This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
don't know if this is the best way to do it - but think it does what you're asking for. Add a handler (see my other post today about this) and make it print out the SOAP messages as they come in and go out
does this help ?
Example code which I've just tried and seems to work
One more easier way is to use netmon or tcpmon tool to intercept the messages
1. TCP/IP Monitor in eclipse plugin too can help Let us assume Webservice is runninig in Port A Now in the client code, change the endpoint port address to B ( Local Port at which the tcp ip tool listens and redirects to Port A Local Port is B Server Port is A Once you give hit to the service using client code, you can able to see the messages in the tool
SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
Joined: Feb 13, 2006
Actually,I want to store the XML in a database.I dont want to use TCPMon.Can anyone tell me how to do this using Axis ??
Thanks and Regards, Sriram
Joined: Aug 13, 2004
How are you going to store xml in DB. 1. You want parse and store the information 2. or You want to dumb the Xml file itself in DB
If you have class which implements org.apache.axis2.databinding.ADBBean this interface then its pretty simple to get Soap Request and Soap response(i.e raw xml which is posted from client)
call this method on the object
This will give you Soap request or response based on object which you call method on.
Here the problem is, Request and Response methods are different,
Is there a way to handle "Request XML Messages or HttpServletRequest" in response scope..
I mean Is there a way to get "request Soap Message" while inbound direction ( meaning while getting response... )
My AxisHandler implements "SOAPHandler"..
(Otherwise I need to save "RequestXML_Message" in a Class variable up to getting response or fault message,
After getting ResponseXML or Fault then I will able to log all the Messages together..
But keeping the requestMessage in a class variable is not a safe state i think..)
I have tried the following code but it always returns "nullPointerException.."