File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to log SOAP request in web services

 
Yogesh Gandhi
Ranch Hand
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 165
Hibernate Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the problem is resolved. will post the solution soon.
 
Yogesh Gandhi
Ranch Hand
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic