-
1. Re: FUSE ESB as a pass through?
mjabali Jan 4, 2012 6:31 PM (in response to hellosir1979)Hi,
I'd recommend you to take a look on the Apache Camel (FUSE Mediation Router) web service proxy sample available at http://camel.apache.org/cxf-proxy-example.html
Then you can host that web service proxy on FUSE ESB (ServiceMix).
There is also a thread that Claus Ibsen responded a similar question mentioning the reasons to follow that approach http://stackoverflow.com/questions/5939067/using-servicemix-to-proxy-remote-web-service ).
Hope this helps,
-Marcelo
-
2. Re: FUSE ESB as a pass through?
ffang Jan 4, 2012 9:18 PM (in response to mjabali)Hi,
Yeah, if you start a new project from the scratch, then we suggest you use camel component but not the JBI component.
If you have to stick to use JBI, then the work flow for your scenario is
cxfbc:consumer===>cxfse(web service1)===>cxfse:proxy(web service2)====>cxfbc:provider
the cxfse:proxy works as a normal object invocation
Take a look at to get more details about how cxfse:proxy works, the "Proxies" part.
http://servicemix.apache.org/servicemix-cxf-se.html
Freeman
-
3. Re: FUSE ESB as a pass through?
hellosir1979 Jan 6, 2012 2:15 PM (in response to mjabali)Hi thanks for the help. I'm able to deploy the artifact into fuse esb 4.3.0, but when i try to start it i get this message
karaf@root> Exception in thread "SpringOsgiExtenderThread-17" java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 're
fresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplication
ContextExecutor.java:345)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.fail(DependencyWaiterApplicationC
ontextExecutor.java:401)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicat
ionContextExecutor.java:287)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicati
onContextExecutor.java:175)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.j
ava:175)
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)
at java.lang.Thread.run(Thread.java:662)
Is there some feature or bundle I need to install to get this to work in Fuse?
Thanks in advance.
-
4. Re: FUSE ESB as a pass through?
mjabali Jan 6, 2012 2:24 PM (in response to hellosir1979)Couple of comments:
- The current version of the FUSE ESB is 4.4.1. If you have no requirements to run your solution in 4.3 then you should move the latest release.
- The reported exception doesn't tell us much. I'd suggest that you run:
karaf@root> log:display
and see if there is anything obvious there.
- Can you tell us what approach are you using? Camel or JBI? Feel free to post your route to give us a better idea how/what are you trying to do.
-Marcelo
-
5. Re: FUSE ESB as a pass through?
hellosir1979 Jan 6, 2012 2:34 PM (in response to mjabali)Hi,
We do have explicit instructions to be running 4.3.
In the servicemix.log,
this error seems to be what is causing the problem.
13:12:51,619 | ERROR | xtenderThread-17 | ContextLoaderListener | 72 - org.springframework.osgi.extender - 1.2.0 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=org.apache.camel.proxy, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace http://camel.apache.org/schema/cxf
Offending resource: URL bundleentry://227.fwk31664352/META-INF/spring/camel-config.xml
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[59:org.springframework.beans:3.0.5.RELEASE]
-
6. Re: FUSE ESB as a pass through?
mjabali Jan 6, 2012 2:50 PM (in response to hellosir1979)Try running the following:
karaf@root> osgi:list |grep camel
and reporting the results back here in the forum...
-
7. Re: FUSE ESB as a pass through?
hellosir1979 Jan 6, 2012 2:56 PM (in response to hellosir1979)Hi, we are using camel route.
Here is the camel-config.xml
...
...
-
-
9. Re: FUSE ESB as a pass through?
hellosir1979 Jan 6, 2012 3:43 PM (in response to hellosir1979)Quick backtrack...
In the example linked below,
http://camel.apache.org/cxf-proxy-example.html
I am able to run it using mvn camel:run.
Question is, how do I then deploy this example to run in fuse esb servicemix?
-
10. Re: FUSE ESB as a pass through?
mjabali Jan 6, 2012 8:51 PM (in response to hellosir1979)Try adding the following to your pom file:
If I remember correctly you also need to install the camel-http feature before you deploy this bundle.
-
11. Re: FUSE ESB as a pass through?
hellosir1979 Jan 6, 2012 9:38 PM (in response to mjabali)Hi,
I added the plugin you suggested to my pom file, but still same error when I try to start the bundle.
i installed the
camel-cxf
camel-http
camel-spring
as you can see by the lines below
camel-spring (2.6.0.fuse-03-01)
camel-example-cxf-proxy (2.7.1.fuse-00-27)
when i run
karaf@root> osgi:start 205
this error occurs, and I cannot figure out what I am missing or doing wrong.
Please help! Thanks a lot in advance!!
Error executing command: The bundle "org.apache.camel.camel-example-cxf-proxy_2.7.1.fuse-00-27 " could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.camel.spring; version="[2.7.0,2.8.0)"
I also copied the error from the servicemix.log
org.osgi.framework.BundleException: The bundle "org.apache.camel.camel-example-cxf-proxy_2.7.1.fuse-00-27 " could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.camel.spring; version="[2.7.0,2.8.0)"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)[osgi-3.6.0.v20100517.jar:]
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)[osgi-3.6.0.v20100517.jar:]
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.0.v20100517.jar:]
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.0.v20100517.jar:]
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.0.v20100517.jar:]
at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:29)[27:org.apache.karaf.shell.osgi:2.1.6.fuse-01-01]
at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:49)[27:org.apache.karaf.shell.osgi:2.1.6.fuse-01-01]
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at org.apache.karaf.shell.console.jline.Console.run(Console.java:170)[14:org.apache.karaf.shell.console:2.1.6.fuse-01-01]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_27]
here is the camel-config.xml
$/target/generated/src/main/java</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>$/src/main/resources/etc/report_incident.wsdl
The pom and camel-config are straight from the camel-example-cxf-proxy with the one plugin you had me put in.
To deploy the bundle, i did a "mvn install" and then copied the jar into the "deploy" folder of servicemix.
It installs, but is unable to start with that error message.
-
12. Re: FUSE ESB as a pass through?
mjabali Jan 6, 2012 10:17 PM (in response to hellosir1979)On your pom file, where you have the camel-spring dependency:
Please let me know if that works for you...
-
13. Re: FUSE ESB as a pass through?
hellosir1979 Jan 6, 2012 10:28 PM (in response to mjabali)Hi, I tried what you said and still the same error.
-
14. Re: FUSE ESB as a pass through?
mjabali Jan 7, 2012 12:47 AM (in response to hellosir1979)I noticed you're deploying the jar file onto the $SMX/deploy directory and that may be causing the issue once the camel version might not be matching.
I could successfully deploy the sample on SMX 4.3.1 using the following in the ServiceMix console:
karaf@root> osgi:install mvn:org.apache.camel/camel-example-cxf-proxy/2.6.0
Hope this helps