File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes log outgoing JAX-RPC message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "log outgoing JAX-RPC message" Watch "log outgoing JAX-RPC message" New topic
Author

log outgoing JAX-RPC message

szabolcs kléninger
Greenhorn

Joined: Dec 04, 2009
Posts: 2
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
Ranch Hand

Joined: Apr 04, 2009
Posts: 539
    
    7
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log outgoing JAX-RPC message