274 Building SOA-based Solutions for IBM System i Platform
problems” on page 273. You can view the packets to determine whether the information was
WebSphere Development Studio client - debugger
In the development of existing applications including RPG and COBOL acting as service
provider or service consumer a useful tool is the debugger built into WebSphere
Development Studio client. The debugger allows you to step line by line through the RPG
code as it is interacted within a services model.
Using the WebSphere Development Studio client debugger
In this section, we demonstrate how to use the host application debugger. We show this using
the Web services client RPG application that we described in Chapter 9, “IBM Web Services
Client for ILE (RPG, C, C++, COBOL)” on page 195, a service client written in RPG was
demonstrated in detail. Follow these steps:
1. Open the Remote Systems Explorer perspective with Window → Open Perspective →
Other (see Figure C-10).
Figure C-10 Switch perspective
Note: In this section we use RPGCODE/RPGTEST program to demonstrate debugging
technique. You need to replace this name with your program’s name as you perform
276 Building SOA-based Solutions for IBM System i Platform
4. On the Add Library List Entry frame, enter the library of source code in the Additional
Library field (see Figure C-13) and click OK.
Figure C-13 Library List Entry
5. In Remote Systems Explorer frame expand into the library that contains, in our example,
the QRPGLESRC source file. This file includes the RPG source code member.
6. Right-click the RPG source member and select Compile (Prompt) → CRTRPGMOD (see
Figure C-14 Compile RPG
Appendix C. Useful tools 277
7. Select *ALL in the Debugging views field and click OK (see Figure C-15).
Figure C-15 Include Debug Code
8. Repeat the steps 9.2.7, “Compiling C modules and Create service program” on page 217
to complete the generating the client code.
9. Using WebSphere Development Studio client, right-click the source code library and
278 Building SOA-based Solutions for IBM System i Platform
10.Right-click RPGTEST → Debug (Service Entry) → Set Service Entry Point (see
Figure C-16 Set Service Entry Point
Figure C-17 STRDBGSVR
11.On the 5250 panel in which the debug server is running, issue the command CALL
Attention: A warning might appear indicating that you need to start the debug server
on the System i host (Figure C-17). Open a 5250 session your System i platform and
issue the command STRDBGSVR. After Debug Server starts repeat the previous step.