You need to do the tutorials in this book in the order shown by the Tutorials Map.
Whichever type of service you created from your COBOL program, and whatever type of client you are invoking it from, you can use the debugging facilities provided to debug it.
The recommended approach to debugging requires no code changes. You must, however, associate your project with an enterprise server that is configured to allow debugging. This server can be on the local or a remote machine. In addition, you must make sure that the application files deployed to the server include the .idy files for the application.
When you begin debugging, Net Express presents a dialog in which you enter details of the service instance that you want to debug. It then contacts the enterprise server to register its interest in any service instance that matches these details. Having done this, it waits for the enterprise server to notify it when such a service begins.
Whenever a service is started, the enterprise server checks to see if it matches the information supplied by Net Express. If it does, the server attaches the Net Express debugger to the service.
If Net Express and the project Mapdemo aren't open, open them now.
This displays the Enterprise Server Administration home page. The current status column tells you whether or not a server is started.
This displays a screen containing tabs that provide detailed administrative options.
A page is displayed asking you to confirm that you want to continue.
The value in Current Status changes to "Stopping" and if you have Show local console checked on the Edit Server page, the enterprise server console daemon window briefly appears indicating the progress of the processs of stopping the server. After a few seconds, click Refresh to check if the server has stopped. When the Current Status changes to "Stopped", continue to the next step.
The value in Current Status changes to "Starting" and if you have Show local console checked on the Edit Server page, the enterprise server console daemon window appears indicating the progress of the process of starting the server. After a few seconds, click Refresh to check that the server has successfully started. When the server has started, the Current Status changes to "Started". You can now move on to the next step.
This displays a dialog with a dropdown list of available enterprise servers on your machine.
You can debug the service whether you are debugging the client or simply running it. We will debug just the service:
The dialog displayed enables you to specify the details of the service that you want to debug.
If you are debugging the EJB service:
Net Express now passes the service details to the enterprise server and waits for the service to start.
You can now start the deployed service by using one of the client programs that you generated earlier.
If you are debugging the Web service, use the Generated COBOL Client for Web services:
If you are debugging the EJB service, use the JSP client for EJB:
For WebSphere, enter the URL http://localhost:9080/JMapServ/JMapServMain.jsp.
You now return to your debugging session. If the Net Express IDE for your debugging session is minimized, restore it.
The IDE opens, displaying book.cbl ready for debugging.
The IDE debugger now waits for the service to start again.
You may find that the Web service client has returned error 0015. This is a time-out, and is simply caused by the time you took in debugging. If you find this a problem, you can change the time-out interval - edit the file mfclient.dat in Net Express\Base\bin and insert:
[default]
timeout=nn
where nn is the desired timeout period in seconds (at run time the figure is rounded up to a multiple of 5).
This is the end of this path through the tutorials. To continue to another tutorial, go to the topic Tutorials and Demos.
Copyright © 2006 Micro Focus (IP) Ltd. All rights reserved.