Author |
Message
|
flahunter |
Posted: Mon Oct 26, 2009 12:20 am Post subject: SOAPEnvelope example |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
Hi,
Could anyone give me an example on how to set Existing Envelope Location($LocalEnvironment/SOAP/Envelope) when using SOAPEnvelope node to create our own SOAP Header? I tried serval times but failed, also I cannot find any similiar sample by Google. Please help
e.g
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" version="1.0">
<soap:Header>
<Tag1>Test1</Tag1>
<Tag2>Test2</Tag2>
</soap:Header>
... |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Oct 26, 2009 1:11 am Post subject: Re: SOAPEnvelope example |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
flahunter wrote: |
I tried serval times but failed |
What have you tried so far?
Whats in the $LocalEnvironment/SOAP/Envelope location? How was this constructed?
In what way doesnt it work? Do you get an error or is it just that the envelope is missing?
Are you using the support pack or version 6.1 of broker? If the support pack did the documentation that comes with it not help? ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/ia9o.pdf
Else was the infocenter of no use? |
|
Back to top |
|
 |
flahunter |
Posted: Mon Oct 26, 2009 1:27 am Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
I have already read the pdf file and infocenter, but there is no explanation on how to set the value. The ia9o.pdf just checked the "Create new envelope" and automatically generated default SOAP Envelope. So it cannot help me anything.
I don't know how to use it. Just give the value like this,but failed.
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag1 = 'Test1';
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag2 = 'Test2'; |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Oct 26, 2009 2:11 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
flahunter wrote: |
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag1 = 'Test1';
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag2 = 'Test2'; |
Have you modified the compute node to allow you to alter the localenvironment? If you put a trace node after the compute node you should be able to check that the LocalEnvironment is as you would expect (or not!). |
|
Back to top |
|
 |
flahunter |
Posted: Mon Oct 26, 2009 10:06 pm Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
WMBDEV1 wrote: |
flahunter wrote: |
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag1 = 'Test1';
SET OutputLocalEnvironment.SOAP.Envelope.soap:Header.Tag2 = 'Test2'; |
Have you modified the compute node to allow you to alter the localenvironment? If you put a trace node after the compute node you should be able to check that the LocalEnvironment is as you would expect (or not!). |
Sure I did it and also I can find the LocalEnviroment generated successfully.
However it still raised an error like this
A message using an incorrect parser (MQROOT) was detected in node: SOAPEnvelope
thrown from class name: 'com.ibm.broker.soap.SoapWrapperNode', method name: 'assembleSOAPMessage', file: 'SoapWrapperNode.java'
My question is simple. Does any one who can show me an example of giving value to LocalEnvironment to create our own SOAP Header when we select "Existing Envelope Location" properties. Thx |
|
Back to top |
|
 |
rajparekh08 |
Posted: Mon Oct 26, 2009 10:38 pm Post subject: |
|
|
Acolyte
Joined: 21 Sep 2009 Posts: 58 Location: India- Bagalore
|
The SOAPEnvelope node, builds a default SOAP Header.
If you want to change it, the only option I can see is, that you put a message in a queue, with the desired SOAP header, and use MQGET to cal the message, and change the LocalEnvironment, and build the SOAP Header.
In this way, you will be able to build the SOAP Header of your choice.
This is what I could think of, Do try all possible ways. |
|
Back to top |
|
 |
flahunter |
Posted: Mon Oct 26, 2009 10:48 pm Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
Thanks for your answer. It's really a good method:) But I'd like to know the usage of "Existing Envelope Location" propeties in SOAPEnvelope node. It's really haunting me!!! |
|
Back to top |
|
 |
rajparekh08 |
Posted: Mon Oct 26, 2009 11:14 pm Post subject: |
|
|
Acolyte
Joined: 21 Sep 2009 Posts: 58 Location: India- Bagalore
|
HI!
"Existing Envelope Location".. Now when you use SOAPExtract node, you can store this Envelope/Header in the LocalEnvironment. Later on if you want to retrive this envelope, you can use the "Existing Envelope Location", I mean the place where you had previously stored the Soap Header, using the SOAPExtract node. If you try to use this in your SOAPEnvelope node without using the SOAPExtract node to store the Header in the LocalEnvironment, then you are sure to get an error.Hope this clears your confusion. |
|
Back to top |
|
 |
flahunter |
Posted: Mon Oct 26, 2009 11:36 pm Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
rajparekh08 wrote: |
HI!
"Existing Envelope Location".. Now when you use SOAPExtract node, you can store this Envelope/Header in the LocalEnvironment. Later on if you want to retrive this envelope, you can use the "Existing Envelope Location", I mean the place where you had previously stored the Soap Header, using the SOAPExtract node. If you try to use this in your SOAPEnvelope node without using the SOAPExtract node to store the Header in the LocalEnvironment, then you are sure to get an error.Hope this clears your confusion. |
Hi, Rajparekh08
I really appreciate your answer. I read the material of infocenter again, and now it make me clear. This node is designed to be used in conjunction with the SOAPExtract node if we use "Existing Envelope Location". Thanks again:) |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 27, 2009 3:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
|