It also seems like it's more of a problem how I create my client
proxy. When I register the webservice everything works fine and I can
also successfully make service calls via SoapUI.
As mentioned in my first post, I'm using ClientProxyFactoryBean for
generating my client and I'm importing IHelloService.class via
MANIFEST from the "interface-sharing-bundle": http://pastebin.com/yPsj46DX
When I run it with interface and implementation seperated in different
bundles my output looks like that:

Apr 15, 2012 9:15:08 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service
{http://interfaces.helloservice.webaudraga.tis.iai.inf.tud.de/}IHelloService
from class
de.tud.inf.iai.tis.webaudraga.interfaces.helloservice.IHelloService
Client proxy: org.apache.cxf.frontend.ClientProxy@2b9179ee
[FRONTEND] Calling Webservice ...
[FRONTEND] Webservice ANSWER: null

Note here that my service calls still deliver correct responses in
SoapUI.

When I put both in the same bundle, everything's fine

Apr 15, 2012 9:16:22 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service
{http://interfaces.helloservice.webaudraga.tis.iai.inf.tud.de/}IHelloService
from class
de.tud.inf.iai.tis.webaudraga.interfaces.helloservice.IHelloService
Client proxy: org.apache.cxf.frontend.ClientProxy@460f774f
[FRONTEND] Calling Webservice ...
[FRONTEND] Webservice ANSWER: Aloha World



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 <[email protected]>
> 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

Reply via email to