Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 55886 invoked from network); 30 May 2007 13:08:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2007 13:08:46 -0000 Received: (qmail 49277 invoked by uid 500); 30 May 2007 13:08:50 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 49244 invoked by uid 500); 30 May 2007 13:08:50 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 49235 invoked by uid 99); 30 May 2007 13:08:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2007 06:08:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of eric.johnson@iona.com designates 65.223.216.181 as permitted sender) Received: from [65.223.216.181] (HELO amereast-smg1.iona.com) (65.223.216.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2007 06:08:43 -0700 Received: from amer-ems1.IONAGLOBAL.COM ([10.65.6.25]) by amereast-smg1.iona.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id l4UD6l7l008984 for ; Wed, 30 May 2007 09:06:47 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Newby REST question Date: Wed, 30 May 2007 09:05:10 -0400 Message-ID: <8DA58330BA060E41AB52B73294034EA68EE0B4@amer-ems1.IONAGLOBAL.COM> In-Reply-To: <7b774c950705291038v55746eceofdfd84e4ec1d4f04@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Newby REST question Thread-Index: AceiGEAmXyJCE7OqRzKZOdoIe5gC1wAotVIg References: <8DA58330BA060E41AB52B73294034EA68EDEB6@amer-ems1.IONAGLOBAL.COM> <46563C2D.1020806@iona.com> <7b774c950705251035x65cd5c91y604b72219cc4e952@mail.gmail.com> <8DA58330BA060E41AB52B73294034EA68EE002@amer-ems1.IONAGLOBAL.COM> <7b774c950705291038v55746eceofdfd84e4ec1d4f04@mail.gmail.com> From: "Johnson, Eric" To: X-Virus-Checked: Checked by ClamAV on apache.org Thanks Dan!!=20 > -----Original Message----- > From: Dan Diephouse [mailto:dan@envoisolutions.com]=20 > Sent: Tuesday, May 29, 2007 1:38 PM > To: cxf-dev@incubator.apache.org > Subject: Re: Newby REST question >=20 > OK, I figured this out. You're missing a @WebService=20 > annotation on your WidgetCatalog class. If you don't want to=20 > use any annotations, try using the=20 > ReflectionServiceFactoryBean. (not sure why there isn't an=20 > error being thrown, I'll see if I can fix that). >=20 > Also, your removeWidgets(...) method seems to cause problems=20 > for the http binding because currently it assumes that=20 > remove/delete methods are singular, not plular (i.e.=20 > deleteWidget). I would suggest adding an @HttpResource for=20 > that method. I'll see if I can get it sorted inside the HTTP=20 > binding, but I'm afraid it will depend on us detecting=20 > whether or not a word is singular or plural to begin with -=20 > which is kind of hard :-). >=20 > Regards, > - Dan >=20 > On 5/29/07, Johnson, Eric wrote: > > > > As a test to make sure I didn't screw up stuff when I copied the=20 > > restful_http_binding demo as a starting point, I stripped out the=20 > > annotations, as well Web services endpoint, from the actual=20 > demo and=20 > > got the same result. > > > > Putting the @HttpResource on the interface had no effect. > > > > > > > > > -----Original Message----- > > > From: Dan Diephouse [mailto:dan@envoisolutions.com] > > > Sent: Friday, May 25, 2007 1:35 PM > > > To: cxf-dev@incubator.apache.org > > > Subject: Re: Newby REST question > > > > > > You shouldn't need any annotations for the convention=20 > based mode to=20 > > > work. > > > I'm not sure why Eric's example isn't working actually,=20 > so it looks=20 > > > like a bug to me. Which is kind of odd because I have a=20 > very similar=20 > > > unit test to what you've written. I'll have to take a=20 > more in depth=20 > > > look and get back to you. > > > > > > - Dan > > > > > > On 5/24/07, Freeman Fang wrote: > > > > > > > > Hi Eric, > > > > > > > > You need add @HttpResource in WidgetCatalog interface, like > > > we do in > > > > CustomerService of restful demo. > > > > > > > > Thanks very much > > > > > > > > Freeman > > > > > > > > > > > > Johnson, Eric wrote: > > > > > I've got a class: > > > > > package com.acme.customer; > > > > > > > > > > public interface WidgetCatalog > > > > > { > > > > > Widgets getWidgets(); > > > > > > > > > > Widget getWidget(long id); > > > > > > > > > > void addWidget(Widget widget); > > > > > > > > > > void updateWidget(Widget w); > > > > > > > > > > int removeWidgets(String type, int num); > > > > > > > > > > void deleteWidget(Widget widget); } > > > > > > > > > > That I want to get working using the convention based > > > REST stuff, so > > > > > I publish it like this: > > > > > > > > > > JaxWsServerFactoryBean sf =3D new=20 > JaxWsServerFactoryBean(); > > > > > sf.setServiceClass(WidgetCatalog.class); > > > > > > > > > > sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); > > > > > sf.setAddress("http://localhost:9000/xml/"); > > > > > > > > > > WidgetCatalogImpl bs =3D new WidgetCatalogImpl(); > > > > > sf.getServiceFactory().setInvoker(new=20 > BeanInvoker(bs)); > > > > > > > > > > sf.getServiceFactory().setWrapped(true); > > > > > > > > > > sf.create(); > > > > > > > > > > When I try to access the getWidgets() method by going to=20 > > > > > http://localhost:9000/xml/widgets I get "Invalid URL/Verb > > > combination. > > > > > Verb: GET Path: /widgets." > > > > > > > > > > What did I do wrong? I basically copied most of the=20 > > > > > restfull_http demo and removed the annotations. > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Dan Diephouse > > > Envoi Solutions > > > http://envoisolutions.com | http://netzooid.com/blog > > > > > >=20 >=20 >=20 > -- > Dan Diephouse > Envoi Solutions > http://envoisolutions.com | http://netzooid.com/blog >=20