Deploying a WebService on Karaf

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploying a WebService on Karaf

Manuel Bernhardt
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

jbonofre
Hi Manuel,

The easiest way is indeed to use CXF.
Currently, CXF feature is part of ServiceMix4 but it could make sense to add it in the Karaf Enterprise features.

Let see the feeling of the team ;)

Regards
JB
-----Original Message-----
From: Manuel Bernhardt <[hidden email]>
Date: Fri, 11 Feb 2011 13:03:39
To: <[hidden email]>
Reply-To: [hidden email]
Subject: Deploying a WebService on Karaf

Hi all,

a colleague of mine is looking at a way to deploy a legacy webservice
of which he can't touch the code on Karaf.

I looked around and found an old thread with a post from Guillaume:

http://www.mail-archive.com/general@.../msg05523.html

which points to an example using ServiceMix.


Before digging further I'd like to ask a few questions here:

1) (you never know) is there maybe an example of this (i.e. exposing a
webservice with cxf on karaf) somewhere? I haven't found one so far.

2) if there is no example, would the following work:
  - deploy the cxf bundles on Karaf (maybe there's a feature
descriptor for this somewhere?)
  - declare the WS endpoint in the blueprint configuration - that is I
have only found instances of this being done in the old spring-dm
descriptor, but I suppose using the CXF namespace in blueprint should
somehow do the trick?

One more thing: after more googling specifically for the history of
Karaf I found a helpful blog entry
(http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
which explains the link ServiceMix -> Karaf. That is, the ServiceMix
Kernel website says nothing about it, and a lot of things (forum
entries, ML archives, ...) still point to it which makes it all very
confusing.
Would it be possible to place a big red bar (or whatever else warning
sign) on the ServiceMix Kernel page redirecting to Karaf?

Thanks!

Manuel
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

Achim Nierbeck
+1 for an enterprise CXF feature.

This way it is also much easier to connect two Karaf instances via
DOSGi (CXF) :)



2011/2/11  <[hidden email]>:

> Hi Manuel,
>
> The easiest way is indeed to use CXF.
> Currently, CXF feature is part of ServiceMix4 but it could make sense to add it in the Karaf Enterprise features.
>
> Let see the feeling of the team ;)
>
> Regards
> JB
> -----Original Message-----
> From: Manuel Bernhardt <[hidden email]>
> Date: Fri, 11 Feb 2011 13:03:39
> To: <[hidden email]>
> Reply-To: [hidden email]
> Subject: Deploying a WebService on Karaf
>
> Hi all,
>
> a colleague of mine is looking at a way to deploy a legacy webservice
> of which he can't touch the code on Karaf.
>
> I looked around and found an old thread with a post from Guillaume:
>
> http://www.mail-archive.com/general@.../msg05523.html
>
> which points to an example using ServiceMix.
>
>
> Before digging further I'd like to ask a few questions here:
>
> 1) (you never know) is there maybe an example of this (i.e. exposing a
> webservice with cxf on karaf) somewhere? I haven't found one so far.
>
> 2) if there is no example, would the following work:
>   - deploy the cxf bundles on Karaf (maybe there's a feature
> descriptor for this somewhere?)
>   - declare the WS endpoint in the blueprint configuration - that is I
> have only found instances of this being done in the old spring-dm
> descriptor, but I suppose using the CXF namespace in blueprint should
> somehow do the trick?
>
> One more thing: after more googling specifically for the history of
> Karaf I found a helpful blog entry
> (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
> which explains the link ServiceMix -> Karaf. That is, the ServiceMix
> Kernel website says nothing about it, and a lot of things (forum
> entries, ML archives, ...) still point to it which makes it all very
> confusing.
> Would it be possible to place a big red bar (or whatever else warning
> sign) on the ServiceMix Kernel page redirecting to Karaf?
>
> Thanks!
>
> Manuel
>
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

Guillaume Nodet
Shouldn't we put that in CXF ? Over time, I think it would be better
if that can be maintained inside CXF rather than Karaf.

On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck <[hidden email]> wrote:

> +1 for an enterprise CXF feature.
>
> This way it is also much easier to connect two Karaf instances via
> DOSGi (CXF) :)
>
>
>
> 2011/2/11  <[hidden email]>:
>> Hi Manuel,
>>
>> The easiest way is indeed to use CXF.
>> Currently, CXF feature is part of ServiceMix4 but it could make sense to add it in the Karaf Enterprise features.
>>
>> Let see the feeling of the team ;)
>>
>> Regards
>> JB
>> -----Original Message-----
>> From: Manuel Bernhardt <[hidden email]>
>> Date: Fri, 11 Feb 2011 13:03:39
>> To: <[hidden email]>
>> Reply-To: [hidden email]
>> Subject: Deploying a WebService on Karaf
>>
>> Hi all,
>>
>> a colleague of mine is looking at a way to deploy a legacy webservice
>> of which he can't touch the code on Karaf.
>>
>> I looked around and found an old thread with a post from Guillaume:
>>
>> http://www.mail-archive.com/general@.../msg05523.html
>>
>> which points to an example using ServiceMix.
>>
>>
>> Before digging further I'd like to ask a few questions here:
>>
>> 1) (you never know) is there maybe an example of this (i.e. exposing a
>> webservice with cxf on karaf) somewhere? I haven't found one so far.
>>
>> 2) if there is no example, would the following work:
>>   - deploy the cxf bundles on Karaf (maybe there's a feature
>> descriptor for this somewhere?)
>>   - declare the WS endpoint in the blueprint configuration - that is I
>> have only found instances of this being done in the old spring-dm
>> descriptor, but I suppose using the CXF namespace in blueprint should
>> somehow do the trick?
>>
>> One more thing: after more googling specifically for the history of
>> Karaf I found a helpful blog entry
>> (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
>> which explains the link ServiceMix -> Karaf. That is, the ServiceMix
>> Kernel website says nothing about it, and a lot of things (forum
>> entries, ML archives, ...) still point to it which makes it all very
>> confusing.
>> Would it be possible to place a big red bar (or whatever else warning
>> sign) on the ServiceMix Kernel page redirecting to Karaf?
>>
>> Thanks!
>>
>> Manuel
>>
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

adrian.trenaman
In reply to this post by Manuel Bernhardt
Hi Manuel,

I did a webinar on deploying web services with CXF into ServiceMix
(which of course, is using Karaf as it's core). You can get access to
the archived webinar at:

http://fusesource.com/resources/video-archived-webinars/

Some sample code should be up there as well.

Best,
Ade

http://fusesource.com

On 11/02/2011 12:03, Manuel Bernhardt wrote:

> Hi all,
>
> a colleague of mine is looking at a way to deploy a legacy webservice
> of which he can't touch the code on Karaf.
>
> I looked around and found an old thread with a post from Guillaume:
>
> http://www.mail-archive.com/general@.../msg05523.html
>
> which points to an example using ServiceMix.
>
>
> Before digging further I'd like to ask a few questions here:
>
> 1) (you never know) is there maybe an example of this (i.e. exposing a
> webservice with cxf on karaf) somewhere? I haven't found one so far.
>
> 2) if there is no example, would the following work:
>    - deploy the cxf bundles on Karaf (maybe there's a feature
> descriptor for this somewhere?)
>    - declare the WS endpoint in the blueprint configuration - that is I
> have only found instances of this being done in the old spring-dm
> descriptor, but I suppose using the CXF namespace in blueprint should
> somehow do the trick?
>
> One more thing: after more googling specifically for the history of
> Karaf I found a helpful blog entry
> (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
> which explains the link ServiceMix ->  Karaf. That is, the ServiceMix
> Kernel website says nothing about it, and a lot of things (forum
> entries, ML archives, ...) still point to it which makes it all very
> confusing.
> Would it be possible to place a big red bar (or whatever else warning
> sign) on the ServiceMix Kernel page redirecting to Karaf?
>
> Thanks!
>
> Manuel
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

Achim Nierbeck
In reply to this post by Guillaume Nodet
that would be fine, too.
As long as someone does this, since searching together all those
dependencies is
just a tedious task :)

2011/2/11 Guillaume Nodet <[hidden email]>:

> Shouldn't we put that in CXF ? Over time, I think it would be better
> if that can be maintained inside CXF rather than Karaf.
>
> On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck <[hidden email]> wrote:
>> +1 for an enterprise CXF feature.
>>
>> This way it is also much easier to connect two Karaf instances via
>> DOSGi (CXF) :)
>>
>>
>>
>> 2011/2/11  <[hidden email]>:
>>> Hi Manuel,
>>>
>>> The easiest way is indeed to use CXF.
>>> Currently, CXF feature is part of ServiceMix4 but it could make sense to add it in the Karaf Enterprise features.
>>>
>>> Let see the feeling of the team ;)
>>>
>>> Regards
>>> JB
>>> -----Original Message-----
>>> From: Manuel Bernhardt <[hidden email]>
>>> Date: Fri, 11 Feb 2011 13:03:39
>>> To: <[hidden email]>
>>> Reply-To: [hidden email]
>>> Subject: Deploying a WebService on Karaf
>>>
>>> Hi all,
>>>
>>> a colleague of mine is looking at a way to deploy a legacy webservice
>>> of which he can't touch the code on Karaf.
>>>
>>> I looked around and found an old thread with a post from Guillaume:
>>>
>>> http://www.mail-archive.com/general@.../msg05523.html
>>>
>>> which points to an example using ServiceMix.
>>>
>>>
>>> Before digging further I'd like to ask a few questions here:
>>>
>>> 1) (you never know) is there maybe an example of this (i.e. exposing a
>>> webservice with cxf on karaf) somewhere? I haven't found one so far.
>>>
>>> 2) if there is no example, would the following work:
>>>   - deploy the cxf bundles on Karaf (maybe there's a feature
>>> descriptor for this somewhere?)
>>>   - declare the WS endpoint in the blueprint configuration - that is I
>>> have only found instances of this being done in the old spring-dm
>>> descriptor, but I suppose using the CXF namespace in blueprint should
>>> somehow do the trick?
>>>
>>> One more thing: after more googling specifically for the history of
>>> Karaf I found a helpful blog entry
>>> (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
>>> which explains the link ServiceMix -> Karaf. That is, the ServiceMix
>>> Kernel website says nothing about it, and a lot of things (forum
>>> entries, ML archives, ...) still point to it which makes it all very
>>> confusing.
>>> Would it be possible to place a big red bar (or whatever else warning
>>> sign) on the ServiceMix Kernel page redirecting to Karaf?
>>>
>>> Thanks!
>>>
>>> Manuel
>>>
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

jbonofre
In reply to this post by Guillaume Nodet
Why not but currently cxf doesn't provide any karaf features. We could talk to Dan about that.

Regards
JB
-----Original Message-----
From: Guillaume Nodet <[hidden email]>
Date: Fri, 11 Feb 2011 13:19:09
To: <[hidden email]>
Reply-To: [hidden email]
Subject: Re: Deploying a WebService on Karaf

Shouldn't we put that in CXF ? Over time, I think it would be better
if that can be maintained inside CXF rather than Karaf.

On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck <[hidden email]> wrote:

> +1 for an enterprise CXF feature.
>
> This way it is also much easier to connect two Karaf instances via
> DOSGi (CXF) :)
>
>
>
> 2011/2/11  <[hidden email]>:
>> Hi Manuel,
>>
>> The easiest way is indeed to use CXF.
>> Currently, CXF feature is part of ServiceMix4 but it could make sense to add it in the Karaf Enterprise features.
>>
>> Let see the feeling of the team ;)
>>
>> Regards
>> JB
>> -----Original Message-----
>> From: Manuel Bernhardt <[hidden email]>
>> Date: Fri, 11 Feb 2011 13:03:39
>> To: <[hidden email]>
>> Reply-To: [hidden email]
>> Subject: Deploying a WebService on Karaf
>>
>> Hi all,
>>
>> a colleague of mine is looking at a way to deploy a legacy webservice
>> of which he can't touch the code on Karaf.
>>
>> I looked around and found an old thread with a post from Guillaume:
>>
>> http://www.mail-archive.com/general@.../msg05523.html
>>
>> which points to an example using ServiceMix.
>>
>>
>> Before digging further I'd like to ask a few questions here:
>>
>> 1) (you never know) is there maybe an example of this (i.e. exposing a
>> webservice with cxf on karaf) somewhere? I haven't found one so far.
>>
>> 2) if there is no example, would the following work:
>>   - deploy the cxf bundles on Karaf (maybe there's a feature
>> descriptor for this somewhere?)
>>   - declare the WS endpoint in the blueprint configuration - that is I
>> have only found instances of this being done in the old spring-dm
>> descriptor, but I suppose using the CXF namespace in blueprint should
>> somehow do the trick?
>>
>> One more thing: after more googling specifically for the history of
>> Karaf I found a helpful blog entry
>> (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
>> which explains the link ServiceMix -> Karaf. That is, the ServiceMix
>> Kernel website says nothing about it, and a lot of things (forum
>> entries, ML archives, ...) still point to it which makes it all very
>> confusing.
>> Would it be possible to place a big red bar (or whatever else warning
>> sign) on the ServiceMix Kernel page redirecting to Karaf?
>>
>> Thanks!
>>
>> Manuel
>>
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

Andreas Pieber
In reply to this post by Guillaume Nodet
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

Achim Nierbeck
One more thing though, since I'm searching for it :)

These Projects like Camel, CXF, Aries and so forth need to place the
URL to the features.xml file
more prominently to show the support and help finding them easier.

As long as it isn't done in another way :)

2011/2/11 Andreas Pieber <[hidden email]>:

> I think we should prefer this for all features currently in the enterprise
> features file
>
> kind regards,
> andreas
>
> On Fri, Feb 11, 2011 at 01:19:09PM +0100, Guillaume Nodet wrote:
>> Shouldn't we put that in CXF ? Over time, I think it would be better
>> if that can be maintained inside CXF rather than Karaf.
>>
>> On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck <[hidden email]> wrote:
>> > +1 for an enterprise CXF feature.
>> >
>> > This way it is also much easier to connect two Karaf instances via
>> > DOSGi (CXF) :)
>> >
>> >
>> >
>> > 2011/2/11  <[hidden email]>:
>> >> Hi Manuel,
>> >>
>> >> The easiest way is indeed to use CXF.
>> >> Currently, CXF feature is part of ServiceMix4 but it could make sense to add it in the Karaf Enterprise features.
>> >>
>> >> Let see the feeling of the team ;)
>> >>
>> >> Regards
>> >> JB
>> >> -----Original Message-----
>> >> From: Manuel Bernhardt <[hidden email]>
>> >> Date: Fri, 11 Feb 2011 13:03:39
>> >> To: <[hidden email]>
>> >> Reply-To: [hidden email]
>> >> Subject: Deploying a WebService on Karaf
>> >>
>> >> Hi all,
>> >>
>> >> a colleague of mine is looking at a way to deploy a legacy webservice
>> >> of which he can't touch the code on Karaf.
>> >>
>> >> I looked around and found an old thread with a post from Guillaume:
>> >>
>> >> http://www.mail-archive.com/general@.../msg05523.html
>> >>
>> >> which points to an example using ServiceMix.
>> >>
>> >>
>> >> Before digging further I'd like to ask a few questions here:
>> >>
>> >> 1) (you never know) is there maybe an example of this (i.e. exposing a
>> >> webservice with cxf on karaf) somewhere? I haven't found one so far.
>> >>
>> >> 2) if there is no example, would the following work:
>> >>   - deploy the cxf bundles on Karaf (maybe there's a feature
>> >> descriptor for this somewhere?)
>> >>   - declare the WS endpoint in the blueprint configuration - that is I
>> >> have only found instances of this being done in the old spring-dm
>> >> descriptor, but I suppose using the CXF namespace in blueprint should
>> >> somehow do the trick?
>> >>
>> >> One more thing: after more googling specifically for the history of
>> >> Karaf I found a helpful blog entry
>> >> (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
>> >> which explains the link ServiceMix -> Karaf. That is, the ServiceMix
>> >> Kernel website says nothing about it, and a lot of things (forum
>> >> entries, ML archives, ...) still point to it which makes it all very
>> >> confusing.
>> >> Would it be possible to place a big red bar (or whatever else warning
>> >> sign) on the ServiceMix Kernel page redirecting to Karaf?
>> >>
>> >> Thanks!
>> >>
>> >> Manuel
>> >>
>> >
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a WebService on Karaf

atlantun
In reply to this post by adrian.trenaman
Hi Adrian, I followed the webinar and it was very interesting ,
now I created a Web service that I deployed in apache-servicemix-4.3.1-fuse-00-00
and I want to have a very light OSGi client that uses that webservice.

so I created an OSGi bundle that will represent my client to that webservice,
Felix would be my OSGi cotainer (just a choice) so since I was very familiar with karaf console in ServiceMix I chosed to have my client to be deployed in apache-karaf-2.2.0...

Now since I wanted to invoke my webservice , my OSGi bundle will require CXF

this is the code I wrote in my Client

org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(MyService.class);
factory.setAddress("http://localhost:8181/cxf/service");
MyService myService = (MyService)factory.create();

How can I add CXF to a basic karaf installation

I tried the following

I copied the cxf feature defined in
$FUSE_ESB/system/org/apache/servicemix/apache-servicemix/4.3.1-fuse-00-00/apache-servicemix-4.3.1-fuse-00-00-features.xml

and I created a custom feature.xml file that I added to my karaf installation

but when I ran the feature:install cxf I was blocked by solving the missing dependencies one by one
adding bundles to the features.xml that I've created

the question is , is there a way make this tedious step easier and also if I have a message like the following

karaf@root> features:install  cxf
Error executing command: Could not start bundle mvn:org.apache.cxf/cxf-bundle/2.3.2-fuse-00-00 in feature(s) cxf-2.3.2-fuse-00-00: Unresolved constraint in bundle org.apache.cxf.bundle [779]: Unable to resolve 779.0: missing requirement [779.0] package; (package=javax.transaction.xa)



what are the steps to solve such an issue (which bundle to add to my features and how do I get the right one)
Thanks