Author |
Message
|
Monk |
Posted: Wed May 23, 2007 1:33 am Post subject: How to Capture SOAP XML request message ? |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Hi All,
How do I capture the SOAP request message(XML) sent by the HTTPRequest node.
I can see the MRM contents in the debug mode.
But I want to see the exact SOAP XML request messge sent by the HTTPRequest node.
Can anyone help me with this?.
Thanks _________________ Thimk |
|
Back to top |
|
 |
edarasumanth |
Posted: Wed May 23, 2007 1:40 am Post subject: |
|
|
Novice
Joined: 15 Jun 2006 Posts: 21
|
Which parser u have defined in the Message Domain of HTTP Request Node |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 23, 2007 1:45 am Post subject: Re: How to Capture SOAP XML request message ? |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Monk wrote: |
Hi All,
How do I capture the SOAP request message(XML) sent by the HTTPRequest node.
I can see the MRM contents in the debug mode.
But I want to see the exact SOAP XML request messge sent by the HTTPRequest node.
Can anyone help me with this?.
Thanks |
What do you mean ?
If you would like to see simple XML content in your trace rather than tree content you can parse input message.
Code: |
...
CREATE LASTCHILD OF Environment DOMAIN('XMLNS')
PARSE(InputRoot.BLOB.BLOB
ENCODING InputRoot.Properties.Encoding
CCSID InputRoot.Properties.CodedCharSetId
--FORMAT 'XMLNS_OPAQUE'
TYPE '{http://schemas.xmlsoap.org/soap/envelope/}Envelope') ;
... |
_________________ Marcin |
|
Back to top |
|
 |
Monk |
Posted: Wed May 23, 2007 3:53 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
I want to capture the XML soap message sent by the HTTPrequest node.
I hope that is clear. _________________ Thimk |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 23, 2007 4:10 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Monk wrote: |
I want to capture the XML soap message sent by the HTTPrequest node.
I hope that is clear. |
You can place trace node before HTTPRequest to capture request.
You can place trace node after HTTPRequest to capture response.
You can use TCP Monitor to capture both. _________________ Marcin |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed May 23, 2007 4:19 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Monk,
Else put a Dummy HTTP Address and send the request to that address. You can use the Net Tool to act like a HTTP Service and send your request to it. Once it picks up, gloat on the received xml
Regards. |
|
Back to top |
|
 |
