Author |
Message
|
roysterdoyster |
Posted: Wed Nov 21, 2007 2:51 am Post subject: Problem with simple web service simulation |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
Hi folks,
I'm trying to perform a simple web service simulation where I have 2 flows
MQinput > Compute > HttpRequest
and
HttpInput > HttpReply
in my compute node in first flow, I add some XML to the message :
CREATE LASTCHILD OF OutputRoot DOMAIN 'XML';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'utf-8';
SET OutputRoot.XML.somexml = 'hello';
which I would expect to be passed to the HttpInput node on the 2nd flow but when I receive the request the XML is not there (using the debugger to examine the received message). I assume its a simple configuration problem but can anyone tell me what I'm doing wrong? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Nov 21, 2007 2:27 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You should not be using the XML domain for a new message flow, which is processing a web service. Are you aware that the XML domain does not support namespaces?
Please change to XMLNS or ( preferably ) XMLNSC immediately. The XML domain is deprecated. |
|
Back to top |
|
 |
roysterdoyster |
Posted: Wed Nov 21, 2007 2:38 pm Post subject: |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
Ok Kimbert, cheers. I was initially just trying to send some plain XML via http rather than any SOAP messages hence why I used the XML domain.
I realised that the problem was that I was setting an HttpHeader value incorrectly (I had a copy and paste error) and was setting the 'host' value to the 'content-type' value I wanted but strangely enough it didn't report any errors so not sure why.
Got it working now thanks. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Nov 21, 2007 2:54 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
OK - I guessed that. In future you may as well use XMLNS. The usage is identical apart from the name of the parser. Posting examples which use the XML domain on a public forum is liable to mislead new users. |
|
Back to top |
|
 |
roysterdoyster |
Posted: Fri Nov 23, 2007 2:51 am Post subject: |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
As an aside, can you tell me why there are no errors reported (or am I not looking in the correct place) when an Http Header value is set incorrectly i.e. SET HttpHeader.host = 'text/html; charset=utf-8';
Obviously this is an invalid host but I would assume you would receive some sort of parsing error whereas what was actually happening was that the XML that followed it was missing when the HttpInput node received the message.
I just ask as the documentation surrounding the use of the Http nodes does not really detail what ESQL could/should be used prior to using the Http nodes and therefore debugging errors is particularly tricky and requires a lot of trial and error. |
|
Back to top |
|
 |
|