Introduction Now that we have a SOAP Web service containing our Legacy COBOL application, the next question is, how can we access it from a client? This tutorial gives a possible client-side scenario of how to use JSP to present the server information. The tutorial uses client-side Web services code to connect to the Web service. The JSP side of the application is based on and explains the JSP and servlet areas in depth. So this tutorial focuses mainly on the client Web services code and the layer which joins the two sides together. The different parts of the client are: 1. The Micro Focus COBOL history is a perfect illustration of customers continuing to derive value and future innovation from previous IT investments. An idea conceived in the 1950s, it has grown and adapted and evolved and supports a vast number of enterprises today. For Micro Focus, COBOL is still one of the largest assets in the portfolio. Build the native COBOL sample on your local Windows machine. Copy the application and the symbols file to a remote Windows machine. On the remote machine, start a cobdebugremote or cobdebugremote64 process at a specified port. Configure the Firewall to allow the Micro Focus Debugger Proxy V2. A servlet which is used to receive the user requests using a Web browser. This uses JSP to present the HTML. Bridge code which takes the servlet request and transforms it into an object for the client-side SOAP request, receives the server response and passes it back to the servlet. Client-side code (generated from the WSDL) which handles the SOAP request to the server and the response back. Prerequisites You need the following software installed. In addition, you need to have completed the available on the Micro Focus Community Web site. Client-Side From Axis2 The first stage is to generate the client-side Axis2 code. This will send SOAP requests to the Web service and receive SOAP responses from the Web service. This code will be generated from the WSDL created in the. Braun manuals 4169. The entire client-side code will be created in a new Dynamic Web Project. Start Visual COBOL for Eclipse and specify a workspace (to change the current workspace click File > Switch Workspace > Other). In the Workspace Launcher dialog, enter an appropriate path and folder in the Workspace field such as [path] workspace.clientdemo and click OK. For each new workspace, you need to set the preferences for Axis2 and the Web Services. For instructions, see the configuration page in the. The steps to set up the Dynamic Web Project are exactly the same as the Web Service Tutorial – follow steps 1-11. For a project name use ClientTest1 instead of DynWebTest1. To import the WSDL project from the Web service workspace, click File > Import 6. Expand General, click Existing Projects into Workspace and then click Next. Use Browse button to select the Web service workspace. Make sure only the wsdl project is selected. Check Copy projects into workspace and then click Finish. This will add the wsdl project that contains BookLegacy.wsdl to Project Explorer. Generation of Client-Side Code Now the WSDL will be run through the Axis2 tool to generate the client code. The client code contains the logic to turn types into XML and pass them to the server using SOAP. It also contains the code to receive XML from the server using SOAP (which contains the response data), parse it, and create types to pass to the main application. Right-click BookLegacy.wsdl in the wsdl project. Click New > Telugu christian audio songs. Other. Type web service in the text box. This will show Web Service Client under Web Services. Click this and then click Next to open the Web Services dialog. Figure 1 Web Service Client Make sure the Web service runtime shows Apache Axis2. Spectrasonics trilian rapidshare. Click it to change this if necessary. On the next page click Generate a synchronous client. Click Finish. Axis2 will now generate the client-side stub program. In the Project Explorer view, expand the src folder and all sub folders to display the file added by Axis2: The following file has been generated: BookLegacyStub.java. This is the synchronous client which waits for a response from the server after sending a request. BookLegacyStub.java To view some of the methods we will use in our own Java code open the Outline View. In the IDE, click Window > Show View > Outline. Double-click BookLegacyStub.java in the Project Explorer. The Outline View displays these methods. Follow the instructions in the Addendum of the to add this file to the WebContent/WEB-INF folder.
0 Comments
Leave a Reply. |