axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Sauthier <>
Subject SOAPMessage.saveChanges()
Date Fri, 17 Dec 2004 10:25:03 GMT
Hi Team

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 ===


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
    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.

        ||SOAPException|| - if there was a problem saving changes to
        this 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 ?

PS, I have a test that fail without the saveMessage() and works with. I 
can send it.


View raw message