Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 80628 invoked from network); 25 May 2007 01:40:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 May 2007 01:40:02 -0000 Received: (qmail 63593 invoked by uid 500); 25 May 2007 01:40:07 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 63552 invoked by uid 500); 25 May 2007 01:40:07 -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 63543 invoked by uid 99); 25 May 2007 01:40:07 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 18:40:07 -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 freeman.fang@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; Thu, 24 May 2007 18:40:00 -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 l4P1cG3b007868 for ; Thu, 24 May 2007 21:38:16 -0400 (EDT) Received: from [10.129.9.200] ([10.129.9.200]) by amer-ems1.IONAGLOBAL.COM with Microsoft SMTPSVC(6.0.3790.1830); Thu, 24 May 2007 21:39:37 -0400 Message-ID: <46563C2D.1020806@iona.com> Date: Fri, 25 May 2007 09:30:21 +0800 From: Freeman Fang User-Agent: Thunderbird 1.5.0.2 (X11/20060524) MIME-Version: 1.0 To: cxf-dev@incubator.apache.org Subject: Re: Newby REST question References: <8DA58330BA060E41AB52B73294034EA68EDEB6@amer-ems1.IONAGLOBAL.COM> In-Reply-To: <8DA58330BA060E41AB52B73294034EA68EDEB6@amer-ems1.IONAGLOBAL.COM> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 May 2007 01:39:38.0008 (UTC) FILETIME=[8E57A180:01C79E6D] X-Virus-Checked: Checked by ClamAV on apache.org 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 = new JaxWsServerFactoryBean(); > sf.setServiceClass(WidgetCatalog.class); > > sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); > sf.setAddress("http://localhost:9000/xml/"); > > WidgetCatalogImpl bs = new WidgetCatalogImpl(); > sf.getServiceFactory().setInvoker(new BeanInvoker(bs)); > > sf.getServiceFactory().setWrapped(true); > > sf.create(); > > When I try to access the getWidgets() method by going to > 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 restfull_http demo > and removed the annotations. > >