camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Camel cxfrs proxy response
Date Thu, 10 Dec 2015 10:32:35 GMT
Hi

Unfortunately I'm very busy right now with the other project so I can't 
help with investigating, can you please get Camel source and trace what 
is happening ?
It looks like the body is consumed somehow after a CXFRS call returns, 
may be the stream is cached, etc... Let us know if you can get to the 
bottom of it...
The only comment I can make is that in newer Camel releases one does not 
have to type no-op method implementations and having the interface or 
even or CXF specific model is sufficient, with RST DSL work pending to 
be completed a bit later on. This is not relevant to this issue though...

Thanks, Sergey

On 10/12/15 02:46, hoomanb wrote:
> Hi Sergey,
>
> Thanks for your reply on this, on the link that you have mentioned the
> solution appears to be setting the Response return type for the the
> controller, however this doesn't seem to work in my case. In
>
> .bean(new ProcessJsonResponse(), "processBody")
>
> I'm basically returning the result as Response object:
>
> return Response.status(Status.OK).entity(MyObjectList).build();
>
> additionally I thought I might change the return type of my controller as
> well:
>
> @GET
>          @Path("/{objectId}")
>          @Produces(MediaType.APPLICATION_JSON)
>          public Response getMyObject(@PathParam("objectId") String objectId)
> {
>                  return null;
>
>          }
>
> I'm receiving the 200 Response back but the result is null. When I debug
> this in unit test I'll see this:
>
> Response.status(Status.OK).entity(MyObjectList).build();
>
> contains the result. Deploying the solution into fuse and hitting the REST
> service only seems to return headers:
>
> 12:20:20,663 | INFO  | qtp790919676-179 | LoggingOutInterceptor            |
> 118 - org.apache.cxf.cxf-core - xxx | Outbound Message
> ---------------------------
> ID: 4
> Response-Code: 200
> Content-Type:
> Headers: {operationNamespace=[xxx], Host=[localhost:9002],
> breadcrumbId=[ID-xxx-50363-1449711439513-3-1], User-Agent=[curl/7.27.0],
> objectId=[xxx], X-Powered-By=[ASP.NET], Server=[Microsoft-IIS/7.0],
> Cache-Control=[private, max-age=0], X-AspNet-Version=[4.0.30319],
> ResponseContext=[{xxx, org.apache.cxf.service.model.MessageInfo=[MessageInfo
> OUTPUT: {xxx], schema-validation-enabled=NONE, org.apache.cxf.client=true,
> org.apache.cxf.message.inbound=true,
> org.apache.cxf.message.Message.PROTOCOL_HEADERS={Cache-Control=[private,
> max-age=0], Content-Length=[1559], content-type=[text/xml; charset=utf-8],
> Date=[Thu, 10 Dec 2015 02:20:15 GMT], Server=[Microsoft-IIS/7.0],
> X-AspNet-Version=[4.0.30319], X-Powered-By=[ASP.NET]},
> org.apache.cxf.interceptor.LoggingMessage.ID=6,
> javax.xml.ws.wsdl.service={xxx,
> org.apache.cxf.binding.soap.SoapVersion=org.apache.cxf.binding.soap.Soap11@62090db0,
> org.apache.cxf.message.Message.ENCODING=UTF-8,
> javax.xml.ws.wsdl.interface={xxx, javax.xml.ws.wsdl.operation={xxx}xxx,
> javax.xml.ws.wsdl.description=xxx?wsdl,
> org.apache.cxf.service.model.BindingMessageInfo=org.apache.cxf.service.model.BindingMessageInfo@138eb4b0,
> Content-Type=text/xml; charset=utf-8, org.apache.cxf.headers.Header.list=[],
> org.apache.cxf.message.Message.RESPONSE_CODE=200}], Date=[Thu, 10 Dec 2015
> 02:20:15 GMT], SOAPAction=[xxx], Accept=[application/json],
> org.apache.cxf.headers.Header.list=[[]], Content-Length=[0]}
>
> please correct me if I misunderstood you.
>
> Thanks
> Hooman
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-cxfrs-proxy-response-tp5774775p5774883.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Mime
View raw message