You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Willem Jiang <wi...@gmail.com> on 2014/06/27 04:15:44 UTC

Re: Error on using camel cxf "No bindingfactory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

Can you use “mvn dependency:tree” to dump the third party jar list?
Just make sure the cxf-rt-bindings-soap-***.jar is in the list to fix the issue.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On June 27, 2014 at 4:30:34 AM, dermoritz (tanteanni@hotmail.com) wrote:
> In my camel app i am creating cxf endpoints in java dsl:
>  
> CxfEndpoint cxf = new CxfEndpoint(rtdmUrl, new
> CxfComponent(this.getContext()));
> cxf.setServiceClass(EventPortType.class);
> process.process(rtdmSetNameFactory.get(eventName)).to(cxf).process(handleRtdmAnswer);  
>  
> If try to run this route i get:
>  
> Exception in thread "main" org.apache.camel.FailedToCreateProducerException:  
> Failed to create Producer for endpoint: End
> point[http://localhost:8088/mockEventSoapBinding]. Reason:
> org.apache.cxf.service.factory.ServiceConstructionException:
> Could not resolve a binding for null
> ...
> Caused by: org.apache.cxf.BusException: No binding factory for namespace
> http://schemas.xmlsoap.org/soap/ registered.
> But if i run main[] from within eclipse (called in a @Test with same
> configuration) it is working fine!?
>  
> My jar is built with maven-assembly-plugin (executable jar with all
> dependencies) I hope/think this is only a configuration problem or is
> related to how i set up the cxf endpoint.
> I also tried to add a camel-cxf.xml to src/main/resources (like the one from
> camel in action but without the endpoint config), no success.
>  
> Additional info:
> The code above is run in a loop after a "process". The exchange containing
> data is created once but this exchange will be processed multiple times
> (setting name in exchange object) and then it is sent to same web service
> multiple times with different names. (don't ask about this silly web service
> design ;-))
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-on-using-camel-cxf-No-binding-factory-http-schemas-xmlsoap-org-soap-registered-but-works-in-ec-tp5752910.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

Posted by dermoritz <ta...@hotmail.com>.
Thanks for quick reply. My main looks as follows:

    public static void main(final String... args) throws Exception {
        Injector i;
        if (args.length < 1 || Strings.isNullOrEmpty(args[0])) {
            i = Guice.createInjector(new CepModule());
        } else {
            i = Guice.createInjector(new CepModule(args[0]));
        }
        OurMain main = i.getInstance(OurMain.class);
        // eliminates logging to java.util.logger
        SLF4JBridgeHandler.removeHandlersForRootLogger();
        // redirects all java.util.logger stuff to slf4j
        SLF4JBridgeHandler.install();
        //i.getInstance(RouteControl.class).startAll();
        main.enableHangupSupport();
        main.run();
    }

As i said before i have a "@Test" that just runs this method with same
configuration in Eclipse and this works fine.
I read many links regarding this error. Often i read something about cxf.xml
(which is present in META-INF/cxf) and/or a camel-cxf.xml. Do i need this?


The line with "startAll" is commented out and related to this question:
http://stackoverflow.com/questions/24427765/camel-getroutes-returns-empty-list-how-to-implement-a-route-controller



--
View this message in context: http://camel.465427.n5.nabble.com/Error-on-using-camel-cxf-No-binding-factory-http-schemas-xmlsoap-org-soap-registered-but-works-in-ec-tp5752910p5752939.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Error on using camel cxf "No bindingfactory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

Posted by Willem Jiang <wi...@gmail.com>.
I can see the cxf-rt-bindings-soap:jar.
Now my question is how did you run this stand alone application?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On June 27, 2014 at 2:49:53 PM, dermoritz (tanteanni@hotmail.com) wrote:
> > *org.apache.cxf:cxf-rt-bindings-soap:jar


Re: Error on using camel cxf "No binding factory… http://schemas.xmlsoap.org/soap/ registered (but works in eclipse)

Posted by dermoritz <ta...@hotmail.com>.
Here it is:

