Why resteasy.servlet.mapping.prefix
by Rebecca Searls
Anyone remember why Resteasy web.xml config setting, resteasy.servlet.mapping.prefix was part of Resteasy arch?
It appears in the very 1st 1.0.1 documentation release, so it must have been part of the initial design.
Resteasy completely ignores servlet-mapping's, url-pattern, and uses resteasy.servlet.mapping.prefix if
declared and @ApplicationPath if it is not declared.
Changes may need to be made to this. I would like to understand why this design so as not to implement a
change that would break Resteasy in a major way.
7 years, 11 months
Re: [resteasy-dev] [Resteasy-developers] Upgrading a client proxy from v2 to v3
by Alessio Soldano
Please see Chapter 1.1, page 3, in particular the notes on
Response.getEntity() vs Response.readEntity().
Basically, use response.readEntity() and response.getStatus().
Cheers
Alessio
Il 10/01/2017 17:55, John Ulric ha scritto:
> Yes, I have. Chapter 1.2 "Client Proxies" only gives one very simple
> example with a method returning a String object.
>
> 2017-01-10 17:52 GMT+01:00 Alessio Soldano <asoldano(a)redhat.com
> <mailto:asoldano@redhat.com>>:
>
> Il 10/01/2017 17:46, John Ulric ha scritto:
>> Hi all,
>>
>> I'm upgrading an application from RESTeasy v2 (2.2.1.GA
>> <http://2.2.1.GA>) to v3 (3.0.19.Final). In v2, I was using the
>> client proxy framework like this:
>>
>> public interface MyClient {
>> ClientResponse<MyPojo> myMethod();
>> }
>>
>> with a call pattern like this:
>>
>> ClientResponse<MyPojo> r = client.myMethod();
>> checkSuccessful(r); //
>> MyPojo myPojo = r.getEntity();
>>
>> With v3, things seem to be different.
>>
>> The ClientResponseinterface is deprecated, so I tried:
>>
>> public interface MyClient {
>> ClientResponse<MyPojo> myMethod0();
>> MyPojo myMethod1();
>> Response myMethod2();
>> }
>>
>> Calling myMethod0 gives:
>>
>> java.lang.ClassCastException:
>> org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine$1
>> cannot be cast to org.jboss.resteasy.client.ClientResponse
>>
>> Calling myMethod1 works and gives me a deserialized object, but
>> it doesn't give me access to the HTTP status code, which I need.
>>
>> Calling myMethod2 gives a response object, but
>> response.getEntity()is always null.
>>
>> I've probably got something wrong here, but I cannot figure it
>> out and I haven't found any more information in the documentation.
>
> Have you read
> http://docs.jboss.org/resteasy/docs/resteasy-upgrade-guide-en-US.pdf
> <http://docs.jboss.org/resteasy/docs/resteasy-upgrade-guide-en-US.pdf>
> ?
>
> Cheers
> Alessio
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Resteasy-developers mailing list
> Resteasy-developers(a)lists.sourceforge.net
> <mailto:Resteasy-developers@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> <https://lists.sourceforge.net/lists/listinfo/resteasy-developers>
>
>
7 years, 11 months
Fwd: Re: [Resteasy-developers] Upgrading a client proxy from v2 to v3
by Alessio Soldano
-------- Messaggio Inoltrato --------
Oggetto: Re: [Resteasy-developers] Upgrading a client proxy from v2 to v3
Data: Tue, 10 Jan 2017 17:52:55 +0100
Mittente: Alessio Soldano <asoldano(a)redhat.com>
A: resteasy-developers(a)lists.sourceforge.net
Il 10/01/2017 17:46, John Ulric ha scritto:
> Hi all,
>
> I'm upgrading an application from RESTeasy v2 (2.2.1.GA
> <http://2.2.1.GA>) to v3 (3.0.19.Final). In v2, I was using the client
> proxy framework like this:
>
> public interface MyClient {
> ClientResponse<MyPojo> myMethod();
> }
>
> with a call pattern like this:
>
> ClientResponse<MyPojo> r = client.myMethod();
> checkSuccessful(r); //
> MyPojo myPojo = r.getEntity();
>
> With v3, things seem to be different.
>
> The ClientResponseinterface is deprecated, so I tried:
>
> public interface MyClient {
> ClientResponse<MyPojo> myMethod0();
> MyPojo myMethod1();
> Response myMethod2();
> }
>
> Calling myMethod0 gives:
>
> java.lang.ClassCastException:
> org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine$1
> cannot be cast to org.jboss.resteasy.client.ClientResponse
>
> Calling myMethod1 works and gives me a deserialized object, but it
> doesn't give me access to the HTTP status code, which I need.
>
> Calling myMethod2 gives a response object, but response.getEntity()is
> always null.
>
> I've probably got something wrong here, but I cannot figure it out and
> I haven't found any more information in the documentation.
Have you read
http://docs.jboss.org/resteasy/docs/resteasy-upgrade-guide-en-US.pdf ?
Cheers
Alessio
7 years, 11 months