Converter not getting called

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Converter not getting called

yagyesh
Hi All,

I am using camel to call a restful webservice.

I am calling the requestBodyandheader method of producerTemplate and expecting a response of type JSONarray

template.requestBodyAndHeader("direct:aa",null,"ab",header,JSONArray.class);

A converter is also defined to manipulate the response.
But i am not getting any result ,in logs converter is loaded but it is not getting called .
The converter has been  already added to  classpath.

Can anybody help me to indicate the possible causes of this issue?
 
Reply | Threaded
Open this post in threaded view
|

Re: Converter not getting called

Christian Mueller
Administrator
Which version do you use?
What's the result if you execute:

template.requestBodyAndHeader("direct:aa",null,"ab",header);

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Tue, Feb 11, 2014 at 5:35 PM, yagyesh <[hidden email]> wrote:

> Hi All,
>
> I am using camel to call a restful webservice.
>
> I am calling the requestBodyandheader method of producerTemplate and
> expecting a response of type JSONarray
>
>
> template.requestBodyAndHeader("direct:aa",null,"ab",header,JSONArray.class);
>
> A converter is also defined to manipulate the response.
> But i am not getting any result ,in logs converter is loaded but it is not
> getting called .
> The converter has been  already added to  classpath.
>
> Can anybody help me to indicate the possible causes of this issue?
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Converter-not-getting-called-tp5747122.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Converter not getting called

yagyesh
camel version 2.11.0.

In logs i can see  Caused by: org.apache.camel.RuntimeCamelException
     Caused by: java.lang.IllegalAccessException a


On Wed, Feb 12, 2014 at 3:59 AM, Christian Mueller [via Camel] <[hidden email]> wrote:
Which version do you use?
What's the result if you execute:

template.requestBodyAndHeader("direct:aa",null,"ab",header);

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Tue, Feb 11, 2014 at 5:35 PM, yagyesh <[hidden email]> wrote:

> Hi All,
>
> I am using camel to call a restful webservice.
>
> I am calling the requestBodyandheader method of producerTemplate and
> expecting a response of type JSONarray
>
>
> template.requestBodyAndHeader("direct:aa",null,"ab",header,JSONArray.class);
>
> A converter is also defined to manipulate the response.
> But i am not getting any result ,in logs converter is loaded but it is not
> getting called .
> The converter has been  already added to  classpath.
>
> Can anybody help me to indicate the possible causes of this issue?
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Converter-not-getting-called-tp5747122.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Converter-not-getting-called-tp5747122p5747146.html
To unsubscribe from Converter not getting called, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Converter not getting called

yagyesh
I was able to solve the issue .There were some problem in my TypeConverter
1)it was not public
2)In typeConverter configuration there were some blank space
3)The InputStream data was not converted to proper form so typeConversionException