cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pratik Pai (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-6733) Reading response body for HTTP status code 202 (JAX-WS)
Date Wed, 06 Jan 2016 10:07:39 GMT

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

Pratik Pai updated CXF-6733:
----------------------------
    Description: 
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.

  was:
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 as how the response can be processed in such a scenario.


> 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 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.4#6332)

Mime
View raw message