-
1. Re: Call an external Web Service in apache-servicemix-4.3.0-fuse-00-00
ffang Dec 5, 2011 8:59 PM (in response to stephane_stephane.pain)Hi,
First of all, apache-servicemix-4.3.0-fuse-00-00 is quite old version so definitely suggest you to use more recent version, the latest released version is FUSE ESB 4.4.1-fuse-01-11.
For your questions, you just wanna a proxy in servicemix to let external client call external webservice, right?
If so, we actually have tests demonstrating how to do it.
With servicemix-cxf-bc jbi component, the test is[1], the configuration file used for this test is here[2].
If you start with new project, I suggest you don't use jbi component anymore, use camel component instead.Here is an test[3] about how to use camel-cxf component to do the proxy, more importantly, the configuration[4] used in this test
Hope this helps.
https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java
https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/cxf_provider_consumer_bridge.xml
https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfProxyExampleTest.java
https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/cxf/camel-config.xml
Freeman
-
2. Re: Call an external Web Service in apache-servicemix-4.3.0-fuse-00-00
stephane_stephane.pain Dec 6, 2011 4:17 AM (in response to ffang)Hi,
I will try to upgrade to 4.4.1-fuse-01-11.
For moment, I test with your recommandation.
That I want to do is this :
HTTP Consumer -> Camel Route -> External Web Service
If I try to do a route like this
I have the error "No component found with scheme: cxf"
What is this problems ? And How I can resolve it ?
For upgrade to the last version and/or remove my jbi component, I think I need time because I need to change my HTTP, FILE and QUARTZ jbi component by Camel component and I need to test my own Camel Bean with the new version.
Thank you for your help
Regards
Stéphane
-
3. Re: Call an external Web Service in apache-servicemix-4.3.0-fuse-00-00
ffang Dec 6, 2011 4:49 AM (in response to stephane_stephane.pain)Hi,
For your question
I have the error "No component found with scheme: http"
ensure you already install camel-http feature
I have the error "No component found with scheme: cxf"
ensure you already install camel-cxf feature.
Freeman
-
4. Re: Call an external Web Service in apache-servicemix-4.3.0-fuse-00-00
stephane_stephane.pain Dec 6, 2011 5:18 AM (in response to ffang)Hi
I do features:install camel-http and features:install camel-cxf
and nonw, when Fuse start, I have the error
Error creating bean with name 'org.apache.cxf.resource.ResourceManager' defined in class path resource : Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'resolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type to required type for property 'resolvers[2]': no matching editors or conversion strategy found</loc-message>
I'm very sorry for this post, but I don't known what is this error.
Thank you for your help
Regards
Stéphane
-
5. Re: Call an external Web Service in apache-servicemix-4.3.0-fuse-00-00
ffang Dec 6, 2011 5:39 AM (in response to stephane_stephane.pain)Hi,
The error like
Cannot convert value of type
required type [org.apache.cxf.resource.ResourceResolver
generally means the org.apache.cxf.bus.spring.BusApplicationContextResourceResolver and org.apache.cxf.resource.ResourceResolver get loaded by different classloaders, which shouldn't happen.
This error could be caused by your customer bundle embed cxf jars, do you?
How you package your SA? JBI packaging or OSGi packaging?
I suggest you should use OSGi packaging which is best practice in OSGi world, we have cxf-wsdl-first-osgi-package(OSGi packaging) and cxf-wsdl-first(JBI packaging) to demonstrate the difference, you may need take a look.
And I strongly suggest you use more recent FUSE ESB version.
Freeman
-
6. Re: Call an external Web Service in apache-servicemix-4.3.0-fuse-00-00
stephane_stephane.pain Dec 6, 2011 9:08 AM (in response to ffang)Hi
Thank you, I can call my external Web Service and I can receive the result.
My SA is package by Maven and it is a JBI packaging.
When my planning will be less busy, I will upgrade the version, use camel component and use OSGI package.
Thank you very much
Stéphane