You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Brice Ruth <bd...@gmail.com> on 2007/05/21 09:01:45 UTC

rest (http-binding) w/ Spring?

Quick question: is it possible to configure rest (http-binding) using
Spring? If so, how's this done? Maybe someone could post a simple
translation of restful_http_binding to use Spring, instead of the
JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but no
matter what I've tried (its been hours now), I can't get the Spring setup to
work.

Using jaxws:endpoint, with a bindingUri of
http://apache.org/cxf/binding/http and importing the
-http-binding.xmlSpring config, no dice. Complains that there's no
destination factory for
SOAP (?!?). If I import the -soap.xml Spring config, then I get a
ClassCastException for BindingInfo. I've tried changing the order of
imports, no dice. I am running in a minimal web container (winstone), to
minimize container weirdness.

Also - its unclear from the docs if I need to import cxf-servlet.xml or not
(I've tried both, doesn't seem to impact things at the point where I'm
getting the exception(s)).

Btw - is an equivalent to the jsr181-api JAR included in the CXF download
under a different name? I went and grabbed the xfire-jsr181-api-...M1.jar
from codehaus, because I couldn't find the right annotations in jaxws. At
least, the annotations referenced in the docs (@WebService, @WebResult,
etc.) are not in jaxws.jar.

Eagerly awaiting a response -

Thanks!

-- 
Brice Ruth
Software Engineer, Madison WI

Re: rest (http-binding) w/ Spring?

Posted by Brice Ruth <bd...@gmail.com>.
Thanks on that.

On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi,
>
> Just quick answer for  the jsr181 jar , it  is
> geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
>
> Willem.
>
> Brice Ruth wrote:
> > Quick question: is it possible to configure rest (http-binding) using
> > Spring? If so, how's this done? Maybe someone could post a simple
> > translation of restful_http_binding to use Spring, instead of the
> > JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but no
> > matter what I've tried (its been hours now), I can't get the Spring
> > setup to
> > work.
> >
> > Using jaxws:endpoint, with a bindingUri of
> > http://apache.org/cxf/binding/http and importing the
> > -http-binding.xmlSpring config, no dice. Complains that there's no
> > destination factory for
> > SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> > ClassCastException for BindingInfo. I've tried changing the order of
> > imports, no dice. I am running in a minimal web container (winstone), to
> > minimize container weirdness.
> >
> > Also - its unclear from the docs if I need to import cxf-servlet.xml
> > or not
> > (I've tried both, doesn't seem to impact things at the point where I'm
> > getting the exception(s)).
> >
> > Btw - is an equivalent to the jsr181-api JAR included in the CXF
> download
> > under a different name? I went and grabbed the
> xfire-jsr181-api-...M1.jar
> > from codehaus, because I couldn't find the right annotations in jaxws.
> At
> > least, the annotations referenced in the docs (@WebService, @WebResult,
> > etc.) are not in jaxws.jar.
> >
> > Eagerly awaiting a response -
> >
> > Thanks!
> >
>
>
>


-- 
Brice Ruth
Software Engineer, Madison WI

Re: rest (http-binding) w/ Spring?

Posted by Dan Diephouse <da...@envoisolutions.com>.
Cool, saw the commit. Thanks Willem!

