camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: i use wsdl file and payload dataFormat, but IllegalArgumentException
Date Mon, 22 Aug 2011 03:34:24 GMT
You should put the message body with the elements of the parameter,
camel-cxf just point it out the issue.

You can find the example in the camel-cxf wiki page[1].

Please take good look at the camel-cxf example and document before you 
ask this kind of question.

[1]http://camel.apache.org/cxf.html

On 8/21/11 3:03 PM, xiangqiuzhao wrote:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>              public void configure() throws Exception {
>                  from("direct:test")
>                  .process(new MyProcessor())
>
> .to("cxf://http://localhost:8000/wstest/services/IWSTestService?wsdlURL=IWSTestService.wsdl&dataFormat=PAYLOAD")
>                  .process(new MyProcessor());
>              }
>          });
>
>          context.start();
>
>          Endpoint endpoint = context.getEndpoint("direct:test");
>          Exchange exchange = endpoint.createExchange();
>          exchange.getIn().setHeader("operationName",
> "getComplexObjectService");
>
>          exchange.getIn().setBody(in); //what the body shoud be??
>
>          Producer producer = endpoint.createProducer();
>          producer.process(exchange);
>          System.out.println(exchange.getOut().getBody());
>
> when i run my program, it's exception as:
> java.lang.IllegalArgumentException: The PayLoad elements cannot fit with the
> message parts of the BindingOperation. Please check the BindingOperation and
> PayLoadMessage.
>
> how to set the message body and send to the URI?
>
> my wsdl file is :
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/i-use-wsdl-file-and-payload-dataFormat-but-IllegalArgumentException-tp4719896p4719896.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Mime
View raw message