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 » Accessing a field in soap message

Post new topic  Reply to topic
 Accessing a field in soap message « View previous topic :: View next topic » 
Author Message
vijay707
PostPosted: Wed Aug 24, 2005 6:21 am    Post subject: Accessing a field in soap message Reply with quote

Novice

Joined: 12 Feb 2004
Posts: 18

I have the folowing soap message.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ ../org/xmlsoap/schemas/soap/envelope/soap.xsd ">
<soapenv:Header>
<wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:0</wsa:MessageID>
<wsa:ReplyTo xmlns:cnaAddressing="http://www.cna.com/services/runtime/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<wsa:Address>jms://queue?queue=rQueue&amp;manager=Local&amp;deliveryMode=1&amp;timeToLive=1000</wsa:Address>
</soapenv:Header>
<soapenv:Body>
<message:CNAMessage xmlns:message="http://services.cna.com/message">
<dt:test xmlns:dt="http://www.cna.com/services/runtime/data">
<data>one</data>
</dt:test>
</message:CNAMessage>
</soapenv:Body>
</soapenv:Envelope>

I want to access the filed ReplyTo in the soap messsage.
I tried to access using the following code

DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';

DECLARE InputRef REFERENCE TO InputRoot.XMLNS.soapenv:Envelope.soapenv:Header;

set Environment.Variables.Reply_Que = InputRef.ReplyTo.Address;

But it does not work.Any help would be greatly appreciated.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 24, 2005 6:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The answer to this is obvious from your post.

I'll tell you anyway.

Code:
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE wsa NAMESPACE 'http://schemas.xmlsoap.org/ws/2004/08/addressing';

DECLARE InputRef REFERENCE TO InputRoot.XMLNS.soapenv:Envelope.soapenv:Header;

set Environment.Variables.Reply_Que = InputRef.wsa:ReplyTo.wsa:Address;


Any time you have trouble accessing a field, particularly in the XMLNS, the best way to find out what you need to address it by is with a Trace node dumped to a file. You will see the fully qualified message tree, and can use that to construct the path you need to get to the field you want.
_________________
I am *not* the model of the modern major general.
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 » Accessing a field in 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.