Implement Java clients calling Web services

Create and test the Web service client.

In this section you use the RAD 6.0 tooling to create a Web service client from the existing SayHello.wsdl.

  1. From the Project Explorer, select Web Services > Services > SayHelloService, and right-click Generate Client.

    Generate Client

  2. At the Web Services pop-up, perform the following actions:

    Ensure that the Client proxy type is set to Java Proxy.

    Select Test the Web service. The Test the Web service option indicates that you want to test the Web service client either through the Web Services Explorer or by generating a test client.

    Web Service Client

    Click Next.

  3. At the Web Service Selection Page pop-up, note that the URI to the WSDL is set to the following:

    platform:/resource/Chapter3EJB/ejbModule/META-INF/wsdl/SayHello.wsdl

    Web Service Selection Page

    Click Next.

  4. At the Client Environment Configuration pop-up, make sure Web service runtime: is set to IBM WebSphere and Server: is set to 000-257.

    Client type: Web

    Client project: Chapter3ClientWeb

    Client EAR project: Chapter3ClientEAR

    Click Next.

    Client Environment Configuration

  5. At the Web Service Proxy Page pop-up, ensure that Security Configuration is set to No Security, and click Next.

    Web Service Proxy Page

  6. At the Web Service Client Test pop-up, perform the following actions:

    Select Test the generated proxy checkbox.

    Test Facility: Web service sample JSPs.

    Clear all methods except greet(...).

    Select Run test on server.

    Web Service Client Test

    Click Finish.

  7. The wizard automatically publishes Chapter3ClientEAR to the test server and launches the generated test client using the following Web address:

    https://localhost:9443/Chapter3ClientWeb/sampleSayHelloProxy/TestClient.jsp

  8. At the resulting Web Services Test Client browser, perform the following actions:

    In the Methods pane, select greet(...).

    In the Inputs pane: Mikalai

    Click Invoke.

    In the Results pane, view the result:

    Web Services Test Client

  9. Close the Web Services Test Client.

BOOT.BY - Tech Industry News         Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     Free SCWCD 1.4 Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free SCBCD 5.0 Study Guide