Author |
Message
|
deecee |
Posted: Wed Mar 16, 2016 9:08 am Post subject: HTTPRequest Node with ESQL PROPAGATE |
|
|
Acolyte
Joined: 11 Sep 2014 Posts: 51
|
Hello,
Product: IIB v9
I have the following scenario,
FileInput -> COmpute -> HttpRequest -> Compute -> FileOutput
The web service requires basic authentication.
Scenario 1
- When I do a simple copy entire message in compute node
- fill the identity fields in Property with username and password
- set bar file to default propagation
The web service gets invoked correctly.
Scenario 2
- When I create a message and use PROPAGATE To 'out' in my compute node
- fill the identity fields in Property with username and password
- set bar file to default propagation
The flow fails, saying identity fields aren't populated and it fails in compute node PROPAGATE statement.
Scenario 3
- When I create a message and use PROPAGATE To 'out' in my compute node
- fill the identity fields in Property with username and password
- do not set bar file to default propagation
The flow crosses HTTPRequest, but the web service returns an authentication required error message.
How do I solve this issue when I have to propagate multiple messages from the compute node to HTTPRequest? |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Mar 16, 2016 11:41 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
How are you 'creating' the message tree on the second and subsequent propagates?
Why not put a trace node after the compute node, set the patternt to ${Root) and you can see it all in its glory.
Then compare the message trees. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
deecee |
Posted: Wed Mar 16, 2016 11:52 am Post subject: |
|
|
Acolyte
Joined: 11 Sep 2014 Posts: 51
|
I wasn't resetting the tree on subsequent propagates, assuming it would be taken from the compute node.
But now I have used Security PEP node immediately after the compute node, and now it's working fine.
Although I do not know if this is the best solution. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Mar 16, 2016 10:57 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
This is why whenever I use PROPAGATE, I do this
Code: |
set OutputRoot = NULL; -- make sure the is nothing in the OutputRoot
set OutputRoot.Properties = InputRoot.Properties;
--
-- Optionally create/copy other headers here
--
--
-- Add specific data to OutputMessage Tree in say OutputRoot.XMLNSC.....
--
PROPAGATE to Terminal 'outn';
|
This way I can be sure of having the correct message tree when it gets to the next node in the flow.
Everyone has their own style/way of doing stuff like this. Not all are 100% right and not all are 100% wrong.  _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
maurito |
Posted: Wed Mar 16, 2016 11:29 pm Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
deecee wrote: |
- do not set bar file to default propagation
|
I don't know what you mean by that. You do not set the bar file to propagate.
deecee wrote: |
I wasn't resetting the tree on subsequent propagates, assuming it would be taken from the compute node.
But now I have used Security PEP node immediately after the compute node, and now it's working fine.
Although I do not know if this is the best solution. |
The PROPAGATE deletes the message tree by default. If you want to keep the propagated message for subsequent processing, use
Code: |
PROPAGATE DELETE NONE;
|
You can also read about the propagate statement in the documentation, it has a few other options. |
|
Back to top |
|
 |
deecee |
Posted: Tue Mar 22, 2016 12:22 pm Post subject: |
|
|
Acolyte
Joined: 11 Sep 2014 Posts: 51
|
I am using propagate delete none.
But when the message comes back a second time, even though I am setting Identity fields in the Properties folder in the output tree, the output tree isn't getting populated with the values. It's taking blank values and hence failing the second time around.
This works perfectly in IIB 10, but this isn't working on IIB 9 |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 22, 2016 12:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
deecee wrote: |
I am using propagate delete none.
But when the message comes back a second time, even though I am setting Identity fields in the Properties folder in the output tree, the output tree isn't getting populated with the values. It's taking blank values and hence failing the second time around.
This works perfectly in IIB 10, but this isn't working on IIB 9 |
Well you have been told that there are multiple options coming with the propagate statement. I believe one of these options is telling it what to propagate (message, localenvironment, exception tree, etc...)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|