简体   繁体   中英

JMS on SOAP address location in a WSDL: What does it mean?

I'm looking over a wsdl and it contains a soap:address location tag with a value of jms:/queue?destination=... .

  • What is the use of soap:address value on the WSDL?
  • Will it affect the way on how the client should connect to the web service?

Also, I tried to search Google for jms:/queue?destination=... and the term 'SOAP over JMS' is on the results.

  • What is 'JMS' and what is 'SOAP over JMS'?

I'm working on the client side so I'm concern if I need to make any measures for it. Currently, I only know how to connect to a REST and SOAP web service via HttpUrlConnection .

Below is a sample of the WSDL file: (As seen below, the transport protocol in used is HTTP, but then a service is also using it with a JMS address? I'm a bit confused here. Is this SOAP over HTTP or SOAP over JMS?)

<wsdl:binding name="MethodSOAP_JMS_Binding" type="tns:MethodPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
    <wsdl:operation name="methodName">
        <soap:operation soapAction="" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
        <wsdl:input name="method_Input">
            <soap:body parts="RequestBean" use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
        </wsdl:input>
        <wsdl:output name="method_Output">
            <soap:body parts="ResponseBean" use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>

<wsdl:service name="MethodSOAP_JMS_Service">
    <wsdl:port binding="tns:MethodSOAP_JMS_Binding" name="MethodSOAPPort">
        <soap:address location="jms:/queue?..." xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
    </wsdl:port>
</wsdl:service>

Thanks in advanced!

JMS, Java Message Service, is a Java standard to send reliable messages between systems. A message is never sent directly between systems, like HTTP, but rather stored and forwarded by a JMS compliant server software. A JMS message is some headers and a payload of various type, but for SOAP it's most likely a String payload as SOAP is XML based.

A JMS URL is not as "self-standing" as a HTTP url.

Like this one:

jms:///queue?connectionfactory=MyQCF&destination=MyQ

It says you should connect with a so called Connection Factory called MyQCF and to a destination called MyQ. Exactly what this means must be configured elsewhere, it says nothing about a specific physical server etc. This is common in JMS, since the most common way to setup a connection to a JMS server is via a configuration file or register called JNDI. In that configuration a vendor specifc settings and configuration resolves into which server to contact, which vendor/version of the server, which destination (topic or queue) etc. etc.

There is not really as easy as getting an open source java library and just start. All JMS vendors are unique implementations. (exampels. IBM WebSphere MQ, Apache ActiveMQ, Tibco EMS, OpenMQ, HornetQ). There are some OpenSource and some commercial. You need to figure out which specific JMS vendor is used in your infrastructure, the setup the JMS configuration acording to that vendors documentation. Some vendors allows complete settings in the JMS url, such as ActiveMQ. It still requires the specific library loaded in java.

SOAP over JMS simply uses all the common standards for SOAP such as WSDL, WS-Security etc. but JMS adds reliability and transactionality together with loose coupling which in turn gives robustness in trade for system and configuration complexity.

If you have no specific JMS vendors and libraries in mind, you might want to look at CXF and ActiveMQ to get up and running with SOAP over JMS. Guide can be found here .

Basically JMS is a middleware service for messaging, see: http://en.wikipedia.org/wiki/Java_Message_Service

'soap:address' defines the location of the service.

'SOAP over JMS' means that you send your SOAP request via an JMS queue to the service, see Figure 1: http://www.ibm.com/developerworks/websphere/library/techarticles/0402_du/0402_du.html

On the client side you'll have to connect to the corresponding JMS queue. Depends on your library if this is handled transparently (or supported at all).

Another tutorial: http://www.ibm.com/developerworks/websphere/library/tutorials/0903_adams/index.html

SO has a couple of related questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM