You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ivan (JIRA)" <ji...@apache.org> on 2011/05/13 02:44:47 UTC

[jira] [Updated] (AXIS2-5039) Override the SOAPAction from the SOAPMessage MIME header if it is explicitly configured later

     [ 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

> 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
>    Affects Versions: 1.7.0
>            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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org