Interoperability of Using JAX-WS Client to Invoke Service

This example illustrates the interoperability of using JAX-WS client to invoke service exposed on TIBCO ActiveMatrix BusinessWorks™.

Prerequisites

Copy the jaxws_sample.wsdl from TIBCO_HOME\bw\n.n\samples\binding\soap\http\JAXWSInterop to the directory specified for “CONCRETE_WSDL_LOCATION_URL” property.

Procedure

  1. In the samples directory, select binding > soap > http > JAXWSInterop and double-click tibco.bw.sample.binding.soap.http.JAXWSInterop. For more information, see Accessing Samples.
  2. In the Project Explorer, expand tibco.bw.sample.binding.soap.http.JAXWSInterop project.
  3. Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
  4. Fully expand the Processes directory and double-click Client.bwp.
  5. Place the jaxws_sample.wsdl at the location of Module Property value “CONCRETE_WSDL_LOCATION_URL”.
  6. Click Run > Debug Configurations.
  7. At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
  8. Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the check box next to tibco.bw.sample.binding.soap.http. JAXWSInterop.application.
  9. Click Debug.
    This executes the sample in Debug mode.
  10. In TIBCO Business Studio™ for BusinessWorks™, click the Terminate icon to stop the process.

Result

The result shows the following response in the console and the output file:

Response for : Sending JAX-WS client request...

Understanding the Configuration

The sample consists of two processes:

  • tibco.bw.sample.binding.soap.http.jaxwsinterop.Client
  • tibco.bw.sample.binding.soap.http.jaxwsinterop.ServerProcess

Service process exposes an operation to accept an input string and returns string as part of response.

Client process uses a concrete WSDL generated from service to send a request with input parameters and then writes the response to file.

Client process uses a Java Invoke activity that passes the concrete WSDL location to the Java invoke (tibco.bw.sample.binding.soap.http.jaxwsinterop.Client.java) , and JAX-WS client code sets value ("Sending JAX-WS client request...") as input and then sends the request.