|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HTTPReply node / BLOB problem |
« View previous topic :: View next topic » |
Author |
Message
|
aq |
Posted: Wed Feb 18, 2004 12:42 pm Post subject: HTTPReply node / BLOB problem |
|
|
Apprentice
Joined: 20 Dec 2001 Posts: 47
|
Hello again !
I have need to process the following scenario (on WMQI 5.02):
--> MsgBroker receives SOAP request
--> MsgBroker sends request MQ message to queue told in SOAP request and waits for reply
<-- when the MQ reply message arrives
<-- it replies to the SOAP request.
It's almost working, except the HTTP / SOAP reply fails because I have problem in keeping Destination.HTTP.RequestIdentifier intact, what HTTP reply node uses (step 4.) I'm quit novice with WMQI and ESQL so probably there is some simple solution for this ?
General suggestion to improve this message flow or totally alternative ways to implement this kind of message flow scenario are also more than welcome
The nodes I have used are:
Request part:
1. HTTP Input node
- Receives SOAP request.
2. Compute node
- Decodes SOAP request ESQL procedures (from the IA81 support pack)
3. AggregateControl node
4. Compute node (LocalEnvironment and Message, connected from AggregateControl Out)
- Set's the MQMD and target queue name in MQDestinationList (and because of that the LocalEnvironment is cleared after this compute node )
- Takes copy of ComIbmAggregateControlNode from InputLocalEnvironment to OutputLocalEnvironment (otherwise aggregate reply node fails)
- Tries to take copy of Destination.HTTP.RequestIdentifier from InputLocalEnvironment to OutputLocalEnvironment but fails, the RequestIdentifier datatype is BLOB.
No errors and in OutputLocalEnvironment there is only the Destination.HTTP, the RequestIdentifier and it's BLOB data is missing from there. I have tried to copy it like: "SET OutputLocalEnvironment.Destination.HTTP.RequestIdentifier = InputLocalEnvironment.Destination.HTTP.RequestIdentifier;"
Should I use CAST or ASBITSTREAM or something like that or perhaps there is way that I wouldn't have at all to take these "temp" copies of ComIbmAggregateControlNode and HTTP.RequestIdentifier values ?
5. MQOutput node
- Put's the request message to queue
6. AggregateRequest node
Reply part:
7. AggregateReply
8. MQInput node (connected to AggregateReply node -->In)
- Takes the reply message from the queue
9. Compute node
- Generates the reply data
10. Compute node
- Encodes the SOAP reply message
11. HTTP reply node
- Sends the SOAP reply, but fails because there is no Destination.HTTP.RequestIdentifier data anymore
Alan |
|
Back to top |
|
 |
aq |
Posted: Thu Feb 26, 2004 8:35 am Post subject: |
|
|
Apprentice
Joined: 20 Dec 2001 Posts: 47
|
The real problem was that I first didn't understand that when the MQInput node receives message after AggregateControl, it clears all the LocalEnvironment and Environment data. ... should use more of those trace nodes...
So I need to pass the RequestIdentifier in MQ message or temporary store it in DB, in order to use it after the MQInput node. |
|
Back to top |
|
 |
jfluitsm |
Posted: Sun Feb 29, 2004 2:34 am Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
You should always keep 2 point in mind:
- For every MQInput node a separate thread is running.
- A message flow is stateless, so after a message is processed it doesn't remember anything of the message.
What you have to do is somehow get this info in your reply part.
Suggestions:
- Store in a database.
- Send data out as request, through a dummy flow (only MQInput and MQReply), to the reply flow.
Did you also look at SupportPac IA81? It conatins a lot of info and some routines for handling SOAP. _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
aq |
Posted: Sun Feb 29, 2004 10:22 pm Post subject: |
|
|
Apprentice
Joined: 20 Dec 2001 Posts: 47
|
I did solve this by passing the information with the MQ (request) message, so when the reply arrives it contains the needed "state" information also. It works, but if I in future would have more information to pass I should think of using DB for that (or that dummy flow), as you suggested.
Yes I'm using the IA81currently for SOAP parsing, the next problem that I'm facing is that I would like to make validation for XML message payload that comes inside of SOAP message. But that means that I should define both the message payload (the actual data) part and SOAP part in MRM. The message payload part is fine, but I haven't been able yet to get the SOAP definition part working.
Would there be any idea to make own message flow's for HTTP part ? Then I could skip the SOAP MRM validation part, something like this:
HttpRequestMsgFlow:
http req. --> parse SOAP away --> MQ input (to MQMsgFlow)
MQMsgFlow:
MQ input --> MRM validation to data --> MQ output (request)
MQ input (reply) --> MRM validation to reply data --> MQ output (to HttpReplyMsgFlow)
HttpReplyMsgFlow:
MQ input --> create SOAP reply --> http reply
Alan |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|