ashoon |
Posted: Wed May 30, 2007 1:17 pm Post subject: try tcpmon |
|
|
Master
Joined: 26 Oct 2004 Posts: 235
|
point your httpreq. node to tcpmon and then tcpmon to your service... you'll see the request/response
https://tcpmon.dev.java.net/
quite useful for http debugging |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 30, 2007 1:35 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
NetTool from sourceforge is at least as useful, and has the advantage of not passing your request out to an external entity... or even outside of your own machine if both endpoints are local... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
roysterdoyster |
Posted: Fri Nov 09, 2007 7:49 am Post subject: |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
Hi folks,
I've added a trace node before and after my HTTPRequest node but the output for the Trace does not give me a clear picture of what is actually being sent in my request.
Basically I am trying to use a public web service and send the following request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<InvertStringCase xmlns="http://www.dataaccess.com/webservicesserver/">
<sAString>string</sAString>
</InvertStringCase>
</soap:Body>
</soap:Envelope>
and my esql is
DECLARE soap NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE myNS1 NAMESPACE 'http://www.dataaccess.com/webservicesserver/';
DECLARE myXSI NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
DECLARE myXSD NAMESPACE 'http://www.w3.org/2001/XMLSchema';
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNS' NAME 'XMLNS';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
CREATE LASTCHILD OF OutputRoot.XMLNS NAMESPACE soap NAME 'Envelope';
SET OutputRoot.XMLNS.soap:Envelope.(XML.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNS.soap:Envelope.(XML.NamespaceDecl)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema';
SET OutputRoot.XMLNS.soap:Envelope.(XML.NamespaceDecl)xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNS.soap:Envelope.soap:Body.myNS1:InvertStringCase.(XML.NamespaceDecl)xmlns = 'http://www.dataaccess.com/webservicesserver/';
SET OutputRoot.XMLNS.soap:Envelope.soap:Body.myNS1:InvertStringCase.myNS1:sAString = 'stringtoconvert';
but when I attempt to call the flow I get the response
X-Original-HTTP-Status-Line = HTTP/1.1 405 Method Not Allowed
which would lead me to believe my request is not correctly formatted. Can anyone help with a method for actaully seeing the request in a clean text format via the trace mechanism? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 09, 2007 8:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
roysterdoyster |
Posted: Mon Nov 12, 2007 6:55 am Post subject: |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
Hi folks, can anyone tell me how do I find out which port the HTTPRequestNode uses for its requests. I'm trying to use either tcpmon or net tool to monitor the outgoing http request so I can see if the soap message has been formatted correctly but am struggling to set up these two apps to be able to create a tunnel between my PC and the corporate proxy?
or is there a neat way in ESQl to show the exact XML being sent out (the esql posted earlier doesn't work for me)...
ta
R |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 12, 2007 6:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It opens the port of the destination...
You can change the node or code to change the destination to a local destination, and then configure nettool/tcpmon to forward to the actual destination. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
roysterdoyster |
Posted: Mon Nov 12, 2007 7:15 am Post subject: |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
hmmm... just tried that but am confused. If I set the url (in a compute node prior to HttpRequestNode) for my request to be something like:
SET OutputRoot.HTTPRequestHeader."X-Original-HTTP-URL" = 'http://www.dummyvalue.com:1020';
and then set up TCP mon to listen on port 1020 and send onto our proxy at www-internalproxy.eu.xxx.net:9999
I get a response, out the error terminal, where the HttpResponseHeader is
X-Original-HTTP-Status-Line = HTTP/1.1 403 OK
but nothing is being displayed in either TCPmon or NetTool. Any idea what I'm doing wrong?
Last edited by roysterdoyster on Fri Jan 18, 2008 2:06 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 12, 2007 7:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
TCP/Monitor only listens on the interface on the machine running the Toolkit it's running under.
Unless you're running your broker locally, that's not going to capture anything.
If you're running your broker locally, you probably need to set the url to use "localhost" rather than 'www.dummyvalue.com'.
Did you start the TCP monitor? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
roysterdoyster |
Posted: Mon Nov 12, 2007 7:47 am Post subject: |
|
|
Apprentice
Joined: 26 Oct 2007 Posts: 25 Location: Glasgow, UK
|
I am running the broker locally (default broker). I have changed the url to be http://localhost:1021 on the HttpRequestNode and also in the ESQL.
I start TCPMon and enter the local port as 1021 and the server name and port as www-internalproxy.eu.xxx.net and 9999 and inject a messsage (which just starts the flow and is currently ignored by the ESQL), in the compute node I generate headers and the soap message but I still amn't seeing anything being logged by TCPMon and the message propgates out the error terminal with the following debug values:
HTTPRequestHeader
Content-Length = 372
SOAPAction =
Proxy-Authorization = Basic aGxxxGVyOmRlY2UyMDA3
Authorization = Basic aGxxxGVyOmRlY2UyMDA3
Content-Type = text/xml; charset=utf-8
X-Original-HTTP-URL = http://localhost:1021
Host = localhost
Proxy-Connection = keep-alive
HTTPResponseHeader
X-Original-HTTP-Status-Line = HTTP/1.1 403 OK
X-Original-HTTP-Status-Code = 403
Via = 1.1 NGVSPX01
Date = Mon, 12 Nov GMT
Content-Type = text/html; charset=UTF-8
Cache-Control = no-cache
Last edited by roysterdoyster on Fri Jan 18, 2008 2:07 am; edited 1 time in total |
|
Back to top |
|
 |
|