camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Mielke (JIRA)" <>
Subject [jira] [Commented] (CAMEL-3806) SOAPAction HTTP header value not copied correctly to from CXF message to Camel message header
Date Mon, 28 Mar 2011 08:20:05 GMT


Torsten Mielke commented on CAMEL-3806:

Btw which client put quotes in the value? I actually wonder if that's really best practice,
and allowed to do?
According to the [SOAP 1.1 spec|],
the SOAPAction header value needs to be enclosed by double quotes. Here an extract of the
grammar defining the SOAPAction header:

soapaction    = "SOAPAction" ":" [ <"> URI-reference <"> ]
URI-reference = <as defined in RFC 2396 [4]>

CXF also generates double quotes around the SOAPAction header value. 

> SOAPAction HTTP header value not copied correctly to from CXF message to Camel message
> ---------------------------------------------------------------------------------------------
>                 Key: CAMEL-3806
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>         Environment: camel-cxf, CXF consumer endpoint with PAYLOAD data format 
>            Reporter: Torsten Mielke
>            Assignee: Willem Jiang
>              Labels: CXF, HTTP, SOAPAction, header
>             Fix For: 2.8.0
>         Attachments:
> When using camel-cxf consumer endpoint with PAYLOAD data format, the SoapActionInInterceptor
correctly strips off any double quotes surrounding the SOAPAction header value, e.g:
> {code}
> SOAPAction: ""
> {code}
> and then sets this header on the message again:
> {}
> public void handleMessage(SoapMessage message) throws Fault {
>         String action = getSoapAction(message);
>         if (!StringUtils.isEmpty(action)) {
>             getAndSetOperation(message, action);
>         }
>     }
> {code}
> After the execution of getAndSetOperation(message, action), there are two SOAPAction
headers set on the message. The original SOAPAction header value (with surrounding quotes)
is part of the org.apache.cxf.message.Message.PROTOCOL_HEADERS. In addition the getAndSetOperation()
method also adds 
> SOAPAction= header (without surrounding
> Later in org.apache.camel.component.cxf.DefaultCxfBinding.propagateHeadersFromCxfToCamel(),
when the CXF message headers get copied to the Camel message, it only retrieves the org.apache.cxf.message.Message.PROTOCOL_HEADERS:
> {code}
> Map<String, List<String>> cxfHeaders = (Map)cxfMessage.get(Message.PROTOCOL_HEADERS);
> {code}
> The SOAPAction header in PROTOCOL_HEADERS wasn't changed by the SoapActionInInterceptor
and hence still has enclosed double quotes. These headers then get copied to the Camel In
message headers. The header that was set by the SoapActionInInterceptor SOAPAction=
does not get copied!
> If later in a Camel route a custom Camel Processor tries to resolve this SOAPAction header,
it gets the the value with surrounding double quotes, but these should actually have been
stripped off. 
> This behavior is a bug.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message