Freeman Fang wrote: > > > On 2010-6-4, at 上午7:49, Freeman Fang wrote: > >> >> On 2010-6-4, at 上午6:36, Amigo_ wrote: >> >>> >>> >>> Freeman Fang wrote: >>>> >>>> >>>> On 2010-6-3, at 上午4:09, Amigo_ wrote: >>>> >>>>> >>>>> >>>>> Freeman Fang wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> My comment inline. >>>>>> On 2010-6-2, at 上午2:41, Amigo_ wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> Freeman Fang wrote: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> My comment inline. >>>>>>>> On 2010-6-1, at 上午4:24, Amigo_ wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Freeman Fang wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 2010-5-30, at 下午11:54, Amigo_ wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> I need to invoke external web service from SE. I've generated >>>>>>>>>>> codes >>>>>>>>>>> for >>>>>>>>>>> client using Apache CXF, but any invocations are blocked by >>>>>>>>>>> servicemix. >>>>>>>>>>> >>>>>>>>>>> I've searched this forum and I've read that there should a >>>>>>>>>>> binding >>>>>>>>>>> component >>>>>>>>>>> between my SE and WS, but I can hardly find any tutorials. I >>>>>>>>>>> will be >>>>>>>>>>> very >>>>>>>>>>> glad if someone could post any links to tutorials or just >>>>>>>>>>> clues >>>>>>>>>>> explaining >>>>>>>>>>> how to ensure communication with external ws over servicemix. >>>>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> In your case you need a cxf bc provider endpoint, so the flow >>>>>>>>>> looks >>>>>>>>>> like >>>>>>>>>> >>>>>>>>>> SE-->cxf bc providier--> external ws, >>>>>>>>>> >>>>>>>>>> You may need take a look at CxfBcProviderTest to get details >>>>>>>>>> about >>>>>>>>>> how >>>>>>>>>> it works. >>>>>>>>>> >>>>>>>>>> [1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java >>>>>>>>>> >>>>>>>>>> Freeman >>>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks for reply, but I can't make this works yet. I've >>>>>>>>> searched >>>>>>>>> internet >>>>>>>>> and found similar post with link to this >>>>>>>>> CxfBcProviderTest.java. >>>>>>>>> >>>>>>>>>>>> So we need to create raw SOAP message in order to pass data >>>>>>>>>>>> instead >>>>>>>>>>>> of >>>>>>>>>>>> directly deal with a JavaBean >>>>>>>>>>>> >>>>>>>>>>> No, you needn't create raw soap message yourself. >>>>>>>>>>> The raw soap message you saw in the test case is just a >>>>>>>>>>> simple >>>>>>>>>>> way >>>>>>>>>>> to >>>>>>>>>>> invoke the cxf se, it's not the key point of that test case. >>>>>>>>>>> The >>>>>>>>>>> key >>>>>>>>>>> point of that test case is cxf se can hold proxy of cxf bc >>>>>>>>>>> provider so >>>>>>>>>>> that you can invoke external webservice >>>>>>>>> >>>>>>>>> I assume I have to define cxf bc provider and managed to >>>>>>>>> communicate >>>>>>>>> with my >>>>>>>>> generated from wsdl cxf client. I added to my bundle- >>>>>>>>> context.xml - >>>>>>>>> cxfbc:provider and it looks like: >>>>>>>>> >>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans" >>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>> xmlns:osgi="http://www.springframework.org/schema/osgi" >>>>>>>>> xmlns:camel-osgi="http://camel.apache.org/schema/osgi" >>>>>>>>> xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" >>>>>>>>> xsi:schemaLocation=" >>>>>>>>> http://www.springframework.org/schema/beans >>>>>>>>> http://www.springframework.org/schema/beans/spring- >>>>>>>>> beans-2.0.xsd >>>>>>>>> http://www.springframework.org/schema/osgi >>>>>>>>> http://www.springframework.org/schema/osgi/spring-osgi.xsd >>>>>>>>> http://camel.apache.org/schema/osgi >>>>>>>>> http://camel.apache.org/schema/osgi/camel-osgi.xsd >>>>>>>>> http://servicemix.apache.org/cxfbc/1.0 >>>>>>>>> http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd"> >>>>>>>>> >>>>>>>>> <camel-osgi:camelContext xmlns="http://camel.apache.org/ >>>>>>>>> schema/ >>>>>>>>> spring"> >>>>>>>>> <route> >>>>>>>>> <from uri="timer://myTimer? >>>>>>>>> fixedRate=true&period=30000" /> >>>>>>>>> <bean ref="translator" method="translate" /> >>>>>>>>> </route> >>>>>>>>> </camel-osgi:camelContext> >>>>>>>>> >>>>>>>>> <bean class="com.amigo.cxf.TranslatorClient" >>>>>>>>> id="translator" /> >>>>>>>>> >>>>>>>>> <cxfbc:provider >>>>>>>>> wsdl="http://localhost:9090/Translator/translate? >>>>>>>>> WSDL" >>>>>>>>> locationURI="http://localhost:9090/Translator/translate" >>>>>>>>> endpoint="tns:translatorSOAP" service="translatorSOAP"> >>>>>>>>> </cxfbc:provider> >>>>>>>>> >>>>>>>>> </beans> >>>>>>>> One obvious problem I can tell now is you need add >>>>>>>> <bean >>>>>>>> class="org.apache.servicemix.common.osgi.EndpointExporter" /> >>>>>>>> when you use jbi endpoint in osgi container. >>>>>>>> You may need take a look at cxf-wsdl-first-osgi-package example >>>>>>>> shipped with kit to get idea how jbi endpoint works with osgi >>>>>>>> package. >>>>>>>> >>>>>>>> Freeman >>>>>>>> >>>>>>> >>>>>>> Hi, thanks for reply. I followed carefully this example and have >>>>>>> made some >>>>>>> changes to my bundle-context.xml It looks now like this: >>>>>>> >>>>>>> <beans xmlns="http://www.springframework.org/schema/beans" >>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>> xmlns:osgi="http://www.springframework.org/schema/osgi" >>>>>>> xmlns:camel-osgi="http://camel.apache.org/schema/osgi" >>>>>>> xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" >>>>>>> xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" >>>>>>> xsi:schemaLocation=" >>>>>>> http://www.springframework.org/schema/beans >>>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >>>>>>> http://www.springframework.org/schema/osgi >>>>>>> http://www.springframework.org/schema/osgi/spring-osgi.xsd >>>>>>> http://camel.apache.org/schema/spring >>>>>>> http://camel.apache.org/schema/spring/camel-spring.xsd >>>>>>> http://camel.apache.org/schema/osgi >>>>>>> http://camel.apache.org/schema/osgi/camel-osgi.xsd >>>>>>> http://servicemix.apache.org/cxfbc/1.0 >>>>>>> http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd >>>>>>> http://servicemix.apache.org/cxfse/1.0 >>>>>>> http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd"> >>>>>>> >>>>>>> <camel-osgi:camelContext xmlns="http://camel.apache.org/schema/ >>>>>>> spring"> >>>>>>> <route> >>>>>>> <from uri="timer://myTimer? >>>>>>> fixedRate=true&period=3000000" /> >>>>>>> <bean ref="translator" method="translate" /> >>>>>>> </route> >>>>>>> </camel-osgi:camelContext> >>>>>>> >>>>>>> <bean class="com.amigo.cxf.TranslatorClient" id="translator" /> >>>>>>> >>>>>>> <import resource="classpath:META-INF/cxf/cxf.xml" /> >>>>>>> <import resource="classpath:META-INF/cxf/cxf-extension-http- >>>>>>> jetty.xml" /> >>>>>>> <import resource="classpath:META-INF/cxf/cxf-extension- >>>>>>> soap.xml" /> >>>>>>> <import resource="classpath:META-INF/cxf/cxf-extension-http- >>>>>>> binding.xml" /> >>>>>>> <import resource="classpath:META-INF/cxf/cxf-extension-http- >>>>>>> jetty.xml" /> >>>>>>> >>>>>> You have two >>>>>> <import resource="classpath:META-INF/cxf/cxf-extension-http- >>>>>> jetty.xml" /> >>>>>> here, you should replace one with >>>>>> <import resource="classpath:META-INF/cxf/cxf-extension- >>>>>> http.xml" /> >>>>>> >>>>>> Freeman >>>>>> >>>>> >>>>> Hi, thanks again for reply. I updated that path, but unfortunately >>>>> it still >>>>> doesn't work. I have got an error about not having Provider >>>>> org.apache.axis2.jaxws.spi.Provider. I have fresh >>>> This error is caused by you install wrong jaxws-api bundle. >>>> You should use the one from servicemix, >>>> org.apache.servicemix.specs.jaxws-api-2.1. >>>> Could you check your bundle list? I guess there's a geronimo jaxws- >>>> api >>>> bundle, which shouldn't be there. >>>> >>>> Freeman >>>> >>>> >>> >>> Hi, thanks for reply. >>> >>> It looks like my jaxws-api bundle is ok. Here is the osgi:header: >>> >>> Apache ServiceMix Specs :: JAXWS API 2.1 (186) >>> ---------------------------------------------- >>> Manifest-Version = 1.0 >>> Built-By = gert >>> Bundle-Activator = org.apache.servicemix.specs.locator.Activator >>> Created-By = Apache Maven Bundle Plugin >>> Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt >>> Import-Package = >>> javax.xml.bind;version="2.1",javax.xml.bind.annotation;version="2.1",javax.xml.namespace,javax.xml.soap;version="1.3",javax.xml.transform,javax.xml.transform.stream,javax.xml.ws;version="2.1",javax.xml.ws.handler;version="2.1",javax.xml.ws.handler.soap;version="2.1",javax.xml.ws.http;version="2.1",javax.xml.ws.soap;version="2.1",javax.xml.ws.spi;version="2.1",javax.xml.ws.wsaddressing;version="2.1",org.osgi.framework,org.w3c.dom >>> Bnd-LastModified = 1272536530939 >>> Export-Package = >>> javax.xml.ws.soap;uses:="javax.xml.soap,javax.xml.ws.spi,javax.xml.ws";version="2.1",javax.xml.ws.handler;uses:="javax.xml.namespace,javax.xml.ws";version="2.1",javax.xml.ws.http;uses:="javax.xml.ws";version="2.1",javax.xml.ws.handler.soap;uses:="javax.xml.ws.handler,javax.xml.soap,javax.xml.namespace,javax.xml.bind";version="2.1",javax.xml.ws.spi;uses:="javax.xml.ws.handler,javax.xml.namespace,javax.xml.transform,javax.xml.ws.wsaddressing,javax.xml.ws,javax.xml.bind";version="2.1",javax.xml.ws.wsaddressing;uses:="javax.xml.namespace,javax.xml.ws.spi,org.w3c.dom,javax.xml.ws,javax.xml.bind,javax.xml.bind.annotation,javax.xml.transform";version="2.1",javax.xml.ws;uses:="javax.xml.ws.handler,javax.xml.namespace,org.w3c.dom,javax.xml.bind.annotation,javax.xml.transform,javax.xml.ws.spi,javax.xml.transform.stream,javax.xml.bind";version="2.1" >>> Bundle-Version = 1.5.0 >>> Bundle-Name = Apache ServiceMix Specs :: JAXWS API 2.1 >>> Bundle-Description = This pom provides project information that is >>> common to >>> all ServiceMix branches. >>> Build-Jdk = 1.5.0_18 >>> Private-Package = org.apache.servicemix.specs.locator >>> Bundle-DocURL = http://www.apache.org/ >>> Bundle-ManifestVersion = 2 >>> Bundle-Vendor = The Apache Software Foundation >>> Bundle-SymbolicName = org.apache.servicemix.specs.jaxws-api-2.1 >>> Implementation-Title = Apache ServiceMix >>> Tool = Bnd-0.0.255 >>> Implementation-Version = 1.5.0 >>> >>> And this is list of all my bundles >>> >>> ID State Blueprint Spring Level Name >>> [ 0] [Active ] [ ] [ ] [ 0] OSGi System >>> Bundle >>> (3.5.1.R35x_v20090827) >>> [ 1] [Active ] [ ] [ ] [ 5] OPS4J Pax Url >>> - mvn: >>> (1.1.2) >>> [ 2] [Active ] [ ] [ ] [ 5] OPS4J Pax Url >>> - wrap: >>> (1.1.2) >>> [ 3] [Active ] [ ] [ ] [ 8] OPS4J Pax >>> Logging - >>> API (1.4) >>> [ 4] [Active ] [ ] [ ] [ 8] OPS4J Pax >>> Logging - >>> Service (1.4) >>> [ 5] [Active ] [ ] [ ] [ 10] Apache Felix >>> Configuration Admin Service (1.2.4) >>> [ 6] [Active ] [ ] [ ] [ 10] Apache Felix >>> Preferences Service (1.0.4) >>> [ 7] [Active ] [ ] [ ] [ 11] Apache Felix >>> File >>> Install (2.0.8) >>> [ 8] [Active ] [Created ] [ ] [ 20] Apache Geronimo >>> Blueprint Bundle (1.0.0) >>> [ 9] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Features Deployer (1.4.0.fuse-01-00) >>> [ 10] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell Console (1.4.0.fuse-01-00) >>> [ 11] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell ConfigAdmin Commands (1.4.0.fuse-01-00) >>> [ 12] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Management (1.4.0.fuse-01-00) >>> [ 13] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Blueprint Deployer (1.4.0.fuse-01-00) >>> [ 14] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Features Management (1.4.0.fuse-01-00) >>> [ 15] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Admin Core (1.4.0.fuse-01-00) >>> [ 16] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell Log Commands (1.4.0.fuse-01-00) >>> [ 17] [Active ] [ ] [ ] [ 30] >>> org.osgi.impl.bundle.jmx (4.2.0.200907080519) >>> [ 18] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Spring Deployer (1.4.0.fuse-01-00) >>> [ 19] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Features Command (1.4.0.fuse-01-00) >>> [ 20] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell OSGi Commands (1.4.0.fuse-01-00) >>> [ 21] [Active ] [ ] [ ] [ 30] Apache Felix >>> Gogo >>> Shell Runtime (0.2.2) >>> [ 22] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Admin Management (1.4.0.fuse-01-00) >>> [ 23] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell PackageAdmin Commands (1.4.0.fuse-01-00) >>> [ 24] [Active ] [ ] [ ] [ 30] Apache MINA >>> Core >>> (2.0.0.RC1) >>> [ 25] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell SSH (1.4.0.fuse-01-00) >>> [ 26] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell Development Commands (1.4.0.fuse-01-00) >>> [ 27] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Shell Various Commands (1.4.0.fuse-01-00) >>> [ 28] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Admin Command (1.4.0.fuse-01-00) >>> [ 29] [Active ] [ ] [ ] [ 30] Apache Mina >>> SSHD :: >>> Core (0.3.0.fuse-01-00) >>> [ 30] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> JAAS Modules (1.4.0.fuse-01-00) >>> [ 31] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> Features Core (1.4.0.fuse-01-00) >>> [ 32] [Active ] [Created ] [ ] [ 30] Apache Felix >>> Karaf :: >>> JAAS Config (1.4.0.fuse-01-00) >>> [ 33] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Naming (1.2.0.fuse-01-00) >>> [ 34] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Transaction (1.2.0.fuse-01-00) >>> [ 35] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: aopalliance-1.0 (1.0.0.3) >>> [ 36] [Active ] [ ] [ ] [ 60] Spring Core >>> (2.5.6.SEC01) >>> [ 37] [Active ] [ ] [ ] [ 60] Spring Beans >>> (2.5.6.SEC01) >>> [ 38] [Active ] [ ] [ ] [ 60] Spring AOP >>> (2.5.6.SEC01) >>> [ 39] [Active ] [ ] [ ] [ 60] Spring Context >>> (2.5.6.SEC01) >>> [ 40] [Active ] [ ] [ ] [ 60] Spring >>> Context Support >>> (2.5.6.SEC01) >>> [ 41] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: cglib-2.1_3 (2.1.0.3_4) >>> [ 42] [Active ] [ ] [ ] [ 60] spring-osgi- >>> io (1.2.0) >>> [ 43] [Active ] [ ] [ ] [ 60] spring-osgi- >>> core >>> (1.2.0) >>> [ 44] [Active ] [ ] [ ] [ 60] spring-osgi- >>> extender >>> (1.2.0) >>> [ 45] [Active ] [ ] [ ] [ 60] spring-osgi- >>> annotation >>> (1.2.0) >>> [ 46] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Document (1.2.0.fuse-01-00) >>> [ 47] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: ACTIVATION API 1.4 (1.4.0) >>> [ 48] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: JBI API 1.0 (1.4.0) >>> [ 49] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: STAX API 1.0 (1.4.0) >>> [ 50] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix :: >>> Utils (1.2.0) >>> [ 51] [Active ] [ ] [ ] [ 60] Commons >>> Management >>> (1.0) >>> [ 52] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix NMR >>> API (1.2.0.fuse-01-00) >>> [ 53] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix NMR >>> Core (1.2.0.fuse-01-00) >>> [ 54] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix NMR >>> OSGi (1.2.0.fuse-01-00) >>> [ 55] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix NMR >>> Spring (1.2.0.fuse-01-00) >>> [ 56] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix NMR >>> Commands (1.2.0.fuse-01-00) >>> [ 57] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix NMR >>> Management (1.2.0.fuse-01-00) >>> [ 58] [Active ] [ ] [ ] [ 60] xbean- >>> classloader >>> (3.5) >>> [ 59] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: mail-1.4.1 (1.4.1.2) >>> [ 60] [Active ] [ ] [ ] [ 60] Stax2 API >>> (3.0.1) >>> [ 61] [Active ] [ ] [ ] [ 60] Woodstox XML- >>> processor >>> (4.0.7) >>> [ 62] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: wsdl4j-1.6.2 (1.6.2.2) >>> [ 63] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: ant-1.7.0 (1.7.0.3) >>> [ 64] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix JBI >>> Runtime (1.2.0.fuse-01-00) >>> [ 65] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix JBI >>> OSGi (1.2.0.fuse-01-00) >>> [ 66] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix JBI >>> Deployer (1.2.0.fuse-01-00) >>> [ 67] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix JBI >>> Commands (1.2.0.fuse-01-00) >>> [ 68] [Active ] [ ] [ ] [ 60] xbean-spring >>> (3.5) >>> [ 69] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> Common >>> (2010.01.0.fuse-01-00) >>> [ 70] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: core-3.2.3.v_686_R32x (3.2.3.2) >>> [ 71] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: antlr-3.0.1 (3.0.1.3) >>> [ 72] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: mvel-1.3.12 (1.3.12.1) >>> [ 73] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: drools-4.0.7 (4.0.7.4) >>> [ 74] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> Drools >>> Service Engine (2010.01.0.fuse-01-00) >>> [ 75] [Active ] [ ] [ ] [ 60] >>> geronimo-j2ee-connector_1.5_spec (2.0.0) >>> [ 76] [Active ] [ ] [ ] [ 60] Geronimo >>> TxManager :: >>> Connector (2.1.3) >>> [ 77] [Active ] [ ] [ ] [ 60] geronimo- >>> jms_1.1_spec >>> (1.1.1) >>> [ 78] [Active ] [ ] [ ] [ 60] >>> geronimo-servlet_2.5_spec (1.1.2) >>> [ 79] [Active ] [ ] [ ] [ 60] Spring >>> Transaction >>> (2.5.6.SEC01) >>> [ 80] [Active ] [ ] [ ] [ 60] Jencks (2.2) >>> [ 81] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: josql-1.5 (1.5.0.3) >>> [ 82] [Active ] [ ] [ ] [ 60] Commons Lang >>> (2.4) >>> [ 83] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: velocity-1.6.2 (1.6.2.3) >>> [ 84] [Active ] [ ] [ ] [ 60] >>> geronimo-j2ee-management_1.1_spec (1.0.1) >>> [ 85] [Active ] [ ] [ ] [ 60] Commons Pool >>> (1.5.4) >>> [ 86] [Active ] [ ] [ ] [ 60] kahadb >>> (5.3.0.fuse-01-00) >>> [ 87] [Active ] [ ] [ ] [ 60] activemq-core >>> (5.3.0.fuse-01-00) >>> [ 88] [Active ] [ ] [ ] [ 60] activemq-ra >>> (5.3.0.fuse-01-00) >>> [ 89] [Active ] [ ] [ ] [ 60] activemq- >>> console >>> (5.3.0.fuse-01-00) >>> [ 90] [Active ] [ ] [ ] [ 60] activemq-pool >>> (5.3.0.fuse-01-00) >>> [ 91] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix >>> Features :: ActiveMQ Commands (4.2.0.fuse-01-00) >>> [ 92] [Active ] [ ] [ ] [ 60] >>> geronimo-ws-metadata_2.0_spec (1.1.2) >>> [ 93] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: SAAJ API 1.3 (1.4.0) >>> [ 94] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: JAXB API 2.1 (1.4.0) >>> [ 96] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: jaxb-impl-2.1.12 (2.1.12.1) >>> [ 97] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> WS-Notification Service Engine (2010.01.0.fuse-01-00) >>> [ 98] [Active ] [ ] [ ] [ 60] camel-core >>> (2.2.0.fuse-01-00) >>> [ 99] [Active ] [ ] [ ] [ 60] geronimo- >>> jta_1.1_spec >>> (1.1.1) >>> [ 100] [Active ] [ ] [ ] [ 60] camel-spring- >>> osgi >>> (2.2.0.fuse-01-00) >>> [ 101] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: jetty-6.1.22 (6.1.22.1) >>> [ 102] [Active ] [ ] [ ] [ 60] OPS4J Pax Web >>> - API >>> (0.7.2) >>> [ 103] [Active ] [ ] [ ] [ 60] OPS4J Pax Web - >>> Service SPI (0.7.2) >>> [ 104] [Active ] [ ] [ ] [ 60] OPS4J Pax Web - >>> Runtime (0.7.2) >>> [ 105] [Active ] [ ] [ ] [ 60] OPS4J Pax Web >>> - Jetty >>> (0.7.2) >>> [ 106] [Active ] [ ] [ ] [ 60] Spring JMS >>> (2.5.6.SEC01) >>> [ 107] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: asm-2.2.3 (2.2.3.3) >>> [ 108] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: commons-codec-1.3 (1.3.0.2) >>> [ 109] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: jdom-1.1 (1.1.0.2) >>> [ 110] [Active ] [ ] [ ] [ 60] jettison (1.2) >>> [ 111] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: bcel-5.2 (5.2.0.2) >>> [ 112] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: xalan-2.7.1 (2.7.1.2) >>> [ 113] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: xercesImpl-2.9.1 (2.9.1.3) >>> [ 114] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: xmlbeans-2.4.0 (2.4.0.3) >>> [ 115] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: xmlsec-1.4.3 (1.4.3.2) >>> [ 116] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: xmlresolver-1.2 (1.2.0.2) >>> [ 117] [Active ] [ ] [ ] [ 60] XmlSchema >>> (1.4.5) >>> [ 118] [Active ] [ ] [ ] [ 60] Commons >>> Collections >>> (3.2.1) >>> [ 119] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: antlr-2.7.7 (2.7.7.2) >>> [ 120] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: oro-2.0.8 (2.0.8.3) >>> [ 121] [Active ] [ ] [ ] [ 60] Axiom API >>> (1.2.8) >>> [ 122] [Active ] [ ] [ ] [ 60] Axiom API >>> (1.2.8) >>> [ 123] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: neethi-2.0.4 (2.0.4.2) >>> [ 124] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: abdera-0.4.0-incubating (0.4.0.incubating_3) >>> [ 126] [Active ] [ ] [ ] [ 60] >>> geronimo-annotation_1.0_spec (1.1.1) >>> [ 127] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: JSR311 API 1.0 (1.4.0) >>> [ 128] [Active ] [ ] [ ] [ 60] Apache CXF >>> Bundle Jar >>> (2.2.6.fuse-01-00) >>> [ 129] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: commons-io-1.3.2 (1.3.2.3) >>> [ 130] [Active ] [ ] [ ] [ 60] camel-cxf >>> (2.2.0.fuse-01-00) >>> [ 131] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: saxon-9.1.0.1 (9.1.0.1_3) >>> [ 132] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> Saxon >>> Service Engine (2010.01.0.fuse-01-00) >>> [ 133] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: quartz-1.6.1 (1.6.1.3) >>> [ 134] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> Quartz >>> (2010.01.0.fuse-01-00) >>> [ 135] [Active ] [ ] [ ] [ 60] OPS4J Pax Web >>> - Jsp >>> Support (0.7.2) >>> [ 136] [Active ] [ ] [ ] [ 60] OPS4J Pax Web >>> Extender >>> - WAR (0.5.0) >>> [ 137] [Active ] [ ] [ ] [ 60] OPS4J Pax Web >>> Extender >>> - Whiteboard (0.5.0) >>> [ 138] [Active ] [ ] [ ] [ 60] OPS4J Pax Url >>> - war:, >>> war-i: (1.1.2) >>> [ 139] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix WAR >>> Deployer (4.2.0.fuse-01-00) >>> [ 140] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> Validation (2010.01.0.fuse-01-00) >>> [ 141] [Active ] [ ] [Started] [ 60] activemq- >>> broker.xml >>> (0.0.0) >>> [ 142] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: oscore-2.2.4 (2.2.4.3) >>> [ 143] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: propertyset-1.3 (1.3.0.3) >>> [ 144] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: osworkflow-2.7.0 (2.7.0.3) >>> [ 145] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> OSWorkflow (2010.01.0.fuse-01-00) >>> [ 146] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix JBI >>> Clustering Requestor (1.2.0.fuse-01-00) >>> [ 147] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix JBI >>> Clustering Engine (1.2.0.fuse-01-00) >>> [ 148] [Active ] [Created ] [ ] [ 60] Apache >>> ServiceMix JBI >>> Clustering Config (1.2.0.fuse-01-00) >>> [ 149] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> File >>> (2010.01.0.fuse-01-00) >>> [ 150] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: FastInfoset-1.2.7 (1.2.7.2) >>> [ 151] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: saaj-impl-1.3.2 (1.3.2.1) >>> [ 152] [Active ] [ ] [ ] [ 60] WSS4J (1.5.8) >>> [ 153] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: opensaml-1.1 (1.1.0.3) >>> [ 154] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> SOAP2 >>> (2010.01.0.fuse-01-00) >>> [ 155] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> CXF >>> Binding Component (2010.01.0.fuse-01-00) >>> [ 156] [Active ] [ ] [ ] [ 60] camel-jms >>> (2.2.0.fuse-01-00) >>> [ 157] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: commons-net-1.4.1 (1.4.1.3) >>> [ 158] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> FTP >>> (2010.01.0.fuse-01-00) >>> [ 159] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> Mail >>> (2010.01.0.fuse-01-00) >>> [ 160] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> Bean >>> (2010.01.0.fuse-01-00) >>> [ 161] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> EIP >>> (2010.01.0.fuse-01-00) >>> [ 162] [Active ] [ ] [ ] [ 60] Apache CXF >>> Runtime JBI >>> Binding (2.2.6.fuse-01-00) >>> [ 163] [Active ] [ ] [ ] [ 60] Apache CXF >>> Runtime JBI >>> Transport (2.2.6.fuse-01-00) >>> [ 164] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> CXF >>> Service Engine (2010.01.0.fuse-01-00) >>> [ 165] [Active ] [ ] [ ] [ 60] ServiceMix :: >>> SOAP >>> (2010.01.0.fuse-01-00) >>> [ 166] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> JMS >>> (2010.01.0.fuse-01-00) >>> [ 167] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: commons-httpclient-3.1 (3.1.0.4) >>> [ 168] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> HTTP >>> (2010.01.0.fuse-01-00) >>> [ 169] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> Camel >>> (2010.01.0.fuse-01-00) >>> [ 170] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: Scripting API 1.0 (1.4.0) >>> [ 171] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: groovy-1.5.6 (1.5.6.3) >>> [ 172] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: js-1.7R1 (1.0.0.7R1_2) >>> [ 173] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Bundles: jruby-1.1.2 (1.1.2.2) >>> [ 174] [Active ] [ ] [ ] [ 60] >>> ScriptEngines :: >>> Groovy (1.1) >>> [ 175] [Active ] [ ] [ ] [ 60] >>> ScriptEngines :: >>> JavaScript (1.1) >>> [ 176] [Active ] [ ] [ ] [ 60] >>> ScriptEngines :: JRuby >>> (1.1) >>> [ 177] [Active ] [ ] [Started] [ 60] ServiceMix :: >>> JSR-223 >>> Scripting Service Engine (2010.01.0.fuse-01-00) >>> [ 178] [Active ] [ ] [Started] [ 60] Translator >>> web service >>> (0.0.1.SNAPSHOT) >>> [ 179] [Active ] [ ] [Failed ] [ 60] CXF - sample >>> ws client >>> (0.0.1.SNAPSHOT) >>> [ 184] [Active ] [ ] [ ] [ 60] >>> mvn:org.apache.cxf/cxf-rt-frontend-jaxws >>> [ 186] [Active ] [ ] [ ] [ 60] Apache >>> ServiceMix >>> Specs :: JAXWS API 2.1 (1.5.0) >>> >> >> Hi, >> >> You needn't install mvn:org.apache.cxf/cxf-rt-frontend-jaxws, CXF >> Bundle should already contain it. >> And why your JAXWS API 2.1 version is 1.5.0? It should be 1.4.0 >> used in the kit? >> Why you install it yourself, if you start a clean smx, it will >> install and start correct JAXWS API version for you. >> >> Freeman > > Btw, if you are using 4.2.0-fuse-01-00, you may encounter a issue > tracked by CAMEL-2528[1] . > > The workaround currently is that you edit > $SMX_HOME/system/org/apache/camel/karaf/apache-camel/2.2.0-fuse-01-00/ > apache-camel-2.2.0-fuse-01-00-features.xml > > replace > <bundle>mvn:org.apache.geronimo.specs/geronimo-jaxws_2.1_spec/1.0</ > bundle> > with > <bundle>mvn:org.apache.servicemix.specs/ > org.apache.servicemix.specs.jaxws-api-2.1/1.4.0</bundle> > > [1]https://issues.apache.org/activemq/browse/CAMEL-2528 >
Hi, thanks for reply. It looks like I am again at the starting point. I have removed mvn:org.apache.cxf/cxf-rt-frontend-jaxws bundle and I now get error about "No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http". Maybe I will present my code <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:camel-osgi="http://camel.apache.org/schema/osgi" xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/osgi http://camel.apache.org/schema/osgi/camel-osgi.xsd http://servicemix.apache.org/cxfbc/1.0 http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd http://servicemix.apache.org/cxfse/1.0 http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" /> <cxfbc:provider wsdl="http://localhost:9090/Translator?wsdl" /> <cxfse:endpoint> <cxfse:pojo> <bean class="com.amigo.cxf.Translator_Service" /> </cxfse:pojo> </cxfse:endpoint> <bean class="org.apache.servicemix.common.osgi.EndpointExporter" /> <bean class="com.amigo.cxf.TranslatorClient" id="translator" /> <camel-osgi:camelContext xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="timer://myTimer?fixedRate=true&period=3000000" /> <bean ref="translator" method="translate" /> </route> </camel-osgi:camelContext> </beans> And translate function in TranslatorClient: private static final QName SERVICE_NAME = new QName( "http://www.amigo.com/amigo_translator/", "amigo_translator"); public Object translate(Object arg) { System.out.println("## translate -> BEG()"); URL wsdlURL = Translator_Service.WSDL_LOCATION; Translator_Service ss = new Translator_Service(wsdlURL, SERVICE_NAME); Translator port = ss.getTranslatorSOAP(); { System.out.println("Invoking translate..."); java.lang.String _translate_parameters = "hello world"; ### after this it throws an error java.lang.String _translate__return = port.translate(_translate_parameters); System.out.println("translate.result=" + _translate__return); } System.out.println("## translate -> END()"); return arg; } Error stack: ERROR | myTimer | TimerConsumer | rg.apache.camel.processor.Logger 248 | Error processing exchange. Exchange[Message: [Body is null]]. Caused by: [javax.xml.ws.soap.SOAPFaultException - No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http.] javax.xml.ws.soap.SOAPFaultException: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146) at $Proxy144.translate(Unknown Source) at com.amigo.cxf.TranslatorClient.translate(TranslatorClient.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:214) at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:133) at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:137) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67) at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53) at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82) at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67) at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177) at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88) at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49) at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228) at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66) at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67) at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103) at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) 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) at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:61) at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:715) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) ... 26 more I think there could be a problem with cxfse:endpoint because I set it up to com.amigo.cxf.Translator_Service but I invoke web service via Translator object (technically using object implementing interface Translator) returned from Translator_Service.getTranslatorSOAP(). Referring to this link: https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java . I believe I need to configure in my bundle-context.xml the following part: protected void setUp() throws Exception { super.setUp(); component = new CxfSeComponent(); jbi.activateComponent(component, "CxfSeComponent"); //Deploy proxy SU component.getServiceUnitManager().deploy("proxy", getServiceUnitPath("provider")); component.getServiceUnitManager().init("proxy", getServiceUnitPath("provider")); component.getServiceUnitManager().start("proxy"); } -- View this message in context: http://old.nabble.com/Invoking-external-web-service-from-SE-tp28722871p28786164.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
