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 » Message Broker web service request

Post new topic  Reply to topic
 Message Broker web service request « View previous topic :: View next topic » 
Author Message
harvanmp
PostPosted: Fri Apr 25, 2008 8:23 am    Post subject: Message Broker web service request Reply with quote

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
View user's profile Send private message
madi
PostPosted: Fri Apr 25, 2008 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
harvanmp
PostPosted: Fri Apr 25, 2008 9:05 am    Post subject: Reply with quote

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
View user's profile Send private message
madi
PostPosted: Fri Apr 25, 2008 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message
harvanmp
PostPosted: Fri Apr 25, 2008 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Apr 25, 2008 10:06 am    Post subject: Reply with quote

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
View user's profile Send private message
harvanmp
PostPosted: Fri Apr 25, 2008 10:23 am    Post subject: Reply with quote

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
View user's profile Send private message
harvanmp
PostPosted: Fri Apr 25, 2008 11:02 am    Post subject: Reply with quote

Newbie

Joined: 25 Apr 2008
Posts: 5

Quote:
Create Field OutputLocalEnvironment.Variables DOMAIN("XMLNSC")


causes a syntax error?
Back to top
View user's profile Send private message
madi
PostPosted: Fri Apr 25, 2008 1:04 pm    Post subject: Re: Message Broker web service request Reply with quote

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
View user's profile Send private message
amyshannon
PostPosted: Wed Jun 18, 2008 11:09 am    Post subject: Reply with quote

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
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 » Message Broker web service request
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.