Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

Labels (3)
3 Replies
Anonymous
Not applicable
Author

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

 

Anonymous
Not applicable
Author

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

Other solution, if you want to manage the response in java, headers etc :

 

String response = exchange.getIn().getBody(String.class);

 

Specifying String.class as parameter makes conversion.