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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply 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: 364
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
Bartender

Joined: Oct 04, 2006
Posts: 2193
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: log outgoing JAX-RPC message
 
Similar Threads
I need to write a client for Testing the SEI implemented as stateless session bean
Invoking Web Services deployed in Weblogic 9.1 from Weblogic 8.1 run time
Testing a web service
JAX-RPC client side programming
Jax-RPC Vs SAAJ