1 2 Previous Next 25 Replies Latest reply on Jun 20, 2012 4:19 AM by arcaballero Go to original post
      • 15. Re: Communication between services
        joatham.perezexposito

        Can you provide the url of the source code?

        • 17. Re: Communication between services
          arcaballero

          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

            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

              Hi,

               

              Please elaborate your flow clearly, I'm not sure what your flow is.

               

              Freeman

              • 20. Re: Communication between services
                ffang

                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

                  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

                    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

                    • 23. Re: Communication between services
                      ffang

                      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

                        Hi,

                         

                        Ensure your customer bundle already Import-Package org.myenterprise.services.tests.test1

                         

                        Freeman

                        • 25. Re: Communication between services
                          arcaballero

                          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

                          1 2 Previous Next