Author |
Message
|
limal_raja |
Posted: Thu Sep 23, 2010 6:33 am Post subject: Read values from request xml in the response flow |
|
|
Novice
Joined: 11 Nov 2009 Posts: 19
|
Hi,
I'm new to MessageBroker, just wanted to check if there is anyway to read a value from the request XML in the response flow?
We need to set some values in the response based on the service version which is part of the request message header. We should not modify the existing flow and the request xml is not passed onto the response flow.
How can the above be achieved? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 23, 2010 6:44 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Please read your question again, and think about it carefully. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 23, 2010 6:45 am Post subject: Re: Read values from request xml in the response flow |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
limal_raja wrote: |
We should not modify the existing flow and the request xml is not passed onto the response flow. |
Well if you can't modify the existing flow and the response flow doesn't have access to the request xml where this value is stored it does sound like you're a bit stuck.
limal_raja wrote: |
How can the above be achieved? |
I'd make the required changes in the flow(s) but that doesn't sound like an option for you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
limal_raja |
Posted: Thu Sep 23, 2010 6:50 am Post subject: |
|
|
Novice
Joined: 11 Nov 2009 Posts: 19
|
The scenario is something like this:
We need to populate a new aggregate in the response XML, only if the ServiceVersion is 2 in the request XML, else we need not send this and the response should be as it was before this change implementation.
Can we use Environment Tree or something similar to store the value? Can it be used across request response flows? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 23, 2010 6:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
limal_raja wrote: |
Can we use Environment Tree or something similar to store the value? Can it be used across request response flows? |
Only if the Environment would remain in scope, and this would still require you to modify some flows. Likewise you could use shared variables, a database or a flat file to store the value but you'd still need to make some changes. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 23, 2010 6:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
limal_raja wrote: |
Can we use Environment Tree or something similar to store the value? Can it be used across request response flows? |
No.
limal_raja wrote: |
We need to populate a new aggregate in the response XML, only if the ServiceVersion is 2 in the request XML, else we need not send this and the response should be as it was before this change implementation. |
If nothing is done in the request flow to save the information you need and you are absolutely forbidden from making any change to the request flow to save that information , then you have two choices:
1) Tell management to stuff it and get a new job somewhere else
2) put a new flow IN FRONT of the request flow, that saves the data you need and then calls the original request flow.
Again, you CAN NOT use Environment tree to save this data. There are other options that do cross message flow boundaries and message flow invocation boundaries. The easiest one to use would be to stick the original request XML on a queue and then use an MQGet node to read it back. |
|
Back to top |
|
 |
|