cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bosschaert <david.bosscha...@gmail.com>
Subject Re: DOSGi CXF WebService Interface and Implementation in different bundles
Date Fri, 13 Apr 2012 15:02:06 GMT
How are you publishing via DOSGi if you're not using
BundleContext.registerService()? OSGi Remote Services (and CXF DOSGi)
only works with services in the OSGi Service Registry. So you either
need to put them there by calling BundleContext.registerService() or
you can use a component framework like Blueprint or DS to do that for
you...

Cheers,

David


On 13 April 2012 15:33, Thomas Pischulski <nephix0r@googlemail.com> wrote:
> Hey David,
>
> that's what I did even though I didn't use registerService() and
> ServiceTracker to access the interface. I thought exporting the
> interface from the "interface-share-bundle" and importing it into the
> bundle (via MANIFEST) where I register my web service would be enough?
> Also I was wondering why I always get null responses after my client
> requests and there's no problem when both are located in the same bundle.
>
> Cheers,
>
> Thomas
>
> On 4/13/2012 3:55 PM, David Bosschaert wrote:
>> Hi Thomas,
>>
>> I'm not sure I fully follow your scenario.
>>
>> I think the best way to do this is by using a shared interface
>> bundle. Like is done in the greeter demo:
>> http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html
>>
>>  Since you probably want to program against the API on the client
>> side it generally makes sense to have the interface there available
>> anyway, otherwise the only way you can access the service is via
>> reflection.
>>
>> So I would recommend to have an interfaces bundle which is shared
>> between the client and the server, as is done with the greeter
>> demo. Then things should work nicely. I think trying to read a
>> .class file from the server may generally not be what you want.
>>
>> Cheers,
>>
>> David
>>
>> On 13 April 2012 14:45, Thomas Pischulski <nephix0r@googlemail.com>
>> wrote:
>>> Hi,
>>>
>>> currently I'm publishing web services via DOSGi in Equinox with
>>> the single distribution bundle 1.3. I can successfully create the
>>> service when both, the web service interface and the interface
>>> implementation are located in the same bundle. However, when put
>>> both into separate bundles the server gets still successfully
>>> created (also the published *.wsdl-file stays the same) but I
>>> always receive "null" for any web service request. For the client
>>> side I'm using the ClientProxyFactoryBean factory. All requests
>>> to the server return correct responses when interface and
>>> implementation of the server are located in the same bundle.
>>>
>>> My main goal is to access the server's interface.class file on
>>> the client-side. I don't want to generate my stub with wsimport
>>> or wsdl2java.
>>>
>>> In the approach that I tried to realize first I would get the
>>> solution because both OSGi platforms can access an
>>> "interface-bundle" because it's synced via SVN.
>>>
>>> Cheers,
>>>
>>> Thomas

Mime
View raw message