On 5/30/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi,
>
> It looks like the unit tests which we wrote skips the context path part.
> I just added the context path in the ServletRunner construction method
> in AbstractServletTest and reproduce the error.
>
> Dan I  can take care of this issue, I think a quick fix will be
> committed in next few hours.
>
> Cheers,
>
> Willem.
>
> Dan Diephouse wrote:
> > I'll take a look into this and write some unit tests so this doesn't
> > happen
> > again... I'll report back in 1-2 days with a fix hopefully :-D
> > - Dan
> >
> > On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
> >>
> >> I'd love to provide a patch, but there's so much indirection that I'm
> >> not
> >> sure where I could do something like req.getContextPath() to subtract
> >> that
> >> from address before the path/address comparison is made.
> >>
> >> -Brice
> >>
> >> On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
> >> >
> >> > Willem -
> >> >
> >> > This isn't quite working yet. It is when the servlet is deployed in
> >> the
> >> > root context "/" - but otherwise, handleMessage() in
> >> DispatchInterceptor
> >> > doesn't do the right thing on lines 54-59, so  an exception is thrown
> >> about
> >> > an invalid verb/method combination.
> >> >
> >> > Specifically, something like:
> >> >
> >> > /myContext/xml/messages/1
> >> >
> >> > fails, because /myContext is not taken out of the picture first,
> >> before
> >> > comparing "path" from the EndpointInfo ("/xml") to the address
> >> (request
> >> > URI).
> >> >
> >> > -Brice
> >> >
> >> > On 5/21/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
> >> > >
> >> > > Hi Brice,
> >> > >
> >> > > The JIRA issue CXF-664 is for the servlet restful support.
> >> > > Because servlet control will try to modify the endpointInfo
> >> according
> >> > > the request url,
> >> > > it will take the rest style get request as its the endpointInfo
> >> address.
> >> > >
> >> > > Current I can not see any work around way to get acorss this.
> >> > > I will try to fix it ASAP.
> >> > >
> >> > > Cheers,
> >> > >
> >> > > Willem.
> >> > >
> >> > >
> >> > > -----Original Message-----
> >> > > From: Brice Ruth [mailto: bdruth@gmail.com]
> >> > > Sent: Mon 5/21/2007 20:22
> >> > > To: cxf-user@incubator.apache.org
> >> > > Subject: Re: rest (http-binding) w/ Spring?
> >> > >
> >> > > So, is there *any* way to use restful support with something that's
> >> > > deployed
> >> > > as a .war, without using the embedded Jetty? i.e. what can I do as
> a
> >> > > work
> >> > > around?
> >> > >
> >> > > On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
> >> > > >
> >> > > > Hi  Brice,
> >> > > >
> >> > > > I just wrote a CXFServlet test  to verified you
> >> restful_http_binding
> >> > > > issue.
> >> > > > Current CXF-Servlet doesn't support the restful_http_binding,
> even
> >> you
> >> > > > can create a service with JaxWsServerFactoryBean.
> >> > > > CXFServlet can't redirect the http request to the right
> >> destination.
> >> > > >
> >> > > > I also looked the code to deal with jaxws:endpoint, it just
> >> work for
> >> > > > soap binding.
> >> > > > So here are two issues of CXF and I filled them in the JIRA.
> >> > > > 1. CXFServlet doesn't support http-binding  [1]
> >> > > > 2. CXF's spring jaxws syntax doesn't support http-binding [2]
> >> > > >
> >> > > > [1]http://issues.apache.org/jira/browse/CXF-664
> >> > > > [2]http://issues.apache.org/jira/browse/CXF-663
> >> > > >
> >> > > > Please have a watch of them.
> >> > > >
> >> > > > Thanks,
> >> > > >
> >> > > > Willem.
> >> > > >
> >> > > > Willem Jiang wrote:
> >> > > > > Hi,
> >> > > > >
> >> > > > > Just quick answer for  the jsr181 jar , it  is
> >> > > > > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> >> > > > >
> >> > > > > Willem.
> >> > > > >
> >> > > > > Brice Ruth wrote:
> >> > > > >> Quick question: is it possible to configure rest
> (http-binding)
> >> > > using
> >> > > > >> Spring? If so, how's this done? Maybe someone could post a
> >> simple
> >> > > > >> translation of restful_http_binding to use Spring, instead
> >> of the
> >> > > > >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean
> >> working,
> >> > > but
> >> > > > no
> >> > > > >> matter what I've tried (its been hours now), I can't get the
> >> Spring
> >> > > > >> setup to
> >> > > > >> work.
> >> > > > >>
> >> > > > >> Using jaxws:endpoint, with a bindingUri of
> >> > > > >> http://apache.org/cxf/binding/http and importing the
> >> > > > >> -http-binding.xmlSpring config, no dice. Complains that
> there's
> >> no
> >> > > > >> destination factory for
> >> > > > >> SOAP (?!?). If I import the -soap.xml Spring config, then I
> >> get a
> >> > > > >> ClassCastException for BindingInfo. I've tried changing the
> >> order
> >> > > of
> >> > > > >> imports, no dice. I am running in a minimal web container
> >> > > (winstone),
> >> > > > to
> >> > > > >> minimize container weirdness.
> >> > > > >>
> >> > > > >> Also - its unclear from the docs if I need to import
> >> > > cxf-servlet.xml
> >> > > > >> or not
> >> > > > >> (I've tried both, doesn't seem to impact things at the point
> >> where
> >> > > I'm
> >> > > > >> getting the exception(s)).
> >> > > > >>
> >> > > > >> Btw - is an equivalent to the jsr181-api JAR included in the
> >> CXF
> >> > > > >> download
> >> > > > >> under a different name? I went and grabbed the
> >> > > > >> xfire-jsr181-api-...M1.jar
> >> > > > >> from codehaus, because I couldn't find the right annotations
> in
> >> > > > >> jaxws. At
> >> > > > >> least, the annotations referenced in the docs (@WebService,
> >> > > @WebResult,
> >> > > > >> etc.) are not in jaxws.jar.
> >> > > > >>
> >> > > > >> Eagerly awaiting a response -
> >> > > > >>
> >> > > > >> Thanks!
> >> > > > >>
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> > > --
> >> > > Brice Ruth
> >> > > Software Engineer, Madison WI
> >> > >
> >> > >
> >> >
> >> >
> >> > --
> >> > Brice Ruth, FCD
> >> > Software Engineer, Madison WI
> >>
> >>
> >>
> >>
> >> --
> >> Brice Ruth, FCD
> >> Software Engineer, Madison WI
> >>
> >
> >
> >
>
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: rest (http-binding) w/ Spring?

Posted by Willem Jiang <ni...@iona.com>.
Hi,

It looks like the unit tests which we wrote skips the context path part.
I just added the context path in the ServletRunner construction method 
in AbstractServletTest and reproduce the error.

Dan I  can take care of this issue, I think a quick fix will be 
committed in next few hours.

Cheers,

Willem.

Dan Diephouse wrote:
> I'll take a look into this and write some unit tests so this doesn't 
> happen
> again... I'll report back in 1-2 days with a fix hopefully :-D
> - Dan
>
> On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
>>
>> I'd love to provide a patch, but there's so much indirection that I'm 
>> not
>> sure where I could do something like req.getContextPath() to subtract 
>> that
>> from address before the path/address comparison is made.
>>
>> -Brice
>>
>> On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
>> >
>> > Willem -
>> >
>> > This isn't quite working yet. It is when the servlet is deployed in 
>> the
>> > root context "/" - but otherwise, handleMessage() in 
>> DispatchInterceptor
>> > doesn't do the right thing on lines 54-59, so  an exception is thrown
>> about
>> > an invalid verb/method combination.
>> >
>> > Specifically, something like:
>> >
>> > /myContext/xml/messages/1
>> >
>> > fails, because /myContext is not taken out of the picture first, 
>> before
>> > comparing "path" from the EndpointInfo ("/xml") to the address 
>> (request
>> > URI).
>> >
>> > -Brice
>> >
>> > On 5/21/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
>> > >
>> > > Hi Brice,
>> > >
>> > > The JIRA issue CXF-664 is for the servlet restful support.
>> > > Because servlet control will try to modify the endpointInfo 
>> according
>> > > the request url,
>> > > it will take the rest style get request as its the endpointInfo
>> address.
>> > >
>> > > Current I can not see any work around way to get acorss this.
>> > > I will try to fix it ASAP.
>> > >
>> > > Cheers,
>> > >
>> > > Willem.
>> > >
>> > >
>> > > -----Original Message-----
>> > > From: Brice Ruth [mailto: bdruth@gmail.com]
>> > > Sent: Mon 5/21/2007 20:22
>> > > To: cxf-user@incubator.apache.org
>> > > Subject: Re: rest (http-binding) w/ Spring?
>> > >
>> > > So, is there *any* way to use restful support with something that's
>> > > deployed
>> > > as a .war, without using the embedded Jetty? i.e. what can I do as a
>> > > work
>> > > around?
>> > >
>> > > On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
>> > > >
>> > > > Hi  Brice,
>> > > >
>> > > > I just wrote a CXFServlet test  to verified you 
>> restful_http_binding
>> > > > issue.
>> > > > Current CXF-Servlet doesn't support the restful_http_binding, even
>> you
>> > > > can create a service with JaxWsServerFactoryBean.
>> > > > CXFServlet can't redirect the http request to the right 
>> destination.
>> > > >
>> > > > I also looked the code to deal with jaxws:endpoint, it just 
>> work for
>> > > > soap binding.
>> > > > So here are two issues of CXF and I filled them in the JIRA.
>> > > > 1. CXFServlet doesn't support http-binding  [1]
>> > > > 2. CXF's spring jaxws syntax doesn't support http-binding [2]
>> > > >
>> > > > [1]http://issues.apache.org/jira/browse/CXF-664
>> > > > [2]http://issues.apache.org/jira/browse/CXF-663
>> > > >
>> > > > Please have a watch of them.
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Willem.
>> > > >
>> > > > Willem Jiang wrote:
>> > > > > Hi,
>> > > > >
>> > > > > Just quick answer for  the jsr181 jar , it  is
>> > > > > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
>> > > > >
>> > > > > Willem.
>> > > > >
>> > > > > Brice Ruth wrote:
>> > > > >> Quick question: is it possible to configure rest (http-binding)
>> > > using
>> > > > >> Spring? If so, how's this done? Maybe someone could post a 
>> simple
>> > > > >> translation of restful_http_binding to use Spring, instead 
>> of the
>> > > > >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean 
>> working,
>> > > but
>> > > > no
>> > > > >> matter what I've tried (its been hours now), I can't get the
>> Spring
>> > > > >> setup to
>> > > > >> work.
>> > > > >>
>> > > > >> Using jaxws:endpoint, with a bindingUri of
>> > > > >> http://apache.org/cxf/binding/http and importing the
>> > > > >> -http-binding.xmlSpring config, no dice. Complains that there's
>> no
>> > > > >> destination factory for
>> > > > >> SOAP (?!?). If I import the -soap.xml Spring config, then I 
>> get a
>> > > > >> ClassCastException for BindingInfo. I've tried changing the 
>> order
>> > > of
>> > > > >> imports, no dice. I am running in a minimal web container
>> > > (winstone),
>> > > > to
>> > > > >> minimize container weirdness.
>> > > > >>
>> > > > >> Also - its unclear from the docs if I need to import
>> > > cxf-servlet.xml
>> > > > >> or not
>> > > > >> (I've tried both, doesn't seem to impact things at the point
>> where
>> > > I'm
>> > > > >> getting the exception(s)).
>> > > > >>
>> > > > >> Btw - is an equivalent to the jsr181-api JAR included in the 
>> CXF
>> > > > >> download
>> > > > >> under a different name? I went and grabbed the
>> > > > >> xfire-jsr181-api-...M1.jar
>> > > > >> from codehaus, because I couldn't find the right annotations in
>> > > > >> jaxws. At
>> > > > >> least, the annotations referenced in the docs (@WebService,
>> > > @WebResult,
>> > > > >> etc.) are not in jaxws.jar.
>> > > > >>
>> > > > >> Eagerly awaiting a response -
>> > > > >>
>> > > > >> Thanks!
>> > > > >>
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > > --
>> > > Brice Ruth
>> > > Software Engineer, Madison WI
>> > >
>> > >
>> >
>> >
>> > --
>> > Brice Ruth, FCD
>> > Software Engineer, Madison WI
>>
>>
>>
>>
>> -- 
>> Brice Ruth, FCD
>> Software Engineer, Madison WI
>>
>
>
>



Re: rest (http-binding) w/ Spring?

Posted by Brice Ruth <bd...@gmail.com>.
Thanks, Dan.

On 5/29/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>
> I'll take a look into this and write some unit tests so this doesn't
> happen
> again... I'll report back in 1-2 days with a fix hopefully :-D
> - Dan
>
> On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
> >
> > I'd love to provide a patch, but there's so much indirection that I'm
> not
> > sure where I could do something like req.getContextPath() to subtract
> that
> > from address before the path/address comparison is made.
> >
> > -Brice
> >
> > On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
> > >
> > > Willem -
> > >
> > > This isn't quite working yet. It is when the servlet is deployed in
> the
> > > root context "/" - but otherwise, handleMessage() in
> DispatchInterceptor
> > > doesn't do the right thing on lines 54-59, so  an exception is thrown
> > about
> > > an invalid verb/method combination.
> > >
> > > Specifically, something like:
> > >
> > > /myContext/xml/messages/1
> > >
> > > fails, because /myContext is not taken out of the picture first,
> before
> > > comparing "path" from the EndpointInfo ("/xml") to the address
> (request
> > > URI).
> > >
> > > -Brice
> > >
> > > On 5/21/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
> > > >
> > > > Hi Brice,
> > > >
> > > > The JIRA issue CXF-664 is for the servlet restful support.
> > > > Because servlet control will try to modify the endpointInfo
> according
> > > > the request url,
> > > > it will take the rest style get request as its the endpointInfo
> > address.
> > > >
> > > > Current I can not see any work around way to get acorss this.
> > > > I will try to fix it ASAP.
> > > >
> > > > Cheers,
> > > >
> > > > Willem.
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Brice Ruth [mailto: bdruth@gmail.com]
> > > > Sent: Mon 5/21/2007 20:22
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: Re: rest (http-binding) w/ Spring?
> > > >
> > > > So, is there *any* way to use restful support with something that's
> > > > deployed
> > > > as a .war, without using the embedded Jetty? i.e. what can I do as a
> > > > work
> > > > around?
> > > >
> > > > On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
> > > > >
> > > > > Hi  Brice,
> > > > >
> > > > > I just wrote a CXFServlet test  to verified you
> restful_http_binding
> > > > > issue.
> > > > > Current CXF-Servlet doesn't support the restful_http_binding, even
> > you
> > > > > can create a service with JaxWsServerFactoryBean.
> > > > > CXFServlet can't redirect the http request to the right
> destination.
> > > > >
> > > > > I also looked the code to deal with jaxws:endpoint, it just work
> for
> > > > > soap binding.
> > > > > So here are two issues of CXF and I filled them in the JIRA.
> > > > > 1. CXFServlet doesn't support http-binding  [1]
> > > > > 2. CXF's spring jaxws syntax doesn't support http-binding [2]
> > > > >
> > > > > [1]http://issues.apache.org/jira/browse/CXF-664
> > > > > [2]http://issues.apache.org/jira/browse/CXF-663
> > > > >
> > > > > Please have a watch of them.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Willem.
> > > > >
> > > > > Willem Jiang wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Just quick answer for  the jsr181 jar , it  is
> > > > > > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> > > > > >
> > > > > > Willem.
> > > > > >
> > > > > > Brice Ruth wrote:
> > > > > >> Quick question: is it possible to configure rest (http-binding)
> > > > using
> > > > > >> Spring? If so, how's this done? Maybe someone could post a
> simple
> > > > > >> translation of restful_http_binding to use Spring, instead of
> the
> > > > > >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean
> working,
> > > > but
> > > > > no
> > > > > >> matter what I've tried (its been hours now), I can't get the
> > Spring
> > > > > >> setup to
> > > > > >> work.
> > > > > >>
> > > > > >> Using jaxws:endpoint, with a bindingUri of
> > > > > >> http://apache.org/cxf/binding/http and importing the
> > > > > >> -http-binding.xmlSpring config, no dice. Complains that there's
> > no
> > > > > >> destination factory for
> > > > > >> SOAP (?!?). If I import the -soap.xml Spring config, then I get
> a
> > > > > >> ClassCastException for BindingInfo. I've tried changing the
> order
> > > > of
> > > > > >> imports, no dice. I am running in a minimal web container
> > > > (winstone),
> > > > > to
> > > > > >> minimize container weirdness.
> > > > > >>
> > > > > >> Also - its unclear from the docs if I need to import
> > > > cxf-servlet.xml
> > > > > >> or not
> > > > > >> (I've tried both, doesn't seem to impact things at the point
> > where
> > > > I'm
> > > > > >> getting the exception(s)).
> > > > > >>
> > > > > >> Btw - is an equivalent to the jsr181-api JAR included in the
> CXF
> > > > > >> download
> > > > > >> under a different name? I went and grabbed the
> > > > > >> xfire-jsr181-api-...M1.jar
> > > > > >> from codehaus, because I couldn't find the right annotations in
> > > > > >> jaxws. At
> > > > > >> least, the annotations referenced in the docs (@WebService,
> > > > @WebResult,
> > > > > >> etc.) are not in jaxws.jar.
> > > > > >>
> > > > > >> Eagerly awaiting a response -
> > > > > >>
> > > > > >> Thanks!
> > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Brice Ruth
> > > > Software Engineer, Madison WI
> > > >
> > > >
> > >
> > >
> > > --
> > > Brice Ruth, FCD
> > > Software Engineer, Madison WI
> >
> >
> >
> >
> > --
> > Brice Ruth, FCD
> > Software Engineer, Madison WI
> >
>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>



-- 
Brice Ruth, FCD
Software Engineer, Madison WI

Re: rest (http-binding) w/ Spring?

Posted by Dan Diephouse <da...@envoisolutions.com>.
I'll take a look into this and write some unit tests so this doesn't happen
again... I'll report back in 1-2 days with a fix hopefully :-D
- Dan

On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
>
> I'd love to provide a patch, but there's so much indirection that I'm not
> sure where I could do something like req.getContextPath() to subtract that
> from address before the path/address comparison is made.
>
> -Brice
>
> On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
> >
> > Willem -
> >
> > This isn't quite working yet. It is when the servlet is deployed in the
> > root context "/" - but otherwise, handleMessage() in DispatchInterceptor
> > doesn't do the right thing on lines 54-59, so  an exception is thrown
> about
> > an invalid verb/method combination.
> >
> > Specifically, something like:
> >
> > /myContext/xml/messages/1
> >
> > fails, because /myContext is not taken out of the picture first, before
> > comparing "path" from the EndpointInfo ("/xml") to the address (request
> > URI).
> >
> > -Brice
> >
> > On 5/21/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
> > >
> > > Hi Brice,
> > >
> > > The JIRA issue CXF-664 is for the servlet restful support.
> > > Because servlet control will try to modify the endpointInfo according
> > > the request url,
> > > it will take the rest style get request as its the endpointInfo
> address.
> > >
> > > Current I can not see any work around way to get acorss this.
> > > I will try to fix it ASAP.
> > >
> > > Cheers,
> > >
> > > Willem.
> > >
> > >
> > > -----Original Message-----
> > > From: Brice Ruth [mailto: bdruth@gmail.com]
> > > Sent: Mon 5/21/2007 20:22
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: rest (http-binding) w/ Spring?
> > >
> > > So, is there *any* way to use restful support with something that's
> > > deployed
> > > as a .war, without using the embedded Jetty? i.e. what can I do as a
> > > work
> > > around?
> > >
> > > On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
> > > >
> > > > Hi  Brice,
> > > >
> > > > I just wrote a CXFServlet test  to verified you restful_http_binding
> > > > issue.
> > > > Current CXF-Servlet doesn't support the restful_http_binding, even
> you
> > > > can create a service with JaxWsServerFactoryBean.
> > > > CXFServlet can't redirect the http request to the right destination.
> > > >
> > > > I also looked the code to deal with jaxws:endpoint, it just work for
> > > > soap binding.
> > > > So here are two issues of CXF and I filled them in the JIRA.
> > > > 1. CXFServlet doesn't support http-binding  [1]
> > > > 2. CXF's spring jaxws syntax doesn't support http-binding [2]
> > > >
> > > > [1]http://issues.apache.org/jira/browse/CXF-664
> > > > [2]http://issues.apache.org/jira/browse/CXF-663
> > > >
> > > > Please have a watch of them.
> > > >
> > > > Thanks,
> > > >
> > > > Willem.
> > > >
> > > > Willem Jiang wrote:
> > > > > Hi,
> > > > >
> > > > > Just quick answer for  the jsr181 jar , it  is
> > > > > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> > > > >
> > > > > Willem.
> > > > >
> > > > > Brice Ruth wrote:
> > > > >> Quick question: is it possible to configure rest (http-binding)
> > > using
> > > > >> Spring? If so, how's this done? Maybe someone could post a simple
> > > > >> translation of restful_http_binding to use Spring, instead of the
> > > > >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working,
> > > but
> > > > no
> > > > >> matter what I've tried (its been hours now), I can't get the
> Spring
> > > > >> setup to
> > > > >> work.
> > > > >>
> > > > >> Using jaxws:endpoint, with a bindingUri of
> > > > >> http://apache.org/cxf/binding/http and importing the
> > > > >> -http-binding.xmlSpring config, no dice. Complains that there's
> no
> > > > >> destination factory for
> > > > >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> > > > >> ClassCastException for BindingInfo. I've tried changing the order
> > > of
> > > > >> imports, no dice. I am running in a minimal web container
> > > (winstone),
> > > > to
> > > > >> minimize container weirdness.
> > > > >>
> > > > >> Also - its unclear from the docs if I need to import
> > > cxf-servlet.xml
> > > > >> or not
> > > > >> (I've tried both, doesn't seem to impact things at the point
> where
> > > I'm
> > > > >> getting the exception(s)).
> > > > >>
> > > > >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
> > > > >> download
> > > > >> under a different name? I went and grabbed the
> > > > >> xfire-jsr181-api-...M1.jar
> > > > >> from codehaus, because I couldn't find the right annotations in
> > > > >> jaxws. At
> > > > >> least, the annotations referenced in the docs (@WebService,
> > > @WebResult,
> > > > >> etc.) are not in jaxws.jar.
> > > > >>
> > > > >> Eagerly awaiting a response -
> > > > >>
> > > > >> Thanks!
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Brice Ruth
> > > Software Engineer, Madison WI
> > >
> > >
> >
> >
> > --
> > Brice Ruth, FCD
> > Software Engineer, Madison WI
>
>
>
>
> --
> Brice Ruth, FCD
> Software Engineer, Madison WI
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: rest (http-binding) w/ Spring?

Posted by Brice Ruth <bd...@gmail.com>.
I'd love to provide a patch, but there's so much indirection that I'm not
sure where I could do something like req.getContextPath() to subtract that
from address before the path/address comparison is made.

-Brice

On 5/29/07, Brice Ruth <bd...@gmail.com> wrote:
>
> Willem -
>
> This isn't quite working yet. It is when the servlet is deployed in the
> root context "/" - but otherwise, handleMessage() in DispatchInterceptor
> doesn't do the right thing on lines 54-59, so  an exception is thrown about
> an invalid verb/method combination.
>
> Specifically, something like:
>
> /myContext/xml/messages/1
>
> fails, because /myContext is not taken out of the picture first, before
> comparing "path" from the EndpointInfo ("/xml") to the address (request
> URI).
>
> -Brice
>
> On 5/21/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
> >
> > Hi Brice,
> >
> > The JIRA issue CXF-664 is for the servlet restful support.
> > Because servlet control will try to modify the endpointInfo according
> > the request url,
> > it will take the rest style get request as its the endpointInfo address.
> >
> > Current I can not see any work around way to get acorss this.
> > I will try to fix it ASAP.
> >
> > Cheers,
> >
> > Willem.
> >
> >
> > -----Original Message-----
> > From: Brice Ruth [mailto: bdruth@gmail.com]
> > Sent: Mon 5/21/2007 20:22
> > To: cxf-user@incubator.apache.org
> > Subject: Re: rest (http-binding) w/ Spring?
> >
> > So, is there *any* way to use restful support with something that's
> > deployed
> > as a .war, without using the embedded Jetty? i.e. what can I do as a
> > work
> > around?
> >
> > On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
> > >
> > > Hi  Brice,
> > >
> > > I just wrote a CXFServlet test  to verified you restful_http_binding
> > > issue.
> > > Current CXF-Servlet doesn't support the restful_http_binding, even you
> > > can create a service with JaxWsServerFactoryBean.
> > > CXFServlet can't redirect the http request to the right destination.
> > >
> > > I also looked the code to deal with jaxws:endpoint, it just work for
> > > soap binding.
> > > So here are two issues of CXF and I filled them in the JIRA.
> > > 1. CXFServlet doesn't support http-binding  [1]
> > > 2. CXF's spring jaxws syntax doesn't support http-binding [2]
> > >
> > > [1]http://issues.apache.org/jira/browse/CXF-664
> > > [2]http://issues.apache.org/jira/browse/CXF-663
> > >
> > > Please have a watch of them.
> > >
> > > Thanks,
> > >
> > > Willem.
> > >
> > > Willem Jiang wrote:
> > > > Hi,
> > > >
> > > > Just quick answer for  the jsr181 jar , it  is
> > > > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> > > >
> > > > Willem.
> > > >
> > > > Brice Ruth wrote:
> > > >> Quick question: is it possible to configure rest (http-binding)
> > using
> > > >> Spring? If so, how's this done? Maybe someone could post a simple
> > > >> translation of restful_http_binding to use Spring, instead of the
> > > >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working,
> > but
> > > no
> > > >> matter what I've tried (its been hours now), I can't get the Spring
> > > >> setup to
> > > >> work.
> > > >>
> > > >> Using jaxws:endpoint, with a bindingUri of
> > > >> http://apache.org/cxf/binding/http and importing the
> > > >> -http-binding.xmlSpring config, no dice. Complains that there's no
> > > >> destination factory for
> > > >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> > > >> ClassCastException for BindingInfo. I've tried changing the order
> > of
> > > >> imports, no dice. I am running in a minimal web container
> > (winstone),
> > > to
> > > >> minimize container weirdness.
> > > >>
> > > >> Also - its unclear from the docs if I need to import
> > cxf-servlet.xml
> > > >> or not
> > > >> (I've tried both, doesn't seem to impact things at the point where
> > I'm
> > > >> getting the exception(s)).
> > > >>
> > > >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
> > > >> download
> > > >> under a different name? I went and grabbed the
> > > >> xfire-jsr181-api-...M1.jar
> > > >> from codehaus, because I couldn't find the right annotations in
> > > >> jaxws. At
> > > >> least, the annotations referenced in the docs (@WebService,
> > @WebResult,
> > > >> etc.) are not in jaxws.jar.
> > > >>
> > > >> Eagerly awaiting a response -
> > > >>
> > > >> Thanks!
> > > >>
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> > --
> > Brice Ruth
> > Software Engineer, Madison WI
> >
> >
>
>
> --
> Brice Ruth, FCD
> Software Engineer, Madison WI




-- 
Brice Ruth, FCD
Software Engineer, Madison WI

Re: rest (http-binding) w/ Spring?

Posted by Brice Ruth <bd...@gmail.com>.
Willem -

This isn't quite working yet. It is when the servlet is deployed in the root
context "/" - but otherwise, handleMessage() in DispatchInterceptor doesn't
do the right thing on lines 54-59, so  an exception is thrown about an
invalid verb/method combination.

Specifically, something like:

/myContext/xml/messages/1

fails, because /myContext is not taken out of the picture first, before
comparing "path" from the EndpointInfo ("/xml") to the address (request
URI).

-Brice

On 5/21/07, Jiang, Ning (Willem) <Ni...@iona.com> wrote:
>
> Hi Brice,
>
> The JIRA issue CXF-664 is for the servlet restful support.
> Because servlet control will try to modify the endpointInfo according the
> request url,
> it will take the rest style get request as its the endpointInfo address.
> Current I can not see any work around way to get acorss this.
> I will try to fix it ASAP.
>
> Cheers,
>
> Willem.
>
>
> -----Original Message-----
> From: Brice Ruth [mailto:bdruth@gmail.com]
> Sent: Mon 5/21/2007 20:22
> To: cxf-user@incubator.apache.org
> Subject: Re: rest (http-binding) w/ Spring?
>
> So, is there *any* way to use restful support with something that's
> deployed
> as a .war, without using the embedded Jetty? i.e. what can I do as a work
> around?
>
> On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
> >
> > Hi  Brice,
> >
> > I just wrote a CXFServlet test  to verified you restful_http_binding
> > issue.
> > Current CXF-Servlet doesn't support the restful_http_binding, even you
> > can create a service with JaxWsServerFactoryBean.
> > CXFServlet can't redirect the http request to the right destination.
> >
> > I also looked the code to deal with jaxws:endpoint, it just work for
> > soap binding.
> > So here are two issues of CXF and I filled them in the JIRA.
> > 1. CXFServlet doesn't support http-binding  [1]
> > 2. CXF's spring jaxws syntax doesn't support http-binding [2]
> >
> > [1]http://issues.apache.org/jira/browse/CXF-664
> > [2]http://issues.apache.org/jira/browse/CXF-663
> >
> > Please have a watch of them.
> >
> > Thanks,
> >
> > Willem.
> >
> > Willem Jiang wrote:
> > > Hi,
> > >
> > > Just quick answer for  the jsr181 jar , it  is
> > > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> > >
> > > Willem.
> > >
> > > Brice Ruth wrote:
> > >> Quick question: is it possible to configure rest (http-binding) using
> > >> Spring? If so, how's this done? Maybe someone could post a simple
> > >> translation of restful_http_binding to use Spring, instead of the
> > >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but
> > no
> > >> matter what I've tried (its been hours now), I can't get the Spring
> > >> setup to
> > >> work.
> > >>
> > >> Using jaxws:endpoint, with a bindingUri of
> > >> http://apache.org/cxf/binding/http and importing the
> > >> -http-binding.xmlSpring config, no dice. Complains that there's no
> > >> destination factory for
> > >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> > >> ClassCastException for BindingInfo. I've tried changing the order of
> > >> imports, no dice. I am running in a minimal web container (winstone),
> > to
> > >> minimize container weirdness.
> > >>
> > >> Also - its unclear from the docs if I need to import cxf-servlet.xml
> > >> or not
> > >> (I've tried both, doesn't seem to impact things at the point where
> I'm
> > >> getting the exception(s)).
> > >>
> > >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
> > >> download
> > >> under a different name? I went and grabbed the
> > >> xfire-jsr181-api-...M1.jar
> > >> from codehaus, because I couldn't find the right annotations in
> > >> jaxws. At
> > >> least, the annotations referenced in the docs (@WebService,
> @WebResult,
> > >> etc.) are not in jaxws.jar.
> > >>
> > >> Eagerly awaiting a response -
> > >>
> > >> Thanks!
> > >>
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
> --
> Brice Ruth
> Software Engineer, Madison WI
>
>


-- 
Brice Ruth, FCD
Software Engineer, Madison WI

RE: rest (http-binding) w/ Spring?

Posted by "Jiang, Ning (Willem)" <Ni...@iona.com>.
Hi Brice,

The JIRA issue CXF-664 is for the servlet restful support. 
Because servlet control will try to modify the endpointInfo according the request url, 
it will take the rest style get request as its the endpointInfo address.
Current I can not see any work around way to get acorss this.
I will try to fix it ASAP.

Cheers,

Willem.


-----Original Message-----
From: Brice Ruth [mailto:bdruth@gmail.com]
Sent: Mon 5/21/2007 20:22
To: cxf-user@incubator.apache.org
Subject: Re: rest (http-binding) w/ Spring?
 
So, is there *any* way to use restful support with something that's deployed
as a .war, without using the embedded Jetty? i.e. what can I do as a work
around?

On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi  Brice,
>
> I just wrote a CXFServlet test  to verified you restful_http_binding
> issue.
> Current CXF-Servlet doesn't support the restful_http_binding, even you
> can create a service with JaxWsServerFactoryBean.
> CXFServlet can't redirect the http request to the right destination.
>
> I also looked the code to deal with jaxws:endpoint, it just work for
> soap binding.
> So here are two issues of CXF and I filled them in the JIRA.
> 1. CXFServlet doesn't support http-binding  [1]
> 2. CXF's spring jaxws syntax doesn't support http-binding [2]
>
> [1]http://issues.apache.org/jira/browse/CXF-664
> [2]http://issues.apache.org/jira/browse/CXF-663
>
> Please have a watch of them.
>
> Thanks,
>
> Willem.
>
> Willem Jiang wrote:
> > Hi,
> >
> > Just quick answer for  the jsr181 jar , it  is
> > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> >
> > Willem.
> >
> > Brice Ruth wrote:
> >> Quick question: is it possible to configure rest (http-binding) using
> >> Spring? If so, how's this done? Maybe someone could post a simple
> >> translation of restful_http_binding to use Spring, instead of the
> >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but
> no
> >> matter what I've tried (its been hours now), I can't get the Spring
> >> setup to
> >> work.
> >>
> >> Using jaxws:endpoint, with a bindingUri of
> >> http://apache.org/cxf/binding/http and importing the
> >> -http-binding.xmlSpring config, no dice. Complains that there's no
> >> destination factory for
> >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> >> ClassCastException for BindingInfo. I've tried changing the order of
> >> imports, no dice. I am running in a minimal web container (winstone),
> to
> >> minimize container weirdness.
> >>
> >> Also - its unclear from the docs if I need to import cxf-servlet.xml
> >> or not
> >> (I've tried both, doesn't seem to impact things at the point where I'm
> >> getting the exception(s)).
> >>
> >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
> >> download
> >> under a different name? I went and grabbed the
> >> xfire-jsr181-api-...M1.jar
> >> from codehaus, because I couldn't find the right annotations in
> >> jaxws. At
> >> least, the annotations referenced in the docs (@WebService, @WebResult,
> >> etc.) are not in jaxws.jar.
> >>
> >> Eagerly awaiting a response -
> >>
> >> Thanks!
> >>
> >
> >
> >
> >
>
>
>


-- 
Brice Ruth
Software Engineer, Madison WI


Re: rest (http-binding) w/ Spring?

Posted by Dan Connelly <da...@comcast.net>.
Hi:

I have the same issue with REST on CXF.

One "answer" here is to use the RESTful JAX-WS api from the Sun Web 
Developer Pack.     Its adapter servlet translates a REST service nicely 
to a WAR for Tomcat 6, or you can just use the Sun Endpoint 
implementation (a Jetty-like container).   Not much fuss in going from 
one to the other.   One problem with SWDP is that the bundled ant script 
for REST has a bad launch for its apt (Annotation Processing Tool) 
task.    I moved everthing to Eclipse JDT-APT with better success (but 
still not perfect).

The Sun Rest container gives a slightly higher level of abstraction than 
the @WebServiceProvider used by CXF its restful_dispatch example.     A 
Sun container keeps Providers in a list and the provider invocation is 
hidden in the container.   The request is forwarded to application 
methods keyed by URI and HTTP method.    

Sun's REST hides (?) the javax.xml.ws.WebServiceContext.   It has its 
own HTTPContext and avoids type casting away from SOAP.

I suspect it is possible to run Sun's REST api over CXF, although I have 
not tried this.    Although SWDP is freeware, it is not open source.   
Therefore, one first needs some reverse engineering before porting this 
API onto CXF.   Has anyone attempted this.

       -- Dan



 

Brice Ruth wrote:

> So, is there *any* way to use restful support with something that's 
> deployed
> as a .war, without using the embedded Jetty? i.e. what can I do as a work
> around?
>
> On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
>
>>
>> Hi  Brice,
>>
>> I just wrote a CXFServlet test  to verified you restful_http_binding
>> issue.
>> Current CXF-Servlet doesn't support the restful_http_binding, even you
>> can create a service with JaxWsServerFactoryBean.
>> CXFServlet can't redirect the http request to the right destination.
>>
>> I also looked the code to deal with jaxws:endpoint, it just work for
>> soap binding.
>> So here are two issues of CXF and I filled them in the JIRA.
>> 1. CXFServlet doesn't support http-binding  [1]
>> 2. CXF's spring jaxws syntax doesn't support http-binding [2]
>>
>> [1]http://issues.apache.org/jira/browse/CXF-664
>> [2]http://issues.apache.org/jira/browse/CXF-663
>>
>> Please have a watch of them.
>>
>> Thanks,
>>
>> Willem.
>>
>> Willem Jiang wrote:
>> > Hi,
>> >
>> > Just quick answer for  the jsr181 jar , it  is
>> > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
>> >
>> > Willem.
>> >
>> > Brice Ruth wrote:
>> >> Quick question: is it possible to configure rest (http-binding) using
>> >> Spring? If so, how's this done? Maybe someone could post a simple
>> >> translation of restful_http_binding to use Spring, instead of the
>> >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but
>> no
>> >> matter what I've tried (its been hours now), I can't get the Spring
>> >> setup to
>> >> work.
>> >>
>> >> Using jaxws:endpoint, with a bindingUri of
>> >> http://apache.org/cxf/binding/http and importing the
>> >> -http-binding.xmlSpring config, no dice. Complains that there's no
>> >> destination factory for
>> >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
>> >> ClassCastException for BindingInfo. I've tried changing the order of
>> >> imports, no dice. I am running in a minimal web container (winstone),
>> to
>> >> minimize container weirdness.
>> >>
>> >> Also - its unclear from the docs if I need to import cxf-servlet.xml
>> >> or not
>> >> (I've tried both, doesn't seem to impact things at the point where 
>> I'm
>> >> getting the exception(s)).
>> >>
>> >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
>> >> download
>> >> under a different name? I went and grabbed the
>> >> xfire-jsr181-api-...M1.jar
>> >> from codehaus, because I couldn't find the right annotations in
>> >> jaxws. At
>> >> least, the annotations referenced in the docs (@WebService, 
>> @WebResult,
>> >> etc.) are not in jaxws.jar.
>> >>
>> >> Eagerly awaiting a response -
>> >>
>> >> Thanks!
>> >>
>> >
>> >
>> >
>> >
>>
>>
>>
>
>


Re: rest (http-binding) w/ Spring?

Posted by Brice Ruth <bd...@gmail.com>.
So, is there *any* way to use restful support with something that's deployed
as a .war, without using the embedded Jetty? i.e. what can I do as a work
around?

On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi  Brice,
>
> I just wrote a CXFServlet test  to verified you restful_http_binding
> issue.
> Current CXF-Servlet doesn't support the restful_http_binding, even you
> can create a service with JaxWsServerFactoryBean.
> CXFServlet can't redirect the http request to the right destination.
>
> I also looked the code to deal with jaxws:endpoint, it just work for
> soap binding.
> So here are two issues of CXF and I filled them in the JIRA.
> 1. CXFServlet doesn't support http-binding  [1]
> 2. CXF's spring jaxws syntax doesn't support http-binding [2]
>
> [1]http://issues.apache.org/jira/browse/CXF-664
> [2]http://issues.apache.org/jira/browse/CXF-663
>
> Please have a watch of them.
>
> Thanks,
>
> Willem.
>
> Willem Jiang wrote:
> > Hi,
> >
> > Just quick answer for  the jsr181 jar , it  is
> > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> >
> > Willem.
> >
> > Brice Ruth wrote:
> >> Quick question: is it possible to configure rest (http-binding) using
> >> Spring? If so, how's this done? Maybe someone could post a simple
> >> translation of restful_http_binding to use Spring, instead of the
> >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but
> no
> >> matter what I've tried (its been hours now), I can't get the Spring
> >> setup to
> >> work.
> >>
> >> Using jaxws:endpoint, with a bindingUri of
> >> http://apache.org/cxf/binding/http and importing the
> >> -http-binding.xmlSpring config, no dice. Complains that there's no
> >> destination factory for
> >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> >> ClassCastException for BindingInfo. I've tried changing the order of
> >> imports, no dice. I am running in a minimal web container (winstone),
> to
> >> minimize container weirdness.
> >>
> >> Also - its unclear from the docs if I need to import cxf-servlet.xml
> >> or not
> >> (I've tried both, doesn't seem to impact things at the point where I'm
> >> getting the exception(s)).
> >>
> >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
> >> download
> >> under a different name? I went and grabbed the
> >> xfire-jsr181-api-...M1.jar
> >> from codehaus, because I couldn't find the right annotations in
> >> jaxws. At
> >> least, the annotations referenced in the docs (@WebService, @WebResult,
> >> etc.) are not in jaxws.jar.
> >>
> >> Eagerly awaiting a response -
> >>
> >> Thanks!
> >>
> >
> >
> >
> >
>
>
>


-- 
Brice Ruth
Software Engineer, Madison WI

Re: rest (http-binding) w/ Spring?

Posted by Brice Ruth <bd...@gmail.com>.
Thank you

