Cloud Application Integration (On-Premises) : Service Development : Debugging Java Services : Debugging a Java Service while its Class Runs in Designer
Debugging a Java Service while its Class Runs in Designer
 
Viewing Service Results from Debugging a Java Service
Use the following procedure to debug a Java service by debugging the Java class in the Service Development Project.
Note:  
As a secondary method of debugging a Java service, you can debug a Java service that is running in Integration Server. This method requires setup on the Integration Server to change the way the server starts and that can affect the server’s performance. For more information, see About Debugging a Java Service while its Class Runs in Designer .
To debug a Java service
1. Open the Java service you want to debug by double clicking the service in the Package Navigator view.
2. Optionally, set breakpoints in the primary method of the Java service.
To do so, in the Java service editor double click in the left margin next to the executable lines of code where you want breakpoints. Designer displays the breakpoint-enabled icon () in the margin. For more information, see “How to Suspend Execution of a Java Class while Debugging and the Eclipse Java Development User Guide.
3. Generate the test harness. For instructions, see Creating a Test Harness.
4. Optionally, create a Java Application launch configuration. For instructions, see Creating a Java Application Launch Configuration“0.
If you do not create a Java Application launch configuration, Designer will create one automatically when you perform the next step.
5. Open the test harness in the editor, or select it in the Project Explorer view or Package Explorer view, and then select Run > Debug As > Java Application.
*If you have no launch configuration for this test harness, Designer creates one and uses it
*If you have a single launch configuration for this test harness, Designer uses it.
*If you have multiple launch configurations for this test harness, Designer prompts you to select the launch configuration you want to use.
6. If you did not update the test harness to provide Integration Server login credentials, the test harness prompts you for the credentials. Specify the user name/password to connect to Integration Server and click OK.
7. If the Java service being tested has declared input parameters, the test harness displays an Enter Input for serviceName dialog box to prompt you for input values. To specify inputs, do one of the following:
*Type values into the Values column. For more information, see Entering Input for a Service.
*To load the input values that match the structure of the service input signature from a file, click Load to locate and select the file containing the input values.
*To load input values from a file and replace the service input signature with the structure and data types in the file, click Load and Replace.
For more information about loading inputs from a file, see Loading Input Values.
8. Optionally, click Save Inputs to save the input values that you have specified so that you can use them to load input values in the future. For more information, see Saving Input Values.
9. Click OK to start launch the Java class in debug mode.
The debugger executes the Java class. If you have set breakpoints or used the Stop in main option, the debugger suspends execution where you specified. If execution is suspended, Designer switches to the Debug perspective. For more information, see How to Suspend Execution of a Java Class while Debugging.
10. If execution suspends, use the views in the Debug perspective to inspect the state of the Java service and the actions in the Debug view toolbar to resume the execution. For more information about using the debugger, see the Eclipse Java Development User Guide.
When the execution ends, Designer displays the Output for serviceName window with the service results.
11. In the Output for serviceName window, optionally click Save Inputs to save the service results to a file.
This might be useful if you are testing another service that takes the results of this service as input. When debugging the next service you can load the results as input to execute that service.
12. Click OK to close the Output for serviceName window.
About Debugging a Java Service while its Class Runs in Designer
About Test Harnesses
Creating a Test Harness
About Java Application Launch Configuration
Creating a Java Application Launch Configuration
Updating a Java Application Launch Configuration
Supplying Input Values to a Service
How to Suspend Execution of a Java Class while Debugging
Viewing Service Results from Debugging a Java Service
About Debugging a Java Service while it Runs in Integration Server
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback