W3C home > Mailing lists > Public > public-soap-jms@w3.org > December 2008

RE: SOAP over JMS

From: <Sanjeev_Dokiburra@ibi.com>
Date: Mon, 01 Dec 2008 18:40:06 +0000
Message-ID: <8EC4F0A8AC7A6D40BF9C55E32249A916068EB68D@IBIUSMBSA.ibi.com>
To: <phil_adams@us.ibm.com>
Cc: <public-soap-jms@w3.org>, <public-soap-jms-request@w3.org>
Phil,

 

Once again thank you very much for clarifying  soapAction usage.   Appreciate your help.

 

Rgds,

Sanjeev

From: Phil Adams [mailto:phil_adams@us.ibm.com] 
Sent: Monday, December 01, 2008 1:32 PM
To: Dokiburra, Sanjeev
Cc: public-soap-jms@w3.org; public-soap-jms-request@w3.org
Subject: RE: SOAP over JMS

 


Sanjeev, 
1) Your use of the soap action is incorrect.      Normally, the soapAction value is specified in the WSDL being used by the client application.   It may be omitted however.   If specified in the WSDL, then the value would be sent (by the underlying runtime) across the transport (HTTP or JMS) in addition to the SOAP Envelope and would then be used by the server as a means of correctly targetting the request.   There may be other uses for soapAction or there may be other ways in which it is used by the server, but I'm describing it from the standpoint of a Java EE-compliant application server. 
In your example, your client is calling the "Call.setTargetEndpointAddress()" method and you should pass in a URL object which is the JMS-style endpoint location URL for the request (e.g. "jms:jndi:jms/MyQueue?jndiConnectionFactoryName=jms/MyCF") 

2) I'm not aware of any generally-available web services that use the JMS transport.   And I think the reason for this is that a web service application that uses a messaging-type environment (as opposed to HTTP) would most likely be entirely behind a company's firewall and self-contained within that company's intranet.      I don't think you'll find many messaging-type applications that are available on the "galactic internet" so to speak. 

 



From: 

<Sanjeev_Dokiburra@ibi.com> 

To: 

Phil Adams/Austin/IBM@IBMUS 

Cc: 

<public-soap-jms@w3.org>, <public-soap-jms-request@w3.org> 

Date: 

12/01/2008 10:20 AM 

Subject: 

RE: SOAP over JMS

 

________________________________




Phil, 
  
1.       So I guess the value of soapAction attribute in the WSDL has to be used while constructing  SOAP service call  as below(even though it is using JMS transport).  Please correct me if I am way off base. 
Service service = new Service(); 
                  Call call = (Call) service.createCall(); 
                  call.setTargetEndpointAddress(new java.net.URL(“soapAction”)); 
  
2.       I would like to test my client by connecting to a JMS webservice.  Wondering if there is any webservice exposed with jms transport, for public usage.  If so could you please send across the WSDL and corresponding sample request ? 
  
Thanks in advance, 
Sanjeev 
From: Phil Adams [mailto:phil_adams@us.ibm.com <mailto:phil_adams@us.ibm.com> ] 
Sent: Tuesday, November 25, 2008 12:07 PM
To: Dokiburra, Sanjeev
Cc: public-soap-jms@w3.org; public-soap-jms-request@w3.org
Subject: RE: SOAP over JMS 
  

1) The soapAction value is not specific to either the HTTP or JMS transport.   The soapAction value of "http://example.com/GetLastTradePrice <http://example.com/GetLastTradePrice> " is perfectly valid to use for an operation that will be invoked with SOAP/JMS.   The fact that it starts with "http:" is merely a coincidence and does not necessarily mean that the HTTP transport is used to invoke the operation.   soapAction is independent of the transport and is simply used as a means for identifying the operation that should be invoked on the server. 

2) The "targetService" property in the endpoint location URI is used to specify the name of the port component that is the target of the request on the server.    This value is used by the server to determine which web service implementation class is used (among other things).     In practice, the port component name is sometimes (or even often times) the same as the WSDL port name, but it doesn't need to be the same.   The port component name must be unique within the application module (EJB jar, WAR file, etc.) in which it is contained.    To determine what value you should use for this on the client, you'll need to inspect the service to see what the port component name is.    This is part of the JSR 109 deployment model.     If, on the other hand, you're not using or concerned with a Java EE compliant runtime, then you can likely omit the targetService property from the endpoint location URI. 



From: 

<Sanjeev_Dokiburra@ibi.com> 

To: 

Phil Adams/Austin/IBM@IBMUS 

Cc: 

<public-soap-jms@w3.org>, <public-soap-jms-request@w3.org> 

Date: 

11/25/2008 07:57 AM 

Subject: 

RE: SOAP over JMS


  

 

________________________________





Hello Phil, 
 
Thank you very much for prompt response.  Those are the points that I am looking for. Appreciate your time in clarifying my questions.  For further understanding, would you mind helping with following questions ? 
 
1.       Can you please provide jms action snippet equivalent for below(http coincidence is little confusing me): 
 
<operation name="GetLastTradePrice"> 
        <wsdl11soap11:operation soapAction="http://example.com/GetLastTradePrice"/> 
        <input> 
            <wsdl11soap11:body use="literal"/> 
        </input> 
        <output> 
            <wsdl11soap11:body use="literal"/> 
         </output> 
      </operation> 
               
2.       Can I have port name &  targetservice with same name as below ? 
<wsdl11:port name="stockquote" binding="tns:StockQuoteSoapJMSBinding">
         <wsdl11soap11:address location="jms:jndi:myQueue?targetService=stockquote"/>
</wsdl11:port>

 
Rgds, 
Sanjeev 
From: Phil Adams [mailto:phil_adams@us.ibm.com <mailto:phil_adams@us.ibm.com> ] 
Sent: Monday, November 24, 2008 9:42 PM
To: Dokiburra, Sanjeev
Cc: public-soap-jms@w3.org; public-soap-jms-request@w3.org
Subject: RE: SOAP over JMS 
 

Sanjeev, 
The fact that the soap action value "looks" like an HTTP url is just a coincidence.  It doesn't  mean that it is related to the HTTP transport per se.    The soap action value is simply an identifier for the intended action (e.g. operation). 
As for your second question, I assume you're referring to this from section 3.4.1 of the binding spec: 
40       <wsdl11:port name="StockQuotePort_jms" binding="tns:StockQuoteSoapJMSBinding">
41           <wsdl11soap11:address location="jms:jndi:myQueue?targetService=stockquote"/>
42       </wsdl11:port>

In this example, the targetService property indicates the name of the port component which is the target of the request. 





From: 

<Sanjeev_Dokiburra@ibi.com> 

To: 

Phil Adams/Austin/IBM@IBMUS 

Cc: 

<public-soap-jms@w3.org>, <public-soap-jms-request@w3.org> 

Date: 

11/24/2008 04:34 PM 

Subject: 

RE: SOAP over JMS


  


  

________________________________






Phil, 

I would be glad if someone from the group could answer below questions. 

1)      I am wondering about   the presence of http in SOAP Action attribute.  For JMS transport,  do we need to have  http action ? 
25         <wsdl11soap11:operation soapAction="http://example.com/GetLastTradePrice <http://example.com/GetLastTradePrice> "/> 

2)      What does last parameter (after ?) in address location stands for ? 


Thanks & Rgds, 
Sanjeev 
From: Phil Adams [mailto:phil_adams@us.ibm.com <mailto:phil_adams@us.ibm.com> ] 
Sent: Wednesday, November 19, 2008 10:47 AM
To: Dokiburra, Sanjeev
Cc: public-soap-jms@w3.org; public-soap-jms-request@w3.org
Subject: RE: SOAP over JMS 


Hi Sanjeev, 
Well, I certainly wouldn't want to be in a position to have to implement all the SOAP processing from scratch.   Have you looked into the use of one of the open source engines, such as Axis2, etc.?    In fact, I think Axis2 already has some sort of SOAP/JMS implementation, although I don't know if it supports the SOAP/JMS binding spec just yet. 



From: 

