| Author | 
		  Message
		 | 
		
		  | mahek | 
		  
		    
			  
				 Posted: Wed May 02, 2007 5:32 am    Post subject: HTTP Request node(does not contain a valid MQMD) | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 10 Sep 2004 Posts: 87
  
  | 
		  
		    
			  
				Hi all,
 
I am using the HTTP REQUEST node in my message flow in message broker 6.0.
 
I am  able to receive the response from the httprequest node but not able to put the message on a queue((does not contain a valid MQMD))
 
 
The flow is like this MqInPut ---->Compute1----->Http Request----->Compute2------>MqOutPut.
 
I am creating the http headers and a soap message in the Compute1 node. Here is the esql for the Compute1
 
 
 
				-- Save the MQMD so we can add it back in again later
 
		SET Environment.myMQMD = InputRoot.MQMD;
 
		-- Copy the Properties folder across
 
		SET OutputRoot.Properties = InputRoot.Properties;
 
		-- Create an HTTP header for the message
 
		
 
		SET OutputRoot.HTTPRequestHeader."Content-Type"='text/xml
 
http : //peoplesoft.com/SOAPTOCI/M_IA_WBI_GLOBAL';
 
		SET OutputRoot.HTTPRequestHeader."User-Agent"='Java1.4.2_03';
 
		SET OutputRoot.HTTPRequestHeader.Host='sltest.weko.loc:8888';
 
		SET OutputRoot.HTTPRequestHeader.Accept = 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2';
 
		SET OutputRoot.HTTPRequestHeader.Connection='keep-alive';
 
		SET OutputRoot.HTTPRequestHeader."Content-length"='714';
 
		
 
		-- Declare the XML namespaces we will be using
 
		DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
 
		DECLARE myNS1 NAMESPACE 'http://tempuri.org/scenario.customer.AccessTrackerEJB';
 
		DECLARE myXSI NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
 
		DECLARE myXSD NAMESPACE 'http://www.w3.org/2001/XMLSchema';
 
		-- Add an XML declaration to the message
 
		SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
 
		SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version) = '1.0';
 
		SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Encoding) = 'UTF-8';
 
		-- Create the SOAP Envelope
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"SOAP-ENV" =
 
		'http://schemas.xmlsoap.org/soap/envelope/' ;
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsi =
 
		'http://www.w3.org/2001/XMLSchema-instance' ;
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsd =
 
		'http://www.w3.org/2001/XMLSchema' ;
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Header".Security.UsernameToken.Username='SLIMEZS';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Header".Security.UsernameToken.Password='test123';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Body".Find__CompIntfc__CUSTOMER.SETID='SHARE';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Body".Find__CompIntfc__CUSTOMER.CUST_ID='1000';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Body".Find__CompIntfc__CUSTOMER.NAME1='';
 
 
Every thing is fine I am getting a reply back from the web services and the reply is coming to the HTTP REQUEST OUT NODE. The esql for the comput2 is 
 
 
SET OutputRoot.MQMD = Environment.myMQMD;
 
SET OutputRoot = InputRoot;
 
 
The error I am getting is does not contain a valid MQMD
 
Can any one help me out in this  problem
 
Thanks in advance | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed May 02, 2007 5:43 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi mahek,
 
 
Use the DOMAIN clause when storing the MQMD into the Environment...search on the forum, you should get some useful links.
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahek | 
		  
		    
			  
				 Posted: Wed May 02, 2007 5:49 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 10 Sep 2004 Posts: 87
  
  | 
		  
		    
			  
				Hi Elvis[[quote]Use the DOMAIN clause when storing the MQMD into the Environment] can you please explain me this
 
Thanks in advance | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dilse | 
		  
		    
			  
				 Posted: Wed May 02, 2007 7:48 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 24 Jun 2004 Posts: 270
  
  | 
		  
		    
			  
				Mahek,
 
          Also set the Http headers to NULL in Compute2 as they will exist in the http response. Hope this should solve it. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | TonyD | 
		  
		    
			  
				 Posted: Wed May 02, 2007 12:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Knight
 
 Joined: 15 May 2001 Posts: 540 Location: New Zealand 
  | 
		  
		    
			  
				Alternatively, if you don't actually need the original MQMD field values you can code:
 
 
   
	| Code: | 
   
  
	
 
SET OutputRoot.MQMD.Version = 2;
 
 | 
   
 
 
 
:which will cause an MQMD to be generated with default values. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | madi | 
		  
		    
			  
				 Posted: Wed May 02, 2007 1:54 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 17 Jan 2006 Posts: 475
  
  | 
		  
		    
			  
				the order of the MQMD might also be a problem
 
 
MQMD should be after the properties
 
 
so u can creat it using
 
 
   
	| Code: | 
   
  
	
 
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD');
 
 
 | 
   
 
 
 
