aspose file tools*
The moose likes Web Services and the fly likes How to log SOAP request in web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to log SOAP request in web services" Watch "How to log SOAP request in web services" New topic
Author

How to log SOAP request in web services

Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
Hi,

I have generated Stubs from WSDL file using JDev 11g.

I created and populated the object with the data and then passed this object to the webservice function which internally calls invokes the webservice function.

Now it failed on server side. So, I want to anlyze as well as log the XML.

Can someone please help me in this regard? I do not want to regenerate the stubs.

Regards
Yogesh
Anurag Verma
Ranch Hand

Joined: Mar 30, 2012
Posts: 124

you can add logging interceptors to services available on your server as well as in your client. How to do this, is something which depends on the mechanism of web-services you are using.
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
i badly need to know how to do this. i have generated stubs using 11g jdev.


can someone having idea abt how to do this please help?

i m ready to provide more details if required.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

You can use log4j and see what the WS framework gives you.

*or*

You could use a tcp-monitor to perform man-in-the-middle analysis.

WP
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
I am also following this post

http://www.coderanch.com/t/549539/Web-Services/java/Convert-SOAP-response-SOAP-XmL#2613098

Some points are given there.
It worked on the sample POC, but it didn't work in case of websphere for me. I need to make it work for webpshere.

Regards
Yogesh
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
the problem is resolved. will post the solution soon.
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 212
I am able to make good use of it. Finally it worked for me.

Here is the detailed post of what I did.

http://javakafunda.blogspot.in/2012/04/how-to-log-soap-request-and-response.html
 
 
subject: How to log SOAP request in web services