Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services - Invocation framework (WSIF) > Use WSIF to invoke web services > Link a WSIF service to the underlying implementation of the service > Link a WSIF service to a JMS-provided service


Write the WSDL extension that lets your WSIF service access a SOAP over JMS service

We can write a WSDL extension that enables your Web Services Invocation Framework (WSIF) service to access a SOAP service that uses the JMS as its transport mechanism. This topic assumes that you chose and configured a JMS provider when you installed WAS (either the default messaging provider, or another provider such as the WebSphere MQ messaging provider). If not, do so now as described in Choosing a messaging provider.

If a SOAP message contains only XML, it can be carried on the JMS (JMS) transport mechanism with the JMS message body type TextMessage. The SOAP message, including the SOAP envelope, is wrapped with a JMS message and put on the appropriate queue. The container receives the JMS message and removes the SOAP message to send to the client.

Use the following procedure, and associated code fragments, to help you to write the WSDL extension that enables your WSIF service to access a SOAP over JMS service.

You can also use this procedure as a guide to writing the WSDL binding extension for SOAP over HTTP, because the SOAP over JMS binding is almost identical to the SOAP over HTTP binding.


Procedure


Example


<!-- Example: SOAP over JMS Text Message -->

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
        name="StockQuoteInterfaceDefinitions"
        targetNamespace="urn:StockQuoteInterface"
        xmlns:tns="urn:StockQuoteInterface"
        xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:jms="http://schemas.xmlsoap.org/wsdl/jms/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:message name="GetQuoteInput">  
<part name="symbol" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="GetQuoteOutput">  
<part name="value" type="xsd:float"/>
</wsdl:message>

<wsdl:portType name="StockQuoteInterface">  
<wsdl:operation name="GetQuote">      
<wsdl:input message="tns:GetQuoteInput"/>      
<wsdl:output message="tns:GetQuoteOutput"/>  
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="StockQuoteSoapJMSBinding" type="tns:StockQuoteInterface">  
<soap:binding style="rpc"
                 transport="http://schemas.xmlsoap.org/soap/jms"/>  
<wsdl:operation name="GetQuote">      
<soap:operation soapAction="urn:StockQuoteInterface#GetQuote"/>      
<wsdl:input>          
<soap:body use="encoded" namespace="urn:StockQuoteService"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>      
</wsdl:input>      
<wsdl:output>          
<soap:body use="encoded" namespace="urn:StockQuoteService"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>      
</wsdl:output>  
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="StockQuoteService">  
<wsdl:port name="StockQuoteServicePort"
                      binding="sqi:StockQuoteSoapJMSBinding">             
<jms:address destinationStyle="queue"
                     jndiConnectionFactoryName="myQCF"
                     jndiDestinationName="myQ"
                     initialContextFactory="com.ibm.NamingFactory"
                     jndiProviderURL="iiop://something:900/">
              
<jms:propertyValue name="targetService"
                                        type="xsd:string"
                                        value="StockQuoteServicePort"/>
     
</jms:address>

 
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

WSIF and WSDL
Write the WSDL extensions that let your WSIF service access a service at a JMS destination
Enable a WSIF client to invoke a web service through JMS
Link a WSIF service to a JMS-provided service

+

Search Tips   |   Advanced Search