and then say MQMD = Env.myMQMD statement that u already have
 
 
--madi | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mgk | 
		  
		    
			  
				 Posted: Thu May 03, 2007 1:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 31 Jul 2003 Posts: 1647
  
  | 
		  
		    
			  
				Also, part of the problem is these two lines:
 
 
   
	| Code: | 
   
  
	SET OutputRoot.MQMD = Environment.myMQMD; 
 
SET OutputRoot = InputRoot;  | 
   
 
 
 
The second line will remove everything under InputRoot before it assigns OutputRoot, so you will lose any changes you made before this line. _________________ MGK
 
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahek | 
		  
		    
			  
				 Posted: Thu May 03, 2007 7:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 10 Sep 2004 Posts: 87
  
  | 
		  
		    
			  
				Hi All 
 
i tried all the options but still i am getting the same error is there any things else that i am misssing.
 
 
Thanks in advance | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu May 03, 2007 7:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Post a trace of your message tree before the error occurs.
 
 
Or at least give us an up to date sample of your ESQL. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahek | 
		  
		    
			  
				 Posted: Thu May 03, 2007 7:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 10 Sep 2004 Posts: 87
  
  | 
		  
		    
			  
				Hi Jeff, here is my flow
 
 
MQINPUT---> COMOUTE1--->HTTPREQUEST--->TRACE1---->COMPUTE2----TRACE2--->MQOUTPUT.
 
 
THE MESSAGE DOMAIN IN HTTPREQUEST IS XMLNS
 
---------------------------
 
Code in Compute1
 
--------------------
 
CREATE COMPUTE MODULE wsdl_Compute1
 
	CREATE FUNCTION Main() RETURNS BOOLEAN
 
	BEGIN
 
		CALL CopyMessageHeaders();
 
	    --store the mqmd
 
		SET Environment.myMQMD = InputRoot.MQMD;
 
		-- Create an HTTP header for the message
 
		SET OutputRoot.HTTPRequestHeader."Content-Type"='text/xml
 
http : //peoplesoft.com/SOAPTOCI/M_IA_WBI_GLOBAL';
 
		SET OutputRoot.HTTPRequestHeader."User-Agent"='Java1.4.2_03';
 
		SET OutputRoot.HTTPRequestHeader.Host='sltest.weko.loc:8888';
 
		SET OutputRoot.HTTPRequestHeader.Accept = 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2';
 
		SET OutputRoot.HTTPRequestHeader.Connection='keep-alive';
 
		SET OutputRoot.HTTPRequestHeader."Content-length"='714';
 
		
 
		-- Declare the XML namespaces we will be using
 
		DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
 
		DECLARE myNS1 NAMESPACE 'http://tempuri.org/scenario.customer.AccessTrackerEJB';
 
		DECLARE myXSI NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
 
		DECLARE myXSD NAMESPACE 'http://www.w3.org/2001/XMLSchema';
 
		-- Add an XML declaration to the message
 
		SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
 
		SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version) = '1.0';
 
		SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Encoding) = 'UTF-8';
 
		-- Create the SOAP Envelope
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"SOAP-ENV" =
 
		'http://schemas.xmlsoap.org/soap/envelope/' ;
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsi =
 
		'http://www.w3.org/2001/XMLSchema-instance' ;
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsd =
 
		'http://www.w3.org/2001/XMLSchema' ;
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Header".Security.UsernameToken.Username='SLIMEZS';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Header".Security.UsernameToken.Password='test123';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Body".Find__CompIntfc__CUSTOMER.SETID='SHARE';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Body".Find__CompIntfc__CUSTOMER.CUST_ID='1000';
 
		SET OutputRoot.XMLNS.mySoapNS:Envelope."SOAP-ENV:Body".Find__CompIntfc__CUSTOMER.NAME1='';
 
		
 
		
 
		RETURN TRUE;
 
	END;
 
-------------------------------------
 
Code in Compute2
 
---------------------------------
 
CREATE COMPUTE MODULE wsdl_Compute2
 
REATE FUNCTION Main() RETURNS BOOLEAN
 
BEGIN
 
	   
 
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD')VALUE Environment.myMQMD ; 
 
		
 
		SET OutputRoot.HTTPRequestHeader."Content-Type"=null;
 
		SET OutputRoot.HTTPRequestHeader."User-Agent"=null;
 
		SET OutputRoot.HTTPRequestHeader.Host=null;
 
		SET OutputRoot.HTTPRequestHeader.Accept =null;
 
		SET OutputRoot.HTTPRequestHeader.Connection= null;
 
		SET OutputRoot.HTTPRequestHeader."Content-length"= null;
 
		SET OutputRoot = InputRoot;
 
RETURN TRUE;
 
	END; | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu May 03, 2007 7:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				You did not create Environment.myMQMD in the DOMAIN('MQMD'). _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahek | 
		  
		    
			  
				 Posted: Thu May 03, 2007 7:30 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 10 Sep 2004 Posts: 87
  
  | 
		  
		    
			  
				Hi Jeff,
 
