You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/03/22 21:29:42 UTC

[jira] [Resolved] (CXF-6733) Reading response body for HTTP status code 202 (JAX-WS)

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

Daniel Kulp resolved CXF-6733.
------------------------------
    Resolution: Won't Fix
      Assignee: Daniel Kulp

WS-BP requires soap messages that are not a fault to use 200.  You can add an interceptor to the in chain to map the 202->200, but it's not something we'll do normally as it's against spec.

> Reading response body for HTTP status code 202 (JAX-WS)
> -------------------------------------------------------
>
>                 Key: CXF-6733
>                 URL: https://issues.apache.org/jira/browse/CXF-6733
>             Project: CXF
>          Issue Type: Bug
>          Components: Core, Transports
>    Affects Versions: 3.1.4
>         Environment: Apache CXF 3.1.4, Windows 7 Professional 64 Bit System
>            Reporter: Pratik Pai
>            Assignee: Daniel Kulp
>             Fix For: Invalid
>
>
> Background:
> Developing a CXF client to consume SOAP web service developed in dot net.
> Aim:
> To read response entity(soap envelope) returned by the service in case of HTTP 202 response.
> Scenario:
> The service does not support WS-Addressing nor WS-RM but still returns HTTP 202 with SOAP envelope response which is as good as a normal service returning HTTP 202 with response.
> Issue:
> On returning a HTTP 202 it is treated as a one-way request and the response was ignored. In order to process the response I have set the property in the client port:
> BindingProvider provider = (BindingProvider)port;     provider.getRequestContext().put(Message.PROCESS_ONEWAY_RESPONSE, true);
> which now allows me to process the response in case of HTTP 202 but it is not set in the resulting object. This is because of the method processResult(class ClientImpl in the core jar) returning null due to the below code which expects a decoupled endpoint which is not true in my scenario.
> Integer responseCode = (Integer)exchange.get(Message.RESPONSE_CODE);
>         if (null != responseCode && 202 == responseCode) {
>             Endpoint ep = exchange.getEndpoint();
>             if (null != ep && null != ep.getEndpointInfo() && null == ep.getEndpointInfo().
>                 getProperty("org.apache.cxf.ws.addressing.MAPAggregator.decoupledDestination")) {
>                 return null;
>             }
>         }
> Please advise how the response can be processed in this scenario.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)