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 » Referencing Message Tree In Filter Node

Post new topic  Reply to topic
 Referencing Message Tree In Filter Node « View previous topic :: View next topic » 
Author Message
bdaoust
PostPosted: Wed Dec 17, 2014 10:21 am    Post subject: Referencing Message Tree In Filter Node Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 130

Hello everyone:

I'm calling a web service and getting a response back. In a FILTER node, I want to be able to reference a field within that response, but having trouble doing so.

The response looks somewhat like :

Code:
Message
  Properties
  HTTPReponseHeader
  HTTPRequestHeader
  SOAP
     Content
     Header
     Body
        ValidateForLineOffReponse
           ValidateForLineOffResult
              IsLineOffAvail (this is a boolvalue)

So in the FILTER esql right after the SOAP Request node, I'm doing

Code:
IF Root.Message.SOAP.Body.ValidateForLineOffReponse.ValidateForLineOffResult.IsLineOffAvail is TRUE THEN
    RETURN TRUE;
ELSE
    RETURN FALSE;
END IF;


Doesn't seem I'm picking up the IsLineOffAvailvalue, it's null, but I know by using the debugger, it does have a value.

Any idea?

Thanks,
Brian
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 17, 2014 10:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You're not using namespaces.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 17, 2014 10:30 am    Post subject: Re: Referencing Message Tree In Filter Node Reply with quote

Grand High Poobah

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

bdaoust wrote:
Any idea?


Is the element in a namespace the debugger isn't showing but the ESQL is honouring?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bdaoust
PostPosted: Wed Dec 17, 2014 10:48 am    Post subject: Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 130

Code:
Message
  Properties
  HTTPReponseHeader
  HTTPRequestHeader
  SOAP
     Content
     Header
     Body
        ValidateForLineOffReponse
           ValidateForLineOffResult
              IsLineOffAvail (this is a boolvalue)


Under ValidateForLineOffResponse there is
xmlns with a value of http://abc.com
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 17, 2014 11:03 am    Post subject: Reply with quote

Grand High Poobah

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

bdaoust wrote:
Under ValidateForLineOffResponse there is
xmlns with a value of http://abc.com


Exactly.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bdaoust
PostPosted: Wed Dec 17, 2014 1:10 pm    Post subject: Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 130

Thank you. I was able to get the correct syntax after doing a trace.

I can't get my head around why you have to explicitly refer to the namespace for each element you are going after. I would think if they are all siblings, you shouldn't have to.

Have a great night.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 17, 2014 1:11 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

bdaoust wrote:
I can't get my head around why you have to explicitly refer to the namespace for each element you are going after. I would think if they are all siblings, you shouldn't have to.

Because that's how Broker builds the message tree, and how you have to access it...
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 17, 2014 1:28 pm    Post subject: Reply with quote

Grand High Poobah

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

bdaoust wrote:
I can't get my head around why you have to explicitly refer to the namespace for each element you are going after. I would think if they are all siblings, you shouldn't have to.


Each element of an XML document is in a namespace or not. If the element is not in a namespace (like ValidateForLineOfResponse) then it's called ValidateForLineOfResponse. If it's in a namespace, then it's called abc.com:IsLineOffAvail and that's the name you have to use. If it's a sibling of another element that happens to be in the same namespace, so what? You can mix and match namespaces in a document; they exist so you can have 2 distinct elements foo.com:jim & bar.com:jim in the same document.

This is W3C not broker.

Also, the way you've written it, the 3 elements in the body are not siblings, but children of each other.
_________________
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 » Referencing Message Tree In Filter Node
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.