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

Freeman Fang commented on CAMEL-9103:
-------------------------------------

For the async mode, I believe the problem comes from the test soap response 
itself
currently it's
{code}
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
        <env:Header>
                
<wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
        </env:Header>
        <env:Body>
                <env:Fault>
                        <faultcode>env:Client</faultcode>
                        <faultstring>Rejected by policy.</faultstring>
                        
<faultactor>urn:nav:ikt:plattform:samhandling:t5_pepgwsbs:OutboundPartnerSecurityGateway</faultactor>
                </env:Fault>
        </env:Body>
</env:Envelope>
{code}

and  per MAPCodec.markPartialResponse method, this message lack of RelatesTo 
ws-addressing header, so it's a partial response(empty message). And per the 
spec, reply message must have RelatesTo header, we can see more details from 
discussion CXF-3916.

If I add a
{code} 
<wsa:RelatesTo>1234567</wsa:RelatesTo>
{code}
header into soapfault.xml, the sync/async behavior are identical. So IMO, this 
is a testcase problem which uses invalid soap resp message.

Freeman



> camel-cxf does not handle soapfaults with ws-addressing headers in async mode
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-9103
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9103
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.15.3
>            Reporter: Bjørn Hilstad
>            Assignee: Freeman Fang
>            Priority: Minor
>         Attachments: camel-jboss-web.7z
>
>
> I am invoking a SOAP 1.1 webservice with WS-Addressing using camel-cxf. When 
> the webservice returns a soapfault that includes a ws-addressing header 
> (<wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>) 
> which I believe is allowed per spec (ws-addressing) I can see in logs that 
> cxf processes the response but the response never reaches Camel (would be 
> handled by the DefaultErrorHandler). The thread just hangs forever.
> I have been able to get the same test to work if I configure the camel 
> endpoint for cxf to use synchronous=true.
> I am attaching a maven project that contains a test that reproduces the 
> issue. The test uses wiremock as a stub to return the response.
> If the endpoint in the camelcontext is changed to use synchronous=true the 
> test succeeds (it gets the soapfault that is expected).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to