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 » namespace and schema location in ESQL

Post new topic  Reply to topic
 namespace and schema location in ESQL « View previous topic :: View next topic » 
Author Message
gaurav.udgir
PostPosted: Tue Jun 09, 2009 8:42 pm    Post subject: namespace and schema location in ESQL Reply with quote

Apprentice

Joined: 18 May 2009
Posts: 32

Hi All,

I am having a XML in the following format:

<root xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:test test.xsd" xmlns="urn:iso:std:iso:20022:tech:xsd:test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" test="123"><test>
<order>
<MsgId>ABCDE</MsgId>
</order>
</test>
</root>

In the above message I need to get the value of the MsgId in a variable in ESQL. I am unable to handle the namespaces and schema location in the root element and getting the field as empty.

I tried using
SET value4 = FIELDVALUE(InputRoot.XMLNSC.root.test.order.(XMLNSC.Field)MsgId);

Please help.

Thank you.

Regards,
Gaurav
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Tue Jun 09, 2009 9:23 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Your message has XML namespace... where as you are not accessing the fields with namespace in ESQL... try accessing the fields by specifying the namespace..
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
gaurav.udgir
PostPosted: Tue Jun 09, 2009 9:58 pm    Post subject: Reply with quote

Apprentice

Joined: 18 May 2009
Posts: 32

Hi,

I tried to do that using the following code:
SET value1 = FIELDVALUE(InputRoot.XMLNSC.(XML.Element)*[1].*:schemaLocation);
SET value2 = FIELDVALUE(InputRoot.XMLNSC.root.(XMLNSC.DoubleNamespaceDecl)xmlns);
SET value3 = FIELDVALUE(InputRoot.XMLNSC.root.(XMLNSC.DoubleNamespaceDecl)"xmlns:xsi");
SET value4 = FIELDVALUE(InputRoot.XMLNSC.root.test.order.(XMLNSC.Field)MsgId);

But the result is still the same.

Please let em know if I am missing anything.

Regards,
Gaurav
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Tue Jun 09, 2009 10:58 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Did you try something like this?
Code:
InputRoot.XMLNSC.NS1:root.NS1:test.NS1:order.NS1:MsgId;

Where NS1= "urn:iso:std:iso:20022:tech:xsd:test"

_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 10, 2009 12:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

gaurav.udgir wrote:
Please let em know if I am missing anything.


What you're missing is a user trace; the single most useful way of determining what the broker's actually doing.

The problem would seem to be that this:

Code:
SET value4 = FIELDVALUE(InputRoot.XMLNSC.root.test.order.(XMLNSC.Field)MsgId);


does not allow for the XML document's default namespace.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » namespace and schema location in ESQL
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.