You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Saurabh Puranik (JIRA)" <ji...@apache.org> on 2019/04/12 06:26:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16816005#comment-16816005 ] 

Saurabh Puranik commented on CXF-6733:
--------------------------------------

Hi Daniel,



I am facing same issue in CXF client(2.6.1). I am consuming third party web service and one operation return response code 202 and as a result I am

Getting null. it is not set in the resulting object. Have you guys resolved this issue. I have searched this issue on internet and everywhere but not get answer / solution. Can you please reply on the same mail So that I can get away from this issue.



Thanking you in advance!


Best Regards,

Saurabh Puranik


> 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
>            Priority: Major
>             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
(v7.6.3#76005)