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 » HTTP Inputnode to MQOutput Node

Post new topic  Reply to topic
 HTTP Inputnode to MQOutput Node « View previous topic :: View next topic » 
Author Message
chedullarameshbabu
PostPosted: Sun Feb 24, 2008 1:56 pm    Post subject: HTTP Inputnode to MQOutput Node Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Sun Feb 24, 2008 2:41 pm    Post subject: Re: HTTP Inputnode to MQOutput Node Reply with quote

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
View user's profile Send private message
chedullarameshbabu
PostPosted: Sun Feb 24, 2008 2:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Feb 25, 2008 1:18 am    Post subject: Reply with quote

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
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 » HTTP Inputnode to MQOutput Node
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.