As you set the invocation parameter as POJO list, you need to set the 
dataFormate to be POJO.
Because camel-cxf default data format is POJO, removing the endpointUri option 
of dataFormat should work for you.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 2, 2014 at 5:51:07 PM, viral.patel69 ([email protected]) 
wrote:
>  
> Done Required changes still have some issue.
> String endpointUri=
> "cxf://http://localhost:8081/buzzor-service/services/ApplicationService?";  
> +
> "wsdlURL=http://localhost:8081/buzzor-service/services/ApplicationService?wsdl&";
>   
> +
> "serviceName={http://service.application.buzzor.atpl.com}ApplicationService&"; 
>  
> +
> "portName={http://service.application.buzzor.atpl.com}ApplicationServiceHttpPort&";
>   
> + "dataFormat=MESSAGE";
>  
> Exchange exchange = template.request(endpointUri, new Processor()  
> {
> public void process(final Exchange exchange) {
> List oList = new ArrayList();
> oList.add("Hello");
> exchange.getIn().setBody(oList);
> exchange.getIn().setHeader(CxfConstants.OPERATION_NAME,  
> "getApplication");
> exchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE,  
> "http://service.application.buzzor.atpl.com";);
> exchange.getIn().setHeader(Exchange.FILE_NAME, "testFile");  
> exchange.getIn().setHeader("requestObject",
> new DefaultCxfBinding());
> SOAPMessage message = processSOAP(exchange);
> System.out.println(message);
>  
> }
> });
>  
>  
> *Now i got an same error
>  
> org.apache.camel.InvalidPayloadException: No body available  
> of type:
> java.io.InputStream but has value: [Hello] of type: java.util.ArrayList  
> on:
> Message: [Hello]. Caused by: No type converter available to  
> convert from
> type: java.util.ArrayList to the required type: java.io.InputStream  
> with
> value [Hello]. Exchange[Message: [Hello]]. 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]]*
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-can-I-call-a-web-service-with-no-parameters-via-a-producerTemplate-tp4806257p5745425.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  

Reply via email to