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 » Obtain a Specific namespace From Multiple Namespaces

Post new topic  Reply to topic
 Obtain a Specific namespace From Multiple Namespaces « View previous topic :: View next topic » 
Author Message
sathish.mani
PostPosted: Tue Mar 10, 2015 1:20 pm    Post subject: Obtain a Specific namespace From Multiple Namespaces Reply with quote

Newbie

Joined: 19 Nov 2014
Posts: 8

I am new to the message broker and ESQL and I am not sure how to obtain a specific namespace in a tag when there is more than one namespaces .

<return ns1='abc' ns2 = 'xyz' />

I need to obtain the value 'abc' which is namespace ns1. I beleive FIELDNAMESPACE(return) doesnt work when there is more than one.

Is there any way to specify the namespace name (ns1) to get that particular one..

Appreciate any help
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 10, 2015 2:03 pm    Post subject: Re: Obtain a Specific namespace From Multiple Namespaces Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

sathish.mani wrote:
I am new to the message broker and ESQL and I am not sure how to obtain a specific namespace in a tag when there is more than one namespaces .

<return ns1='abc' ns2 = 'xyz' />

I need to obtain the value 'abc' which is namespace ns1. I beleive FIELDNAMESPACE(return) doesnt work when there is more than one.

Is there any way to specify the namespace name (ns1) to get that particular one..

Appreciate any help

FIELDNAMESPACE does so work even if more than one namespaces are defined.
What you are missing here is that what you want is the namespace declaration type. So inspect the children and find the type with PARSER.XMLDecl or PARSER.XMLDeclaration ... Replace PARSER here with XMLNS or XMLNSC .... have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sathish.mani
PostPosted: Tue Mar 10, 2015 4:25 pm    Post subject: Re:Obtain a Specific namespace From Multiple Namespaces Reply with quote

Newbie

Joined: 19 Nov 2014
Posts: 8

None of the children are of that type. Just to brief on my question, it is an incoming soap message where the <body> has a <return> tag with attributes and namespaces looking like this
<soap:Body>
<response>
<return xsi:type='dealer' xmlns:ns1:'http://abc.com'>
--
--
</return>
</response>
</soap:Body>

I am trying to obtain the attribute 'type' of value 'dealer' and assign it to a variable. Thanks for your help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 11, 2015 4:29 am    Post subject: Re:Obtain a Specific namespace From Multiple Namespaces Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

sathish.mani wrote:
None of the children are of that type. Just to brief on my question, it is an incoming soap message where the <body> has a <return> tag with attributes and namespaces looking like this
<soap:Body>
<response>
<return xsi:type='dealer' xmlns:ns1:'http://abc.com'>
--
--
</return>
</response>
</soap:Body>

I am trying to obtain the attribute 'type' of value 'dealer' and assign it to a variable. Thanks for your help.

Well return has a number of children in the tree. Among the children of return you have
  • a child with FIELDNAME () = 'type' and namespace xsi, value 'dealer', type XMLNSC.Attribute
  • a child with FIELDNAME() = 'ns1' namespace xmlns, value 'http://abc.com' type XMLNSC.NamespaceDecl

Hope this helps
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sathish.mani
PostPosted: Wed Mar 11, 2015 6:19 am    Post subject: Re:Obtain a Specific namespace From Multiple Namespaces Reply with quote

Newbie

Joined: 19 Nov 2014
Posts: 8

fjb_saper wrote:
sathish.mani wrote:
None of the children are of that type. Just to brief on my question, it is an incoming soap message where the <body> has a <return> tag with attributes and namespaces looking like this
<soap:Body>
<response>
<return xsi:type='dealer' xmlns:ns1:'http://abc.com'>
--
--
</return>
</response>
</soap:Body>

I am trying to obtain the attribute 'type' of value 'dealer' and assign it to a variable. Thanks for your help.

Well return has a number of children in the tree. Among the children of return you have
  • a child with FIELDNAME () = 'type' and namespace xsi, value 'dealer', type XMLNSC.Attribute
  • a child with FIELDNAME() = 'ns1' namespace xmlns, value 'http://abc.com' type XMLNSC.NamespaceDecl

Hope this helps


I dont have any child of <return> of the field name 'type' with namespace xsi... It is available only as an attribute of the <return> tag. I need to make use of this value 'dealer', is there any command to make use of it??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 11, 2015 7:37 am    Post subject: Re:Obtain a Specific namespace From Multiple Namespaces Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

sathish.mani wrote:

I dont have any child of <return> of the field name 'type' with namespace xsi... It is available only as an attribute of the <return> tag. I need to make use of this value 'dealer', is there any command to make use of it??

It shows that you are not listening and know little about the way the product uses and manipulates XML.
Any attribute of the return tag is portrayed as a child of the return element in the XMLNSC tree with type XMLNSC.Attribute...
Put a trace node into the flow with ${Root} and look at how the message tree unfolds...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sathish.mani
PostPosted: Wed Mar 11, 2015 7:52 am    Post subject: Re:Obtain a Specific namespace From Multiple Namespaces Reply with quote

Newbie

Joined: 19 Nov 2014
Posts: 8

fjb_saper wrote:
sathish.mani wrote:

I dont have any child of <return> of the field name 'type' with namespace xsi... It is available only as an attribute of the <return> tag. I need to make use of this value 'dealer', is there any command to make use of it??

It shows that you are not listening and know little about the way the product uses and manipulates XML.
Any attribute of the return tag is portrayed as a child of the return element in the XMLNSC tree with type XMLNSC.Attribute...
Put a trace node into the flow with ${Root} and look at how the message tree unfolds...


It works now. I understood what you were saying but there was an error in code and that's why it is not working for me. But yeah I am new to message broker and hoping to learn a lot. Thanks for your help.
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 » Obtain a Specific namespace From Multiple Namespaces
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.