D-OSGi and REST

View: New views
18 Messages — Rating Filter:   Alert me  

D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Sergey,

    you mentioned in the blog that users can now expose bundles/beans as
SOAP and
REST services. I looked over the example listed on the D-OSGi web site
but both
Greeter examples are the same for SOAP and REST - unless I am missing
something.
Do you have any examples of RESTful bundles?

Thanks


RE: D-OSGi and REST

by Sergey Beryozkin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Have a look please at

http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/

it is indeed virtually identical to a soap based greeter demo but
the difference is here :

http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
rvice.java

(note JAXRS annotations)

and here :

http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
rvice2.java

(has no annotations at all) but GreeterService2 uses this model :
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml

some more info is here :

http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
andconsumers

hope it helps
Sergey



-----Original Message-----
From: Demetris [mailto:demetris@...]
Sent: 23 September 2009 08:13
To: dev@...
Subject: D-OSGi and REST


Hi Sergey,

    you mentioned in the blog that users can now expose bundles/beans as

SOAP and
REST services. I looked over the example listed on the D-OSGi web site
but both
Greeter examples are the same for SOAP and REST - unless I am missing
something.
Do you have any examples of RESTful bundles?

Thanks


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Super - I will follow up on the links Sergey and let you know if I have
any more questions.
Much appreciated.

Sergey Beryozkin wrote:

> Hi
>
> Have a look please at
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>
> it is indeed virtually identical to a soap based greeter demo but
> the difference is here :
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
> rvice.java
>
> (note JAXRS annotations)
>
> and here :
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
> rvice2.java
>
> (has no annotations at all) but GreeterService2 uses this model :
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>
> some more info is here :
>
> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
> andconsumers
>
> hope it helps
> Sergey
>
>
>
> -----Original Message-----
> From: Demetris [mailto:demetris@...]
> Sent: 23 September 2009 08:13
> To: dev@...
> Subject: D-OSGi and REST
>
>
> Hi Sergey,
>
>     you mentioned in the blog that users can now expose bundles/beans as
>
> SOAP and
> REST services. I looked over the example listed on the D-OSGi web site
> but both
> Greeter examples are the same for SOAP and REST - unless I am missing
> something.
> Do you have any examples of RESTful bundles?
>
> Thanks
>
>
>  


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Sergey,

I followed up on your info below in the distribution baseline - thanks,
things are making a bit
more sense now.

Can I conceivably run this particular REST GreeterService and its client
on any OSGi Web
Server (how about Knopflerfish) with the  JAX-RS libraries. I do see you
are using Felix and
Equinox in your examples so I am assuming the answer is yes.
What do you guys add to such a service with  the
cxf-dosgi-ri-singlebundle-distribution_1.0.0?
The reason I am asking is because I want to connect the REST service
with its client by
over p2p instead of over HTTP.

Thanks

Sergey Beryozkin wrote:

> Hi
>
> Have a look please at
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>
> it is indeed virtually identical to a soap based greeter demo but
> the difference is here :
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
> rvice.java
>
> (note JAXRS annotations)
>
> and here :
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
> rvice2.java
>
> (has no annotations at all) but GreeterService2 uses this model :
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>
> some more info is here :
>
> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
> andconsumers
>
> hope it helps
> Sergey
>
>
>
> -----Original Message-----
> From: Demetris [mailto:demetris@...]
> Sent: 23 September 2009 08:13
> To: dev@...
> Subject: D-OSGi and REST
>
>
> Hi Sergey,
>
>     you mentioned in the blog that users can now expose bundles/beans as
>
> SOAP and
> REST services. I looked over the example listed on the D-OSGi web site
> but both
> Greeter examples are the same for SOAP and REST - unless I am missing
> something.
> Do you have any examples of RESTful bundles?
>
> Thanks
>
>
>  


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


In other words, without trying to make this too convoluted, my question
is do you guys use your
own implementation of JAX-RS (instead of Jersey etc.).

Thanks again

Demetris wrote:

>
> Hi Sergey,
>
> I followed up on your info below in the distribution baseline -
> thanks, things are making a bit
> more sense now.
>
> Can I conceivably run this particular REST GreeterService and its
> client on any OSGi Web
> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
> you are using Felix and
> Equinox in your examples so I am assuming the answer is yes.
> What do you guys add to such a service with  the
> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
> The reason I am asking is because I want to connect the REST service
> with its client by
> over p2p instead of over HTTP.
>
> Thanks
>
> Sergey Beryozkin wrote:
>> Hi
>>
>> Have a look please at
>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>
>> it is indeed virtually identical to a soap based greeter demo but
>> the difference is here :
>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>> rvice.java
>>
>> (note JAXRS annotations)
>>
>> and here :
>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>> rvice2.java
>>
>> (has no annotations at all) but GreeterService2 uses this model :
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>
>> some more info is here :
>>
>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>> andconsumers
>>
>> hope it helps
>> Sergey
>>
>>
>>
>> -----Original Message-----
>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>> 08:13
>> To: dev@...
>> Subject: D-OSGi and REST
>>
>>
>> Hi Sergey,
>>
>>     you mentioned in the blog that users can now expose bundles/beans as
>>
>> SOAP and
>> REST services. I looked over the example listed on the D-OSGi web
>> site but both
>> Greeter examples are the same for SOAP and REST - unless I am missing
>> something.
>> Do you have any examples of RESTful bundles?
>>
>> Thanks
>>
>>
>>  
>


Re: D-OSGi and REST

by Sergey Beryozkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Yes, we do, it is the CXF JAXRS implementation which is embedded inside the DOSGI RI but given that the RI is based on CXF it's probably can be expected. But DOSGi is an open spec.

> > Can I conceivably run this particular REST GreeterService and its
> client on any OSGi Web
> Server (how about Knopflerfish) with the  JAX-RS libraries.

You should have no problems publishing (RESTful) services on Knopflerfish as the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't be possible to run the (REST GreeterService) client on Knopflerfish though untill it implements the relevant OSGI spec (RFC 119 ?), but it should not be too difficult to do. In meantime the only option on the client side is to load the bundles containing code explicitly consuming a remote service (using proxy-based or http-centric api)...

cheers, Sergey
 
Demetris-2 wrote:
In other words, without trying to make this too convoluted, my question
is do you guys use your
own implementation of JAX-RS (instead of Jersey etc.).

Thanks again

Demetris wrote:
>
> Hi Sergey,
>
> I followed up on your info below in the distribution baseline -
> thanks, things are making a bit
> more sense now.
>
> Can I conceivably run this particular REST GreeterService and its
> client on any OSGi Web
> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
> you are using Felix and
> Equinox in your examples so I am assuming the answer is yes.
> What do you guys add to such a service with  the
> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
> The reason I am asking is because I want to connect the REST service
> with its client by
> over p2p instead of over HTTP.
>
> Thanks
>
> Sergey Beryozkin wrote:
>> Hi
>>
>> Have a look please at
>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>
>> it is indeed virtually identical to a soap based greeter demo but
>> the difference is here :
>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>> rvice.java
>>
>> (note JAXRS annotations)
>>
>> and here :
>>
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>> rvice2.java
>>
>> (has no annotations at all) but GreeterService2 uses this model :
>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>
>> some more info is here :
>>
>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>> andconsumers
>>
>> hope it helps
>> Sergey
>>
>>
>>
>> -----Original Message-----
>> From: Demetris [mailto:demetris@ece.neu.edu] Sent: 23 September 2009
>> 08:13
>> To: dev@cxf.apache.org
>> Subject: D-OSGi and REST
>>
>>
>> Hi Sergey,
>>
>>     you mentioned in the blog that users can now expose bundles/beans as
>>
>> SOAP and
>> REST services. I looked over the example listed on the D-OSGi web
>> site but both
>> Greeter examples are the same for SOAP and REST - unless I am missing
>> something.
>> Do you have any examples of RESTful bundles?
>>
>> Thanks
>>
>>
>>  
>

Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Sergey,

    sounds good - yes it is RFC 119 and you are right it is not
implemented in KF as of now but
I think it is in the works. For the rest I will follow up and see how
far I get.

Thanks again

Sergey Beryozkin wrote:

> Hi
>
> Yes, we do, it is the CXF JAXRS implementation which is embedded inside the
> DOSGI RI but given that the RI is based on CXF it's probably can be
> expected. But DOSGi is an open spec.
>
>  
>>> Can I conceivably run this particular REST GreeterService and its
>>>      
>> client on any OSGi Web
>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>    
>
> You should have no problems publishing (RESTful) services on Knopflerfish as
> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't be
> possible to run the (REST GreeterService) client on Knopflerfish though
> untill it implements the relevant OSGI spec (RFC 119 ?), but it should not
> be too difficult to do. In meantime the only option on the client side is to
> load the bundles containing code explicitly consuming a remote service
> (using proxy-based or http-centric api)...
>
> cheers, Sergey
>  
>
> Demetris-2 wrote:
>  
>> In other words, without trying to make this too convoluted, my question
>> is do you guys use your
>> own implementation of JAX-RS (instead of Jersey etc.).
>>
>> Thanks again
>>
>> Demetris wrote:
>>    
>>> Hi Sergey,
>>>
>>> I followed up on your info below in the distribution baseline -
>>> thanks, things are making a bit
>>> more sense now.
>>>
>>> Can I conceivably run this particular REST GreeterService and its
>>> client on any OSGi Web
>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>> you are using Felix and
>>> Equinox in your examples so I am assuming the answer is yes.
>>> What do you guys add to such a service with  the
>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>> The reason I am asking is because I want to connect the REST service
>>> with its client by
>>> over p2p instead of over HTTP.
>>>
>>> Thanks
>>>
>>> Sergey Beryozkin wrote:
>>>      
>>>> Hi
>>>>
>>>> Have a look please at
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>
>>>> it is indeed virtually identical to a soap based greeter demo but
>>>> the difference is here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice.java
>>>>
>>>> (note JAXRS annotations)
>>>>
>>>> and here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice2.java
>>>>
>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>
>>>> some more info is here :
>>>>
>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>> andconsumers
>>>>
>>>> hope it helps
>>>> Sergey
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>> 08:13
>>>> To: dev@...
>>>> Subject: D-OSGi and REST
>>>>
>>>>
>>>> Hi Sergey,
>>>>
>>>>     you mentioned in the blog that users can now expose bundles/beans as
>>>>
>>>> SOAP and
>>>> REST services. I looked over the example listed on the D-OSGi web
>>>> site but both
>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>> something.
>>>> Do you have any examples of RESTful bundles?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>  
>>>>        
>>
>>    
>
>  


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Sergey one more question if you don't mind - you probably saw some of my
earlier postings
with Benson regarding running Web Services on mobiles. I can easily run
KF or Equinox
on mobiles and I can run some SOAP-based engines (ksoap-osgi) and open
source Web Servers.
I am leaning towards running REST-based services on mobiles - I know
DOSGi does not run
under J2ME (I tested the single distribution and it didn't go far) so I
am hoping to follow
another avenue along the same lines. If you have any advice on this I
would greatly appreciate it.

Thanks and regards

Sergey Beryozkin wrote:

> Hi
>
> Yes, we do, it is the CXF JAXRS implementation which is embedded inside the
> DOSGI RI but given that the RI is based on CXF it's probably can be
> expected. But DOSGi is an open spec.
>
>  
>>> Can I conceivably run this particular REST GreeterService and its
>>>      
>> client on any OSGi Web
>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>    
>
> You should have no problems publishing (RESTful) services on Knopflerfish as
> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't be
> possible to run the (REST GreeterService) client on Knopflerfish though
> untill it implements the relevant OSGI spec (RFC 119 ?), but it should not
> be too difficult to do. In meantime the only option on the client side is to
> load the bundles containing code explicitly consuming a remote service
> (using proxy-based or http-centric api)...
>
> cheers, Sergey
>  
>
> Demetris-2 wrote:
>  
>> In other words, without trying to make this too convoluted, my question
>> is do you guys use your
>> own implementation of JAX-RS (instead of Jersey etc.).
>>
>> Thanks again
>>
>> Demetris wrote:
>>    
>>> Hi Sergey,
>>>
>>> I followed up on your info below in the distribution baseline -
>>> thanks, things are making a bit
>>> more sense now.
>>>
>>> Can I conceivably run this particular REST GreeterService and its
>>> client on any OSGi Web
>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>> you are using Felix and
>>> Equinox in your examples so I am assuming the answer is yes.
>>> What do you guys add to such a service with  the
>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>> The reason I am asking is because I want to connect the REST service
>>> with its client by
>>> over p2p instead of over HTTP.
>>>
>>> Thanks
>>>
>>> Sergey Beryozkin wrote:
>>>      
>>>> Hi
>>>>
>>>> Have a look please at
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>
>>>> it is indeed virtually identical to a soap based greeter demo but
>>>> the difference is here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice.java
>>>>
>>>> (note JAXRS annotations)
>>>>
>>>> and here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice2.java
>>>>
>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>
>>>> some more info is here :
>>>>
>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>> andconsumers
>>>>
>>>> hope it helps
>>>> Sergey
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>> 08:13
>>>> To: dev@...
>>>> Subject: D-OSGi and REST
>>>>
>>>>
>>>> Hi Sergey,
>>>>
>>>>     you mentioned in the blog that users can now expose bundles/beans as
>>>>
>>>> SOAP and
>>>> REST services. I looked over the example listed on the D-OSGi web
>>>> site but both
>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>> something.
>>>> Do you have any examples of RESTful bundles?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>  
>>>>        
>>
>>    
>
>  


Re: D-OSGi and REST

by Sergey Beryozkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

no problems at all - your questions are welcome.

> I know DOSGi does not run under J2ME(I tested the single distribution and it didn't go far)

What happened during that test ? Just curious...

I haven't worked with J2ME so I don't have any recommendations, sorry...

cheers, Sergey

Demetris-2 wrote:
Sergey one more question if you don't mind - you probably saw some of my
earlier postings
with Benson regarding running Web Services on mobiles. I can easily run
KF or Equinox
on mobiles and I can run some SOAP-based engines (ksoap-osgi) and open
source Web Servers.
I am leaning towards running REST-based services on mobiles - I know
DOSGi does not run
under J2ME (I tested the single distribution and it didn't go far) so I
am hoping to follow
another avenue along the same lines. If you have any advice on this I
would greatly appreciate it.

Thanks and regards

Sergey Beryozkin wrote:
> Hi
>
> Yes, we do, it is the CXF JAXRS implementation which is embedded inside the
> DOSGI RI but given that the RI is based on CXF it's probably can be
> expected. But DOSGi is an open spec.
>
>  
>>> Can I conceivably run this particular REST GreeterService and its
>>>      
>> client on any OSGi Web
>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>    
>
> You should have no problems publishing (RESTful) services on Knopflerfish as
> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't be
> possible to run the (REST GreeterService) client on Knopflerfish though
> untill it implements the relevant OSGI spec (RFC 119 ?), but it should not
> be too difficult to do. In meantime the only option on the client side is to
> load the bundles containing code explicitly consuming a remote service
> (using proxy-based or http-centric api)...
>
> cheers, Sergey
>  
>
> Demetris-2 wrote:
>  
>> In other words, without trying to make this too convoluted, my question
>> is do you guys use your
>> own implementation of JAX-RS (instead of Jersey etc.).
>>
>> Thanks again
>>
>> Demetris wrote:
>>    
>>> Hi Sergey,
>>>
>>> I followed up on your info below in the distribution baseline -
>>> thanks, things are making a bit
>>> more sense now.
>>>
>>> Can I conceivably run this particular REST GreeterService and its
>>> client on any OSGi Web
>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>> you are using Felix and
>>> Equinox in your examples so I am assuming the answer is yes.
>>> What do you guys add to such a service with  the
>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>> The reason I am asking is because I want to connect the REST service
>>> with its client by
>>> over p2p instead of over HTTP.
>>>
>>> Thanks
>>>
>>> Sergey Beryozkin wrote:
>>>      
>>>> Hi
>>>>
>>>> Have a look please at
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>
>>>> it is indeed virtually identical to a soap based greeter demo but
>>>> the difference is here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice.java
>>>>
>>>> (note JAXRS annotations)
>>>>
>>>> and here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice2.java
>>>>
>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>
>>>> some more info is here :
>>>>
>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>> andconsumers
>>>>
>>>> hope it helps
>>>> Sergey
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Demetris [mailto:demetris@ece.neu.edu] Sent: 23 September 2009
>>>> 08:13
>>>> To: dev@cxf.apache.org
>>>> Subject: D-OSGi and REST
>>>>
>>>>
>>>> Hi Sergey,
>>>>
>>>>     you mentioned in the blog that users can now expose bundles/beans as
>>>>
>>>> SOAP and
>>>> REST services. I looked over the example listed on the D-OSGi web
>>>> site but both
>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>> something.
>>>> Do you have any examples of RESTful bundles?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>  
>>>>        
>>
>>    
>
>  

Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hi Sergey - no problem at all.

Regarding the test I got the following exception once I started the
single distribution on
a J2ME-CDC device - equinox (as well as Knopflerfish_ run fine under
J2ME but
the dosgi throws java.lang.UnsupportedClassVersionError exceptions
(showing only
the small trace below)

Thanks

----

Framework is launched.

id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.5.0.v20090520
11      ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
12      RESOLVED    cxf-dosgi-ri-singlebundle-distribution_1.0.0
13      ACTIVE      org.eclipse.osgi.util_3.2.0.v20090520-1800

osgi> start 12
org.osgi.framework.BundleException: The activator
org.apache.cxf.dosgi.singlebundle.AggregatedActivator for bundle
cxf-dosgi-ri-singlebundle-distribution is invalid
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(Unknown
Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Unknown
Source)
        at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
        at java.lang.Thread.startup(Unknown Source)
Caused by: java.lang.UnsupportedClassVersionError:
org/apache/cxf/dosgi/singlebundle/AggregatedActivator (Unsupported
major.minor version 49.0)


Sergey Beryozkin wrote:

> Hi
>
> no problems at all - your questions are welcome.
>
>  
>> I know DOSGi does not run under J2ME(I tested the single distribution and
>> it didn't go far)
>>    
>
> What happened during that test ? Just curious...
>
> I haven't worked with J2ME so I don't have any recommendations, sorry...
>
> cheers, Sergey
>
>
> Demetris-2 wrote:
>  
>> Sergey one more question if you don't mind - you probably saw some of my
>> earlier postings
>> with Benson regarding running Web Services on mobiles. I can easily run
>> KF or Equinox
>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and open
>> source Web Servers.
>> I am leaning towards running REST-based services on mobiles - I know
>> DOSGi does not run
>> under J2ME (I tested the single distribution and it didn't go far) so I
>> am hoping to follow
>> another avenue along the same lines. If you have any advice on this I
>> would greatly appreciate it.
>>
>> Thanks and regards
>>
>> Sergey Beryozkin wrote:
>>    
>>> Hi
>>>
>>> Yes, we do, it is the CXF JAXRS implementation which is embedded inside
>>> the
>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>> expected. But DOSGi is an open spec.
>>>
>>>  
>>>      
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>      
>>>>>          
>>>> client on any OSGi Web
>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>    
>>>>        
>>> You should have no problems publishing (RESTful) services on Knopflerfish
>>> as
>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't
>>> be
>>> possible to run the (REST GreeterService) client on Knopflerfish though
>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it should
>>> not
>>> be too difficult to do. In meantime the only option on the client side is
>>> to
>>> load the bundles containing code explicitly consuming a remote service
>>> (using proxy-based or http-centric api)...
>>>
>>> cheers, Sergey
>>>  
>>>
>>> Demetris-2 wrote:
>>>  
>>>      
>>>> In other words, without trying to make this too convoluted, my question
>>>> is do you guys use your
>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>
>>>> Thanks again
>>>>
>>>> Demetris wrote:
>>>>    
>>>>        
>>>>> Hi Sergey,
>>>>>
>>>>> I followed up on your info below in the distribution baseline -
>>>>> thanks, things are making a bit
>>>>> more sense now.
>>>>>
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>> client on any OSGi Web
>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>>>> you are using Felix and
>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>> What do you guys add to such a service with  the
>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>> The reason I am asking is because I want to connect the REST service
>>>>> with its client by
>>>>> over p2p instead of over HTTP.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Sergey Beryozkin wrote:
>>>>>      
>>>>>          
>>>>>> Hi
>>>>>>
>>>>>> Have a look please at
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>>>
>>>>>> it is indeed virtually identical to a soap based greeter demo but
>>>>>> the difference is here :
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>> rvice.java
>>>>>>
>>>>>> (note JAXRS annotations)
>>>>>>
>>>>>> and here :
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>> rvice2.java
>>>>>>
>>>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>
>>>>>> some more info is here :
>>>>>>
>>>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>>>> andconsumers
>>>>>>
>>>>>> hope it helps
>>>>>> Sergey
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>>>> 08:13
>>>>>> To: dev@...
>>>>>> Subject: D-OSGi and REST
>>>>>>
>>>>>>
>>>>>> Hi Sergey,
>>>>>>
>>>>>>     you mentioned in the blog that users can now expose bundles/beans
>>>>>> as
>>>>>>
>>>>>> SOAP and
>>>>>> REST services. I looked over the example listed on the D-OSGi web
>>>>>> site but both
>>>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>>>> something.
>>>>>> Do you have any examples of RESTful bundles?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>  
>>>>>>        
>>>>>>            
>>>>    
>>>>        
>>>  
>>>      
>>
>>    
>
>  


Re: D-OSGi and REST

by David Bosschaert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Even if you were able to solve the class file version, there's probably
bigger problems with J2ME as AFAIK it doesn't support any of the Java 5
features yet (e.g. annotations) and is missing chunks of JSE 5 libraries
that CXF uses. You can theoretically get CXF working on J2ME by retroweaving
it (see
http://www.osgi.org/wiki/uploads/CommunityEvent2007/OSGiCommunity-Roelofsen.pdf)
but I'm not sure this is really suitable for an embedded device with
constrained memory...

Cheers,

David

2009/9/28 Demetris <demetris@...>

>
>
> Hi Sergey - no problem at all.
>
> Regarding the test I got the following exception once I started the single
> distribution on
> a J2ME-CDC device - equinox (as well as Knopflerfish_ run fine under J2ME
> but
> the dosgi throws java.lang.UnsupportedClassVersionError exceptions (showing
> only
> the small trace below)
>
> Thanks
>
> ----
>
> Framework is launched.
>
> id      State       Bundle
> 0       ACTIVE      org.eclipse.osgi_3.5.0.v20090520
> 11      ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
> 12      RESOLVED    cxf-dosgi-ri-singlebundle-distribution_1.0.0
> 13      ACTIVE      org.eclipse.osgi.util_3.2.0.v20090520-1800
>
> osgi> start 12
> org.osgi.framework.BundleException: The activator
> org.apache.cxf.dosgi.singlebundle.AggregatedActivator for bundle
> cxf-dosgi-ri-singlebundle-distribution is invalid
>       at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(Unknown
> Source)
>       at java.lang.reflect.Method.invoke(Unknown Source)
>       at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Unknown
> Source)
>       at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Unknown
> Source)
>       at java.lang.Thread.run(Unknown Source)
>       at java.lang.Thread.startup(Unknown Source)
> Caused by: java.lang.UnsupportedClassVersionError:
> org/apache/cxf/dosgi/singlebundle/AggregatedActivator (Unsupported
> major.minor version 49.0)
>
>
>
> Sergey Beryozkin wrote:
>
>> Hi
>>
>> no problems at all - your questions are welcome.
>>
>>
>>
>>> I know DOSGi does not run under J2ME(I tested the single distribution and
>>> it didn't go far)
>>>
>>>
>>
>> What happened during that test ? Just curious...
>>
>> I haven't worked with J2ME so I don't have any recommendations, sorry...
>>
>> cheers, Sergey
>>
>>
>> Demetris-2 wrote:
>>
>>
>>> Sergey one more question if you don't mind - you probably saw some of my
>>> earlier postings
>>> with Benson regarding running Web Services on mobiles. I can easily run
>>> KF or Equinox
>>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and open
>>> source Web Servers.
>>> I am leaning towards running REST-based services on mobiles - I know
>>> DOSGi does not run
>>> under J2ME (I tested the single distribution and it didn't go far) so I
>>> am hoping to follow
>>> another avenue along the same lines. If you have any advice on this I
>>> would greatly appreciate it.
>>>
>>> Thanks and regards
>>>
>>> Sergey Beryozkin wrote:
>>>
>>>
>>>> Hi
>>>>
>>>> Yes, we do, it is the CXF JAXRS implementation which is embedded inside
>>>> the
>>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>>> expected. But DOSGi is an open spec.
>>>>
>>>>
>>>>
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>>
>>>>>>
>>>>> client on any OSGi Web
>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>>
>>>>>
>>>> You should have no problems publishing (RESTful) services on
>>>> Knopflerfish
>>>> as
>>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't
>>>> be
>>>> possible to run the (REST GreeterService) client on Knopflerfish though
>>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it should
>>>> not
>>>> be too difficult to do. In meantime the only option on the client side
>>>> is
>>>> to
>>>> load the bundles containing code explicitly consuming a remote service
>>>> (using proxy-based or http-centric api)...
>>>>
>>>> cheers, Sergey
>>>> Demetris-2 wrote:
>>>>
>>>>
>>>>> In other words, without trying to make this too convoluted, my question
>>>>> is do you guys use your
>>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>>
>>>>> Thanks again
>>>>>
>>>>> Demetris wrote:
>>>>>
>>>>>
>>>>>> Hi Sergey,
>>>>>>
>>>>>> I followed up on your info below in the distribution baseline -
>>>>>> thanks, things are making a bit
>>>>>> more sense now.
>>>>>>
>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>> client on any OSGi Web
>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>>>>> you are using Felix and
>>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>>> What do you guys add to such a service with  the
>>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>>> The reason I am asking is because I want to connect the REST service
>>>>>> with its client by
>>>>>> over p2p instead of over HTTP.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Sergey Beryozkin wrote:
>>>>>>
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Have a look please at
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>>>>
>>>>>>> it is indeed virtually identical to a soap based greeter demo but
>>>>>>> the difference is here :
>>>>>>>
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>>
>>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>>> rvice.java
>>>>>>>
>>>>>>> (note JAXRS annotations)
>>>>>>>
>>>>>>> and here :
>>>>>>>
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>>
>>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>>> rvice2.java
>>>>>>>
>>>>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>>
>>>>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>>
>>>>>>> some more info is here :
>>>>>>>
>>>>>>>
>>>>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>>>>>
>>>>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>>>>> andconsumers
>>>>>>>
>>>>>>> hope it helps
>>>>>>> Sergey
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>>>>> 08:13
>>>>>>> To: dev@...
>>>>>>> Subject: D-OSGi and REST
>>>>>>>
>>>>>>>
>>>>>>> Hi Sergey,
>>>>>>>
>>>>>>>    you mentioned in the blog that users can now expose bundles/beans
>>>>>>> as
>>>>>>>
>>>>>>> SOAP and
>>>>>>> REST services. I looked over the example listed on the D-OSGi web
>>>>>>> site but both
>>>>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>>>>> something.
>>>>>>> Do you have any examples of RESTful bundles?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Exactly - thanks David for the response. I am looking at alternative
solutions that are more
geered towards mobility even though I do like a lot of the elements CXF
showcases.

David Bosschaert wrote:

> Even if you were able to solve the class file version, there's probably
> bigger problems with J2ME as AFAIK it doesn't support any of the Java 5
> features yet (e.g. annotations) and is missing chunks of JSE 5 libraries
> that CXF uses. You can theoretically get CXF working on J2ME by retroweaving
> it (see
> http://www.osgi.org/wiki/uploads/CommunityEvent2007/OSGiCommunity-Roelofsen.pdf)
> but I'm not sure this is really suitable for an embedded device with
> constrained memory...
>
> Cheers,
>
> David
>
> 2009/9/28 Demetris <demetris@...>
>
>  
>> Hi Sergey - no problem at all.
>>
>> Regarding the test I got the following exception once I started the single
>> distribution on
>> a J2ME-CDC device - equinox (as well as Knopflerfish_ run fine under J2ME
>> but
>> the dosgi throws java.lang.UnsupportedClassVersionError exceptions (showing
>> only
>> the small trace below)
>>
>> Thanks
>>
>> ----
>>
>> Framework is launched.
>>
>> id      State       Bundle
>> 0       ACTIVE      org.eclipse.osgi_3.5.0.v20090520
>> 11      ACTIVE      org.eclipse.osgi.services_3.2.0.v20090520-1800
>> 12      RESOLVED    cxf-dosgi-ri-singlebundle-distribution_1.0.0
>> 13      ACTIVE      org.eclipse.osgi.util_3.2.0.v20090520-1800
>>
>> osgi> start 12
>> org.osgi.framework.BundleException: The activator
>> org.apache.cxf.dosgi.singlebundle.AggregatedActivator for bundle
>> cxf-dosgi-ri-singlebundle-distribution is invalid
>>       at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(Unknown
>> Source)
>>       at java.lang.reflect.Method.invoke(Unknown Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Unknown
>> Source)
>>       at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Unknown
>> Source)
>>       at java.lang.Thread.run(Unknown Source)
>>       at java.lang.Thread.startup(Unknown Source)
>> Caused by: java.lang.UnsupportedClassVersionError:
>> org/apache/cxf/dosgi/singlebundle/AggregatedActivator (Unsupported
>> major.minor version 49.0)
>>
>>
>>
>> Sergey Beryozkin wrote:
>>
>>    
>>> Hi
>>>
>>> no problems at all - your questions are welcome.
>>>
>>>
>>>
>>>      
>>>> I know DOSGi does not run under J2ME(I tested the single distribution and
>>>> it didn't go far)
>>>>
>>>>
>>>>        
>>> What happened during that test ? Just curious...
>>>
>>> I haven't worked with J2ME so I don't have any recommendations, sorry...
>>>
>>> cheers, Sergey
>>>
>>>
>>> Demetris-2 wrote:
>>>
>>>
>>>      
>>>> Sergey one more question if you don't mind - you probably saw some of my
>>>> earlier postings
>>>> with Benson regarding running Web Services on mobiles. I can easily run
>>>> KF or Equinox
>>>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and open
>>>> source Web Servers.
>>>> I am leaning towards running REST-based services on mobiles - I know
>>>> DOSGi does not run
>>>> under J2ME (I tested the single distribution and it didn't go far) so I
>>>> am hoping to follow
>>>> another avenue along the same lines. If you have any advice on this I
>>>> would greatly appreciate it.
>>>>
>>>> Thanks and regards
>>>>
>>>> Sergey Beryozkin wrote:
>>>>
>>>>
>>>>        
>>>>> Hi
>>>>>
>>>>> Yes, we do, it is the CXF JAXRS implementation which is embedded inside
>>>>> the
>>>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>>>> expected. But DOSGi is an open spec.
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>>            
>>>>>>>              
>>>>>> client on any OSGi Web
>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>>>
>>>>>>
>>>>>>            
>>>>> You should have no problems publishing (RESTful) services on
>>>>> Knopflerfish
>>>>> as
>>>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't
>>>>> be
>>>>> possible to run the (REST GreeterService) client on Knopflerfish though
>>>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it should
>>>>> not
>>>>> be too difficult to do. In meantime the only option on the client side
>>>>> is
>>>>> to
>>>>> load the bundles containing code explicitly consuming a remote service
>>>>> (using proxy-based or http-centric api)...
>>>>>
>>>>> cheers, Sergey
>>>>> Demetris-2 wrote:
>>>>>
>>>>>
>>>>>          
>>>>>> In other words, without trying to make this too convoluted, my question
>>>>>> is do you guys use your
>>>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>>>
>>>>>> Thanks again
>>>>>>
>>>>>> Demetris wrote:
>>>>>>
>>>>>>
>>>>>>            
>>>>>>> Hi Sergey,
>>>>>>>
>>>>>>> I followed up on your info below in the distribution baseline -
>>>>>>> thanks, things are making a bit
>>>>>>> more sense now.
>>>>>>>
>>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>>> client on any OSGi Web
>>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>>>>>> you are using Felix and
>>>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>>>> What do you guys add to such a service with  the
>>>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>>>> The reason I am asking is because I want to connect the REST service
>>>>>>> with its client by
>>>>>>> over p2p instead of over HTTP.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Sergey Beryozkin wrote:
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> Have a look please at
>>>>>>>>
>>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>>>>>
>>>>>>>> it is indeed virtually identical to a soap based greeter demo but
>>>>>>>> the difference is here :
>>>>>>>>
>>>>>>>>
>>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>>>
>>>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>>>> rvice.java
>>>>>>>>
>>>>>>>> (note JAXRS annotations)
>>>>>>>>
>>>>>>>> and here :
>>>>>>>>
>>>>>>>>
>>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>>>
>>>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>>>> rvice2.java
>>>>>>>>
>>>>>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>>>>>>
>>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>>>
>>>>>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>>>
>>>>>>>> some more info is here :
>>>>>>>>
>>>>>>>>
>>>>>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>>>>>>
>>>>>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>>>>>> andconsumers
>>>>>>>>
>>>>>>>> hope it helps
>>>>>>>> Sergey
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>>>>>> 08:13
>>>>>>>> To: dev@...
>>>>>>>> Subject: D-OSGi and REST
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Sergey,
>>>>>>>>
>>>>>>>>    you mentioned in the blog that users can now expose bundles/beans
>>>>>>>> as
>>>>>>>>
>>>>>>>> SOAP and
>>>>>>>> REST services. I looked over the example listed on the D-OSGi web
>>>>>>>> site but both
>>>>>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>>>>>> something.
>>>>>>>> Do you have any examples of RESTful bundles?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>          
>>>>
>>>>        
>>>
>>>      
>>    
>
>  


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Sergey,

    it is possible to execute bundles as RESTful resources on Felix
without the need for
JAX-RS annotations or the CXF libs? Felix has a full-featured HTTP
bundlified server?

Thanks

Sergey Beryozkin wrote:

> Hi
>
> no problems at all - your questions are welcome.
>
>  
>> I know DOSGi does not run under J2ME(I tested the single distribution and
>> it didn't go far)
>>    
>
> What happened during that test ? Just curious...
>
> I haven't worked with J2ME so I don't have any recommendations, sorry...
>
> cheers, Sergey
>
>
> Demetris-2 wrote:
>  
>> Sergey one more question if you don't mind - you probably saw some of my
>> earlier postings
>> with Benson regarding running Web Services on mobiles. I can easily run
>> KF or Equinox
>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and open
>> source Web Servers.
>> I am leaning towards running REST-based services on mobiles - I know
>> DOSGi does not run
>> under J2ME (I tested the single distribution and it didn't go far) so I
>> am hoping to follow
>> another avenue along the same lines. If you have any advice on this I
>> would greatly appreciate it.
>>
>> Thanks and regards
>>
>> Sergey Beryozkin wrote:
>>    
>>> Hi
>>>
>>> Yes, we do, it is the CXF JAXRS implementation which is embedded inside
>>> the
>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>> expected. But DOSGi is an open spec.
>>>
>>>  
>>>      
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>      
>>>>>          
>>>> client on any OSGi Web
>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>    
>>>>        
>>> You should have no problems publishing (RESTful) services on Knopflerfish
>>> as
>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't
>>> be
>>> possible to run the (REST GreeterService) client on Knopflerfish though
>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it should
>>> not
>>> be too difficult to do. In meantime the only option on the client side is
>>> to
>>> load the bundles containing code explicitly consuming a remote service
>>> (using proxy-based or http-centric api)...
>>>
>>> cheers, Sergey
>>>  
>>>
>>> Demetris-2 wrote:
>>>  
>>>      
>>>> In other words, without trying to make this too convoluted, my question
>>>> is do you guys use your
>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>
>>>> Thanks again
>>>>
>>>> Demetris wrote:
>>>>    
>>>>        
>>>>> Hi Sergey,
>>>>>
>>>>> I followed up on your info below in the distribution baseline -
>>>>> thanks, things are making a bit
>>>>> more sense now.
>>>>>
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>> client on any OSGi Web
>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>>>> you are using Felix and
>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>> What do you guys add to such a service with  the
>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>> The reason I am asking is because I want to connect the REST service
>>>>> with its client by
>>>>> over p2p instead of over HTTP.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Sergey Beryozkin wrote:
>>>>>      
>>>>>          
>>>>>> Hi
>>>>>>
>>>>>> Have a look please at
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>>>
>>>>>> it is indeed virtually identical to a soap based greeter demo but
>>>>>> the difference is here :
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>> rvice.java
>>>>>>
>>>>>> (note JAXRS annotations)
>>>>>>
>>>>>> and here :
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>> rvice2.java
>>>>>>
>>>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>
>>>>>> some more info is here :
>>>>>>
>>>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>>>> andconsumers
>>>>>>
>>>>>> hope it helps
>>>>>> Sergey
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>>>> 08:13
>>>>>> To: dev@...
>>>>>> Subject: D-OSGi and REST
>>>>>>
>>>>>>
>>>>>> Hi Sergey,
>>>>>>
>>>>>>     you mentioned in the blog that users can now expose bundles/beans
>>>>>> as
>>>>>>
>>>>>> SOAP and
>>>>>> REST services. I looked over the example listed on the D-OSGi web
>>>>>> site but both
>>>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>>>> something.
>>>>>> Do you have any examples of RESTful bundles?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>  
>>>>>>        
>>>>>>            
>>>>    
>>>>        
>>>  
>>>      
>>
>>    
>
>  


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I think this is what you meant here probably with 'no annotations' ..

and here :

http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
rvice2.java

(has no annotations at all) but GreeterService2 uses this model :
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml



Demetris wrote:

>
> Hi Sergey,
>
>    it is possible to execute bundles as RESTful resources on Felix
> without the need for
> JAX-RS annotations or the CXF libs? Felix has a full-featured HTTP
> bundlified server?
>
> Thanks
>
> Sergey Beryozkin wrote:
>> Hi
>>
>> no problems at all - your questions are welcome.
>>
>>  
>>> I know DOSGi does not run under J2ME(I tested the single
>>> distribution and
>>> it didn't go far)
>>>    
>>
>> What happened during that test ? Just curious...
>>
>> I haven't worked with J2ME so I don't have any recommendations, sorry...
>>
>> cheers, Sergey
>>
>>
>> Demetris-2 wrote:
>>  
>>> Sergey one more question if you don't mind - you probably saw some
>>> of my earlier postings
>>> with Benson regarding running Web Services on mobiles. I can easily
>>> run KF or Equinox
>>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and
>>> open source Web Servers.
>>> I am leaning towards running REST-based services on mobiles - I know
>>> DOSGi does not run
>>> under J2ME (I tested the single distribution and it didn't go far)
>>> so I am hoping to follow
>>> another avenue along the same lines. If you have any advice on this
>>> I would greatly appreciate it.
>>>
>>> Thanks and regards
>>>
>>> Sergey Beryozkin wrote:
>>>    
>>>> Hi
>>>>
>>>> Yes, we do, it is the CXF JAXRS implementation which is embedded
>>>> inside
>>>> the
>>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>>> expected. But DOSGi is an open spec.
>>>>
>>>>        
>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>>                
>>>>> client on any OSGi Web
>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>>            
>>>> You should have no problems publishing (RESTful) services on
>>>> Knopflerfish
>>>> as
>>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It
>>>> won't
>>>> be
>>>> possible to run the (REST GreeterService) client on Knopflerfish
>>>> though
>>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it should
>>>> not
>>>> be too difficult to do. In meantime the only option on the client
>>>> side is
>>>> to
>>>> load the bundles containing code explicitly consuming a remote service
>>>> (using proxy-based or http-centric api)...
>>>>
>>>> cheers, Sergey  
>>>>
>>>> Demetris-2 wrote:
>>>>        
>>>>> In other words, without trying to make this too convoluted, my
>>>>> question is do you guys use your
>>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>>
>>>>> Thanks again
>>>>>
>>>>> Demetris wrote:
>>>>>            
>>>>>> Hi Sergey,
>>>>>>
>>>>>> I followed up on your info below in the distribution baseline -
>>>>>> thanks, things are making a bit
>>>>>> more sense now.
>>>>>>
>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>> client on any OSGi Web
>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do
>>>>>> see you are using Felix and
>>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>>> What do you guys add to such a service with  the
>>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>>> The reason I am asking is because I want to connect the REST
>>>>>> service with its client by
>>>>>> over p2p instead of over HTTP.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Sergey Beryozkin wrote:
>>>>>>                
>>>>>>> Hi
>>>>>>>
>>>>>>> Have a look please at
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/ 
>>>>>>>
>>>>>>>
>>>>>>> it is indeed virtually identical to a soap based greeter demo but
>>>>>>> the difference is here :
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int 
>>>>>>>
>>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>>>
>>>>>>> rvice.java
>>>>>>>
>>>>>>> (note JAXRS annotations)
>>>>>>>
>>>>>>> and here :
>>>>>>>
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int 
>>>>>>>
>>>>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>>>
>>>>>>> rvice2.java
>>>>>>>
>>>>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int 
>>>>>>>
>>>>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>>
>>>>>>>
>>>>>>> some more info is here :
>>>>>>>
>>>>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef 
>>>>>>>
>>>>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>>>>>
>>>>>>> andconsumers
>>>>>>>
>>>>>>> hope it helps
>>>>>>> Sergey
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September
>>>>>>> 2009 08:13
>>>>>>> To: dev@...
>>>>>>> Subject: D-OSGi and REST
>>>>>>>
>>>>>>>
>>>>>>> Hi Sergey,
>>>>>>>
>>>>>>>     you mentioned in the blog that users can now expose
>>>>>>> bundles/beans
>>>>>>> as
>>>>>>>
>>>>>>> SOAP and
>>>>>>> REST services. I looked over the example listed on the D-OSGi
>>>>>>> web site but both
>>>>>>> Greeter examples are the same for SOAP and REST - unless I am
>>>>>>> missing something.
>>>>>>> Do you have any examples of RESTful bundles?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>>                      
>>>>>            
>>>>        
>>>
>>>    
>>
>>  
>


RE: D-OSGi and REST

by Sergey Beryozkin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> it is possible to execute bundles as RESTful resources on Felix
without the need for JAX-RS annotations

Yes with DOSGI RI...

> or the CXF libs?

Quite possibly - but it will not be DOSGI RI then which will be used.


Cheers, Sergey

-----Original Message-----
From: Demetris [mailto:demetris@...]
Sent: 21 October 2009 05:08
To: dev@...
Subject: Re: D-OSGi and REST


Hi Sergey,

    it is possible to execute bundles as RESTful resources on Felix
without the need for
JAX-RS annotations or the CXF libs? Felix has a full-featured HTTP
bundlified server?

Thanks

Sergey Beryozkin wrote:
> Hi
>
> no problems at all - your questions are welcome.
>
>  
>> I know DOSGi does not run under J2ME(I tested the single distribution
and
>> it didn't go far)
>>    
>
> What happened during that test ? Just curious...
>
> I haven't worked with J2ME so I don't have any recommendations,
sorry...
>
> cheers, Sergey
>
>
> Demetris-2 wrote:
>  
>> Sergey one more question if you don't mind - you probably saw some of
my
>> earlier postings
>> with Benson regarding running Web Services on mobiles. I can easily
run
>> KF or Equinox
>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and
open
>> source Web Servers.
>> I am leaning towards running REST-based services on mobiles - I know
>> DOSGi does not run
>> under J2ME (I tested the single distribution and it didn't go far) so
I
>> am hoping to follow
>> another avenue along the same lines. If you have any advice on this I

>> would greatly appreciate it.
>>
>> Thanks and regards
>>
>> Sergey Beryozkin wrote:
>>    
>>> Hi
>>>
>>> Yes, we do, it is the CXF JAXRS implementation which is embedded
inside

>>> the
>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>> expected. But DOSGi is an open spec.
>>>
>>>  
>>>      
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>      
>>>>>          
>>>> client on any OSGi Web
>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>    
>>>>        
>>> You should have no problems publishing (RESTful) services on
Knopflerfish
>>> as
>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It
won't
>>> be
>>> possible to run the (REST GreeterService) client on Knopflerfish
though
>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it
should
>>> not
>>> be too difficult to do. In meantime the only option on the client
side is
>>> to
>>> load the bundles containing code explicitly consuming a remote
service
>>> (using proxy-based or http-centric api)...
>>>
>>> cheers, Sergey
>>>  
>>>
>>> Demetris-2 wrote:
>>>  
>>>      
>>>> In other words, without trying to make this too convoluted, my
question

>>>> is do you guys use your
>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>
>>>> Thanks again
>>>>
>>>> Demetris wrote:
>>>>    
>>>>        
>>>>> Hi Sergey,
>>>>>
>>>>> I followed up on your info below in the distribution baseline -
>>>>> thanks, things are making a bit
>>>>> more sense now.
>>>>>
>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>> client on any OSGi Web
>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do
see
>>>>> you are using Felix and
>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>> What do you guys add to such a service with  the
>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>> The reason I am asking is because I want to connect the REST
service

>>>>> with its client by
>>>>> over p2p instead of over HTTP.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Sergey Beryozkin wrote:
>>>>>      
>>>>>          
>>>>>> Hi
>>>>>>
>>>>>> Have a look please at
>>>>>>
>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>>>
>>>>>> it is indeed virtually identical to a soap based greeter demo but
>>>>>> the difference is here :
>>>>>>
>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>> rvice.java
>>>>>>
>>>>>> (note JAXRS annotations)
>>>>>>
>>>>>> and here :
>>>>>>
>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>>>> rvice2.java
>>>>>>
>>>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>>>>
erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>
>>>>>> some more info is here :
>>>>>>
>>>>>>
http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>>>>
erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>>>> andconsumers
>>>>>>
>>>>>> hope it helps
>>>>>> Sergey
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September
2009
>>>>>> 08:13
>>>>>> To: dev@...
>>>>>> Subject: D-OSGi and REST
>>>>>>
>>>>>>
>>>>>> Hi Sergey,
>>>>>>
>>>>>>     you mentioned in the blog that users can now expose
bundles/beans
>>>>>> as
>>>>>>
>>>>>> SOAP and
>>>>>> REST services. I looked over the example listed on the D-OSGi web

>>>>>> site but both
>>>>>> Greeter examples are the same for SOAP and REST - unless I am
missing

>>>>>> something.
>>>>>> Do you have any examples of RESTful bundles?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>  
>>>>>>        
>>>>>>            
>>>>    
>>>>        
>>>  
>>>      
>>
>>    
>
>  


RE: D-OSGi and REST

by Sergey Beryozkin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes. Some information about the annotation-free mode is here :

http://cxf.apache.org/docs/jax-rs.html#JAX-RS-RESTfulserviceswithoutanno
tations

cheers, Sergey



-----Original Message-----
From: Demetris [mailto:demetris@...]
Sent: 21 October 2009 05:17
To: dev@...
Subject: Re: D-OSGi and REST


I think this is what you meant here probably with 'no annotations' ..

and here :

http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
rvice2.java

(has no annotations at all) but GreeterService2 uses this model :
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml



Demetris wrote:

>
> Hi Sergey,
>
>    it is possible to execute bundles as RESTful resources on Felix
> without the need for
> JAX-RS annotations or the CXF libs? Felix has a full-featured HTTP
> bundlified server?
>
> Thanks
>
> Sergey Beryozkin wrote:
>> Hi
>>
>> no problems at all - your questions are welcome.
>>
>>  
>>> I know DOSGi does not run under J2ME(I tested the single
>>> distribution and
>>> it didn't go far)
>>>    
>>
>> What happened during that test ? Just curious...
>>
>> I haven't worked with J2ME so I don't have any recommendations,
sorry...

>>
>> cheers, Sergey
>>
>>
>> Demetris-2 wrote:
>>  
>>> Sergey one more question if you don't mind - you probably saw some
>>> of my earlier postings
>>> with Benson regarding running Web Services on mobiles. I can easily
>>> run KF or Equinox
>>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and
>>> open source Web Servers.
>>> I am leaning towards running REST-based services on mobiles - I know

>>> DOSGi does not run
>>> under J2ME (I tested the single distribution and it didn't go far)
>>> so I am hoping to follow
>>> another avenue along the same lines. If you have any advice on this
>>> I would greatly appreciate it.
>>>
>>> Thanks and regards
>>>
>>> Sergey Beryozkin wrote:
>>>    
>>>> Hi
>>>>
>>>> Yes, we do, it is the CXF JAXRS implementation which is embedded
>>>> inside
>>>> the
>>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>>> expected. But DOSGi is an open spec.
>>>>
>>>>        
>>>>>> Can I conceivably run this particular REST GreeterService and its

>>>>>>                
>>>>> client on any OSGi Web
>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>>            
>>>> You should have no problems publishing (RESTful) services on
>>>> Knopflerfish
>>>> as
>>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It
>>>> won't
>>>> be
>>>> possible to run the (REST GreeterService) client on Knopflerfish
>>>> though
>>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it
should
>>>> not
>>>> be too difficult to do. In meantime the only option on the client
>>>> side is
>>>> to
>>>> load the bundles containing code explicitly consuming a remote
service

>>>> (using proxy-based or http-centric api)...
>>>>
>>>> cheers, Sergey  
>>>>
>>>> Demetris-2 wrote:
>>>>        
>>>>> In other words, without trying to make this too convoluted, my
>>>>> question is do you guys use your
>>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>>
>>>>> Thanks again
>>>>>
>>>>> Demetris wrote:
>>>>>            
>>>>>> Hi Sergey,
>>>>>>
>>>>>> I followed up on your info below in the distribution baseline -
>>>>>> thanks, things are making a bit
>>>>>> more sense now.
>>>>>>
>>>>>> Can I conceivably run this particular REST GreeterService and its

>>>>>> client on any OSGi Web
>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do
>>>>>> see you are using Felix and
>>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>>> What do you guys add to such a service with  the
>>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>>> The reason I am asking is because I want to connect the REST
>>>>>> service with its client by
>>>>>> over p2p instead of over HTTP.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Sergey Beryozkin wrote:
>>>>>>                
>>>>>>> Hi
>>>>>>>
>>>>>>> Have a look please at
>>>>>>>
>>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/ 
>>>>>>>
>>>>>>>
>>>>>>> it is indeed virtually identical to a soap based greeter demo
but
>>>>>>> the difference is here :
>>>>>>>
>>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int

>>>>>>>
>>>>>>>
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe

>>>>>>>
>>>>>>> rvice.java
>>>>>>>
>>>>>>> (note JAXRS annotations)
>>>>>>>
>>>>>>> and here :
>>>>>>>
>>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int

>>>>>>>
>>>>>>>
erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe

>>>>>>>
>>>>>>> rvice2.java
>>>>>>>
>>>>>>> (has no annotations at all) but GreeterService2 uses this model
:
>>>>>>>
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int

>>>>>>>
>>>>>>>
erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>>>>
>>>>>>>
>>>>>>> some more info is here :
>>>>>>>
>>>>>>>
http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef

>>>>>>>
>>>>>>>
erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints

>>>>>>>
>>>>>>> andconsumers
>>>>>>>
>>>>>>> hope it helps
>>>>>>> Sergey
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September
>>>>>>> 2009 08:13
>>>>>>> To: dev@...
>>>>>>> Subject: D-OSGi and REST
>>>>>>>
>>>>>>>
>>>>>>> Hi Sergey,
>>>>>>>
>>>>>>>     you mentioned in the blog that users can now expose
>>>>>>> bundles/beans
>>>>>>> as
>>>>>>>
>>>>>>> SOAP and
>>>>>>> REST services. I looked over the example listed on the D-OSGi
>>>>>>> web site but both
>>>>>>> Greeter examples are the same for SOAP and REST - unless I am
>>>>>>> missing something.
>>>>>>> Do you have any examples of RESTful bundles?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>>                      
>>>>>            
>>>>        
>>>
>>>    
>>
>>  
>


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Excellent - thanks Sergey.

Sergey Beryozkin wrote:

> Yes. Some information about the annotation-free mode is here :
>
> http://cxf.apache.org/docs/jax-rs.html#JAX-RS-RESTfulserviceswithoutanno
> tations
>
> cheers, Sergey
>
>
>
> -----Original Message-----
> From: Demetris [mailto:demetris@...]
> Sent: 21 October 2009 05:17
> To: dev@...
> Subject: Re: D-OSGi and REST
>
>
> I think this is what you meant here probably with 'no annotations' ..
>
> and here :
>
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
> rvice2.java
>
> (has no annotations at all) but GreeterService2 uses this model :
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>
>
>
> Demetris wrote:
>  
>> Hi Sergey,
>>
>>    it is possible to execute bundles as RESTful resources on Felix
>> without the need for
>> JAX-RS annotations or the CXF libs? Felix has a full-featured HTTP
>> bundlified server?
>>
>> Thanks
>>
>> Sergey Beryozkin wrote:
>>    
>>> Hi
>>>
>>> no problems at all - your questions are welcome.
>>>
>>>  
>>>      
>>>> I know DOSGi does not run under J2ME(I tested the single
>>>> distribution and
>>>> it didn't go far)
>>>>    
>>>>        
>>> What happened during that test ? Just curious...
>>>
>>> I haven't worked with J2ME so I don't have any recommendations,
>>>      
> sorry...
>  
>>> cheers, Sergey
>>>
>>>
>>> Demetris-2 wrote:
>>>  
>>>      
>>>> Sergey one more question if you don't mind - you probably saw some
>>>> of my earlier postings
>>>> with Benson regarding running Web Services on mobiles. I can easily
>>>> run KF or Equinox
>>>> on mobiles and I can run some SOAP-based engines (ksoap-osgi) and
>>>> open source Web Servers.
>>>> I am leaning towards running REST-based services on mobiles - I know
>>>>        
>
>  
>>>> DOSGi does not run
>>>> under J2ME (I tested the single distribution and it didn't go far)
>>>> so I am hoping to follow
>>>> another avenue along the same lines. If you have any advice on this
>>>> I would greatly appreciate it.
>>>>
>>>> Thanks and regards
>>>>
>>>> Sergey Beryozkin wrote:
>>>>    
>>>>        
>>>>> Hi
>>>>>
>>>>> Yes, we do, it is the CXF JAXRS implementation which is embedded
>>>>> inside
>>>>> the
>>>>> DOSGI RI but given that the RI is based on CXF it's probably can be
>>>>> expected. But DOSGi is an open spec.
>>>>>
>>>>>        
>>>>>          
>>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>>>              
>
>  
>>>>>>>                
>>>>>>>              
>>>>>> client on any OSGi Web
>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>>>>>            
>>>>>>            
>>>>> You should have no problems publishing (RESTful) services on
>>>>> Knopflerfish
>>>>> as
>>>>> the DOSGI RI DSW component relies on the OSGI ServiceListener. It
>>>>> won't
>>>>> be
>>>>> possible to run the (REST GreeterService) client on Knopflerfish
>>>>> though
>>>>> untill it implements the relevant OSGI spec (RFC 119 ?), but it
>>>>>          
> should
>  
>>>>> not
>>>>> be too difficult to do. In meantime the only option on the client
>>>>> side is
>>>>> to
>>>>> load the bundles containing code explicitly consuming a remote
>>>>>          
> service
>  
>>>>> (using proxy-based or http-centric api)...
>>>>>
>>>>> cheers, Sergey  
>>>>>
>>>>> Demetris-2 wrote:
>>>>>        
>>>>>          
>>>>>> In other words, without trying to make this too convoluted, my
>>>>>> question is do you guys use your
>>>>>> own implementation of JAX-RS (instead of Jersey etc.).
>>>>>>
>>>>>> Thanks again
>>>>>>
>>>>>> Demetris wrote:
>>>>>>            
>>>>>>            
>>>>>>> Hi Sergey,
>>>>>>>
>>>>>>> I followed up on your info below in the distribution baseline -
>>>>>>> thanks, things are making a bit
>>>>>>> more sense now.
>>>>>>>
>>>>>>> Can I conceivably run this particular REST GreeterService and its
>>>>>>>              
>
>  
>>>>>>> client on any OSGi Web
>>>>>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do
>>>>>>> see you are using Felix and
>>>>>>> Equinox in your examples so I am assuming the answer is yes.
>>>>>>> What do you guys add to such a service with  the
>>>>>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>>>>>> The reason I am asking is because I want to connect the REST
>>>>>>> service with its client by
>>>>>>> over p2p instead of over HTTP.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Sergey Beryozkin wrote:
>>>>>>>                
>>>>>>>              
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> Have a look please at
>>>>>>>>
>>>>>>>>
>>>>>>>>                
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/ 
>  
>>>>>>>> it is indeed virtually identical to a soap based greeter demo
>>>>>>>>                
> but
>  
>>>>>>>> the difference is here :
>>>>>>>>
>>>>>>>>
>>>>>>>>                
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>
>  
>>>>>>>>                
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>
>  
>>>>>>>> rvice.java
>>>>>>>>
>>>>>>>> (note JAXRS annotations)
>>>>>>>>
>>>>>>>> and here :
>>>>>>>>
>>>>>>>>
>>>>>>>>                
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>
>  
>>>>>>>>                
> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>
>  
>>>>>>>> rvice2.java
>>>>>>>>
>>>>>>>> (has no annotations at all) but GreeterService2 uses this model
>>>>>>>>                
> :
>  
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>
>  
>>>>>>>>                
> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>  
>>>>>>>> some more info is here :
>>>>>>>>
>>>>>>>>
>>>>>>>>                
> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>
>  
>>>>>>>>                
> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>
>  
>>>>>>>> andconsumers
>>>>>>>>
>>>>>>>> hope it helps
>>>>>>>> Sergey
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Demetris [mailto:demetris@...] Sent: 23 September
>>>>>>>> 2009 08:13
>>>>>>>> To: dev@...
>>>>>>>> Subject: D-OSGi and REST
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Sergey,
>>>>>>>>
>>>>>>>>     you mentioned in the blog that users can now expose
>>>>>>>> bundles/beans
>>>>>>>> as
>>>>>>>>
>>>>>>>> SOAP and
>>>>>>>> REST services. I looked over the example listed on the D-OSGi
>>>>>>>> web site but both
>>>>>>>> Greeter examples are the same for SOAP and REST - unless I am
>>>>>>>> missing something.
>>>>>>>> Do you have any examples of RESTful bundles?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>>
>>>>>>>>                      
>>>>>>>>                
>>>>>>            
>>>>>>            
>>>>>        
>>>>>          
>>>>    
>>>>        
>>>  
>>>      
>
>
>  


Re: D-OSGi and REST

by Demetris-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Sergey,

    did you ever try deploying servlets (to serve calls to RESTful
services) on Felix or did you
only work on the CXF JAX-RS implementation? I am curious as to whether
the OSGi HTTP
server can handle servlets for this purpose. I have a feeling that it
may not support a web.xml.
I want to compare some performance metrics between such different
implementations - any
ideas will be greatly welcomed.

Many regards
Demetris

Sergey Beryozkin wrote:

> Hi
>
> Yes, we do, it is the CXF JAXRS implementation which is embedded inside the
> DOSGI RI but given that the RI is based on CXF it's probably can be
> expected. But DOSGi is an open spec.
>
>  
>>> Can I conceivably run this particular REST GreeterService and its
>>>      
>> client on any OSGi Web
>> Server (how about Knopflerfish) with the  JAX-RS libraries.
>>    
>
> You should have no problems publishing (RESTful) services on Knopflerfish as
> the DOSGI RI DSW component relies on the OSGI ServiceListener. It won't be
> possible to run the (REST GreeterService) client on Knopflerfish though
> untill it implements the relevant OSGI spec (RFC 119 ?), but it should not
> be too difficult to do. In meantime the only option on the client side is to
> load the bundles containing code explicitly consuming a remote service
> (using proxy-based or http-centric api)...
>
> cheers, Sergey
>  
>
> Demetris-2 wrote:
>  
>> In other words, without trying to make this too convoluted, my question
>> is do you guys use your
>> own implementation of JAX-RS (instead of Jersey etc.).
>>
>> Thanks again
>>
>> Demetris wrote:
>>    
>>> Hi Sergey,
>>>
>>> I followed up on your info below in the distribution baseline -
>>> thanks, things are making a bit
>>> more sense now.
>>>
>>> Can I conceivably run this particular REST GreeterService and its
>>> client on any OSGi Web
>>> Server (how about Knopflerfish) with the  JAX-RS libraries. I do see
>>> you are using Felix and
>>> Equinox in your examples so I am assuming the answer is yes.
>>> What do you guys add to such a service with  the
>>> cxf-dosgi-ri-singlebundle-distribution_1.0.0?
>>> The reason I am asking is because I want to connect the REST service
>>> with its client by
>>> over p2p instead of over HTTP.
>>>
>>> Thanks
>>>
>>> Sergey Beryozkin wrote:
>>>      
>>>> Hi
>>>>
>>>> Have a look please at
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/
>>>>
>>>> it is indeed virtually identical to a soap based greeter demo but
>>>> the difference is here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice.java
>>>>
>>>> (note JAXRS annotations)
>>>>
>>>> and here :
>>>>
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterSe
>>>> rvice2.java
>>>>
>>>> (has no annotations at all) but GreeterService2 uses this model :
>>>> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/int
>>>> erface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml
>>>>
>>>> some more info is here :
>>>>
>>>> http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiRef
>>>> erence-ServiceProviderpropertiesForConfiguringRESTfulJAXRSbasedendpoints
>>>> andconsumers
>>>>
>>>> hope it helps
>>>> Sergey
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Demetris [mailto:demetris@...] Sent: 23 September 2009
>>>> 08:13
>>>> To: dev@...
>>>> Subject: D-OSGi and REST
>>>>
>>>>
>>>> Hi Sergey,
>>>>
>>>>     you mentioned in the blog that users can now expose bundles/beans as
>>>>
>>>> SOAP and
>>>> REST services. I looked over the example listed on the D-OSGi web
>>>> site but both
>>>> Greeter examples are the same for SOAP and REST - unless I am missing
>>>> something.
>>>> Do you have any examples of RESTful bundles?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>  
>>>>        
>>
>>    
>
>