[ 
https://issues.apache.org/jira/browse/CXF-6732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493055#comment-15493055
 ] 

David Taxgaard commented on CXF-6732:
-------------------------------------

Hi 

After updating from CXF version 2.7.10 to version 3.1.7 I have problems with 
SOAPAction being an empty string when the endpoint is called.

I am using CXF with Camel and using PAYLOAD/Dispatcher  

I have tracked down the problem to the fix in this JIRA and after method 
setSoapAction in SoapPreProtocolOutInterceptor.java was changed SOAPAction is 
no longer being set when using Camel in dispatcher mode. 

Instead the SOAPAction is always "" (empty String) when the endpoint is called.

The old version of the class to into consideration that the SOAPAction might 
already be set in the Request headers

if (!reqHeaders.containsKey(SoapBindingConstants.SOAP_ACTION)) {            
   reqHeaders.put(SoapBindingConstants.SOAP_ACTION, 
Collections.singletonList(action));
}

while the new version just always add the action which in this case is an empty 
String - perhaps the solution is to when whether action is != "" before adding 
it. 

reqHeaders.put(SoapBindingConstants.SOAP_ACTION, 
Collections.singletonList(action));


> Allow SOAPAction to be overwritten via RequestContext property
> --------------------------------------------------------------
>
>                 Key: CXF-6732
>                 URL: https://issues.apache.org/jira/browse/CXF-6732
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 2.7.18, 3.2.0
>            Reporter: Tomohisa Igarashi
>            Assignee: Freeman Fang
>             Fix For: 3.1.5, 3.0.8, 3.2.0
>
>
> SoapPreProtocolOutInterceptor sets SOAPAction into PROTOCOL_HEADERS only when 
> it's not yet set here:
> https://fisheye6.atlassian.com/browse/cxf/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java?hb=true#to121
> If user reuses the client like Dispatch instance, the PROTOCOL_HEADERS is 
> carried over multiple invocations including SOAPAction specified for the 
> first invocation, thus the "javax.xml.ws.soap.http.soapaction.uri" property 
> is ignored afterward. IMO the "javax.xml.ws.soap.http.soapaction.uri" 
> standard property should precede existing SOAPAction in PROTOCOL_HEADERS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to