Author |
Message
|
harvanmp |
Posted: Fri Apr 25, 2008 8:23 am Post subject: Message Broker web service request |
|
|
Newbie
Joined: 25 Apr 2008 Posts: 5
|
I am working on a web service proxy message flow that does the following:
http input: accept incoming request
compute node: save off incoming request in local environment and build new request
http request: call external web service to obtain additional information
compute: restore original request and overwrite destination URL of the original request with new information
http request: call intended web service
This message flow fails. Everything works up to the final http request. Looking at the data received by the web service, the http header is received, but there is no body.
If I change the flow to http input, compute, http request with the compute node just rewriting the destination URL, this works.
If I change the flow to http input, compute, compute, http request with the first compute saving off the original request and the second compute restoring the original request, it fails.
I am saving the incoming request using:
SET OutputLocalEnvironment.Variables.(XMLNSC.Folder)savedMessage=InputRoot
and restoring it using:
SET OutputRoot=InputLocalEnvironment.Variables.savedMessage
Thanks for any help! |
|
Back to top |
|
 |
madi |
Posted: Fri Apr 25, 2008 8:53 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Try setting the LocalEnvironment serarately instead of just saying outputroot = inputroot
save localenvironemnt and then add it again
what information are you getting from the first request when u are not using it for the second one (outputroot = inputroot)
--madi |
|
Back to top |
|
 |
harvanmp |
Posted: Fri Apr 25, 2008 9:05 am Post subject: |
|
|
Newbie
Joined: 25 Apr 2008 Posts: 5
|
I'm not sure what you mean by your first 2 statements, can you clarify? What do you mean by "set the LocalEnvironment separately", and what do you mean by "save localenvironment and add it again"?
In the 3 scenarios that I mentioned, I am only doing 2 requests in the first scenario. In that case, I am looking up a new destination URL.
In the other 2 scenarios I am just setting the new destination URL explicitly.
It doesn't seem as though making the first request is causing the problem, since I have the same result without making that request. It seems that I am not saving and restoring my original incoming message correctly. |
|
Back to top |
|
 |
madi |
Posted: Fri Apr 25, 2008 9:50 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
if its just the message u wanna save, why dont you try to copy inputroot.XMLNSC instead of the whole root
--madi |
|
Back to top |
|
 |
harvanmp |
Posted: Fri Apr 25, 2008 9:58 am Post subject: |
|
|
Newbie
Joined: 25 Apr 2008 Posts: 5
|
It is not just the XMLNSC portion that I want to save. I also want the HTTPInputHeader section. I'm not sure about needing the Properties section.
The reason that I am saving the whole message is that I already knew that passing the whole message to an HTTPRequest node worked once I changed the destination URL. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 25, 2008 10:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Create Field OutputLocalEnvironment.Variables DOMAIN("XMLNSC") _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
harvanmp |
Posted: Fri Apr 25, 2008 10:23 am Post subject: |
|
|
Newbie
Joined: 25 Apr 2008 Posts: 5
|
Sorry to be dense, but where in my flow do I need that statement? And can you explain why? |
|
Back to top |
|
 |
harvanmp |
Posted: Fri Apr 25, 2008 11:02 am Post subject: |
|
|
Newbie
Joined: 25 Apr 2008 Posts: 5
|
Quote: |
Create Field OutputLocalEnvironment.Variables DOMAIN("XMLNSC") |
causes a syntax error? |
|
Back to top |
|
 |
madi |
Posted: Fri Apr 25, 2008 1:04 pm Post subject: Re: Message Broker web service request |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
harvanmp wrote: |
I am saving the incoming request using:
SET OutputLocalEnvironment.Variables.(XMLNSC.Folder)savedMessage=InputRoot
|
create the field with the XMLNSC domain and then copy the root or i think u do it both in the same statement
if you more details and "why" go to the online info center and search on the CREATE statement
--madi |
|
Back to top |
|
 |
amyshannon |
Posted: Wed Jun 18, 2008 11:09 am Post subject: |
|
|
Newbie
Joined: 18 Jun 2008 Posts: 1
|
With help from a guru, here's a solution:
To save original message:
CREATE FIRSTCHILD OF OutputLocalEnvironment.Variables.InputMessage DOMAIN('XMLNSC') NAME 'XMLNSC';
SET OutputLocalEnvironment.Variables.InputMessage.XMLNSC = InputRoot.XMLNSC;
SET OutputLocalEnvironment.Variables.Properties = InputRoot.Properties;
SET OutputLocalEnvironment.Variables.HTTPInputHeader.SOAPAction = InputRoot.HTTPInputHeader.SOAPAction;
To restore message:
SET OutputRoot.Properties = InputLocalEnvironment.Variables.Properties;
SET OutputRoot.Properties.MessageDomain = 'XMLNSC';
SET OutputRoot.HTTPRequestHeader."SOAPAction" = InputLocalEnvironment.Variables.HTTPInputHeader.SOAPAction;
SET OutputRoot.XMLNSC = InputLocalEnvironment.Variables.InputMessage.XMLNSC; |
|
Back to top |
|
 |
|