[
https://issues.apache.org/jira/browse/CXF-6733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pratik Pai updated CXF-6733:
----------------------------
Summary: Reading response body for HTTP status code 202 (JAX-WS) (was:
Reading response body for HTTP 202 request)
> 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
> Fix For: Invalid
>
>
> Background:
> Developing a cxf client to consume service developed in dot net.
> Aim:
> To read content returned by the service in case of HTTP 202
> Scenario:
> The service I am calling does not support WS-Addressing but still returns
> HTTP 202 with SOAP envelope response.
> Issue:
> As soon as the service returns a HTTP 202 it is treated as a one-way request
> and the response is ignored. In order to process that response I have set the
> property
> 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 the same
> 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 suggest if I have missed out on something or whether a fix can be
> provided in the above code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)