Hi!
I want to create the following route in camel:

    <camel-cxf:cxfEndpoint id="soapClientEndpoint"
wsdlURL="wsdl/invoke.wsdl">
        <camel-cxf:properties>
            <entry key="dataFormat" value="CXF_MESSAGE"/>
        </camel-cxf:properties>
    </camel-cxf:cxfEndpoint>

   ...

        <route id="soapClient">
            <from uri="direct:soapClient"/>
            <to uri="cxf:bean:soapClientEndpoint"/>
        </route>


However, when I try to do so, I keep getting this error:

java.lang.IllegalArgumentException: endpointUri is not specified and
org.apache.camel.component.cxf.CxfEndpoint does not implement
createEndpointUri() to create a default value

Here is the Java I am using:
      camelContext_.addRoutes(new RouteBuilder() {
         @Override
         public void configure()
            throws Exception {
            CxfEndpoint cxfEndpoint = new CxfEndpoint();
            cxfEndpoint.setWsdlURL("wsdl/invoke.wsdl");
            cxfEndpoint.setCamelContext(camelContext_);

//         cxfEndpoint.setBeanId("soapClientEndpoint");  also tried this
            cxfEndpoint.setEndpointNameString("soapClientEndpoint");

           
cxfEndpoint.setDataFormat(org.apache.camel.component.cxf.DataFormat.CXF_MESSAGE);
            camelContext_.addEndpoint("soapClientEndpoint", cxfEndpoint);
            from("direct:soapClient").to("soapClientEndpoint");
         }
      });




--
View this message in context: 
http://camel.465427.n5.nabble.com/cxf-endpoint-configuration-in-java-DSL-tp5771538.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to