--
Weinan Li
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Saturday, February 23, 2013 at 11:16 PM, Weinan Li wrote:
>
>
> --
> Weinan Li
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>
>
> On Saturday, February 23, 2013 at 3:04 AM, Nuwan Bandara wrote:
>
> > Hi,
> >
> > Thanks for your reply. Here's my code
> >
> > public List<AnalyteResult> interpretResultListRemote(List<AnalyteResult>
> > analyteResultList) throws AREException {
> > logger.debug("Start of interpretResultListRemote method");
> > List<AnalyteResult> 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);
> >
> >
> >
> >
>
> Did you use your own MessageBodyWriter for marshalling the List -> json
> format? I remember RESTEasy doesn't provide it by default.
>
>
My mistake, resteasy-jackson-provider can handle List properly and will convert
obj <-> json for you.
As Bill said, your response is text/html but the return type expected is
text/html. It may be caused by some exceptions thrown from server side.
My suggestion is that you could try to read the server response to see what
happens. I usually use Wireshark to read http request / response and it's very
convenient to use. Hope these useful to you :-)
>
> > interpretResultList =
> > (List<AnalyteResult>)clientRequest.post().getEntity(new
> > GenericType<List<AnalyteResult>>(){});
> > } 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 <l.wei...@gmail.com
> > (mailto:l.wei...@gmail.com)> wrote:
> > >
> > >
> > > --
> > > Weinan Li
> > > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> > >
> > >
> > > 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<com.questdiagnostics.nichpro.assayruleengine.model.AnalyteResult>
> > > >
> > >
> > > 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
> > > > (mailto: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