ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to Capture SOAP XML request message ?

Post new topic  Reply to topic Goto page 1, 2  Next
 How to Capture SOAP XML request message ? « View previous topic :: View next topic » 
Author Message
Monk
PostPosted: Wed May 23, 2007 1:33 am    Post subject: How to Capture SOAP XML request message ? Reply with quote

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
View user's profile Send private message
edarasumanth
PostPosted: Wed May 23, 2007 1:40 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2006
Posts: 21

Which parser u have defined in the Message Domain of HTTP Request Node
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
marcin.kasinski
PostPosted: Wed May 23, 2007 1:45 am    Post subject: Re: How to Capture SOAP XML request message ? Reply with quote

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
View user's profile Send private message Visit poster's website
Monk
PostPosted: Wed May 23, 2007 3:53 am    Post subject: Reply with quote

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
View user's profile Send private message
marcin.kasinski
PostPosted: Wed May 23, 2007 4:10 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
elvis_gn
PostPosted: Wed May 23, 2007 4:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ashoon
PostPosted: Wed May 30, 2007 1:17 pm    Post subject: try tcpmon Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed May 30, 2007 1:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
roysterdoyster
PostPosted: Fri Nov 09, 2007 7:49 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 09, 2007 8:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You're probably doing a POST when the provider wants a GET.

10.4.6 405 Method Not Allowed

The method specified in the Request-Line is not allowed for the
resource identified by the Request-URI. The response MUST include an
Allow header containing a list of valid methods for the requested
resource.


So look for an X-Original-HTTP-Allow or similar in the HTTPResponse header.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
roysterdoyster
PostPosted: Mon Nov 12, 2007 6:55 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 12, 2007 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
roysterdoyster
PostPosted: Mon Nov 12, 2007 7:15 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 12, 2007 7:28 am    Post subject: Reply with quote

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
View user's profile Send private message
roysterdoyster
PostPosted: Mon Nov 12, 2007 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to Capture SOAP XML request message ?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.