|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HTTPRequest node always returns SOAP error as a BLOB? |
« View previous topic :: View next topic » |
Author |
Message
|
asalema |
Posted: Fri Aug 25, 2006 11:50 am Post subject: HTTPRequest node always returns SOAP error as a BLOB? |
|
|
Apprentice
Joined: 05 May 2003 Posts: 35
|
Hi All,
I have a Message Flow with HTTPRequest node calling an external webservice.
When I call the webservice with a valid request
E.g.
Code: |
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><NS1:QueryClientByIDRequest xmlns:NS1="http://tempuri.org/EPS_QueryClientInfo/" xmlns:q0="dummySTC:ephs:v1"><q0:id>100000</q0:id></NS1:QueryClientByIDRequest></soapenv:Body></soapenv:Envelope>
|
I get a valid response back as domain = XMLNS
However, if I try an invalid message, I should expect a SOAPFAULT folder back in the InputRoot.XMLNS.
I do get a response back and I can verify (by using a TCP monitor) that the response has the SOAPFault folder except that the message always comes back as a BLOB (i.e. InputRoot.BLOB.BLOB) not as InputRoot.XMLNS as I expect.
I set the domain in in the HTTPRequest node explicitly to 'XMLNS'.
Now, I have to do an extra step to parse the BLOB back using ESQL to a tree structure in case of error as follows:
Code: |
SET MessageBlob = InputRoot.BLOB.BLOB;
CREATE LASTCHILD OF OutputRoot.XMLNS DOMAIN('XMLNS') PARSE(MessageBlob
ENCODING InputProperties.Encoding
CCSID InputProperties.CodedCharSetId
SET ''
TYPE ''
FORMAT ''
OPTIONS options);
|
Which seems to work fine.
However, is there any thing I am missing to force the HTTPRequest node to parse the incoming SOAP envelope back to a tree structure instead of using a BLOB bitstream?
Any input is much appreciated as always.
Thx and best regards, |
|
Back to top |
|
 |
mgk |
Posted: Fri Aug 25, 2006 12:11 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
This behaviour is by design. The Domain property only affects successful messages leaving the OUT terminal. Due to the fact that error messages could be HTML or XML (Soap fault) or even something else, everything that leaves the ERROR terminal is a BLOB. Your code to convert the BLOB back to XML is the right thing to do if you want an XML format error.
Regards, _________________ 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 |
|
 |
asalema |
Posted: Fri Aug 25, 2006 12:22 pm Post subject: |
|
|
Apprentice
Joined: 05 May 2003 Posts: 35
|
Thx very much for your prompt reponse, I really appreciate it
At least I know that what I'm doing is correct.
Thx again. |
|
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
|
|
|
|