[ https://issues.apache.org/jira/browse/AXIS2-4264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698154#action_12698154 ]
Davanum Srinivas commented on AXIS2-4264: ----------------------------------------- Alexis, we think there may be cases where AxisOperation may be the correct one to use. Can you please try this patch? You may have to apply the patch by hand as there are differences between current axis2 version and the one that i am using. thanks, dims Index: src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java =================================================================== --- src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (revision 6604) +++ src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (working copy) @@ -22,6 +22,7 @@ import org.apache.axiom.om.OMOutputFormat; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; +import org.apache.axis2.client.ServiceClient; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.MessageContext; @@ -399,12 +400,25 @@ if ((soapActionString == null) || (soapActionString.length() == 0)) { // now let's try to get WSA action soapActionString = messageContext.getWSAAction(); + if (log.isDebugEnabled()) { + log.debug("SOAP Action from getWSAAction was : " + soapActionString); + } if (messageContext.getAxisOperation() != null && ((soapActionString == null) || (soapActionString .length() == 0))) { // last option is to get it from the axis operation - soapActionString = messageContext.getAxisOperation() + String axisOpSOAPAction = messageContext.getAxisOperation() .getSoapAction(); + log.debug("SOAP Action from AxisOperation was : " + axisOpSOAPAction); + if (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction) + || (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction)) + || (ServiceClient.ANON_OUT_ONLY_OP.equals(axisOpSOAPAction))) { + if (log.isDebugEnabled()) { + log.debug("Will not override SOAP Action as " + axisOpSOAPAction + " in AxisOperation was auto-generated"); + } + } else { + soapActionString = axisOpSOAPAction; + } } } } > Empty action not applied in CommonsHTTPTransportSender > ------------------------------------------------------ > > Key: AXIS2-4264 > URL: https://issues.apache.org/jira/browse/AXIS2-4264 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: transports > Affects Versions: 1.5, 1.4.1, 1.4, 1.3 > Reporter: Alexis Midon > Attachments: AXIS2-4264.patch.txt > > > Hello there, > I'm invoking a service using a ServiceClient, the wsdl operation declares an > empty soapAction. > However the soapActiuon actually sent is "urn:anonOutInOp" which the server > refuses. This action is the action the anonymous operation "urn:anonOutInOp" > and is set by the ServiceClient. > Later when CommonsHTTPTransportSender#findSOAPAction [1] is invoked, if the > action of the MessageContext is null or empty, the operation action is used. > The empty case seems like a bug, because this is the action set in the wsdl > and it is not applied. > This opinion is strengthened by the fact that other senders do not have this > behavior. > The right behavior would be: > if null ; use the operation action as a default > if empty ; send an empty soapAction > Could you confirm please? > Alexis > [1] http://is.gd/m0Mt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.