|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HTTP Inputnode to MQOutput Node |
« View previous topic :: View next topic » |
Author |
Message
|
chedullarameshbabu |
Posted: Sun Feb 24, 2008 1:56 pm Post subject: HTTP Inputnode to MQOutput Node |
|
|
Newbie
Joined: 24 Feb 2008 Posts: 3
|
Hi,
I have created a sample message flow in WBI 6.0
HTTPInputNode --> Trace Node --> ComputNode --> TraceNode --> MQOoutputNode.
When I put a message through URL from HTTInput Node, it is coming to MQOutputNode (defined queue), with zero length message.
I am using below code:
CALL CopyMessageHeaders();
-- Output is MQ, so remove HTTP headers
SET OutputRoot.HTTPInputHeader = null;
-- Add an MQMD
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
SET OutputRoot.MQMD.StrucId = MQMD_STRUC_ID;
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.MsgType = MQMT_DATAGRAM;
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2 ;
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
MbElement mqmd = outRoot.getFirstChild().createElementAfter("MQMD");
mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE,"Format","MQSTR");
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
-- SET OutputRoot.XML.A.MessageID = CAST(InputLocalEnvironment.Destination.HTTP.RequestIdentifier AS CHARACTER);
END;
Please let me know, where I am doing mistake?
I appreciate your help.
Regards,
Ramesh |
|
Back to top |
|
 |
Vitor |
Posted: Sun Feb 24, 2008 2:41 pm Post subject: Re: HTTP Inputnode to MQOutput Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
chedullarameshbabu wrote: |
Please let me know, where I am doing mistake?
|
You're setting the MQMD format to indicate an RFH2 header, but don't set up an RFH2 header.
You're creating a copy of the message of the XMLNSC Domain, then creating a string message after the MQMD. In an interesting way. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
chedullarameshbabu |
Posted: Sun Feb 24, 2008 2:53 pm Post subject: |
|
|
Newbie
Joined: 24 Feb 2008 Posts: 3
|
Even, after removing those ESQL code also, I am facing same problem.
this is comput node ESQL code:
********************************************************
CALL CopyMessageHeaders();
-- Output is MQ, so remove HTTP headers
SET OutputRoot.HTTPInputHeader = null;
-- Add an MQMD
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
******************************************* |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 25, 2008 1:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I'd suggest thinking about what the code is doing, rather than randomly experimenting.
Consider your latest code fragment, which makes no attempt to set up a message body of any kind. Why are you puzzled that there's no output message?
It also sets up an MQMD, but doesn't populate it with any values; this is not going to help.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|