Hi,

I create my example following the cxf-wsdl-first-osgi-package example and i
could deploy the se and bc bundles correctly into servicemix, both of them
were active and started...

The problem appears when i try to consume a service that is exposed from
another bundle and inject the service reference into the pojo that implement
the endpoint.

I have two problems:

1) When i create the osgi packaging using maven it throws a compile error,
because the SE bundle doesn't have the class interface i'm consuming and
referencing in the pojo implementation.
I create the interface class into that bundle in order to remove the error
but i don't know if its the correct thing to do....

2) I create the two bundles correctly but the se bundle is active but not
started.

I put the following configuration into the beans.xml of the SE bundle, is
that correct?

----------
beans.xml:
----------

<cxfse:endpoint>
        <cxfse:pojo>
          <bean class="com.crs.sag.service.GeographicReferenceTypeImpl">
                <property name="bussinesService" 
ref="osgibattaBusiness"></property>
          </bean>
        </cxfse:pojo>
    </cxfse:endpoint>

    <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />

   <osgi:reference id="osgibattaBusiness" cardinality="1..1"
interface="com.crs.uy.business.IBattaBusiness">
        </osgi:reference>

-------------------
Pojo implementation
-------------------

@WebService(name = "ValidateLocationService", targetNamespace =
"http://com/crs/sag/service"; , endpointInterface =
"com.crs.sag.service.GeographicReferenceType")
public class GeographicReferenceTypeImpl implements GeographicReferenceType{
        private IBattaBusiness bussinesService;

        public IBattaBusiness getBussinesService() {
                return bussinesService;
        }

        public void setBussinesService(IBattaBusiness bussinesService) {
                this.bussinesService = bussinesService;
        }

        public ValidateLocationRSParam validateLocation(
                        ValidateLocationRQParam validateLocationRQ) {
                
System.out.println("validateLocationRQ.getHeaderRQ().getSession().getId()
= " + validateLocationRQ.getHeaderRQ().getSession().getId());
                ValidateLocationRSParam validateRS = new 
ValidateLocationRSParam();
                HeaderRS headerRS = new HeaderRS();
                HeaderRS.Session session = new HeaderRS.Session();
                session.setId("66666666666");
                headerRS.setSession(session);
                validateRS.setHeaderRS(headerRS);
                try {
                        this.bussinesService.executeService(null);
                } catch (Exception e) {
                        e.printStackTrace();
                }
                return validateRS;
        }

Thanks in advance, Santiago.
-- 
View this message in context: 
http://old.nabble.com/OSGI-Reference-injection-to-cxfse-endpoint-Problem-tp27882759p27882759.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to