this is my wsdl generate the request in soap ui: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:iws="http://www.wstest.sunyard.com/IWSTestService/"> <soapenv:Header/> <soapenv:Body> <iws:getComplexObjectRequest> <iws:userNames> <iws:name>test</iws:name> </iws:userNames> <iws:userNames> <iws:name>test12</iws:name> </iws:userNames> </iws:getComplexObjectRequest> </soapenv:Body> </soapenv:Envelope>
so i write my program like 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=D:/IWSTestService.wsdl&dataFormat=PAYLOAD"); } }); context.start(); Endpoint endpoint = context.getEndpoint("direct:test"); Exchange exchange = endpoint.createExchange(); exchange.getIn().setHeader("operationName", "getComplexObjectService"); byte[] in = FileUtil.readAsByteArray(new File("d:/a.xml")); //a.xml content as the soapui request exchange.getIn().setBody(new String(in)); Producer producer = endpoint.createProducer(); producer.process(exchange); but it's error as "Cannot set right payload paremeters. Please check the BindingOperation and PayLoadMessage" -- View this message in context: http://camel.465427.n5.nabble.com/how-to-invoke-webservice-with-wsdl-or-not-in-camel-tp4700436p4703094.html Sent from the Camel - Users mailing list archive at Nabble.com.