Author |
Message
|
pkidza |
Posted: Mon Apr 19, 2010 5:39 am Post subject: SOAP 1.2 with the SOAP Nodes |
|
|
Newbie
Joined: 19 Apr 2010 Posts: 3
|
Hi
I was wondering if somebody could please help me out? I am trying to call a web service that is hosted using the Microsoft WCF. The call is being made using HTTP. The service supports SOAP 1.2. I import the WSDL into Broker and it shows me a warning that there are no SOAP 1.1 endpoints on the service. When I try to call the service I get a HTTP 415 error back. I did some research online and it turns out that you get the error when you are calling a service with a different version of SOAP than it is expecting. When I change the Microsoft service to use HTTP 1.1 the Message Broker call works.
The provider of the service wants us to use SOAP 1.2. Is there a switch some where that I can flick that will change the Broker SOAP nodes so that they use SOAP 1.2 or will I have to code something to get the message to work?
Thank you |
|
Back to top |
|
 |
mgk |
Posted: Mon Apr 19, 2010 6:19 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
I'm not sure why you are seeing the errors you mention, but the SOAP node do support SOAP 1.2. Can you post the full text of the error you got when importing and the actual WSDL as well if possible... _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
goffinf |
Posted: Mon Apr 19, 2010 8:13 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
mgk wrote: |
I'm not sure why you are seeing the errors you mention, but the SOAP node do support SOAP 1.2. .. |
Are you sure about that. I was under the impression that the SOAP Envelope and Extract are SOAP 1.1 only?
Not sure whether the OP is using the SOAP Request node or a vanilla HTTPRequest and if the later may be using SOAPEnvelope node to create the message wrapper and possibly the SOAPExtract to unpack the response in which case a problem will likely ensue ?
Fraser. |
|
Back to top |
|
 |
mgk |
Posted: Mon Apr 19, 2010 8:37 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
OK, the SOAPInput, SOAPRequest, SOAPReply, SOAPAsyncRequest and SOAPAsyncResponse nodes support SOAP 1.2. The SOAPExtract and SOAPEnvelope nodes only support SOAP 1.1. Ideally, the SOAPExtract nodes make most sense when used with the basic HTTPNodes as otherwise if you use the SOAPExtract node with a "SOAP Domain" (SOAP Parser) message you loose the benefits that the SOAP Parser gives you. However, it can make it easier to use with the mapping node. The SOAPEnvelope node does not need to be used with the SOAPReply (etc) nodes because the SOAPReply (etc) nodes will automatically wrap the message from other parser with an SOAPEnvelope automatically if one is not present.
Kind Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
pkidza |
Posted: Wed Apr 21, 2010 4:50 am Post subject: |
|
|
Newbie
Joined: 19 Apr 2010 Posts: 3
|
I found out the answer. I had to have a compute node and then use SET OutputRoot.Envelope.SOAP.Context.SOAP_Version = '1.2'; to force the SOAPRequest node to use SOAP 1.2. After doing that it worked fine.
I am now having issue with the SOAPEnvelope node because the line of code doesn't work for that although IBM claim that SOAP 1.1 and SOAP 1.2 is supported. http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/topic/com.ibm.iea.wmb_v6/wmb/6.1/WebServices/WMB61_IEA_WebServices_SOAP_Message_Processing.pdf Page 6 of 9 says that they support both. I get a (0x03000000:NameValue):Text = 'java.lang.RuntimeException: A message using an incorrect parser (SOAP) was detected in node: SOAPEnvelope' (CHARACTER) exception though if I replace the SOAPRequestNode with a SOAPEnvelope node. |
|
Back to top |
|
 |
mgk |
Posted: Wed Apr 21, 2010 5:27 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Why do you want to use the SOAPEnvelope node before the SOAPRequest node? As you are using the SOAP Domain to set the SOAP Version explicitly, the SOAPEnvelope node is unnecessary as the message will already have an envelope create by the SOAP Domain itself. Can you explain more about what you are trying to do here as that would let us help you more...
More generally you should not mix usage of the SOAPExtract and Envelope nodes with usage of the SOAP Domain parser. Ideally you would choose one or the other and stick to that choice throughout a flow, and in many cases (like this one) that choice would be in favour of the SOAPDomain as that usually works best with the SOAP nodes...
Kind Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
pkidza |
Posted: Wed Apr 21, 2010 6:11 am Post subject: |
|
|
Newbie
Joined: 19 Apr 2010 Posts: 3
|
mgk wrote: |
Why do you want to use the SOAPEnvelope node before the SOAPRequest node? As you are using the SOAP Domain to set the SOAP Version explicitly, the SOAPEnvelope node is unnecessary as the message will already have an envelope create by the SOAP Domain itself. Can you explain more about what you are trying to do here as that would let us help you more...
More generally you should not mix usage of the SOAPExtract and Envelope nodes with usage of the SOAP Domain parser. Ideally you would choose one or the other and stick to that choice throughout a flow, and in many cases (like this one) that choice would be in favour of the SOAPDomain as that usually works best with the SOAP nodes...
Kind Regards, |
Ah. My apologies. There have been some changes since my first post.
We have abandoned using the SOAPRequest etc nodes because we don't want to use HTTP. Instead we want to get an XML message, wrap it in a SOAP header and then send it out over MQ.
MQInput -> Compute -> SOAPEnvelope -> MQOutput |
|
Back to top |
|
 |
goffinf |
Posted: Wed Apr 21, 2010 3:13 pm Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
If you want SOAP 1.2 then you'll need to code the construction of the Envelope, [Header] and Body in eSQL, since the Envelope node on;y supports 1.1. Pretty standard stuff so no big deal. |
|
Back to top |
|
 |
mgk |
Posted: Thu Apr 22, 2010 12:42 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
If you want SOAP 1.2 then you'll need to code the construction of the Envelope, [Header] and Body in eSQL |
But as I was trying to say above you don't need to construct an envelope at all if you use the SOAP Domain parser in conjunction with the SOAPRequest. SOAPAsyncRequest or SOAPReply nodes. There job is to take care of all of this for you  _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Apr 22, 2010 1:43 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mgk wrote: |
Quote: |
If you want SOAP 1.2 then you'll need to code the construction of the Envelope, [Header] and Body in eSQL |
But as I was trying to say above you don't need to construct an envelope at all if you use the SOAP Domain parser in conjunction with the SOAPRequest. SOAPAsyncRequest or SOAPReply nodes. There job is to take care of all of this for you  |
But the poster is using MQOutput, and NOT SOAPRequest. SOAPAsyncRequest or SOAPReply.
So they *do* need to construct the envelope themselves.
But it's not *necessary* to do this with *ESQL*. One can just as well use java or php or mapping. (You'd have to import the soap 1.2 predefined message definitions and create a new message that instantiates the body to your data to use mapping). |
|
Back to top |
|
 |
mgk |
Posted: Thu Apr 22, 2010 3:12 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
But the poster is using MQOutput, and NOT SOAPRequest. SOAPAsyncRequest or SOAPReply |
Oh yes, I missed the requirements change  _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
goffinf |
Posted: Sun Apr 25, 2010 6:21 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
mgk wrote: |
But it's not *necessary* to do this with *ESQL*. One can just as well use java or php or mapping. |
Thats true, there are lots of possibilities, and I can bind to any number of libraries that are reachable from supported programmatic languages.
However I was was trying to illustrate that if all that is required is simple a SOAP protocol wrapper around an XML message, that this can be acheived with no more effort than 1 or 2 lines of simple eSQL.
Personally, I like simple, where simple provides all the functioanlity required (and possibly no more). |
|
Back to top |
|
 |
|