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 » Parse and access fields of a HTTP response

Post new topic  Reply to topic
 Parse and access fields of a HTTP response « View previous topic :: View next topic » 
Author Message
amrit
PostPosted: Fri Oct 27, 2017 4:15 am    Post subject: Parse and access fields of a HTTP response Reply with quote

Newbie

Joined: 24 Oct 2017
Posts: 5

Hello users,
I am building a flow(In Broker Toolkit using ESQL) where I am suppose to receive a XML response from a HTTP request node and i need to parse it and access the DocId which has multiple occurrence, here I am posting my xml response
Code:
<?xml version="1.0"?>
<List>
<type>MAILBOX</type>
<DOCS>
<DocId>39fece005f28qrn8000003r5</DocId>
<DocNo>123</DocNo>
</DOCS>
<DOCS>
<DocId>39fece005f28qrn8000003r6</DocId>
<DocNo>456</DocNo>
</DOCS>
<DOCS>
<DocId>39fece005f28qrn8000003r7</DocId>
<DocNo>789</DocNo>
</DOCS>
<DOCS>
<DocId>39fece005f28qrn8000003r8</DocId>
<DocNo>258</DocNo>
</DOCS>
<DOCS>
<DocId>39fece005f28qrn8000003r9</DocId>
<DocNo>147</DocNo>
</DOCS>
</List>

I am getting the response but I am not able to access DocId.
Please suggest some way to parse it and to access it .


Last edited by amrit on Fri Oct 27, 2017 7:17 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 27, 2017 4:55 am    Post subject: Re: Parse and access fields of a HTTP response Reply with quote

Grand High Poobah

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

amrit wrote:
I am getting the response but I am not able to access DocId.


Why not? Religious objections? A giant lizard put it's head through the window and told you not to? Your keyboard's broken?

amrit wrote:
Please suggest some way to parse it


The XML parser built into IIB seems an obvious choice

amrit wrote:
to access it .


ESQL, Java, Mapping node or any other facility of IIB that can reference an IIB message tree. What you're trying to achieve is as simple as falling off a log when the log's been greased and there's an anvil tied to your back, so you've got a lot of flexibility in what you can use.
_________________
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 » Parse and access fields of a HTTP response
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.