Author |
Message
|
Frnd |
Posted: Tue May 03, 2011 1:18 am Post subject: Issue in retreiving value from a SOAP message |
|
|
Apprentice
Joined: 04 Jun 2007 Posts: 33
|
Hi
I am trying to retreive a value from a soap input message. The input message is as follows:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xyz="http://xyz.com/">
<soapenv:Header/>
<soapenv:Body>
<xyz:getdata>
<arg0>500</arg0>
</xyz:getdata>
</soapenv:Body>
</soapenv:Envelope>
And the ESQL code I am using is
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xyz NAMESPACE 'http://xyz.com';
DECLARE INMSG CHAR;
SET INMSG = InputRoot.XMLNSC.soapenv:Envelope.soapenv:Body.xyz:getdata.arg0;
I have selected the Local Env & message in compute node.I am using WMB 7001.Not sure what I 'm missing over here.Can anyone please help me with this.. |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 03, 2011 1:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Thanks for the description of what you are doing, but you did not tell us what your problem is. What happens when you execute this code?
Not sure whether it is just a typo, but this code
Code: |
DECLARE xyz NAMESPACE 'http://xyz.com'; |
does not use the same namespace URI as your instance document.
When you post snippets of code or XML, please us [c o d e] tags - it makes the code a lot easier to read. Untidy formatting annoys the reader, and makes it less likely that you will get a helpful response. |
|
Back to top |
|
 |
Frnd |
Posted: Tue May 03, 2011 11:33 pm Post subject: |
|
|
Apprentice
Joined: 04 Jun 2007 Posts: 33
|
Thanks Kimbert. Will take care of it. The issue I am facing is the variable INMSG is not getting populated. |
|
Back to top |
|
 |
kimbert |
Posted: Wed May 04, 2011 12:15 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Correct that namespace URI. That should fix the problem. If it doesn't, take a user trace and read it carefully - it will almost certainly tell you what the problem is. |
|
Back to top |
|
 |
Frnd |
Posted: Wed May 04, 2011 12:32 am Post subject: |
|
|
Apprentice
Joined: 04 Jun 2007 Posts: 33
|
Yes Kimbert. There was amimatch in the URI. But now I am getting the repons as below.Don't where NS1 came from and how to get this issue resolved
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<NS1:getdata xmlns:NS1="http://xyz.com/">
<arg0>500</arg0>
</NS1:getdata>
</soapenv:Body>
</soapenv:Envelope> |
|
Back to top |
|
 |
kimbert |
Posted: Wed May 04, 2011 2:33 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your output message tree needs to define a namespace prefix for "http://xyz.com/". So you need to add a namespace declaration to your output message tree. Please search the infocenter for 'XMLNSC namespace declaration' |
|
Back to top |
|
 |
|