WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

Package examples.webservices.client.dynamic_wsdl

This example shows how to create a dynamic client application that invokes a non-WebLogic Web service.

Package examples.webservices.client.dynamic_wsdl Description

This example shows how to create a dynamic client application that invokes a non-WebLogic Web service whose WSDL is published at the following URL:
http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl

The example also shows how you can create a proxy server in a separate command shell to view the request and response SOAP messages as the Web service operation is invoked.

The Main client application uses the javax.xml.rpc.Call JAX-RPC class to dynamically discover the operations of the Web service, as well as its parameters, and then call it with the appropriate values.

Additional Resources for examples.webservices.client.dynamic_wsdl
build.xml The Java Ant build script that runs the client application.
Main.java Client application that invokes the Web service.

 

The following sections describe how to build and run the example.

  1. Prerequisites
  2. Build the Example
  3. Run the Example

 

Prerequisites

Before you run this example, you need:

 

Build the Example

To build the example, follow these steps:
  1. Set up your development shell as described in Quick Start.

  2. Change to the SAMPLES_HOME\server\src\examples\webservices\client\dynamic_wsdl directory, where SAMPLES_HOME refers to the examples WebLogic Server domain directory.

  3. Assemble and compile the example by executing the Java ant utility at the command line:
    prompt> ant

 

Run the Example

  1. Open a new command window.

  2. Set up your development shell in this new command window as described in Quick Start.

  3. Start the proxy server window using the following command:
    java weblogic.webservice.tools.debug.ProxyServer -port 5001 

  4. In another command window, run the Main Java application using the following command:
    prompt> ant run 

    NOTE: You do not need to start WebLogic Server because the application invokes a Web service from a different vendor rather than one running on WebLogic Server.

  5. See the command window that is running the proxy server for the request and response SOAP message generated by the client application and the Web service.

 

See Also

Read more about:
Documentation is available at
http://e-docs.bea.com/wls/docs70/

Copyright © 2002 BEA Systems, Inc. All rights reserved.