|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem with HTTPRequest node invoking a WS |
« View previous topic :: View next topic » |
Author |
Message
|
Testo |
Posted: Wed Aug 04, 2004 1:37 am Post subject: Problem with HTTPRequest node invoking a WS |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
WBIMB 5 CSD3 on W2K
We are trying to invoke a web service with a sample flow that receives in input an XML message and then calls a webservice.
Despite a trace node just before the HTTPRequest node shows that the XML is well formed, from the trace we get the following exception:
"ParserException BIP5007E: The Element has an invalid element type for a top level element. A top level element was found which didn't have type xmlXmlDecl, xmlDocTypeDecl, etc etc"
The input xml message, in fact, starts with:
<HTTPTest>
<URL>bla bla</URL>
<InputData>bla bla
etc etc
The article from which we got the sample it's not very recent (2003) but we followed those instructions. Does the HTTPRequest node require a specific kind of XML message in input?
Thanks in advance for any hint,
Cheers,
Andrea Tedone
IBM IT Specialist |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Aug 04, 2004 3:46 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
Try doing what the error says and add an XML declaration. |
|
Back to top |
|
 |
Testo |
Posted: Wed Aug 04, 2004 5:06 am Post subject: Solved! |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
jlrowe,
we found the problem. In the HTTPRequest node properties, Advanced tab, you can specify "Request message location in tree*" and the one we were specifying was not parsed correctly because there was a carriage return separating the piece of XML message we want to use as a request and the rest of the XML.
I will explain it with the sample. What follows is the XML message in a row:
<HTTPTest><InputData><RequestData> bla bla bla </RequestData></InputData></HTTPTest>
If you insert a carriage return between <InputData> and <RequestData> and at the same time specify "InputRoot.XML.HTTPTest.InputData" in "Request message location in tree*" you will get the exception specified above.
Cheers,
Andrea
PS the trick of adding an XML declaration on top was our first attempt but it was too easy and too obvious to work  |
|
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
|
|
|
|