[INFO] com.sas:cep-adapter-java:jar:1.0-SNAPSHOT
[INFO] +- com.sas:dfESP-component:jar:1.0-SNAPSHOT:compile
[INFO] |  \- dfx-esp-api:api:jar:2.2-post:compile
[INFO] +- com.sas.o2:RTDM_general_client:jar:0.0.1-SNAPSHOT:compile
[INFO] +- com.google.inject:guice:jar:3.0:compile
[INFO] |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- com.google.inject.extensions:guice-multibindings:jar:3.0:compile
[INFO] +- com.google.guava:guava:jar:16.0.1:compile
[INFO] +- joda-time:joda-time:jar:2.3:compile
[INFO] +- org.apache.camel:camel-core:jar:2.13.1:compile
[INFO] |  \- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
[INFO] +- org.apache.camel:camel-ftp:jar:2.13.1:compile
[INFO] |  +- com.jcraft:jsch:jar:0.1.50:compile
[INFO] |  \- commons-net:commons-net:jar:3.3:compile
[INFO] +- org.apache.camel:camel-cxf:jar:2.13.1:compile
[INFO] |  +- org.apache.camel:camel-spring:jar:2.13.1:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:3.2.8.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-tx:jar:3.2.8.RELEASE:compile
[INFO] |  +- org.apache.camel:camel-cxf-transport:jar:2.13.1:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:2.7.11:compile
[INFO] |  |  +- org.apache.cxf:cxf-api:jar:2.7.11:compile
[INFO] |  |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.1:compile
[INFO] |  |  |  |  \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] |  |  |  +- org.apache.ws.xmlschema:xmlschema-core:jar:2.1.0:compile
[INFO] |  |  |  +-
org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] |  |  |  \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-core:jar:2.7.11:compile
[INFO] |  |  +- javax.ws.rs:javax.ws.rs-api:jar:2.0-m10:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.11:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-transports-http:jar:2.7.11:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.11:compile
[INFO] |  |  +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] |  |  +- asm:asm:jar:3.3.1:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.11:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.11:compile
[INFO] |  |     \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.11:compile
[INFO] |  |        \- org.apache.neethi:neethi:jar:3.0.3:compile
[INFO] |  +- org.apache.cxf:cxf-rt-rs-security-oauth:jar:2.7.11:compile
[INFO] |  |  \- net.oauth.core:oauth-provider:jar:20100527:compile
[INFO] |  |     \- net.oauth.core:oauth:jar:20100527:compile
[INFO] |  +- org.springframework:spring-core:jar:3.2.8.RELEASE:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  +- org.springframework:spring-beans:jar:3.2.8.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:3.2.8.RELEASE:compile
[INFO] |  |  \-
org.springframework:spring-expression:jar:3.2.8.RELEASE:compile
[INFO] |  +- org.apache.cxf:cxf-rt-features-clustering:jar:2.7.11:compile
[INFO] |  \- *org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.11:compile*
[INFO] |     \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.11:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.7:compile
[INFO] +- org.slf4j:jul-to-slf4j:jar:1.7.7:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.apache.camel:camel-test:jar:2.13.0:test
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- org.mockftpserver:MockFtpServer:jar:2.4:compile
[INFO] +- org.jukito:jukito:jar:1.4:compile
[INFO] |  +- org.mockito:mockito-core:jar:1.9.5:compile
[INFO] |  |  \- org.objenesis:objenesis:jar:1.0:compile
[INFO] |  \-
com.google.inject.extensions:guice-assistedinject:jar:3.0:compile
[INFO] \- org.hamcrest:hamcrest-all:jar:1.3:compile

In meantime i tried to add "cxf-rt-transports-http-jetty" but didn't help. I
also tried to add a camel-cxf.xml, but didn't helped neither. But why the
hell is this running fine in eclipse but not "stand alone"??



--
View this message in context: http://camel.465427.n5.nabble.com/Error-on-using-camel-cxf-No-binding-factory-http-schemas-xmlsoap-org-soap-registered-but-works-in-ec-tp5752910p5752932.html
Sent from the Camel - Users mailing list archive at Nabble.com.