cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Blavier" <cblav...@gmail.com>
Subject Re: Problem writing restful services with Spring
Date Thu, 05 Jul 2007 16:06:49 GMT
It doesn't work :(

My method is annotated like this (in a @WebService class) :

@Get

@HttpResource(location="/books")

*public* List getBooks() {

*return* books;

}

and I get a "org.apache.cxf.interceptor.Fault: Invalid URL/Verb combination.
Verb: GET Path: /books" exception when I try
http://localhost:8080/yuipoc-webapp/cxf/bookService/books
and the http://localhost:8080/yuipoc-webapp/cxf/bookService?wsdl address
still works.





2007/7/5, Dan Diephouse <dan@envoisolutions.com>:
>
> I *think* given your configuration, that the correct address to look at
> might be:
>
> http://localhost:8080/yuipoc-webapp/cxf/bookService/books<
> http://localhost:8080/yuipoc-webapp/cxf/books>
>
> The address attribute on <jaxws:endpoint> specifies the root location for
> the restful service. Then the URIs in @HttpResource are appended to it (if
> you're using annotations).
>
> Cheers,
> - Dan
>
> On 7/5/07, Christian Blavier <cblavier@gmail.com> wrote:
> >
> > No idea ? Anyone ?
> > I'm still blocked on this.. :/
> >
> > 2007/7/3, Christian Blavier <cblavier@gmail.com>:
> > >
> > > Hello,
> > >
> > > I am currently using CXF 2.0-SNAPSHOT, and I've got some trouble
> writing
> > > restful services with CXF.
> > >
> > > Here is my spring configuration :
> > >
> > > <beans>
> > >
> > > <bean id="JaxWsServiceFactoryBean" class="
> > > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
> > >
> > > <property name="wrapped" value="false"/>
> > >
> > > </bean>
> > >
> > > <jaxws:endpoint id="restfulServer"
> > >
> > > implementor="#bookService"
> > >
> > > address="/bookService"
> > >
> > > bindingUri="http://apache.org/cxf/binding/http" >
> > >
> > > <jaxws:serviceFactory>
> > >
> > > <ref bean= "JaxWsServiceFactoryBean"/>
> > >
> > > </jaxws:serviceFactory>
> > >
> > > </jaxws:endpoint>
> > > </
> > > beans>
> > > My bookService is a simple java service with a single getBooks()
> method
> > > which return a collection of Books
> > > I haven't got any error at jetty startup and I can see a wsdl at
> > http://localhost:8080/yuipoc-webapp/cxf/bookService?wsdl
> > >
> > > but nothing at http://localhost:8080/yuipoc-webapp/cxf/books or any
> > other
> > > rest-like address
> > >
> > > Where am I wrong ?
> > > Thanks
> > >
> >
>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message