Re: [Resteasy-users] Unable to find a MessageBodyReader of content-type text/html; charset="utf-8"

2013-02-22 Thread Nuwan Bandara
Thanks for the reply.

I have @Producer(application/jason)

Is this seething to do with AnalyteResult Jaxb annotation or the
client lobs I use in JUnit?

Sent from my iPhone

On Feb 22, 2013, at 12:07 PM, Bill Burke  wrote:

> It looks like you are getting an error response from the server as the
> response body contains HTML, not the requested JSON you put in the accep
> theader.  Check the status to see if it is 200. If it is an error
> status, its probably HTML from the server
> s error msg
>
> On 2/22/2013 2:04 PM, Nuwan Bandara wrote:
>> Hi,
>>
>> Thanks for your reply. Here's my code
>>
>> public List interpretResultListRemote(List
>> analyteResultList) throws AREException {
>> logger.debug("Start of interpretResultListRemote method");
>> List interpretResultList;
>> try {
>> String
>> wsURL=ServiceLocator.getInstance().getNichPROProperties().getProperty("REST_WS_ARE_PREFIX")
>> + INTERPRET_RESULT_LIST;
>> clientRequest = new ClientRequest(wsURL);
>> clientRequest.accept("application/json");
>> clientRequest.body("application/json", analyteResultList);
>> interpretResultList =
>> (List)clientRequest.post().getEntity(new
>> GenericType>(){});
>>} catch (Exception e) {
>> logger.error(AssayRuleEngineInvoker.class.getName() +
>> ":interpretResultListRemote:", e);
>> throw new AREException(e);
>> }
>> logger.debug("End of interpretResultListRemote method");
>> return interpretResultList;
>> }
>>
>> Am I doing anything wrong here?
>>
>> On Thu, Feb 21, 2013 at 4:29 PM, Weinan Li > > wrote:
>>
>>
>>
>>--
>>Weinan Li
>>Sent with Sparrow 
>>
>>On Friday, February 22, 2013 at 12:42 AM, Nuwan Bandara wrote:
>>
>>>Hi,
>>>
>>>I am getting this error when I try to call one of the webservice
>>>in remote stateless session bean. I use JUnit to call the webservice.
>>>
>>>org.jboss.resteasy.client.ClientResponseFailure: Unable to find a
>>>MessageBodyReader of content-type text/html;charset="utf-8" and
>>>type
>>>
>>> java.util.List
>>
>>btw, could you please provide some codes on how you are using the
>>resteasy client  api?
>>>
>>>What could be the problem?
>>>
>>>Thanks,
>>>Nuwan
>>>
>>> --
>>>Everyone hates slow websites. So do we.
>>>Make your web apps faster with AppDynamics
>>>Download AppDynamics Lite for free today:
>>>http://p.sf.net/sfu/appdyn_d2d_feb
>>>___
>>>Resteasy-users mailing list
>>>Resteasy-users@lists.sourceforge.net
>>>
>>>https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>
>>
>>
>>
>> --
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>>
>>
>>
>> ___
>> Resteasy-users mailing list
>> Resteasy-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Unable to find a MessageBodyReader of content-type text/html; charset="utf-8"

2013-02-22 Thread Bill Burke
It looks like you are getting an error response from the server as the 
response body contains HTML, not the requested JSON you put in the accep 
theader.  Check the status to see if it is 200. If it is an error 
status, its probably HTML from the server
s error msg

On 2/22/2013 2:04 PM, Nuwan Bandara wrote:
> Hi,
>
> Thanks for your reply. Here's my code
>
> public List interpretResultListRemote(List
> analyteResultList) throws AREException {
>  logger.debug("Start of interpretResultListRemote method");
>  List interpretResultList;
>  try {
>  String
> wsURL=ServiceLocator.getInstance().getNichPROProperties().getProperty("REST_WS_ARE_PREFIX")
> + INTERPRET_RESULT_LIST;
>  clientRequest = new ClientRequest(wsURL);
>  clientRequest.accept("application/json");
>  clientRequest.body("application/json", analyteResultList);
>  interpretResultList =
> (List)clientRequest.post().getEntity(new
> GenericType>(){});
> } catch (Exception e) {
>  logger.error(AssayRuleEngineInvoker.class.getName() +
> ":interpretResultListRemote:", e);
>  throw new AREException(e);
>  }
>  logger.debug("End of interpretResultListRemote method");
>  return interpretResultList;
>  }
>
> Am I doing anything wrong here?
>
> On Thu, Feb 21, 2013 at 4:29 PM, Weinan Li  > wrote:
>
>
>
> --
> Weinan Li
> Sent with Sparrow 
>
> On Friday, February 22, 2013 at 12:42 AM, Nuwan Bandara wrote:
>
>> Hi,
>>
>> I am getting this error when I try to call one of the webservice
>> in remote stateless session bean. I use JUnit to call the webservice.
>>
>> org.jboss.resteasy.client.ClientResponseFailure: Unable to find a
>> MessageBodyReader of content-type text/html;charset="utf-8" and
>> type
>> 
>> java.util.List
>
> btw, could you please provide some codes on how you are using the
> resteasy client  api?
>>
>> What could be the problem?
>>
>> Thanks,
>> Nuwan
>> 
>> --
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> ___
>> Resteasy-users mailing list
>> Resteasy-users@lists.sourceforge.net
>> 
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
>
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
>
>
> ___
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Unable to find a MessageBodyReader of content-type text/html; charset="utf-8"

2013-02-22 Thread Nuwan Bandara
Hi,

Thanks for your reply. Here's my code

public List interpretResultListRemote(List
analyteResultList) throws AREException {
logger.debug("Start of interpretResultListRemote method");
List interpretResultList;
try {
String
wsURL=ServiceLocator.getInstance().getNichPROProperties().getProperty("REST_WS_ARE_PREFIX")
+ INTERPRET_RESULT_LIST;
clientRequest = new ClientRequest(wsURL);
clientRequest.accept("application/json");
clientRequest.body("application/json", analyteResultList);
interpretResultList =
(List)clientRequest.post().getEntity(new
GenericType>(){});
   } catch (Exception e) {
logger.error(AssayRuleEngineInvoker.class.getName() +
":interpretResultListRemote:", e);
throw new AREException(e);
}
logger.debug("End of interpretResultListRemote method");
return interpretResultList;
}

Am I doing anything wrong here?

On Thu, Feb 21, 2013 at 4:29 PM, Weinan Li  wrote:

>
>
> --
> Weinan Li
> Sent with Sparrow 
>
> On Friday, February 22, 2013 at 12:42 AM, Nuwan Bandara wrote:
>
> Hi,
>
> I am getting this error when I try to call one of the webservice in remote
> stateless session bean. I use JUnit to call the webservice.
>
> org.jboss.resteasy.client.ClientResponseFailure: Unable to find a
> MessageBodyReader of content-type text/html;charset="utf-8" and type
> java.util.List
>
>
> btw, could you please provide some codes on how you are using the resteasy
> client  api?
>
>
> What could be the problem?
>
> Thanks,
> Nuwan
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
>
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users