| Author | 
		  Message
		 | 
		
		  | shrek | 
		  
		    
			  
				 Posted: Thu Jul 12, 2007 4:41 pm    Post subject: HTTPRequest -- Failing when using Partial Input Tree | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 19 Feb 2005 Posts: 61 Location: Gudivada,India 
  | 
		  
		    
			  
				All, 
 
 
I'm trying to understand how HTTP nodes work and am encoutering below issue when trying to use the PartialInputTree (InputRoot.XML.HTTPTest.InputData). 
 
 
I'm able to overcome the issue by removing "\n\t" from the input xml. Is this the standard behavior of HTTPRequestNode? Do we know why the HTTPRequestNode is behaving differently from a Compute Node? 
 
 
Thank you. 
 
 
   
	| Code: | 
   
  
	
 
Message
 
   Properties
 
   MQMD
 
   XML
 
      HTTPTest
 
           \n\t
 
         URL
 
              http://localhost:7080/svc1
 
           \n\t
 
         InputData
 
              \n\t\t
 
            Data
 
                 Test
 
              \n\t
 
           \n\t
 
         OutputData
 
              \n\t\t
 
            Data
 
              \n\t
 
           \n
 
LocalEnvironment
 
   Destination
 
      HTTP
 
         RequestURL = http://localhost:7080/svc1
 
Environment
 
ExceptionList
 
   RecoverableException
 
      File = F:\\build\\S000_P\\src\\DataFlowEngine\\ImbDataFlowNode.cpp
 
      Line = 616
 
      Function = ImbDataFlowNode::createExceptionList
 
      Type = ComIbmWSRequestNode
 
      Name = HTTPRequest_TestFlow#FCMComposite_1_3
 
      Label = HTTPRequest_TestFlow.HTTP Request
 
      Catalog = BIPv600
 
      Severity = 3
 
      Number = 2230
 
      Text = Node throwing exception
 
      RecoverableException
 
         File = F:\\build\\S000_P\\src\\WebServices\\WSLibrary\\ImbWSRequestNode.cpp
 
         Line = 747
 
         Function = ImbWSRequestNode::evaluate
 
         Type = 
 
         Name = 
 
         Label = 
 
         Catalog = BIPv600
 
         Severity = 3
 
         Number = 3162
 
         Text = WebService Request Exception
 
         Insert
 
            Type = 5
 
            Text = 
 
         Insert
 
            Type = 5
 
            Text = 
 
         Insert
 
            Type = 5
 
            Text = 
 
         Insert
 
            Type = 5
 
            Text = 
 
         ParserException
 
            File = F:\\build\\S000_P\\src\\MTI\\MTIforBroker\\GenXmlParser2\\XmlImbParser.cpp
 
            Line = 371
 
            Function = XmlImbParser::refreshBitStreamFromElements
 
            Type = ComIbmMQInputNode
 
            Name = HTTPRequest_TestFlow#FCMComposite_1_1
 
            Label = HTTPRequest_TestFlow.MQInput
 
            Catalog = BIPv600
 
            Severity = 3
 
            Number = 5010
 
            Text = XML Writing Errors have occurred
 
            ParserException
 
               File = F:\\build\\S000_P\\src\\MTI\\MTIforBroker\\GenXmlParser2\\XmlImbParser.cpp
 
               Line = 630
 
               Function = XmlImbParser::validateTree
 
               Type = 
 
               Name = 
 
               Label = 
 
               Catalog = BIPv600
 
               Severity = 3
 
               Number = 5007
 
               Text = Invalid top level element found.
 
               Insert
 
                  Type = 5
 
                  Text = 
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wbi_telecom | 
		  
		    
			  
				 Posted: Thu Jul 12, 2007 5:16 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA 
  | 
		  
		    
			  
				How are you putting your input message? Looks like you have whitespaces in the message which are failing in XML parsing. Try using XMLNSC domain and test the message.
 
 
Cheers, | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shrek | 
		  
		    
			  
				 Posted: Thu Jul 12, 2007 6:47 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 19 Feb 2005 Posts: 61 Location: Gudivada,India 
  | 
		  
		    
			  
				I created the test message in notepad and formatted it using tab. I'm trying to understand why HTTPRequest is throwing an exception when Compute node parses the same with out any issues. 
 
 
P.S: If i remove white space characters, this works fine. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Jul 12, 2007 7:23 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				If, instead of the "It's not deprecated, but don't use it anyway" XML Domain, you used the ... XML NameSpace compact (XMLNSC) domain, then you would not have to worry about unnecessary whitespace in your message tree.
 
 
Also, likely, you're mangling something somewhere yourself, and it's not a real issue with the HTTP input node. 
 
 
Thirdly, if you think about what the error message means - "Invalid top-level element found"... it's finding a whitespace element at what it thinks should be the root element instead. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | AkankshA | 
		  
		    
			  
				 Posted: Fri Jul 13, 2007 1:24 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 12 Jan 2006 Posts: 1494 Location: Singapore 
  | 
		  
		    
			  
				XMLNSC parser would resolve this issue..   this is my own learnt exp :p _________________ Cheers | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wbi_telecom | 
		  
		    
			  
				 Posted: Fri Jul 13, 2007 7:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA 
  | 
		  
		    
			  
				This problem occurs when you create the test message yourself in notepad. 99% you will not face this issue when another app sends the input message. Nevertheless use XMLNSC instead of XML. 
 
You will never get the exception in the compute node because the message does not get serialized in the compute node (unless you force it) so the exception will occur only at the input or Output node where the message is serialized. 
 
 
Cheers, | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shrek | 
		  
		    
			  
				 Posted: Mon Jul 16, 2007 11:51 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 19 Feb 2005 Posts: 61 Location: Gudivada,India 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |