Here is the detail of what I am doing and getting:

I am using the RestEasy client framework, accessing it via a service
interface
The methods are POST. The 3rd party "REST" service returns a list a query
strings BUT the type is marked as text/html;utf-8

When running without my custom reader, the framework complains it cannot
find a message reader for text/html;utf-8 with my custom return type

I was thinking of 2 alternatives:

1- Do as I am right now: implement my own message reader and convert it
back to my custom type
2- Could I user a client interceptor and change the type
from text/html;utf-8 to application/x-www-form-**urlencoded and skip my
custom message reader entirely?

My custom type has attributes annotated with FormParam

Olivier

On Wed, May 2, 2012 at 6:12 PM, Bill Burke <bbu...@redhat.com> wrote:

> Well, isn't that the application/x-www-form-**urlencoded format?
>
>
> On 5/2/12 8:45 PM, Olivier Brand wrote:
>
>> Yes, maybe I was not clear in my question. Basically I am using a third
>> party API that returns as body a list of query params:
>> param1=www&param2=ddd
>>
>> I have just finished implementing a custom message body reader that
>> takes this string and convert it back to a Java Bean.
>> No need further help.
>>
>> Olivier
>>
>> On Wed, May 2, 2012 at 5:00 PM, Bill Burke <bbu...@redhat.com
>> <mailto:bbu...@redhat.com>> wrote:
>>
>>    MessageBodyReader is for reading Http message bodies.  Also, I"m not
>>    exactly sure what you mean/want anyways.
>>
>>    On 5/2/12 6:35 PM, Olivier Brand wrote:
>>     > Hi,
>>     >
>>     > I am using a 3rd party API that returns a list of query parameters
>>     > Is there a way in RestEasy to convert such a list (in a
>>     > MessageBodyReader) into a POJO with, let's say @Form annotations?
>>     >
>>     > Thanks
>>     >
>>     > --
>>     > *Olivier
>>     > *
>>     >
>>     >
>>     >
>>    ------------------------------**------------------------------**
>> ------------------
>>     > Live Security Virtual Conference
>>     > Exclusive live event will cover all the ways today's security and
>>     > threat landscape has changed and how IT managers can respond.
>>    Discussions
>>     > will include endpoint security, mobile security and the latest in
>>    malware
>>     > threats. http://www.accelacomm.com/jaw/**
>> sfrnl04242012/114/50122263/<http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/>
>>     >
>>     >
>>     >
>>     > ______________________________**_________________
>>     > Resteasy-users mailing list
>>     > 
>> Resteasy-users@lists.**sourceforge.net<Resteasy-users@lists.sourceforge.net>
>>    
>> <mailto:Resteasy-users@lists.**sourceforge.net<Resteasy-users@lists.sourceforge.net>
>> >
>>
>>     > 
>> https://lists.sourceforge.net/**lists/listinfo/resteasy-users<https://lists.sourceforge.net/lists/listinfo/resteasy-users>
>>
>>    --
>>    Bill Burke
>>    JBoss, a division of Red Hat
>>    http://bill.burkecentral.com
>>
>>    ------------------------------**------------------------------**
>> ------------------
>>    Live Security Virtual Conference
>>    Exclusive live event will cover all the ways today's security and
>>    threat landscape has changed and how IT managers can respond.
>>    Discussions
>>    will include endpoint security, mobile security and the latest in
>>    malware
>>    threats. 
>> http://www.accelacomm.com/jaw/**sfrnl04242012/114/50122263/<http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/>
>>    ______________________________**_________________
>>    Resteasy-users mailing list
>>    
>> Resteasy-users@lists.**sourceforge.net<Resteasy-users@lists.sourceforge.net>
>>    
>> <mailto:Resteasy-users@lists.**sourceforge.net<Resteasy-users@lists.sourceforge.net>
>> >
>>    
>> https://lists.sourceforge.net/**lists/listinfo/resteasy-users<https://lists.sourceforge.net/lists/listinfo/resteasy-users>
>>
>>
>>
>>
>> --
>> *Olivier Brand*
>> *CTO Passbox LLC*
>>
>>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>



-- 
*Olivier Brand*
*CTO Passbox LLC*
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to