Cheers for the suggestion.

Ryan


On Thu, May 12, 2011 at 4:47 AM, Sergey Beryozkin <sberyoz...@gmail.com>wrote:

> Hi Ryan
>
> On Thu, May 12, 2011 at 10:42 AM, Ryan Zoerner <ryanzoer...@gmail.com>
> wrote:
> > In the paragraph, with the hyperlink to the jaxrs demo, I said this:
> >
> >
> -------------------------------------------------------------------------------------------
> >
> > The client opens a printStream that is associated with the connection,
> and
> > from that connection the client obtains the return information that would
> > normally be
> > associated with a GET request. It may be that since the only @Path in
> > CustomerService
> > with "/customerservice/customers/{id}" is the GET method, that the
> service
> > automatically
> > just queries that @Path and assumes a GET request, since that method is
> > annotated with
> > the @GET annotation. If you annotated it with more than one HTTP
> > RequestType, I am unsure
> > what would happen at the moment. That said, here is the refactoring part
> of
> > the code.
> >
> -------------------------------------------------------------------------------------------
> >
> >
> > However, I found this, in a stack trace:
> >
> -------------------------------------------------------------------------------------------
> > May 12, 2011 4:29:04 AM org.apache.cxf.jaxrs.utils.JAXRSUtils
> > findTargetMethod
> > WARNING: No operation matching request path /customer/123 is found,
> > HTTP Method : GET, ContentType : */*,
> > Accept :
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,.
> >
> -------------------------------------------------------------------------------------------
> >
> > Apparently the findTargetMethod(?); method named above
> > takes care of selecting the HTTP method, at least in this case, based
> upon
> > what url is received. But I was right, no explicit GET method is sent,
> the
> > application simply selects, based upon input, which method to assume, or
> > use.
> >
> No, HTTP method is always sent by the client code, it is just in your
> case, when you do
> url.openStream() or similar, it's defaulted to GET.
>
> By the way, enabling the FINE logging level on the server side will
> let you see more details about the selection process
>
> Cheers, Sergey
>
> > Ryan
> >
>

Reply via email to