<Sanjeev_Dokiburra@ibi.com> 

To: 

Phil Adams/Austin/IBM@IBMUS 

Cc: 

<public-soap-jms@w3.org>, <public-soap-jms-request@w3.org> 

Date: 

11/19/2008 09:32 AM 

Subject: 

RE: SOAP over JMS


  



  

________________________________







Hi Phil, 

Thank you very much for the response.  It was my mistake that I did not put up my question in right way.   In fact my component should do both functions i.e SOAP sending node & SOAP receiving node.  At this moment I am stuck with SOAP sending node implementation of constructing SOAP request message based on any given WSDL.  It would be really helpful if you can post a sample pseudo code(with respect to any existing soap/jms WSDL, to connect & test as well) for SOAP sending node implementation. Appreciate your time. 

Rgds, 
Sanjeev 
From: Phil Adams [mailto:phil_adams@us.ibm.com <mailto:phil_adams@us.ibm.com> ] 
Sent: Wednesday, November 19, 2008 10:16 AM
To: Dokiburra, Sanjeev
Cc: public-soap-jms@w3.org; public-soap-jms-request@w3.org
Subject: Re: SOAP over JMS 


Hi Sanjeev, 
It sounds like you are implementing (more or less) the "SOAP receiving node" as described in the SOAP/JMS binding spec.   Note that the WSDL binding section of the spec really doesn't apply to the SOAP receiving node, since the WSDL is used by the client runtime (SOAP sending node) to construct the request message.    So you basically just need to receive the JMS message off the queue or topic, then use the JMS message properties (e.g. SOAPJMS_contentType) along with the body of the message (the format of the body will be described by the SOAPJMS_contentType property value) to de-serialize the request.   Then you would process the request and construct a response message and send it back in a JMS message according to the rules laid out by the SOAP/JMS binding spec.    The hardest part (IMO) is the message de-serialization step, although the code used to do that would basically be the same that's used to de-serialize a message received via HTTP so if your component already supports HTTP, then you are mostly done :) 

Regards, 



From: 

<Sanjeev_Dokiburra@ibi.com> 

To: 

<public-soap-jms@w3.org> 

Date: 

11/19/2008 02:43 AM 

Subject: 

SOAP over JMS


  




  

________________________________








Team, 

I am developing a standalone component, which would pick soap/jms message from a destination, processes it (webservice call) and then returns the response to reply destination.  Could you please give me pointers about java implementation by looking at WSDL.  Wondering whether it would be normal http webservice rpc/document invocation using soapaction mentioned in line-25, after picking up request message.  Any help is appreciated. 

<wsdl11:binding name="StockQuoteSoapJMSBinding" type="tns:StockQuotePortType" 
          xmlns:soapjms="http://www.w3.org/2008/07/soap/bindings/JMS/ <http://www.w3.org/2008/07/soap/bindings/JMS/> "> 
15       <wsdl11soap11:binding style="document" 
          transport="http://www.w3.org/2008/07/soap/bindings/JMS/ <http://www.w3.org/2008/07/soap/bindings/JMS/> "/> 
16 
17       <!-- We want this binding to use a particular CF class --> 
18       <soapjms:jndiConnectionFactoryName> 
19         sample.jms.ConnectionFactory 
20       </soapjms:jndiConnectionFactoryName> 
21       <!-- Specify PERSISTENT delivery mode --> 
22       <soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode> 
23 
24       <wsdl11:operation name="GetLastTradePrice"> 
25         <wsdl11soap11:operation soapAction="http://example.com/GetLastTradePrice <http://example.com/GetLastTradePrice> "/> 
26         <wsdl11:input> 
27             <wsdl11soap11:body use="literal"/> 
28         </wsdl11:input> 
29         <wsdl11:output> 
30             <wsdl11soap11:body use="literal"/> 
31          </wsdl11:output> 
32       </wsdl11:operation> 
33   </wsdl11:binding> 


Thanks & Rgds, 
Sanjeev 




image001.gif
(image/gif attachment: image001.gif)

Received on Tuesday, 2 December 2008 10:59:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:16:19 GMT