If your're talking about saving a copy of the SOAP message on the server, then a Handler would do that for you.
You could program your HandleResponse part of the handler to save the incoming message into a xml file.
You will need to add the handler declaration to webservices.xml, setting your handler class (extending Handler or GenericHandler) in a separate java class (to be included in the WAR file as well).
..... </service-impl-bean> <handler> <handler-name>ServiceHandler</handler-name> <handler-class>pakage.name.ServiceHandler</handler-class> </handler> </port-component> </webservice-description> </webservices>
Thanks this works! Does anyone know another way to serialize the Java Object to Xml within the web service implementation? I'm not sure if this is even possible.
Romeu is right, the jaxrpc handler willl do the job. With jbossws-2.0.x you will be able to use JAXB. Have a look at the JAXWS spec.