-
15. Re: Communication between services
joatham.perezexposito Jun 14, 2012 10:52 AM (in response to ffang)Can you provide the url of the source code?
-
16. Re: Communication between services
ffang Jun 14, 2012 7:05 PM (in response to joatham.perezexposito) -
17. Re: Communication between services
arcaballero Jun 15, 2012 6:38 AM (in response to ffang)Hi,
I have a similar issue. I need connect two services (serviceA depends on serviceB).
serviceB is a {cxfbc-bc, cxfbc-provider}
serviceA is a {cxfbc-bc, cxfse-se}
I'm using cxfse:proxy in serviceA-xbeans.xml to connect both services, but serviceA doesn't find the serviceB.
How can I get this functionality?
Edited by: arcaballero on Jun 15, 2012 10:25 AM
Edited by: arcaballero on Jun 15, 2012 10:38 AM
-
18. Re: Communication between services
arcaballero Jun 15, 2012 8:30 AM (in response to ffang)Hi,
To achieve the communication between (SE, BC-Provider) and (SE, SE) Are valid these examples?
https://issues.apache.org/jira/browse/SMXCOMP-421
20080630-BUG-routingServiceWithSeveralInterfaces-calculatrice.zip
-
19. Re: Communication between services
ffang Jun 15, 2012 8:52 AM (in response to arcaballero)Hi,
Please elaborate your flow clearly, I'm not sure what your flow is.
Freeman
-
20. Re: Communication between services
ffang Jun 15, 2012 9:03 AM (in response to arcaballero)Hi,
IIRC that issue(SMXCOMP-421) only exist between cxfse:proxy===>multiple cxfbc:providers
the cxfbc:providers share same servicename but using different endpoint names.
That issue already get fixed four years ago, so if you use more recent FUSE ESB, you won't run into such issue.
Freeman
-
21. Re: Communication between services
arcaballero Jun 15, 2012 10:28 AM (in response to ffang)I have a serviceB (cxfbc-bc, cxfbc-provider) exposed to the bus as follow:
<cxfbc:consumer wsdl="${serviceB.provider.locationURI}?wsdl"
targetService="serv:serviceBBeanService" targetInterface="serv:serviceBBean"
locationURI="${serviceB.consumer.locationURI}" mtomEnabled="false"
timeout="300" delegateToJaas="false" endpoint="tercEndpoint" >
</cxfbc:consumer>
And a serviceA (cxfbc-bc, cxfse-se) which depends on serviceB as follows:
The problem is that, when servicemix starts, if serviceB is not started yet, serviceA throws an exception, after this exception, if i update the serviceA any error is showed, so I thought that there a problem in fuse and serviceA is not waiting for serviceB.
Any thoughts?
Edited by: arcaballero on Jun 15, 2012 2:27 PM
Edited by: arcaballero on Jun 15, 2012 2:28 PM
-
22. Re: Communication between services
arcaballero Jun 19, 2012 9:09 AM (in response to ffang)These are the different cases I want to implement. The error that I get:
ERROR | ExtenderThread-7 | ContextLoaderListener | 88 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=service-test1-osgi-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.servicemix.cxfse.CxfSeEndpoint#0' defined in URL bundle://43.0:0/META-INF/spring/beans.xml: Cannot create inner bean 'org.myenterprise.services.tests.test1.Test1Impl#0' of type while setting bean property 'pojo'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.myenterprise.services.tests.test1.Test1Impl#0' defined in URL bundle://46.0:0/META-INF/spring/beans.xml: Cannot create inner bean 'cxfse:proxy#71b8b648' of type while setting bean property 'test2Proxy'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxfse:proxy#71b8b648': FactoryBean threw exception on object creation; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
-
proxies-test-osgi.zip 74.8 KB
-
-
23. Re: Communication between services
ffang Jun 19, 2012 8:34 PM (in response to arcaballero)Hi,
As serviceA and serviceB are in different bundles, so per OSGi async nature, ServiceA won't waiting for ServiceB, this isn't fuse problem, this is just how OSGi works. And assume bundle start sequence isn't good practice in OSGi world.
Anyway, you can let ServiceB expose a OSGi service and in ServiceA hold this service reference, this way bundle ServiceA will get started after bundle ServiceB fully started.
Freeman
-
24. Re: Communication between services
ffang Jun 19, 2012 8:35 PM (in response to arcaballero)Hi,
Ensure your customer bundle already Import-Package org.myenterprise.services.tests.test1
Freeman
-
25. Re: Communication between services
arcaballero Jun 20, 2012 4:19 AM (in response to ffang)We have the following proxy:
And within MANIFEST.MF
Export-Package: org.myenterprise.services.tests.test1;uses:="javax.jws,
org.myenterprise.services.tests.test2";version="2012.06.19"
Import-Package: META-INF.cxf,javax.jws;version="[2.0,3)",javax.wsdl,java
x.xml.bind;version="[2.2,3)",javax.xml.bind.annotation;version="[2.2,3)
",javax.xml.namespace,javax.xml.soap,javax.xml.ws,org.apache.cxf.bus,
org.apache.cxf.bus.resource,org.apache.cxf.bus.spring,
org.apache.cxf.configuration.spring,org.apache.cxf.resource,
org.apache.servicemix.common.osgi,org.apache.servicemix.cxfse,
org.myenterprise.services.tests.test2;
version="[2012.6,2013)",org.springframework.beans.factory.config
Require-Bundle: org.apache.cxf.bundle
Edited by: arcaballero on Jun 20, 2012 8:15 AM