Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 90678 invoked from network); 14 Jul 2010 03:21:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jul 2010 03:21:27 -0000 Received: (qmail 4558 invoked by uid 500); 14 Jul 2010 03:21:27 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 4294 invoked by uid 500); 14 Jul 2010 03:21:24 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 4286 invoked by uid 99); 14 Jul 2010 03:21:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jul 2010 03:21:23 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [173.212.192.37] (HELO server.dankulp.com) (173.212.192.37) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jul 2010 03:21:15 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id ED382D1D005E; Tue, 13 Jul 2010 23:20:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-users@cxf.apache.org.icHWLVTCRi Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id D61E5D1D005C; Tue, 13 Jul 2010 23:20:52 -0400 (EDT) From: Daniel Kulp To: users@cxf.apache.org Subject: Re: Invoking Web Service from within Camel Component using CXF -- No conduit initiator found error Date: Tue, 13 Jul 2010 23:20:00 -0400 User-Agent: KMail/1.13.5 (Linux/2.6.34; KDE/4.4.5; x86_64; ; ) Cc: mindchi References: <1278949887796-1046431.post@n5.nabble.com> In-Reply-To: <1278949887796-1046431.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007132320.00632.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.1 What does your spring context file look like? You may need to import the cxf-extension-http-jetty.xml thing as well. Dan On Monday 12 July 2010 11:51:27 am mindchi wrote: > 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(Abstract > ConduitSelector.java:102) at > org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduit > Selector.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.(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:98 > 9) at > org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.ja > va:197) at > org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelCo > ntext.java:101) at > org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelCon > textFactoryBean.java:593) at > org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(S > impleApplicationEventMulticaster.java:78) at > org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.jav > a:49) at > org.springframework.context.event.SimpleApplicationEventMulticaster.multica > stEvent(SimpleApplicationEventMulticaster.java:76) at > org.springframework.context.support.AbstractApplicationContext.publishEvent > (AbstractApplicationContext.java:274) at > org.springframework.context.support.AbstractApplicationContext.finishRefres > h(AbstractApplicationContext.java:736) at > org.springframework.osgi.context.support.AbstractOsgiBundleApplicationConte > xt.finishRefresh(AbstractOsgiBundleApplicationContext.java: 235) > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicat > ionContext$4.run(AbstractDelegatedExecutionApplicationConte xt.java:358) > at > org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCC > L(PrivilegedUtils.java:85) at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicat > ionContext.completeRefresh(AbstractDelegatedExecutionApplic > ationContext.java:320) > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyW > aiterApplicationContextExecutor$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(Co > nduitInitiatorManagerImpl.java:112) at > org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(Abstract > ConduitSelector.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 : > > > org.apache.camel > camel-core > > > > org.springframework > spring-beans > provided > > > > commons-logging > commons-logging > provided > > > commons-digester > commons-digester > 2.0 > provided > > > commons-configuration > commons-configuration > 1.6 > provided > > > > commons-io > commons-io > 1.4 > provided > > > log4j > log4j > 1.2.14 > > > > > org.slf4j > slf4j-api > 1.5.8 > > > > org.slf4j > slf4j-log4j12 > 1.5.8 > > > org.apache.cxf > cxf-rt-core > 2.2.7 > runtime > > > org.apache.cxf > cxf-rt-frontend-jaxws > 2.2.7 > runtime > > > > org.apache.cxf > cxf-rt-transports-http > 2.2.7 > runtime > > > org.apache.cxf > cxf-rt-bindings-soap > 2.2.7 > runtime > > > > > org.apache.cxf > cxf-rt-transports-http-jetty > 2.2.7 > runtime > > > org.apache.cxf > cxf-bundle > 2.2.6-fuse-01-00 > runtime > > > > > > javax.xml.bind > jaxb-api > 2.0 > > > > org.apache.camel > camel-spring-osgi > 2.1.0 > > > > org.apache.camel > camel-test > 2.2.0 > test > > > > org.osgi > osgi_R4_core > 1.0 provided > true > > > > org.osgi > osgi_R4_compendium > 1.0 > provided > true > > > > > > > > > > org.apache.cxf > cxf-codegen-plugin > 2.2.7 > > > generate-sources > generate-sources > > ${basedir}/target/generated/src/main/java > > > ${basedir}/src/main/resources/wsdl/passsubscriber.wsdl > > > > > wsdl2java > > > > > > > org.codehaus.mojo > jaxb2-maven-plugin > > > > xjc > > > > > src/main/resources/schema > ${project.build.directory}/jaxb-generated-sources/ Directory> > > > > org.apache.felix > maven-bundle-plugin > true > > > ${pom.groupId}.${pom.artifactId} > > *, > 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.*, > > org.apache.cxf.bundle > > mil.army.us.sec.c2gw.adaptor.*, > > > > > > > > > > I'm basically stuck at this point, so any help in resolving this is much > appreciated. > > > -T -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog