You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "John Poth (JIRA)" <ji...@apache.org> on 2016/11/09 15:04:58 UTC

[jira] [Commented] (CXF-6732) Allow SOAPAction to be overwritten via RequestContext property

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

John Poth commented on CXF-6732:
--------------------------------

Hi [~dtax],

I've push a fix in [camel-cxf|https://github.com/apache/camel/pull/1254] that fixes this. To workaround this issue you can register your own camel-cxf binding that basically mimics the fix:

{code}
package foo.bar;

import java.util.Map;

import org.apache.camel.Exchange;
import org.apache.camel.component.cxf.CxfBinding;
import org.apache.camel.component.cxf.DefaultCxfBinding;
import org.apache.cxf.binding.soap.SoapBindingConstants;

public class SoapHeaderCxfBinding extends DefaultCxfBinding{

    @Override
    protected void propagateHeadersFromCamelToCxf(Exchange camelExchange,
                                                  Map<String, Object> camelHeaders,
                                                  org.apache.cxf.message.Exchange cxfExchange,
                                                  Map<String, Object> cxfContext) {
        super.propagateHeadersFromCamelToCxf(camelExchange,camelHeaders,cxfExchange,cxfContext);
        cxfContext.put(SoapBindingConstants.SOAP_ACTION,camelHeaders.get(SoapBindingConstants.SOAP_ACTION));
        
    }
}
{code}

Cheers,

John.

> 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)