here is the trace1 file
 
 
(
 
  (0x01000000):Properties         = (
 
    (0x03000000):MessageSet      = ''
 
    (0x03000000):MessageType     = ''
 
    (0x03000000):MessageFormat   = ''
 
    (0x03000000):Encoding        = 546
 
    (0x03000000):CodedCharSetId  = 1208
 
    (0x03000000):Transactional   = FALSE
 
    (0x03000000):Persistence     = FALSE
 
    (0x03000000):CreationTime    = GMTTIMESTAMP '2007-05-03 15:29:17.754'
 
    (0x03000000):ExpirationTime  = -1
 
    (0x03000000):Priority        = 0
 
    (0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
 
    (0x03000000):ReplyProtocol   = 'MQ'
 
    (0x03000000):Topic           = NULL
 
    (0x03000000):ContentType     = 'text/xml; charset=UTF-8'
 
  )
 
  (0x01000000):HTTPRequestHeader  = (
 
    (0x03000000):Content-Type   = 'text/xml
 
http : //peoplesoft.com/SOAPTOCI/M_IA_WBI_GLOBAL'
 
    (0x03000000):User-Agent     = 'Java1.4.2_03'
 
    (0x03000000):Host           = 'sltest.weko.loc:8888'
 
    (0x03000000):Accept         = 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2'
 
    (0x03000000):Connection     = 'keep-alive'
 
    (0x03000000):Content-length = 522
 
  )
 
  (0x01000000):HTTPResponseHeader = (
 
    (0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 200 OK'
 
    (0x03000000):X-Original-HTTP-Status-Code = 200
 
    (0x03000000):Date                        = 'Thu, 03 May 2007 15:29:06 GMT'
 
    (0x03000000):Server                      = 'WebLogic Server 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973'
 
    (0x03000000):Content-Length              = '433'
 
    (0x03000000):Content-Type                = 'text/xml; charset=UTF-8'
 
    (0x03000000):Connection                  = 'Keep-Alive'
 
  )
 
  (0x01000010):XMLNS              = (
 
    (0x05000018):XML                                               = (
 
      (0x06000011): = '1.0'
 
    )
 
    (0x06000002):                                                  = '
 
'
 
    (0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
 
      (0x07000012)xmlns:xsd                                        = 'http://www.w3.org/2001/XMLSchema'
 
      (0x07000012)xmlns:xsi                                        = 'http://www.w3.org/2001/XMLSchema-instance'
 
      (0x07000012)xmlns:SOAP-ENV                                   = 'http://schemas.xmlsoap.org/soap/envelope/'
 
      (0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Header = 
 
      (0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body   = (
 
        (0x01000000):Find__CompIntfc__CUSTOMERResponse = (
 
          (0x01000000):CUSTOMER = (
 
            (0x01000000):SETID   = (
 
              (0x02000000): = 'SHARE'
 
            )
 
            (0x01000000):CUST_ID = (
 
              (0x02000000): = '1000'
 
            )
 
            (0x01000000):NAME1   = (
 
              (0x02000000): = 'Alliance Group'
 
            )
 
          )
 
        )
 
      )
 
    )
 
  )
 
) | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | madi | 
		  
		    
			  
				 Posted: Thu May 03, 2007 8:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 17 Jan 2006 Posts: 475
  
  | 
		  
		    
			  
				
   
	| mahek wrote: | 
   
  
	Hi Jeff, here is my flow
 
 
 
-------------------------------------
 
Code in Compute2
 
---------------------------------
 
CREATE COMPUTE MODULE wsdl_Compute2
 
REATE FUNCTION Main() RETURNS BOOLEAN
 
BEGIN
 
	   
 
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD')VALUE Environment.myMQMD ; 
 
		
 
		SET OutputRoot.HTTPRequestHeader."Content-Type"=null;
 
		SET OutputRoot.HTTPRequestHeader."User-Agent"=null;
 
		SET OutputRoot.HTTPRequestHeader.Host=null;
 
		SET OutputRoot.HTTPRequestHeader.Accept =null;
 
		SET OutputRoot.HTTPRequestHeader.Connection= null;
 
		SET OutputRoot.HTTPRequestHeader."Content-length"= null;
 
		SET OutputRoot = InputRoot;
 
RETURN TRUE;
 
	END; | 
   
 
 
 
as mqk has already said 
 
 
you overwriting the OutputRoot by saying 
 
 
SET OutputRoot = InputRoot;
 
 
at the end of ur code 
 
 
do that at the begining of the compute 
 
 
here is ur code (how it should be)
 
 
   
	| Code: | 
   
  
	 
 
CALL CopyEntireMessage();
 
DELETE FIELD OutputRoot.HTTPRequestHeader;
 
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD'); 
 
OutputRoot.MQMD = myMQMD;
 
RETURN TRUE;
 
 | 
   
 
 
 
--madi | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mahek | 
		  
		    
			  
				 Posted: Thu May 03, 2007 8:33 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 10 Sep 2004 Posts: 87
  
  | 
		  
		    
			  
				Thanks a  a lot to every one .
 
madi it worked you told me .
 
thanks again to evry one. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |