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 » HttpInputNode and HttpReplyNode in two separate flows?

Post new topic  Reply to topic
 HttpInputNode and HttpReplyNode in two separate flows? « View previous topic :: View next topic » 
Author Message
Gogol
PostPosted: Thu Nov 15, 2012 11:24 am    Post subject: HttpInputNode and HttpReplyNode in two separate flows? Reply with quote

Newbie

Joined: 16 Jul 2012
Posts: 8

Hi Again,

I am trying to make 2 flows within the same Execution Group.
HttpInputNode>ComputeNode>MQOutPutNode

MQInputNode>ComputeNode>HttpReplyNode.

I am passing the request Identifier using a Shared variable to the second flow and setting it correctly within the compute node.
But the Requesting application is not getting a response.

I have'nt tried setting all the HttpResponse Header manually. I will give it a try but I am not very confident of this to be working.
Any Explanations crossing your mind

MB v6.1 being used here
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Nov 15, 2012 11:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Standard version disclaimer: V6 is end-of-life : upgrade.

There were substantial HTTP node improvements with FPs 2-4 for V7 (ie. 7.0.0.2-7.0.0.4). Before you spend too much time troubleshooting, you may want to update your WMB to later versions. V8 preferable.

Your approach is accurate. Rather than a shared variable, store the 24-byte Http reply Id in the Msg Id of the outgoing message, then read the correl Id of the reply MQ message.

Be sure to set the reply Id into the LocalEnvironment.

Get the scenario to work in one flow first, then break apart the one flow into two parts.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Thu Nov 15, 2012 5:14 pm    Post subject: Re: HttpInputNode and HttpReplyNode in two separate flows? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Gogol wrote:
I am passing the request Identifier using a Shared variable to the second flow and setting it correctly within the compute node.

Message flows don't share (ESQL) variables. Please explain in more detail how the request Identifier is passed from one message flow to the other, and demonstrate that it's actually working as expected.

lancelotlinc wrote:
Standard version disclaimer: V6 is end-of-life : upgrade.

More precisely, WMB v6.0 has reached the End of Support. But WMB v6.1 has not.
Back to top
View user's profile Send private message
Gogol
PostPosted: Fri Nov 16, 2012 11:05 am    Post subject: Reply with quote

Newbie

Joined: 16 Jul 2012
Posts: 8

Thanks Lancelotlinc,

Its a good idea to use your way, by avoiding Shared Variable. But I am sending a XML message to the Http Input Node, and I guess the in such a scenario the message has to be a BLOB for the http Reply Node to make a reply.

It is throwing exceptions saying Expected Blob but received Character.

I have tried setting the reply-protocol as http and content-type as text/xml but no luck.
Back to top
View user's profile Send private message
Gogol
PostPosted: Fri Nov 16, 2012 11:09 am    Post subject: Reply with quote

Newbie

Joined: 16 Jul 2012
Posts: 8

Hi rekarm01,

The two flows mentioned by me in my question reside in the same message flow, but they are not connected. So I guess in that situation you may use Shared variable to pass the ReplyIdentifier.
Back to top
View user's profile Send private message
wbi_telecom
PostPosted: Fri Nov 16, 2012 11:26 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

A better design would be to combine the 2 flows into 1 using MQGET node after MQOutput. No need for the shared variable. No need to store the reply Identifier as HTTPRequest and HTTPResponse are in the same flow. Generate a new message id and Correl id in your MQOutput and use a compute node to copy them in MQMD. User get by CorrelID in your MQGet.
So your flow is
HTTPInut-- Compute ---MQOutput--compute --MQGet---Compute---HTTPOutput.
We use this design a lot in our environment for sending web requests to CICS.
Cheers,
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Nov 16, 2012 11:47 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

wbi_telecom wrote:
A better design would be to combine the 2 flows into 1 using MQGET node after MQOutput. No need for the shared variable. No need to store the reply Identifier as HTTPRequest and HTTPResponse are in the same flow. Generate a new message id and Correl id in your MQOutput and use a compute node to copy them in MQMD. User get by CorrelID in your MQGet.
So your flow is
HTTPInut-- Compute ---MQOutput--compute --MQGet---Compute---HTTPOutput.
We use this design a lot in our environment for sending web requests to CICS.
Cheers,


Be sure to explicitly set transaction mode to ' no ' if you do this.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kash3338
PostPosted: Sat Nov 17, 2012 4:34 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Gogol wrote:

I am trying to make 2 flows within the same Execution Group.
HttpInputNode>ComputeNode>MQOutPutNode

MQInputNode>ComputeNode>HttpReplyNode.


Is the MQOutput Queue 1st flow and the MQInput queue of 2nd flow the same in the two flows. I hope its not, and if yes there is no point of having two flows at all.

If it is going to a third party application which is MQ based, then the Reply Identifier can be set in the MQRFH2 headers and passed between the 2 flows.

wbi_telecom wrote:

HTTPInut-- Compute ---MQOutput--compute --MQGet---Compute---HTTPOutput.
We use this design a lot in our environment for sending web requests to CICS.
Cheers,


In this case, what if the reply comes to the second Queue after certain unknown time interval? The response will be ASync over MQ in general. How does this design handle that?
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Sat Nov 17, 2012 1:37 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Gogol wrote:
It is throwing exceptions saying Expected Blob but received Character.

For help with that, please be more specific. What part of which message flow is throwing exceptions? What exception(s) is "it' throwing, exactly? What part of the message (request identifier, message body element, etc.) is expected to be a BLOB?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Nov 18, 2012 9:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20700
Location: LI,NY

rekarm01 wrote:
Gogol wrote:
It is throwing exceptions saying Expected Blob but received Character.

For help with that, please be more specific. What part of which message flow is throwing exceptions? What exception(s) is "it' throwing, exactly? What part of the message (request identifier, message body element, etc.) is expected to be a BLOB?


My guess is the RelpyIdentifier... but then this is just a guess...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Gogol
PostPosted: Mon Nov 19, 2012 10:12 am    Post subject: Reply with quote

Newbie

Joined: 16 Jul 2012
Posts: 8

Yes it is the ReplyIdentifier , nice guess fjb_saber .
I did a blunder by copying the ReplyIdentifier as CHARACTER, after changing it to BLOB, the flow works like charm. It was a mistake from my side.

Thanks everybody for posting, A good discussion helps in learning.

And yes the MQRFH2 looks like a good idea too.
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 » HttpInputNode and HttpReplyNode in two separate flows?
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.