This section demonstrates the use of WebSphere Developer for System z (WD/z) to generate a Web service client and run it in an application server. WD/z generates all the required Java classes to create a Web service request and to receive a Web service response. It also builds a very basic graphical user interface to interact with those classes. RAD users will be able to take advantage of this facility as the wizard is part of the RAD Web service features. As WD/z is built on RAD, this facility is also available under WD/z.
For this example, we generate a client to invoke the GetHash Web service. The only input required is the GetHash.wsdl.
Import the wsdl
The wsdl needs to be in the WD/z work space. If you do not already have a local copy of the wsdl, import the wsdl using File → Import, and then select the import source. Follow the wizard to complete the import.
Start the application server
Start the server before we start to generate the Web client using the wizard because it can take several minutes to start the WebSphere Application Server.
To start the server, select it in the Servers view. Go to Window → Show View → Other, and select Server → Servers, and click OK. This is seen in Figure.
Select the Server view
In the Servers view, right-click the server name, and select Start. This begins the server startup, and progress can be seen in the console view that is dynamically opened. The server view shows the status as in Figure.
The Server view showing startup
A successful startup of the server will show a State of Started and a Status of Synchronized. The Console view shows the following message:
WSVR0001I: Server server1 open for e-business
Generate the client
We are now going to generate a proxy client to test the Web service.
This displays the Web services wizard. There is much richer functionality here than just generating a test client. The slide bar allows you to select the stages of Web service client development. The wizard will take you through the stages Develop - Assemble - Deploy - Install - Test.
We are only interested in testing the Web service using a proxy Java client, so slide the bar to the Test position, as shown in Figure.
There are also options in the Configuration section of the panel in Figure to select the server, runtime, and to change the Web service project name and Web service EAR name that are auto-generated. Because this is just a unit test we left the default of WebServiceProject and WebServiceProjectEAR.
Web Services wizard
Web Service Client Test
Testing the Proxy Client
The result is seen in Figure.
Successful Test Result
This test was successful.
IBM-CICS Related Interview Questions
|VSAM Interview Questions||IBM - VSAM Interview Questions|
|IBM-REXX Interview Questions||JCL Interview Questions|
|IBM DB2 Interview Questions||COBOL Interview Questions|
|IBM-JCL Interview Questions||DB2 Using SQL Interview Questions|
|IBM-JCL&VSAM Interview Questions||IBM Mainframe Interview Questions|
|Mainframe DB2 Interview Questions|
Service-oriented Architecture And Cics
Cics As A Service Provider And Requester
Modern Web Services Development Tools
Development Of The Change Of Address Cics Application
Exposing Our Application As A Web Service
Developing Web Service Clients
Tracing The Change Of Address Scenario
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.