Hi, I'm creating a Camel component from which I want to invoke a web service using CXF. I'm using plain CXF as opposed to the Camel CXF component.
snippet of code that's connecting to the web service looks like the following ss = new MyService(mainWsdl.toURI().toURL(), SERVICE_NAME); port = ss.getMyService(); portBP = (BindingProvider) port; urlUsed = (String) portBP.getRequestContext().get (BindingProvider.ENDPOINT_ADDRESS_PROPERTY); setHTTPsConnection(); setHTTPsConnection() does the following: portBP.getRequestContext().put (BindingProvider.ENDPOINT_ADDRESS_PROPERTY, _endpointAddress); portBP.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, _myUsername); portBP.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, _myPassword); Client client = ClientProxy.getClient(port); HTTPConduit http = (HTTPConduit) client.getConduit(); TLSClientParameters tlsParameters = new TLSClientParameters(); : : When I run this, I get the following error: org.apache.cxf.interceptor.Fault: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http. at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:102) at org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:71) at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:711) at com.acme.webservice.demo.DEMOPort.setHTTPsConnection(PASSPort.java:514) at com.acme.webservice.demo.DEMOPort.<init>(DEMOPort.java:118) at com.acme.webservice.demo.osgi.DEMOReceiverService.init(DEMOReceiverService.java:58) atcom.acme.webservice.Service.initialize(Service.java:46) at com.acme.webservice.demo.camel.DEMOConsumer.doStart(DEMOConsumer.java:63) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53) at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989) at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197) at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101) at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593) at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java: 235) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationConte xt.java:358) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplic ationContext.java:320) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dep endencyWaiterApplicationContextExecutor.java:136) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.cxf.BusException: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http. at org.apache.cxf.transport.ConduitInitiatorManagerImpl.getConduitInitiator(ConduitInitiatorManagerImpl.java:112) at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:73) ... 24 more I've seen some posts on the internet from people having a similar problem using Maven and CXF and the solution was to include the cxf-rt-transports-http-jetty jar file in thePOM file. I am doing this, and I have imported most of the CXF packages into my bundle, but I am still getting this error. My POM file has the following dependencies and Import-Package : <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>commons-digester</groupId> <artifactId>commons-digester</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.6</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> </dependency> <!-- cxf using slf4j --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.5.8</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.5.8</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-core</artifactId> <version>2.2.7</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.2.7</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.2.7</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-bindings-soap</artifactId> <version>2.2.7</version> <scope>runtime</scope> </dependency> <!-- using Jetty with CXF --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>2.2.7</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle</artifactId> <version>2.2.6-fuse-01-00</version> <scope>runtime</scope> </dependency> <!-- using JAXB --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-osgi</artifactId> <version>2.1.0</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-test</artifactId> <version>2.2.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>osgi_R4_core</artifactId> <version>1.0</version> <scope>provided</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>osgi_R4_compendium</artifactId> <version>1.0</version> <scope>provided</scope> <optional>true</optional> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>2.2.7</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>${basedir}/src/main/resources/wsdl/passsubscriber.wsdl</wsdl> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <schemaDirectory>src/main/resources/schema</schemaDirectory> <outputDirectory>${project.build.directory}/jaxb-generated-sources/</outputDirectory> </configuration> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName> <Import-Package> *, org.apache.commons.logging, org.apache.commons.digester;version="2.0", org.apache.commons.configuration;version="1.6", org.apache.commons.io;version="1.4", javax.jws, javax.wsdl, META-INF.cxf, META-INF.cxf.osgi, org.apache.cxf, org.apache.cxf.bus, org.apache.cxf.bus.spring, org.apache.cxf.configuration.spring, org.apache.cxf.resource, org.apache.cxf.binding, org.apache.cxf.binding.soap, org.apache.cxf.binding.soap.model, org.apache.cxf.binding.soap.saaj, org.apache.cxf.binding.soap.interceptor, org.apache.cxf.interceptor, org.apache.cxf.phase, org.apache.cxf.frontend, org.apache.cxf.transport, org.apache.cxf.transport.http, org.apache.cxf.transport.https, org.apache.cxf.transport.http_osgi, org.apache.cxf.transport.http_jetty, org.apache.cxf.jaxws.handler, org.apache.cxf.jaxws.handler.logical, org.apache.cxf.jaxws.handler.soap, org.apache.cxf.jaxws.binding.soap, org.apache.servicemix.util, org.springframework.beans.factory.config, org.apache.camel, org.apache.camel.builder, org.apache.camel.language, org.apache.camel.model, mil.army.us.sec.c2gw.dispatcher.service.model.*, </Import-Package> <Require-Bundle>org.apache.cxf.bundle</Require-Bundle> <Export-Package> mil.army.us.sec.c2gw.adaptor.*, </Export-Package> </instructions> </configuration> </plugin> </plugins> </build> </project> I'm basically stuck at this point, so any help in resolving this is much appreciated. -T -- View this message in context: http://cxf.547215.n5.nabble.com/Invoking-Web-Service-from-within-Camel-Component-using-CXF-No-conduit-initiator-found-error-tp1046431p1046431.html Sent from the cxf-user mailing list archive at Nabble.com.
