Reconfiguring a Web Service by Changing the Transport

This sample documentation describes the way to convert a transport for a Web Service

Prerequisites

TIBCO Enterprise Message Service must be running.

Sample Description

Converting a transport for a Web Service:

  • From SOAP over HTTP to SOAP over JMS
  • From SOAP over JMS to SOAP over HTTP
For more information, see Accessing Samples.

Before performing the following steps, import the SOAP over HTTP ZipCodeServiceProvider.zip project from the File Explorer view by double-clicking the project zip file in TIBCO Business Studio™ for BusinessWorks™.

Set the default application profile to match the OS you are running on. For more information, see Setting the Default Application Profile.

Converting the Transport from SOAP over HTTP to SOAP over JMS

Procedure

  1. Create and configure a JMS Connection shared configuration resource.
  2. Navigate to the Module Descriptors > Components tab and select ZipPort service.
  3. Click the Bindings tab, and in the Transport Configuration section, change the Transport Type from HTTP to JMS.
  4. Create the JMS Connection shared resource with default or custom values using the JMS Connection wizard after changing the Transport Type to JMS.
  5. Change the Messaging Style to Queue in the JMS Connection shared resource.
  6. Create JNDI Configuration shared resource with default or custom values.
  7. Test the connection using the Test Connection button.
  8. Click Bindings > Transport Configuration and specify the JMS Destination value as queue.sample or a custom queue name.
  9. In the TIBCO Enterprise Message Service server, create a queue with queue.sample name, if a queue was not created earlier, using the TIBCO Enterprise Message Service Administration option.
  10. Click the Generate Concrete WSDL for SOAPServiceBinding binding link in the Binding configuration. Use the Generate WSDL wizard to generate a new concrete WSDL.
  11. Delete the previous concrete WSDL, to avoid WSDL cache exceptions, located under Service Descriptors > Special Folders that contains HTTP transport details.
  12. Specify the folder location where you want to generate the concrete WSDL file.
  13. Clear the Embed options (Abstract WSDL and Schema) check boxes, if both Service and Client are under the same project module.
  14. Click OK in the WSDL generated successfully confirmation dialog box.
  15. Overwrite (if required) with ActiveMatrix BusinessWorks 5.x client concrete WSDL file.
  16. Go to the Web Service Client project (ActiveMatrix BusinessWorks 5.x) in TIBCO Designer and click the Browse option in SOAP Request Reply activities to select the Service/Operation from the newly imported WSDL file. Optionally click Reload to get WSDL configurations.
  17. Click Transport Connection to test the connection status.

Result

The Client and Server are executed.

Converting the Transport from SOAP over JMS to SOAP over HTTP

Before performing the following steps, import the ZipCodeLookup.zip project from the File Explorer view by double-clicking the project zip in TIBCO Business Studio for BusinessWorks.

Procedure

  1. Create an HTTP Connection shared configuration resource, and configure the HTTP Host and Port details.
  2. Navigate to the Module Descriptors > Components tab and select ZipPort service.
  3. Click the Bindings tab, and in the Transport Configuration section, change the Transport Type from JMS to HTTP.
  4. Create the HTTP Connection shared resource with default or custom values using the HTTP Connection wizard after changing the Transport Type to HTTP.
  5. Click the Generate WSDL for SOAPReferenceBinding binding link in the Binding configuration. Use the Generate WSDL wizard to generate a new concrete WSDL.
  6. Clear the Embed options (Abstract WSDL and Schema) check boxes, if both Service and Client are under same project module.
    If required, overwrite with the existing Client concrete WSDL file.
  7. Click OK in the WSDL generated successfully confirmation dialog box.
  8. Navigate to Module Descriptors > Components tab and select ZipPort Reference.
  9. Delete the previous SOAPReferenceBinding configured with JMS transport.
  10. Optionally, configure the HTTP Client shared resource to override the custom configurations.
  11. To avoid WSDL cache exceptions, delete the previous concrete WSDL located under Service Descriptors > Special Folders that contains JMS transport details.

Example

Important: If the previous concrete WSDL is not removed or deleted, you see two portTypes. Choose the default selected portType, which is HTTP.
Note: If you are using Context mappings on Client binding, you must reconfigure the Context mappings.

Result: The Client and Server are executed successfully.