You want to be able to see when the client program hands off control to the service running in Enterprise Server.
The code that calls the service is contained in the MakeCheckAppt-proxy.cbl file. Because the program hands off control at two points in its execution – first to run the MakeAppt operation, and second to run the CheckAppt operation – set a breakpoint at each hand-off point in the code so you can step through the program from there.
call "InvokeService03"
This is the call that hands execution off to the Web service. You want to set a breakpoint on the code that executes just before it, which is:
move 256 to wsc-srvc-faultstring-len
call "InvokeService03"and set another breakpoint on the line of code that precedes it.
To successfully run the MakeCheckAppt Web service using the debugger in Eclipse, you must create a debug configuration to set the proper environment.
This shows that all debug Web services are invoked by a request from the client.
.
This places an entry into the Debug view for the client application.
The client invokes a console named runm, and waits for input.
on the Windows task bar.
| Service Address | leave blank |
| Username | leave blank |
| Password | leave blank |
| Operation | 1 |
| lnk_customer_name | Benton Riley |
| lnk_consultant_id | 8706 |
| lnk_date.lnk_yyyy | 2525 |
| lnk_date.lnk_mm | 1 |
| lnk_date.lnk_dd | 1 |
| lnk_time_slot | 5 |
The client application then resumes execution, and pauses on the breakpoint set on the move 256 to wsc-srvc-faultcode-len statement.
twice to step just past the
call "InvokeService03" statement and into
schedule.cbl, which opens in an Eclipse window.
.
to terminate
MakeCheckAppt-app.dll execution.
Here you rerun the client, selecting the other operation to see that the appointment has been made.
| Service Address | leave blank |
| Username | leave blank |
| Password | leave blank |
| Operation | 2 |
| lnk_customer_name | Benton Riley |
| lnk_consultant_id | 8706 |
| lnk_date.lnk_yyyy | 2525 |
| lnk_date.lnk_mm | 1 |
| lnk_date.lnk_dd | 1 |
The client application then resumes execution, and pauses on the move 256 to wsc-srvc-faultcode-len statement.
repeatedly to step through the code until the appointment you set appears on the list in the
runm client. You should see it on line
[00005] because it is the fifth appointment set for that day.
to terminate execution and stop debugging.
This concludes the tutorial.