Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
JOnAS 4.3.0+
Description
I'm facing some problems with server side JAXRPC Handlers that modify the SOAPMessage but theses changes are never propagated to the real service invokation.
After reading some docs, I found an interressting method on SOAPMessage : saveChanges().
Here is an extract :
=== api snippet ===
saveChanges
public abstract void saveChanges()
throws SOAPException
Updates this |SOAPMessage| object with all the changes that have
been made to it. This method is called automatically when
writeTo(OutputStream) | is called. However, if changes are made to a message that was received or to one that has already been sent, the method |
||
saveChanges | needs to be called explicitly in order to save the changes. The method |
saveChanges | also generates any changes that can be read back (for example, a MessageId in profiles that support a message id). All MIME headers in a message that is created for sending purposes are guaranteed to have valid values only after |
saveChanges | has been called. |
In addition, this method marks the point at which the data from all
constituent |AttachmentPart| objects are pulled into the message.
...
=== /api snippet ===
The important part is "|saveChanges| needs to be called explicitly"
This method is never called by Axis, seems that's the role of the Handler to call this method.
Maybe Axis could automatically use msg.saveContext() in some case (after server-side jaxrpc handler chain (request) for example, and maybe client side (response) ). this can be done only if saveRequired is true ...
What do you think ?