[ 
https://issues.apache.org/jira/browse/CAMEL-7921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Freeman Fang resolved CAMEL-7921.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.15.4
                   2.14.4
                   2.16.0

commit fix
http://git-wip-us.apache.org/repos/asf/camel/commit/843ef83f for camel-2.14.x 
branch
http://git-wip-us.apache.org/repos/asf/camel/commit/63234bd1 for camel-2.15.x 
branch
http://git-wip-us.apache.org/repos/asf/camel/commit/8c36915e for master

> The soapAction HTTP header is not correctly set when running the CXF client 
> in POJO mode using Camel
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7921
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7921
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.12.3, 2.12.4, 2.13.2, 2.14.0
>            Reporter: Ton Swieb
>            Assignee: Freeman Fang
>             Fix For: 2.16.0, 2.14.4, 2.15.4
>
>         Attachments: soapActionTest.zip
>
>
> The soapAction HTTP header is not correctly set when running the CXF client 
> in POJO mode using Camel.
> The root cause seems to be that the service name from the generated service 
> class differs from the service name in the WSDL.
> For me it is unclear if this should be an issue with the cxf-codegen-plugin 
> or with the Camel CXF component. When running the CXF client without Camel 
> then the soapAction HTTP header is correctly set and the issue does not 
> occur. So that's why I first report the bug with Camel.
> Possible workarounds I found are:
> 1) Explicitly specifying the correct serviceName as CXF endpoint attribute.
> 2) Explicitly setting the soapAction header in the Camel route prior to 
> calling the CXF endpoint.
> Both workarounds are not desirable, because they are easily forgotten and CXF 
> does not throw an exception when you do. According to the basic profile v1.0 
> the soapAction HTTP header must match the value in the WSDL and receiving 
> SOAP servers may throw a SOAP Fault if it doesn't. Some SOAP servers do throw 
> an exception when the soapAction HTTP header is invalid. Resulting in 
> communication failures between some SOAP client/server combinations.
> I created a test project to verify the above behaviour with the following 
> tests:
> 1) CXF in PAYLOAD with Camel. => OK
> 2) CXF in POJO mode without Camel => OK
> 3) CXF in POJO mode with Camel => *NOT OK*
> 4) CXF in POJO mode with service name set => OK
> 5) CXF in POJO mode with soapAction set => OK
> I run the test project with multiple combinations of Camel and CXF. The 
> following combinations I have tried:
> 1) Camel 2.12.3 and CXF 2.7.10 (Apache Servicemix 5.0.0 setup)
> 2) Camel 2.12.4 and CXF 2.7.11 (Apache Servicemix 5.0.5 setup)
> 3) Camel 2.13.2 and CXF 2.7.11 (Apache Servicemix 5.1.3 and 5.3.0 setup)
> 4) Camel 2.14.0 and CXF 3.0.1
> In the example project the mismatch occurs between an annotation in the 
> generated service class:
> {code}
> @WebService(targetNamespace = "http://finalist.nl/ai/";, name = 
> "ICamelCxfTestService")
> {code}
> and the definition of the service name in the WSDL:
> {code}
> <wsdl:service name="CamelCxfTestService">
> {code}



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

Reply via email to