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 » How to see the attibutes values in environment.variables

Post new topic  Reply to topic Goto page 1, 2  Next
 How to see the attibutes values in environment.variables « View previous topic :: View next topic » 
Author Message
mr2kn
PostPosted: Tue Jan 26, 2016 7:40 am    Post subject: How to see the attibutes values in environment.variables Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

Hi,
Required help, in the code I have assign the values to the attributes and copied those values in the Environment.Variables.abc and later I need to merge with other response values and process it, but in the SOAPUI message it shows as child,
in the code I have mentioned

SET OutputRoot.Environment.Variables.x.Status(XMLNSC.Attribute)success = 'false';

in another compute node

SET OutputRoot.Soap.Body.Response = Environment.Variables.x;
and its displaying like this

<Status>
<success>false</success>

and I want like this

<Status success="false">

Thank you and appreciate you help
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 26, 2016 7:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What Domain is being used in the Environment tree?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
mr2kn
PostPosted: Tue Jan 26, 2016 7:50 am    Post subject: Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

DOMAIN is XMLNSC
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 26, 2016 7:55 am    Post subject: Reply with quote

Grand High Poobah

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

mr2kn wrote:
DOMAIN is XMLNSC


Really? Where do you set that? It's not in the code you posted.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mr2kn
PostPosted: Tue Jan 26, 2016 8:01 am    Post subject: Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

Here is the code,
this is in 1 compute node in 1 msgflow
SET OutputLocalEnvironment = InputLocalEnvironment;

CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC');

DECLARE envRefShared REFERENCE TO OutputRoot.XMLNSC.Response;
CREATE LASTCHILD OF OutputRoot.XMLNSC.Response AS envRefShared NAME 'Result';

SET envRefShared.Status.(XMLNSC.Attribute)success = 'false';
SET envRefShared.Status.StatusDetails.(XMLNSC.Attribute)code = '6666';

in another msgflow in compute node
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputRoot.SOAP.Body.Response = Environment.Variables.envRefShared;

Hope this helps
Back to top
View user's profile Send private message
timber
PostPosted: Tue Jan 26, 2016 8:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Same problem as this:
http://www.mqseries.net/phpBB2/viewtopic.php?t=37991&sid=1ce2e27f6e8304278cbdb6d0f8476bd2

Note the use of formatting to separate code from text. It makes things easier to read.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 26, 2016 8:29 am    Post subject: Reply with quote

Grand High Poobah

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

mr2kn wrote:
Here is the code,
this is in 1 compute node in 1 msgflow
SET OutputLocalEnvironment = InputLocalEnvironment;

CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC');

DECLARE envRefShared REFERENCE TO OutputRoot.XMLNSC.Response;
CREATE LASTCHILD OF OutputRoot.XMLNSC.Response AS envRefShared NAME 'Result';

SET envRefShared.Status.(XMLNSC.Attribute)success = 'false';
SET envRefShared.Status.StatusDetails.(XMLNSC.Attribute)code = '6666';


This isn't setting anything in the Environment tree; this is setting OutputRoot.

mr2kn wrote:
in another msgflow in compute node
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputRoot.SOAP.Body.Response = Environment.Variables.envRefShared;


So at no point in either node is there any XMLNSC domain associated with Environment.Variables.

Simply saying:
Code:

SET Environment.Variables.envRefShared = OutputRoot.XMLNSC.response;


copies the content but doesn't associate a domain. If you believe otherwise, why did you use a DOMAIN statement elsewhere in your code?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mpong
PostPosted: Tue Jan 26, 2016 10:16 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

why don't you set the below, are you really setting something in your Environment tree?

SET OutputRoot.Soap.Body.Response.Status(XMLNSC.Attribute)success = 'false';
Back to top
View user's profile Send private message
mr2kn
PostPosted: Tue Jan 26, 2016 10:42 am    Post subject: Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

im able to set the values in environment tree and in the tree im able to see the values under the environment tree, like this I will process other msgflow collect it in environment tree and at final I will merged all response and send back to requestor, and im seeing the response in the soapui but in different format like parent/child instead attribute
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 26, 2016 10:52 am    Post subject: Reply with quote

Grand High Poobah

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

mr2kn wrote:
im seeing the response in the soapui but in different format like parent/child instead attribute


Because the Environment tree doesn't support attributes so it holds any XML attributes as children of their parents. Only the XMLNSC domain supports XML attributes and thus you need to use that as you're using it for OutputRoot and as we keep telling you.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mr2kn
PostPosted: Tue Jan 26, 2016 12:20 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

yes agreed, it will work for 1 msgflow, but I have like that 9 msgflow all are them need to process one by one and hold the response and final merge and send it to requestor

1 request ---- 9 msgflow --- hold response ---- 1 response to requestor
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 26, 2016 12:24 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And?

Have you looked at the samples that come with the product?

Have you reviewed where the Environment is available and where it is not?

Have you reviewed the features of IIB to determine if there's some way you can share data between message flows?

Have you worked with a more senior developer to review your requirements and come up with a working plan to implement?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 26, 2016 12:40 pm    Post subject: Reply with quote

Grand High Poobah

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

mr2kn wrote:
it will work for 1 msgflow,


Not unless you use the XMLNSC domain it won't.

mr2kn wrote:
I have like that 9 msgflow all are them need to process one by one and hold the response and final merge and send it to requestor

1 request ---- 9 msgflow --- hold response ---- 1 response to requestor


Then your design is completely & hopelessly flawed. The Environment tree (irrespective of the domain it uses or doesn't) is specific to one instance of one flow and isn't shared, even with other instances of the same flow never mind 9 separate flows. Even if you rebuilt all the flows into one single flow, you'd need to do some interesting dancing to prevent collisions in the tree.

You need a different design. Ideally one that leverages the functionality built into IIB to handle exactly the design situation you describe (typically known as a fan out / fan in). Less ideally, one that leverages the functionality available to share data across flows (though you'll need your own code to ensure that Reply A is made up of the 9 responses to Request A, and not 3 responses from A, 2 from B, 3 from C and the rest from D.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mr2kn
PostPosted: Tue Jan 26, 2016 2:16 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

Have you looked at the samples that come with the product?
- yes, I have looked at it and try with that but no luck

Have you reviewed where the Environment is available and where it is not?
- yes, reviewed the Environment and values are present and in the log also im able to see in the correct format

Have you reviewed the features of IIB to determine if there's some way you can share data between message flows?
- yes, IIB can share the data between msgflow through environment, so that it cannot lost the data

Have you worked with a more senior developer to review your requirements and come up with a working plan to implement?
- yes, we are also working same but no luck
Back to top
View user's profile Send private message
mr2kn
PostPosted: Tue Jan 26, 2016 4:25 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Jan 2016
Posts: 46

i have vendor given library(xsd,wsdl) and from front-end i will get in 1 request only which has the full requirement and and waiting for the response from 4 from A vendors and 5 from B vendors and the response will get each different timing, and front-end need only 1 response,
so that reason i made separate each subflow and get response and stored in the environment.variables.x and at final club all the response and give it back with 1 reponse
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to see the attibutes values in environment.variables
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.