File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log outgoing JAX-RPC message

 
szabolcs kléninger
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello!

I'm developing a Webapp in Netbeans which calls an external WebService.
I have imported the wsdl file, generated JAX-RPC stub( Right click on Project / WebService Client...), and set the message payload for the WS call.
Is it possible to log(save) the outgoing Request message?
Here is the generated stub and the message.
I want to save the outgoing SOAP message in a Database, and of course the Response message too.


Thanks for helping!
Peter
 
Karthik Shiraly
Bartender
Pie
Posts: 1054
24
Android C++ Java Linux PHP Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can add Handlers on both sides through your Service's HandlerChain. Your handler receives SOAPMessageContext objects, and you can then get SOAPMessage out of that and write it out to an OutputStream (or DB).
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
As Karthik says, handlers is a good way. There is an article showing how to implement JAX-RPC handlers at:
http://www.ibm.com/developerworks/webservices/library/ws-tipjax2.html
Best wishes!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic