You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chris Wolf <cw...@gmail.com> on 2013/03/28 23:35:03 UTC
Need help with cxfrs component, actually RESTful service consumption,
in general
So I have the book, "Camel In Action", which is a very good and
thorough treatment of camel-core. However, now my development efforts
are starting to hit severe turbulence upon making the jump from
camel-core to camel-cxf, in particular, how to consume a RESTful
service?
I read these:
http://camel.apache.org/cxfrs.html
http://camel.apache.org/cxf-bean-component.html
...but these pages seem to be reference pages for people who have
already mastered camel-cxfrs - not newbies, like me. Can anyone point
me to an end-to-end example? I don't need the server-side - this is
legacy and produces XML.
N.B. Outside of Camel, I have had much previous experience using CXF
for JAX-WS style services, client and server (never JAX-RS, though)
Thanks for any help,
-Chris
Re: How can I deal with & character in password when sending an email
Posted by Claus Ibsen <cl...@gmail.com>.
Camel 2.11
On Mon, Apr 1, 2013 at 5:47 AM, liugang <cl...@gmail.com> wrote:
> Does this work on 2.10.4, or only works from 2.11.0?
>
> Thanks.
> GangLiu
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Friday, March 29, 2013 4:18 PM
> To: users@camel.apache.org
> Subject: Re: How can I deal with & character in password when sending an
> email
>
> Hi
>
> See
>
> http://camel.465427.n5.nabble.com/HEADS-UP-Configuring-passwords-in-Camel-en
> dpoints-is-now-easier-with-new-RAW-syntax-tp5729782.html
>
> On Fri, Mar 29, 2013 at 9:09 AM, liugang <cl...@gmail.com> wrote:
> > Hi All:
> >
> > If the mail password includes a '&' char, then how can I pass it?
> >
> > I tried %26 or %2526, seems both of them doesn't work.
> >
> > I'm using camel 2.10.4 .
> >
> > Can anybody give me a tip? Thanks very much.
> >
> > GangLiu
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
RE: How can I deal with & character in password when sending an email
Posted by liugang <cl...@gmail.com>.
Does this work on 2.10.4, or only works from 2.11.0?
Thanks.
GangLiu
-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: Friday, March 29, 2013 4:18 PM
To: users@camel.apache.org
Subject: Re: How can I deal with & character in password when sending an
email
Hi
See
http://camel.465427.n5.nabble.com/HEADS-UP-Configuring-passwords-in-Camel-en
dpoints-is-now-easier-with-new-RAW-syntax-tp5729782.html
On Fri, Mar 29, 2013 at 9:09 AM, liugang <cl...@gmail.com> wrote:
> Hi All:
>
> If the mail password includes a '&' char, then how can I pass it?
>
> I tried %26 or %2526, seems both of them doesn't work.
>
> I'm using camel 2.10.4 .
>
> Can anybody give me a tip? Thanks very much.
>
> GangLiu
>
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
RE: How can I deal with & character in password when sending an email
Posted by liugang <cl...@gmail.com>.
I'm sorry, this is also supported on 2.10.4, or only from 2.11.0 ?
Thanks.
GangLiu
-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: Friday, March 29, 2013 4:18 PM
To: users@camel.apache.org
Subject: Re: How can I deal with & character in password when sending an
email
Hi
See
http://camel.465427.n5.nabble.com/HEADS-UP-Configuring-passwords-in-Camel-en
dpoints-is-now-easier-with-new-RAW-syntax-tp5729782.html
On Fri, Mar 29, 2013 at 9:09 AM, liugang <cl...@gmail.com> wrote:
> Hi All:
>
> If the mail password includes a '&' char, then how can I pass it?
>
> I tried %26 or %2526, seems both of them doesn't work.
>
> I'm using camel 2.10.4 .
>
> Can anybody give me a tip? Thanks very much.
>
> GangLiu
>
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
RE: How can I deal with & character in password when sending an email
Posted by liugang <cl...@gmail.com>.
Hi Claus:
It looks good. ( even I still confused, why we have a special RAW(), if I
want to pass a real value "RAW", then what's happened, or only works on
password parameter?)
Thanks a lot
GangLiu
-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: Friday, March 29, 2013 4:18 PM
To: users@camel.apache.org
Subject: Re: How can I deal with & character in password when sending an
email
Hi
See
http://camel.465427.n5.nabble.com/HEADS-UP-Configuring-passwords-in-Camel-en
dpoints-is-now-easier-with-new-RAW-syntax-tp5729782.html
On Fri, Mar 29, 2013 at 9:09 AM, liugang <cl...@gmail.com> wrote:
> Hi All:
>
> If the mail password includes a '&' char, then how can I pass it?
>
> I tried %26 or %2526, seems both of them doesn't work.
>
> I'm using camel 2.10.4 .
>
> Can anybody give me a tip? Thanks very much.
>
> GangLiu
>
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: How can I deal with & character in password when sending an email
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
See
http://camel.465427.n5.nabble.com/HEADS-UP-Configuring-passwords-in-Camel-endpoints-is-now-easier-with-new-RAW-syntax-tp5729782.html
On Fri, Mar 29, 2013 at 9:09 AM, liugang <cl...@gmail.com> wrote:
> Hi All:
>
> If the mail password includes a '&' char, then how can I pass it?
>
> I tried %26 or %2526, seems both of them doesn't work.
>
> I'm using camel 2.10.4 .
>
> Can anybody give me a tip? Thanks very much.
>
> GangLiu
>
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
How can I deal with & character in password when sending an email
Posted by liugang <cl...@gmail.com>.
Hi All:
If the mail password includes a '&' char, then how can I pass it?
I tried %26 or %2526, seems both of them doesn't work.
I'm using camel 2.10.4 .
Can anybody give me a tip? Thanks very much.
GangLiu
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Chris Wolf <cw...@gmail.com>.
Willem,
Thanks for the link - I thought I had all the tests because I checked
out the code a while ago - then I realized I had only checked out
camel-core. BTW, the link you provided is a little off, but I found
what I needed to at here:
https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java
Regards,
Chris
On Thu, Mar 28, 2013 at 9:47 PM, Willem jiang <wi...@gmail.com> wrote:
> Hi,
>
> If you have used CXF before, you can reuse most of you knowledge about the CXF in camel-cxfrs or camel-cxf component.
> If you just want to access the RESTful service from examples, you can take a look at some unit tests[1] in the camel-cxfrs.
>
> [1]https://svn.apache.org/repos/asf/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
> http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
> On Friday, March 29, 2013 at 6:35 AM, Chris Wolf wrote:
>
>> So I have the book, "Camel In Action", which is a very good and
>> thorough treatment of camel-core. However, now my development efforts
>> are starting to hit severe turbulence upon making the jump from
>> camel-core to camel-cxf, in particular, how to consume a RESTful
>> service?
>>
>> I read these:
>> http://camel.apache.org/cxfrs.html
>> http://camel.apache.org/cxf-bean-component.html
>>
>> ...but these pages seem to be reference pages for people who have
>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
>> me to an end-to-end example? I don't need the server-side - this is
>> legacy and produces XML.
>>
>> N.B. Outside of Camel, I have had much previous experience using CXF
>> for JAX-WS style services, client and server (never JAX-RS, though)
>>
>> Thanks for any help,
>>
>> -Chris
>
>
RE: How many Escape characters in Camel
Posted by liugang <cl...@gmail.com>.
Unfortunately, I'd like to know how I can pass the password which includes an & when sending the email.
I tried both %26 or %2526, both of them doesn't work. I'm not sure it's a bug or not.
Thanks.
GangLiu.
-----Original Message-----
From: Willem jiang [mailto:willem.jiang@gmail.com]
Sent: Friday, March 29, 2013 4:13 PM
To: users@camel.apache.org
Subject: Re: How many Escape characters in Camel
If you are using the URI inside the XML, you need to check change "&" to "&".
It is same with the "<" and ">".
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Friday, March 29, 2013 at 2:57 PM, liugang wrote:
> Hi All:
>
> Does anybody can give me a link or an answer about this problem:
> How many Escape characters in Camel ?
>
> For example, if I want to send an email, and the password includes '&', then I have to use & right?
>
>
> Thanks.
> Gangliu
>
Re: How many Escape characters in Camel
Posted by Willem jiang <wi...@gmail.com>.
If you are using the URI inside the XML, you need to check change "&" to "&".
It is same with the "<" and ">".
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Friday, March 29, 2013 at 2:57 PM, liugang wrote:
> Hi All:
>
> Does anybody can give me a link or an answer about this problem:
> How many Escape characters in Camel ?
>
> For example, if I want to send an email, and the password includes '&', then I have to use & right?
>
>
> Thanks.
> Gangliu
>
How many Escape characters in Camel
Posted by liugang <cl...@gmail.com>.
Hi All:
Does anybody can give me a link or an answer about this problem:
How many Escape characters in Camel ?
For example, if I want to send an email, and the password includes '&', then I have to use & right?
Thanks.
Gangliu
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Willem jiang <wi...@gmail.com>.
Hi,
If you have used CXF before, you can reuse most of you knowledge about the CXF in camel-cxfrs or camel-cxf component.
If you just want to access the RESTful service from examples, you can take a look at some unit tests[1] in the camel-cxfrs.
[1]https://svn.apache.org/repos/asf/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Friday, March 29, 2013 at 6:35 AM, Chris Wolf wrote:
> So I have the book, "Camel In Action", which is a very good and
> thorough treatment of camel-core. However, now my development efforts
> are starting to hit severe turbulence upon making the jump from
> camel-core to camel-cxf, in particular, how to consume a RESTful
> service?
>
> I read these:
> http://camel.apache.org/cxfrs.html
> http://camel.apache.org/cxf-bean-component.html
>
> ...but these pages seem to be reference pages for people who have
> already mastered camel-cxfrs - not newbies, like me. Can anyone point
> me to an end-to-end example? I don't need the server-side - this is
> legacy and produces XML.
>
> N.B. Outside of Camel, I have had much previous experience using CXF
> for JAX-WS style services, client and server (never JAX-RS, though)
>
> Thanks for any help,
>
> -Chris
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Raul Kripalani <ra...@evosent.com>.
Hi guys,
Take a look at the new Simple binding style for CXFRS consumers, which
greatly simplifies consuming REST requests:
https://cwiki.apache.org/confluence/display/CAMEL/CXFRS#CXFRS-ConsumingaRESTRequestSimpleBindingStyle
.
Fresh out of the oven.
Regards,
*Raúl Kripalani*
Enterprise Architect, Open Source Integration specialist, Program
Manager | Apache
Camel Committer
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk
On Fri, Mar 29, 2013 at 6:43 PM, Chris Wolf <cw...@gmail.com> wrote:
> Hello - I just used camel-http to do my RESTful service invocation and
> it's good enough for my basic purposes.
>
> -Chris
>
> On Fri, Mar 29, 2013 at 11:30 AM, Chris Wolf <cw...@gmail.com> wrote:
> > On Fri, Mar 29, 2013 at 9:23 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
> >> On 29/03/13 11:05, Claus Ibsen wrote:
> >>>
> >>> Hi
> >>>
> >>> There is also camel-restlet
> >>> http://camel.apache.org/restlet
> >>>
> >>> It may be easier to get hold of and use. But CXF may have more
> >>> configuration options, but is also IMHO harder to get started with
> >>> using - some of that is us to blame, for not having better
> >>> documentation and samples. And the fact that IMHO camel-cxf has both
> >>> WS and RS in the same big giant component, which IMHO is becoming a
> >>> problem and hurts the lightweightness of Camel and CXF.
> >>
> >> Really ? I agree that it is not the easiest component to use - that is
> fare
> >> and personally I'd have no problems with sharing part of the 'blame'
> for not
> >> contributing, but please don't do this "hurts the Camel " thing, which
> is
> >> FUD IMHO - FYI, I'm perfectly fine with yourself having the
> preferences, no
> >> problems there at all !
> >>
> >> Chris: feel free to experiment with all the other HTTP-aware components,
> >> some of them indeed are simpler to use for a given task.
> >> FYI, I'm going to work on doing a better demo of using CXF JAX-RS
> endpoints
> >> directly within Camel, specifically, using the Camel transport to link
> >> directly to CXF jaxrs:endpoints, and will update the list.
> >>
> >> Thanks, Sergey
> >
> > Even just a basic client making an HTTP GET and getting back some text
> > would be great. I still can't do that.
> > (See my recent reply to Claus)
> >
> > Thanks,
> >
> > Chris
> >
> >>>
> >>>
> >>> You may also take a look at some of the articles about Camel. There
> >>> should be some good ones about REST etc
> >>> http://camel.apache.org/articles
> >>>
> >>> For example this article
> >>> http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
> >>>
> >>> But there is others as well.
> >>>
> >>>
> >>>
> >>> On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf<cw...@gmail.com>
> wrote:
> >>>>
> >>>> So I have the book, "Camel In Action", which is a very good and
> >>>> thorough treatment of camel-core. However, now my development efforts
> >>>> are starting to hit severe turbulence upon making the jump from
> >>>> camel-core to camel-cxf, in particular, how to consume a RESTful
> >>>> service?
> >>>>
> >>>> I read these:
> >>>> http://camel.apache.org/cxfrs.html
> >>>> http://camel.apache.org/cxf-bean-component.html
> >>>>
> >>>> ...but these pages seem to be reference pages for people who have
> >>>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
> >>>> me to an end-to-end example? I don't need the server-side - this is
> >>>> legacy and produces XML.
> >>>>
> >>>> N.B. Outside of Camel, I have had much previous experience using CXF
> >>>> for JAX-WS style services, client and server (never JAX-RS, though)
> >>>>
> >>>> Thanks for any help,
> >>>>
> >>>> -Chris
> >>>
> >>>
> >>>
> >>>
> >>
> >>
>
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Chris Wolf <cw...@gmail.com>.
Hello - I just used camel-http to do my RESTful service invocation and
it's good enough for my basic purposes.
-Chris
On Fri, Mar 29, 2013 at 11:30 AM, Chris Wolf <cw...@gmail.com> wrote:
> On Fri, Mar 29, 2013 at 9:23 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> On 29/03/13 11:05, Claus Ibsen wrote:
>>>
>>> Hi
>>>
>>> There is also camel-restlet
>>> http://camel.apache.org/restlet
>>>
>>> It may be easier to get hold of and use. But CXF may have more
>>> configuration options, but is also IMHO harder to get started with
>>> using - some of that is us to blame, for not having better
>>> documentation and samples. And the fact that IMHO camel-cxf has both
>>> WS and RS in the same big giant component, which IMHO is becoming a
>>> problem and hurts the lightweightness of Camel and CXF.
>>
>> Really ? I agree that it is not the easiest component to use - that is fare
>> and personally I'd have no problems with sharing part of the 'blame' for not
>> contributing, but please don't do this "hurts the Camel " thing, which is
>> FUD IMHO - FYI, I'm perfectly fine with yourself having the preferences, no
>> problems there at all !
>>
>> Chris: feel free to experiment with all the other HTTP-aware components,
>> some of them indeed are simpler to use for a given task.
>> FYI, I'm going to work on doing a better demo of using CXF JAX-RS endpoints
>> directly within Camel, specifically, using the Camel transport to link
>> directly to CXF jaxrs:endpoints, and will update the list.
>>
>> Thanks, Sergey
>
> Even just a basic client making an HTTP GET and getting back some text
> would be great. I still can't do that.
> (See my recent reply to Claus)
>
> Thanks,
>
> Chris
>
>>>
>>>
>>> You may also take a look at some of the articles about Camel. There
>>> should be some good ones about REST etc
>>> http://camel.apache.org/articles
>>>
>>> For example this article
>>> http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
>>>
>>> But there is others as well.
>>>
>>>
>>>
>>> On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf<cw...@gmail.com> wrote:
>>>>
>>>> So I have the book, "Camel In Action", which is a very good and
>>>> thorough treatment of camel-core. However, now my development efforts
>>>> are starting to hit severe turbulence upon making the jump from
>>>> camel-core to camel-cxf, in particular, how to consume a RESTful
>>>> service?
>>>>
>>>> I read these:
>>>> http://camel.apache.org/cxfrs.html
>>>> http://camel.apache.org/cxf-bean-component.html
>>>>
>>>> ...but these pages seem to be reference pages for people who have
>>>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
>>>> me to an end-to-end example? I don't need the server-side - this is
>>>> legacy and produces XML.
>>>>
>>>> N.B. Outside of Camel, I have had much previous experience using CXF
>>>> for JAX-WS style services, client and server (never JAX-RS, though)
>>>>
>>>> Thanks for any help,
>>>>
>>>> -Chris
>>>
>>>
>>>
>>>
>>
>>
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Chris Wolf <cw...@gmail.com>.
On Fri, Mar 29, 2013 at 9:23 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> On 29/03/13 11:05, Claus Ibsen wrote:
>>
>> Hi
>>
>> There is also camel-restlet
>> http://camel.apache.org/restlet
>>
>> It may be easier to get hold of and use. But CXF may have more
>> configuration options, but is also IMHO harder to get started with
>> using - some of that is us to blame, for not having better
>> documentation and samples. And the fact that IMHO camel-cxf has both
>> WS and RS in the same big giant component, which IMHO is becoming a
>> problem and hurts the lightweightness of Camel and CXF.
>
> Really ? I agree that it is not the easiest component to use - that is fare
> and personally I'd have no problems with sharing part of the 'blame' for not
> contributing, but please don't do this "hurts the Camel " thing, which is
> FUD IMHO - FYI, I'm perfectly fine with yourself having the preferences, no
> problems there at all !
>
> Chris: feel free to experiment with all the other HTTP-aware components,
> some of them indeed are simpler to use for a given task.
> FYI, I'm going to work on doing a better demo of using CXF JAX-RS endpoints
> directly within Camel, specifically, using the Camel transport to link
> directly to CXF jaxrs:endpoints, and will update the list.
>
> Thanks, Sergey
Even just a basic client making an HTTP GET and getting back some text
would be great. I still can't do that.
(See my recent reply to Claus)
Thanks,
Chris
>>
>>
>> You may also take a look at some of the articles about Camel. There
>> should be some good ones about REST etc
>> http://camel.apache.org/articles
>>
>> For example this article
>> http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
>>
>> But there is others as well.
>>
>>
>>
>> On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf<cw...@gmail.com> wrote:
>>>
>>> So I have the book, "Camel In Action", which is a very good and
>>> thorough treatment of camel-core. However, now my development efforts
>>> are starting to hit severe turbulence upon making the jump from
>>> camel-core to camel-cxf, in particular, how to consume a RESTful
>>> service?
>>>
>>> I read these:
>>> http://camel.apache.org/cxfrs.html
>>> http://camel.apache.org/cxf-bean-component.html
>>>
>>> ...but these pages seem to be reference pages for people who have
>>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
>>> me to an end-to-end example? I don't need the server-side - this is
>>> legacy and produces XML.
>>>
>>> N.B. Outside of Camel, I have had much previous experience using CXF
>>> for JAX-WS style services, client and server (never JAX-RS, though)
>>>
>>> Thanks for any help,
>>>
>>> -Chris
>>
>>
>>
>>
>
>
Re: Need help with cxfrs component, actually RESTful service consumption,
in general
Posted by Sergey Beryozkin <sb...@gmail.com>.
On 29/03/13 11:05, Claus Ibsen wrote:
> Hi
>
> There is also camel-restlet
> http://camel.apache.org/restlet
>
> It may be easier to get hold of and use. But CXF may have more
> configuration options, but is also IMHO harder to get started with
> using - some of that is us to blame, for not having better
> documentation and samples. And the fact that IMHO camel-cxf has both
> WS and RS in the same big giant component, which IMHO is becoming a
> problem and hurts the lightweightness of Camel and CXF.
Really ? I agree that it is not the easiest component to use - that is
fare and personally I'd have no problems with sharing part of the
'blame' for not contributing, but please don't do this "hurts the Camel
" thing, which is FUD IMHO - FYI, I'm perfectly fine with yourself
having the preferences, no problems there at all !
Chris: feel free to experiment with all the other HTTP-aware components,
some of them indeed are simpler to use for a given task.
FYI, I'm going to work on doing a better demo of using CXF JAX-RS
endpoints directly within Camel, specifically, using the Camel transport
to link directly to CXF jaxrs:endpoints, and will update the list.
Thanks, Sergey
>
> You may also take a look at some of the articles about Camel. There
> should be some good ones about REST etc
> http://camel.apache.org/articles
>
> For example this article
> http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
>
> But there is others as well.
>
>
>
> On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf<cw...@gmail.com> wrote:
>> So I have the book, "Camel In Action", which is a very good and
>> thorough treatment of camel-core. However, now my development efforts
>> are starting to hit severe turbulence upon making the jump from
>> camel-core to camel-cxf, in particular, how to consume a RESTful
>> service?
>>
>> I read these:
>> http://camel.apache.org/cxfrs.html
>> http://camel.apache.org/cxf-bean-component.html
>>
>> ...but these pages seem to be reference pages for people who have
>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
>> me to an end-to-end example? I don't need the server-side - this is
>> legacy and produces XML.
>>
>> N.B. Outside of Camel, I have had much previous experience using CXF
>> for JAX-WS style services, client and server (never JAX-RS, though)
>>
>> Thanks for any help,
>>
>> -Chris
>
>
>
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Chris Wolf <cw...@gmail.com>.
I see that the default method is GET, but I urlendcoded the '?' that
is part of the service URL, rather then restlet URL.
However, it's getting a "no consumer error". My route is:
from("direct:readsvc")
.to("restlet:http://localhost:4040/some/service%3Fparam1=/root/level2[id='xyz']")
.to("log:readsvc?showAll=true&multiline=true&level=INFO");
Object response = xdsrdr.requestBody("direct:readsvc", "");
The error is:
org.apache.camel.CamelExchangeException: No consumers available on
endpoint: Endpoint[direct://readsvc]. Exchange[Message: ]
I thought I was following the client-side pattern show on the restlet
documentation web page,
but it's not working.
So my question is can restlet be use to perform an HTTP GET on a
RESTful service that returns a string (actually an xml document)?
If so, how?
Thanks,
Chris
On Fri, Mar 29, 2013 at 11:09 AM, Chris Wolf <cw...@gmail.com> wrote:
> Ok, before I go the CXF-RS route (no pun intended) I want to try
> restlet. To clarify - can I use restlet to consume any RESTful
> service,
> or does the service have to be a restlet service?
>
> The example client-side code on the the page: http://camel.apache.org/restlet
>
> Has:
>
> from("direct:start-auth").to("restlet:http://localhost:" + port +
> "/securedOrders?restletMethod=post");
> That is all we need. We are ready to send a request and try out the
> restlet component:
> final String id = "89531";
>
> Map<String, Object> headers = new HashMap<String, Object>();
> headers.put(RestletConstants.RESTLET_LOGIN, "admin");
> headers.put(RestletConstants.RESTLET_PASSWORD, "foo");
> headers.put("id", id);
>
> String response =
> (String)template.requestBodyAndHeaders("direct:start-auth", "<order
> foo='1'/>", headers);
>
> I don't need to authenticate, and I only need to do a GET, but the URL
> I'm consuming from
> has a query string with a parameter whose value is an Xpath
>
> http://localhost:4040/some/service?param1=/root/level2[id='xyz']
>
> Do I need to URL-Encode the first '?' so I can append "?restletMethod=GET"
>
> ?
>
> Thanks,
>
> Chris
>
> On Fri, Mar 29, 2013 at 4:05 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> Hi
>>
>> There is also camel-restlet
>> http://camel.apache.org/restlet
>>
>> It may be easier to get hold of and use. But CXF may have more
>> configuration options, but is also IMHO harder to get started with
>> using - some of that is us to blame, for not having better
>> documentation and samples. And the fact that IMHO camel-cxf has both
>> WS and RS in the same big giant component, which IMHO is becoming a
>> problem and hurts the lightweightness of Camel and CXF.
>>
>> You may also take a look at some of the articles about Camel. There
>> should be some good ones about REST etc
>> http://camel.apache.org/articles
>>
>> For example this article
>> http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
>>
>> But there is others as well.
>>
>>
>>
>> On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf <cw...@gmail.com> wrote:
>>> So I have the book, "Camel In Action", which is a very good and
>>> thorough treatment of camel-core. However, now my development efforts
>>> are starting to hit severe turbulence upon making the jump from
>>> camel-core to camel-cxf, in particular, how to consume a RESTful
>>> service?
>>>
>>> I read these:
>>> http://camel.apache.org/cxfrs.html
>>> http://camel.apache.org/cxf-bean-component.html
>>>
>>> ...but these pages seem to be reference pages for people who have
>>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
>>> me to an end-to-end example? I don't need the server-side - this is
>>> legacy and produces XML.
>>>
>>> N.B. Outside of Camel, I have had much previous experience using CXF
>>> for JAX-WS style services, client and server (never JAX-RS, though)
>>>
>>> Thanks for any help,
>>>
>>> -Chris
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cibsen@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Chris Wolf <cw...@gmail.com>.
Ok, before I go the CXF-RS route (no pun intended) I want to try
restlet. To clarify - can I use restlet to consume any RESTful
service,
or does the service have to be a restlet service?
The example client-side code on the the page: http://camel.apache.org/restlet
Has:
from("direct:start-auth").to("restlet:http://localhost:" + port +
"/securedOrders?restletMethod=post");
That is all we need. We are ready to send a request and try out the
restlet component:
final String id = "89531";
Map<String, Object> headers = new HashMap<String, Object>();
headers.put(RestletConstants.RESTLET_LOGIN, "admin");
headers.put(RestletConstants.RESTLET_PASSWORD, "foo");
headers.put("id", id);
String response =
(String)template.requestBodyAndHeaders("direct:start-auth", "<order
foo='1'/>", headers);
I don't need to authenticate, and I only need to do a GET, but the URL
I'm consuming from
has a query string with a parameter whose value is an Xpath
http://localhost:4040/some/service?param1=/root/level2[id='xyz']
Do I need to URL-Encode the first '?' so I can append "?restletMethod=GET"
?
Thanks,
Chris
On Fri, Mar 29, 2013 at 4:05 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> There is also camel-restlet
> http://camel.apache.org/restlet
>
> It may be easier to get hold of and use. But CXF may have more
> configuration options, but is also IMHO harder to get started with
> using - some of that is us to blame, for not having better
> documentation and samples. And the fact that IMHO camel-cxf has both
> WS and RS in the same big giant component, which IMHO is becoming a
> problem and hurts the lightweightness of Camel and CXF.
>
> You may also take a look at some of the articles about Camel. There
> should be some good ones about REST etc
> http://camel.apache.org/articles
>
> For example this article
> http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
>
> But there is others as well.
>
>
>
> On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf <cw...@gmail.com> wrote:
>> So I have the book, "Camel In Action", which is a very good and
>> thorough treatment of camel-core. However, now my development efforts
>> are starting to hit severe turbulence upon making the jump from
>> camel-core to camel-cxf, in particular, how to consume a RESTful
>> service?
>>
>> I read these:
>> http://camel.apache.org/cxfrs.html
>> http://camel.apache.org/cxf-bean-component.html
>>
>> ...but these pages seem to be reference pages for people who have
>> already mastered camel-cxfrs - not newbies, like me. Can anyone point
>> me to an end-to-end example? I don't need the server-side - this is
>> legacy and produces XML.
>>
>> N.B. Outside of Camel, I have had much previous experience using CXF
>> for JAX-WS style services, client and server (never JAX-RS, though)
>>
>> Thanks for any help,
>>
>> -Chris
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
Re: Need help with cxfrs component, actually RESTful service
consumption, in general
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
There is also camel-restlet
http://camel.apache.org/restlet
It may be easier to get hold of and use. But CXF may have more
configuration options, but is also IMHO harder to get started with
using - some of that is us to blame, for not having better
documentation and samples. And the fact that IMHO camel-cxf has both
WS and RS in the same big giant component, which IMHO is becoming a
problem and hurts the lightweightness of Camel and CXF.
You may also take a look at some of the articles about Camel. There
should be some good ones about REST etc
http://camel.apache.org/articles
For example this article
http://www.ofbizian.com/2012/02/apache-camel-rest-example.html
But there is others as well.
On Thu, Mar 28, 2013 at 11:35 PM, Chris Wolf <cw...@gmail.com> wrote:
> So I have the book, "Camel In Action", which is a very good and
> thorough treatment of camel-core. However, now my development efforts
> are starting to hit severe turbulence upon making the jump from
> camel-core to camel-cxf, in particular, how to consume a RESTful
> service?
>
> I read these:
> http://camel.apache.org/cxfrs.html
> http://camel.apache.org/cxf-bean-component.html
>
> ...but these pages seem to be reference pages for people who have
> already mastered camel-cxfrs - not newbies, like me. Can anyone point
> me to an end-to-end example? I don't need the server-side - this is
> legacy and produces XML.
>
> N.B. Outside of Camel, I have had much previous experience using CXF
> for JAX-WS style services, client and server (never JAX-RS, though)
>
> Thanks for any help,
>
> -Chris
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen