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 » retrieving the soap body from environment variable

Post new topic  Reply to topic
 retrieving the soap body from environment variable « View previous topic :: View next topic » 
Author Message
kumar.MBMQ
PostPosted: Mon Jan 20, 2014 7:07 am    Post subject: retrieving the soap body from environment variable Reply with quote

Voyager

Joined: 06 May 2011
Posts: 93

I have one composite service which calls three services.
each time after getting the soap response it stores in environment variable.
like
env.var1= soap.body1;
environment.var2=soap.body2.


is it possible to store the soap body in environment and retrieve the body.
will the value in environment takes care of namespaces which are in soap.body ?



SET Environment.Variables2.ResponseBody.CustAcctListRes=InputRoot.SOAP.Body;
SET OutputRoot.SOAP.Body.ns25:CustomerProfileAggregateRes.ns25:CustShortDtlInqRes.ns25:CustInfo.CustomerID=Environment.Variables1.ResponseBody.CustShortDetailsInquiryRes.custinfo.custid
SET OutputRoot.SOAP.Body.ns25:CustomerProfileAggregateRes.ns25:CustShortDtlInqRes.ns25:CustInfo.Mnemonic=Environment.Variables1.ResponseBody.CustShortDetailsInquiryRes.CustInfo.mnemonic
SET OutputRoot.SOAP.Body.ns25:CustomerProfileAggregateRes.ns25:CustShortDtlInqRes.ns25:CustInfo.PersonInfo.ShortName=Environment.Variables1.ResponseBody.CustShortDetailsInquiry.PersonInfo.ShortName;
will the above code work?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 20, 2014 7:28 am    Post subject: Reply with quote

Grand High Poobah

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

If you park something in the environment tree be aware that you need to assign it a parser first. By default the environment tree has no parser assigned and this will lead you to some surprises and gotchas...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dogorsy
PostPosted: Mon Jan 20, 2014 8:33 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

yes, as fjb_saper said, associate a parser to the tree. And also, use REFERENCEs to avoid those horribly long SET statements and improve performance and readability
Back to top
View user's profile Send private message
kumar.MBMQ
PostPosted: Mon Jan 20, 2014 9:18 am    Post subject: Reply with quote

Voyager

Joined: 06 May 2011
Posts: 93

Thanks for your reply but
I have written statement like .
CREATE LASTCHILD OF Environment.Variables1.ResponseBody1 DOMAIN('XMLNSC') PARSE(X ENCODING 0 CCSID 0);
I am not sure ,What have to write in the place of X ?
I want to write some thing like this
SET Environment.Variables1.ResponseBody1 .XMLNSC = InputRoot.soap.Body;
let me know if I am wrong ?
thanks,
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Jan 20, 2014 10:03 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

kumar.MBMQ wrote:
Thanks for your reply but
I have written statement like .
CREATE LASTCHILD OF Environment.Variables1.ResponseBody1 DOMAIN('XMLNSC') PARSE(X ENCODING 0 CCSID 0);
I am not sure ,What have to write in the place of X ?
I want to write some thing like this
SET Environment.Variables1.ResponseBody1 .XMLNSC = InputRoot.soap.Body;
let me know if I am wrong ?
thanks,


You do not need the PARSE clause in the CREATE, but you need a NAME clause.
In the set you do not need the .XMLNSC

There are examples in the infocenter
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 » retrieving the soap body from environment variable
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.