[ 
http://issues.apache.org/jira/browse/AXIS-1884?page=comments#action_64996 ]
     
Clive Brettingham-Moore commented on AXIS-1884:
-----------------------------------------------

This apprears to have originated from the fix for AXIS-1732
Actually problem apprears to be considerably more complex (and still present in 
latest CVS).
Two issues:
1) even if I could change the envelope the HandlerChainImpl will throw a 
runtime exception if the body structure changes - AFICS this is not a JAX-RPC 
requirement and is a major PITA when writing handlers that change document 
structure (eg encryption) and can be triggered for doc/lit messages (if a form 
optimisation is triggered in sees RPC form, out sees doc form - missmatch 
results;  this can be fixed by ensuring canonical form with save changes - see 
patch for HandlerChainImpl). Since I have no idea why the structure was being 
checked I have not removed it, but it would be a good idea.

2) the origin of the problems with the document changes in SOAPPart is due to 
the ambiguous use of setCurrentForm - this method is mostly invoked as a form 
optimisation except when called by setCurrentMessage (in turn called, in this 
instance, by setContent).
The solution to this would appear to be refactoring the class so setCurrentForm 
is called only for for optimisation (so current  logic is accurate) and add new 
code for content change either in setCurrentMessage or delegated to a new 
method.

setContent should probably parse the content before calling setCurrentMessage.

See my newer patch suggestion for SOAPPart

> setContent doesn't work for jaxrpc handlers (due to form optimisation)
> ----------------------------------------------------------------------
>
>          Key: AXIS-1884
>          URL: http://issues.apache.org/jira/browse/AXIS-1884
>      Project: Axis
>         Type: Bug
>   Components: SAAJ
>     Versions: 1.2RC3
>  Environment: All
>     Reporter: Clive Brettingham-Moore
>  Attachments: HandlerChainImplPatch.txt, SOAPPartPatch.txt, SOAPPartPatch2.txt
>
> jaxrpc handlers silently fail to set message content (SOAPPart.setContent) 
> for all Sources that are converted to input streams becuase formOptimisation 
> is disabled for jax-rpc handlers, and the (buggy) logic of setCurrentForm 
> supresses content setting for non string content (eg input stream derived 
> from a DOMSource)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to