[ 
https://issues.apache.org/jira/browse/AXIS2-5039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan updated AXIS2-5039:
------------------------

    Attachment: AXIS2-5039.patch

Update the patch, and will provide a test case to demonstrate the issue. 

> Override the SOAPAction from the SOAPMessage MIME header if it is explicitly 
> configured later
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5039
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5039
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Ivan
>         Attachments: AXIS2-5039.patch
>
>
>  While using RI SAAJ impl with Axis2, it seems that RI SAAJ will always adds 
> a SOAPAction header with the value "" if it is a SOAP 1.1 message. I found 
> that if the action is configured in the requestContext by the 
> BindingProvider.SOAPACTION_USE_PROPERTY and 
> BindingProvider.SOAPACTION_URI_PROPERTY will be ignored. And it looks to me 
> that it makes sense to override the soap action if it is explicitly 
> configured with the later way.
>     I did a text search for the setSOAPAction method for the MessageContext, 
> and its initial values are from SOAPMessage.
>     a. o.a.axis2.saaj.SOAPConnectionImpl     Line 185
>     b. o.a.axis2.jaxws.message.util.MessageUtils Line 206
>     Also, for the SOAPAction in the OperationClient, it is configured in 
> o.a.axis2.jaxws.core.control.impl.AxisInvocationController.initOperationClient
>  method
>     --->
>     String soapAction = ClientUtils.findSOAPAction(requestMsgCtx);
>    <---     
>    The codes in the ClientUtils.findSOAPAction will check the configurations 
> in the RequestContext, and even the action configured in the Operation, it 
> looks to me that the SOAPAction here is more valuable.  
>    The proposed the changes are in the OperationClient.prepareMessageContext
>    From
>    --->
>   if (mc.getSoapAction() == null || "".equals(mc.getSoapAction())) {
>             mc.setSoapAction(options.getAction());
>    }
>    <---
>    To
>     if (options.getAction() != null || options.getAction().length() > 0) {
>             mc.setSoapAction(options.getAction());
>         }
>     <---

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to