Six Stars

cCXF response handling

I am calling the service with cCXF component with "RAW" mode. The response  get is in the body and it looks like

Exchange[ExchangePattern: InOnly, BodyType: sun.net.www.protocol.http.HttpURLConnection.HttpInputStream, Body: [Body is instance of java.io.InputStream]]

  How would I see the response of the service in the body and not what I currently get.

2 REPLIES
Moderator

Re: cCXF response handling

Hello,

In the MESSAGE mode - the passed message is a complete SOAP message. So you will receive a DOM document of a complete SOAP message into your route and to create a response, you need to create a complete SOAP envelope reposponse

In the PAYLOAD mode to create a response, you will have to create a DOM document the message body.

In the POJO mode you have to attach a library with classes for the web service (service class, request and response classes) and to create a response, you will have to pass a response object as a route output.

Have you already created a Processor implementation where you create the output?

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: cCXF response handling

I just connected "Convert to" component with String.class and now I see the service's response in the body.