Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 11734 invoked from network); 30 Nov 2009 15:19:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Nov 2009 15:19:04 -0000 Received: (qmail 11851 invoked by uid 500); 30 Nov 2009 15:19:04 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 11769 invoked by uid 500); 30 Nov 2009 15:19:04 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 11759 invoked by uid 99); 30 Nov 2009 15:19:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2009 15:19:04 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cmoulliard@gmail.com designates 209.85.217.209 as permitted sender) Received: from [209.85.217.209] (HELO mail-gx0-f209.google.com) (209.85.217.209) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2009 15:18:52 +0000 Received: by gxk1 with SMTP id 1so1494428gxk.16 for ; Mon, 30 Nov 2009 07:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=IArgujdPDQTNXZ63PHyR/fJUVce6fw2rkwxszc/iOSQ=; b=mptq7VD7+ZxL5Cod7Q5DgjfzjXhKFP3NNM76UQr3b+HYLFp+QV0VUG4ehGIOyeqnBJ P1pZ6vjUkmlZUV76FJ3trf2WG/Ryqlbus0VtmqTTd7qZE/TJ/mBAIQ1XKaUmsX644nMT quCGR46emlFKEPJUh2dLNw76w085+mYi8zKUg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=LJIt2QK7oAzBlZiK+HGNkm809j4MV7nmAsefR0bVi6383UqY8vlYvt3w8vzzw8r8ct WqD4L9oSZtDhpq0SbS2nRFSngkeYFFVQXQrzyUGHyJL2QenYApj6BgpuzXk8mxNcW8Eh YouYzJRM5ww6P3pVy/2C9Aqpbryd0ASxYcFZ8= MIME-Version: 1.0 Received: by 10.100.1.17 with SMTP id 17mr1455024ana.113.1259594310933; Mon, 30 Nov 2009 07:18:30 -0800 (PST) In-Reply-To: <4B13DC55.3020200@gmail.com> References: <4B13DC55.3020200@gmail.com> Date: Mon, 30 Nov 2009 16:18:30 +0100 Message-ID: Subject: Re: CXF - camel CXF From: Charles Moulliard To: users@camel.apache.org Content-Type: multipart/alternative; boundary=00163623a77e76de3904799827db X-Virus-Checked: Checked by ClamAV on apache.org --00163623a77e76de3904799827db Content-Type: text/plain; charset=ISO-8859-1 If you recommend to call directly the service from the POJO where we have added REST annotation, what is the purpose of this route presented as an example in camel-cxf test if the cxf:rsServer:bean:server endpoint can directly answer to a GET/PUT,POST, ... call ? Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com twitter : http://twitter.com/cmoulliard Linkedlin : http://www.linkedin.com/in/charlesmoulliard Apache Camel Group : http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm On Mon, Nov 30, 2009 at 3:53 PM, Willem Jiang wrote: > Hi Charles, > > You don't need to use the camel cxfrs route all the time, if you have to > retrieve the DB for the REST request. > > You just need to define a POJO with annotation, and use OR mapping > framework to implement retrieve or update the data for your service. You > don't need to let camel be involved ;) > > Willem > > > > Charles Moulliard wrote: > >> Hi, >> >> If camel is used in combination with CXF to handle REST services, How must >> be designed the POJOs managing the REST services ? >> >> eg. camel spring config >> >> > >> >> serviceClass="org.apache.camel.example.reportincident.restful.ReportIncidentService" >> /> >> >> > /> >> >> > xmlns="http://camel.apache.org/schema/osgi"> >> >> >> // REST HTTP Service >> receiving the call from REST client and providing reply >> >> >> >> >> >> >> // HTTP (internal >> client) >> who will generate HTTP reply using CXF - jaxrs:server component to >> cxfrs:bean:rsServer endpoint >> >> >> Do we have to create two POJOs (one for the request and the other for the >> reply ? >> If this is the case, how the method must be defined to provide the REST >> info >> (request, parameters, ...) to the camel endpoint (= camel bean) who will >> be >> in charge to retrieve by example info from DB ? idem but for the method >> who >> will be send back the reply to the client calling the REST service ? >> >> ex : Request >> >> @GET >> @Path("/customers/{id}/") >> public String getCustomer(@PathParam("id") String id) { >> return id; >> } >> >> ex: reply >> >> @GET >> @Path("/customers/{id}/") >> public Customer getCustomer(Customer customer) { >> return customer; >> } >> >> >> Regards, >> >> Charles Moulliard >> Senior Enterprise Architect >> Apache Camel Committer >> >> ***************************** >> blog : http://cmoulliard.blogspot.com >> twitter : http://twitter.com/cmoulliard >> Linkedlin : http://www.linkedin.com/in/charlesmoulliard >> >> Apache Camel Group : >> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm >> >> > --00163623a77e76de3904799827db--