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.

Reply via email to