On 5/21/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi  Brice,
>
> I just wrote a CXFServlet test  to verified you restful_http_binding
> issue.
> Current CXF-Servlet doesn't support the restful_http_binding, even you
> can create a service with JaxWsServerFactoryBean.
> CXFServlet can't redirect the http request to the right destination.
>
> I also looked the code to deal with jaxws:endpoint, it just work for
> soap binding.
> So here are two issues of CXF and I filled them in the JIRA.
> 1. CXFServlet doesn't support http-binding  [1]
> 2. CXF's spring jaxws syntax doesn't support http-binding [2]
>
> [1]http://issues.apache.org/jira/browse/CXF-664
> [2]http://issues.apache.org/jira/browse/CXF-663
>
> Please have a watch of them.
>
> Thanks,
>
> Willem.
>
> Willem Jiang wrote:
> > Hi,
> >
> > Just quick answer for  the jsr181 jar , it  is
> > geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
> >
> > Willem.
> >
> > Brice Ruth wrote:
> >> Quick question: is it possible to configure rest (http-binding) using
> >> Spring? If so, how's this done? Maybe someone could post a simple
> >> translation of restful_http_binding to use Spring, instead of the
> >> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but
> no
> >> matter what I've tried (its been hours now), I can't get the Spring
> >> setup to
> >> work.
> >>
> >> Using jaxws:endpoint, with a bindingUri of
> >> http://apache.org/cxf/binding/http and importing the
> >> -http-binding.xmlSpring config, no dice. Complains that there's no
> >> destination factory for
> >> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> >> ClassCastException for BindingInfo. I've tried changing the order of
> >> imports, no dice. I am running in a minimal web container (winstone),
> to
> >> minimize container weirdness.
> >>
> >> Also - its unclear from the docs if I need to import cxf-servlet.xml
> >> or not
> >> (I've tried both, doesn't seem to impact things at the point where I'm
> >> getting the exception(s)).
> >>
> >> Btw - is an equivalent to the jsr181-api JAR included in the CXF
> >> download
> >> under a different name? I went and grabbed the
> >> xfire-jsr181-api-...M1.jar
> >> from codehaus, because I couldn't find the right annotations in
> >> jaxws. At
> >> least, the annotations referenced in the docs (@WebService, @WebResult,
> >> etc.) are not in jaxws.jar.
> >>
> >> Eagerly awaiting a response -
> >>
> >> Thanks!
> >>
> >
> >
> >
> >
>
>
>


-- 
Brice Ruth
Software Engineer, Madison WI

Re: rest (http-binding) w/ Spring?

Posted by Willem Jiang <ni...@iona.com>.
Hi  Brice,

I just wrote a CXFServlet test  to verified you restful_http_binding issue.
Current CXF-Servlet doesn't support the restful_http_binding, even you 
can create a service with JaxWsServerFactoryBean.
CXFServlet can't redirect the http request to the right destination.

I also looked the code to deal with jaxws:endpoint, it just work for 
soap binding.
So here are two issues of CXF and I filled them in the JIRA.
1. CXFServlet doesn't support http-binding  [1]
2. CXF's spring jaxws syntax doesn't support http-binding [2]

[1]http://issues.apache.org/jira/browse/CXF-664
[2]http://issues.apache.org/jira/browse/CXF-663

Please have a watch of them.

Thanks,
 
Willem.

Willem Jiang wrote:
> Hi,
>
> Just quick answer for  the jsr181 jar , it  is  
> geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.
>
> Willem.
>
> Brice Ruth wrote:
>> Quick question: is it possible to configure rest (http-binding) using
>> Spring? If so, how's this done? Maybe someone could post a simple
>> translation of restful_http_binding to use Spring, instead of the
>> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but no
>> matter what I've tried (its been hours now), I can't get the Spring 
>> setup to
>> work.
>>
>> Using jaxws:endpoint, with a bindingUri of
>> http://apache.org/cxf/binding/http and importing the
>> -http-binding.xmlSpring config, no dice. Complains that there's no
>> destination factory for
>> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
>> ClassCastException for BindingInfo. I've tried changing the order of
>> imports, no dice. I am running in a minimal web container (winstone), to
>> minimize container weirdness.
>>
>> Also - its unclear from the docs if I need to import cxf-servlet.xml 
>> or not
>> (I've tried both, doesn't seem to impact things at the point where I'm
>> getting the exception(s)).
>>
>> Btw - is an equivalent to the jsr181-api JAR included in the CXF 
>> download
>> under a different name? I went and grabbed the 
>> xfire-jsr181-api-...M1.jar
>> from codehaus, because I couldn't find the right annotations in 
>> jaxws. At
>> least, the annotations referenced in the docs (@WebService, @WebResult,
>> etc.) are not in jaxws.jar.
>>
>> Eagerly awaiting a response -
>>
>> Thanks!
>>
>
>
>
>



Re: rest (http-binding) w/ Spring?

Posted by Willem Jiang <ni...@iona.com>.
Hi,

Just quick answer for  the jsr181 jar , it  is  
geronimo-ws-metadata_2.0_spec-1.1-M1.jar  in  CXF.

Willem.

Brice Ruth wrote:
> Quick question: is it possible to configure rest (http-binding) using
> Spring? If so, how's this done? Maybe someone could post a simple
> translation of restful_http_binding to use Spring, instead of the
> JaxWsServerFactoryBean. I can get JaxWsServerFactoryBean working, but no
> matter what I've tried (its been hours now), I can't get the Spring 
> setup to
> work.
>
> Using jaxws:endpoint, with a bindingUri of
> http://apache.org/cxf/binding/http and importing the
> -http-binding.xmlSpring config, no dice. Complains that there's no
> destination factory for
> SOAP (?!?). If I import the -soap.xml Spring config, then I get a
> ClassCastException for BindingInfo. I've tried changing the order of
> imports, no dice. I am running in a minimal web container (winstone), to
> minimize container weirdness.
>
> Also - its unclear from the docs if I need to import cxf-servlet.xml 
> or not
> (I've tried both, doesn't seem to impact things at the point where I'm
> getting the exception(s)).
>
> Btw - is an equivalent to the jsr181-api JAR included in the CXF download
> under a different name? I went and grabbed the xfire-jsr181-api-...M1.jar
> from codehaus, because I couldn't find the right annotations in jaxws. At
> least, the annotations referenced in the docs (@WebService, @WebResult,
> etc.) are not in jaxws.jar.
>
> Eagerly awaiting a response -
>
> Thanks!
>