camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atg roxx <atgr...@gmail.com>
Subject Re: Not getting any response from rest serivce
Date Wed, 15 Feb 2012 15:00:02 GMT
HI   Willem Jiang ,

Thanks for replying ..
I found the issue. The  issue was that I was using
"System.out.println("response is "+ exchange.getOut().getBody());"

instead I should have used "System.out.println("response is "+
exchange.getIn().getBody());"

getOut and getIn was the issue.

Also the error msg which i have posted
"I am getting : " java.lang.**IllegalStateException: IllegalStateException
invoking http://www.google.com: Already connected"

was a warning msg which I received when I kept all logs in debug mode.



thanks;

-cheers,
atg roxx

On Wed, Feb 15, 2012 at 2:27 PM, Willem Jiang <willem.jiang@gmail.com>wrote:

> Not sure why are you trying to use cxfrs to send the request to google.
> First, google doesn't provide the REST service,
> Second, you need to prepare the parameter for the cxfrs to send.
>
> Can you try to use the camel-http component to send the request ?
>
>
> On Wed Feb 15 21:54:23 2012, atg roxx wrote:
>
>> Hi All.
>>
>> I am facing a issue. I am trying to connect to rest service and want to
>> process the response which I receive.
>> But I was not getting any response.
>>
>> So I thought to try simple  connection to google and see if any response
>> comes from there.
>>
>> strange that I am not even getting any response from google.
>> I am getting : " java.lang.**IllegalStateException: IllegalStateException
>> invoking http://www.google.com: Already connected"
>>
>> my route is defined like this:
>>
>>
>> from("jms:request")
>>  .log("Output:")
>> .to(ExchangePattern.InOut,"**cxfrs://http://www.google.com"**)
>>          .log("Output:")
>>         .process(new Processor() {
>>  @Override
>> public void process(Exchange exchange) throws Exception {
>> System.out.println("response is "+ exchange.getOut().getBody());
>>  }
>> });
>>
>>
>>
>> ------------------------------**-----------------
>>
>> Kindly let me know where I am going wrong.
>>
>> --cheers,
>> atg roxx
>>
>>
>
>
> --
> Willem
> ------------------------------**----
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
>        http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang Weibo: willemjiang
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message