ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Issue in retreiving value from a SOAP message

Post new topic  Reply to topic
 Issue in retreiving value from a SOAP message « View previous topic :: View next topic » 
Author Message
Frnd
PostPosted: Tue May 03, 2011 1:18 am    Post subject: Issue in retreiving value from a SOAP message Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Tue May 03, 2011 1:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Frnd
PostPosted: Tue May 03, 2011 11:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Wed May 04, 2011 12:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Frnd
PostPosted: Wed May 04, 2011 12:32 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Wed May 04, 2011 2:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Issue in retreiving value from a SOAP message
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.