Dear,
Thanks for your help.
I have Tested my Web Service using
*exchange.getIn().setBody("<soap:Envelope
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ "<soap:Body><ns1:getApplication
xmlns:ns1=\"http://cxf.component.camel.apache.org/\">"
+ "<arg0
xmlns=\"http://cxf.component.camel.apache.org/\">hello world</arg0>"
+
"</ns1:getApplication></soap:Body></soap:Envelope>");*
Its working fine.
But When i am going to use Bellow code it will give me
*org.apache.camel.InvalidPayloadException: No body available of type:
java.io.InputStream but has value: [hello world] of type:
java.util.ArrayList on: Message: [hello world]. Caused by: No type converter
available to convert from type: java.util.ArrayList to the required type:
java.io.InputStream with value [hello world]. Exchange[Message: [hello
world]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException -
No type converter available to convert from type: java.util.ArrayList to the
required type: java.io.InputStream with value [hello world]]*
Code for same is given bellow.
Exchange exchange = template.request(endpointUri, new Processor() {
public void process(final Exchange exchange) throws Exception {
final List<String> params = new ArrayList<String>();
params.add("hello world");
exchange.getIn().setBody(params);
exchange.getIn().setHeader(CxfConstants.OPERATION_NAME,
"getApplication");
exchange.getIn().setHeader("requestObject", new
DefaultCxfBinding());
}
});
return exchange;
}
Where i made mistake?
Please help me.
--
View this message in context:
http://camel.465427.n5.nabble.com/SOAP-Web-service-Calling-using-camel-tp5745180p5745383.html
Sent from the Camel - Users mailing list archive at Nabble.com.