gtata007 opened a new issue, #3973: URL: https://github.com/apache/camel-k/issues/3973
Hello Everyone, I am trying a POC to invoke a sample SOAP service from Camel-K. My requirement is very simple I have a simple XML Payload which i need to pass to the SOAP operation. Is there any way to achieve this without having wsdl2java jax-ws client classes generation? The sample code looks as below. **Camel-k Version : Camel K Client 1.10.2** **Service :** http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?wsdl // camel-k: language=java import javax.xml.stream.events.Namespace; import org.apache.camel.support.builder.Namespaces; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.Processor; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.component.cxf.common.message.CxfConstants; public class TestWeb extends RouteBuilder { @Override public void configure() throws Exception { String WS_URI="cxf://http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?dataFormat=PAYLOAD"; Namespaces web = new Namespaces("web", "http://www.oorsprong.org/websamples.countryinfo"); from("timer:java?period=100000") .routeId("java") .setBody() .simple("<web:CountryCurrency xmlns:web=\"http://www.oorsprong.org/websamples.countryinfo\"><web:sCountryISOCode>IN</web:sCountryISOCode></web:CountryCurrency>") .setHeader(CxfConstants.OPERATION_NAMESPACE, constant("http://www.oorsprong.org/websamples.countryinfo")) .setHeader(CxfConstants.OPERATION_NAME, constant("CountryCurrency")) .to("cxf://http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?dataFormat=PAYLOAD") .to("log:info"); } } **Run command:** kamel run -d camel:cxf-soap TestWeb.java --dev -t logging.level=DEBUG Appreciate any valuable thoughts or suggestions on this. Regards, Guru Tata -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
