You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Al Ferguson <al...@hotmail.com> on 2013/04/25 15:07:11 UTC

Expected behavior of two consecutive convertBodyTo?

Hi,

I get an Address in a format (MyAddress, jaxb annotated) and I want to
convert this address in another format (ExternalAddress, jaxb annotated)
before invoking an Web service.



Curiously the second conversion (MyAddress to ExternalAddress, for which I
wrote a Converter) does not work. In fact my converter is not invoked. It
seems Camel tries rather a conversion of the original XML to
ExternalAddress.

When I invoke myself the converter via the ConvertAddress process, it works.

Is there something I do not understand in the behavior of convertBodyTo?

Thanks,
A. Fe



--
View this message in context: http://camel.465427.n5.nabble.com/Expected-behavior-of-two-consecutive-convertBodyTo-tp5731543.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Expected behavior of two consecutive convertBodyTo?

Posted by Al Ferguson <al...@hotmail.com>.
TypeConverter file!  You got it, thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Expected-behavior-of-two-consecutive-convertBodyTo-tp5731543p5731623.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Expected behavior of two consecutive convertBodyTo?

Posted by Christian Müller <ch...@gmail.com>.
Can you share your type converter class with us?
Do you provide a TypeConverter file?

Best,
Christian


On Thu, Apr 25, 2013 at 3:07 PM, Al Ferguson <al...@hotmail.com> wrote:

> Hi,
>
> I get an Address in a format (MyAddress, jaxb annotated) and I want to
> convert this address in another format (ExternalAddress, jaxb annotated)
> before invoking an Web service.
>
>
>
> Curiously the second conversion (MyAddress to ExternalAddress, for which I
> wrote a Converter) does not work. In fact my converter is not invoked. It
> seems Camel tries rather a conversion of the original XML to
> ExternalAddress.
>
> When I invoke myself the converter via the ConvertAddress process, it
> works.
>
> Is there something I do not understand in the behavior of convertBodyTo?
>
> Thanks,
> A. Fe
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Expected-behavior-of-two-consecutive-convertBodyTo-tp5731543.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Expected behavior of two consecutive convertBodyTo?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Sounds a bit like this FAQ
http://camel.apache.org/why-is-my-message-body-empty.html

Also what version of Camel do you use?

And how have you implemented your type converters?

On Thu, Apr 25, 2013 at 3:07 PM, Al Ferguson <al...@hotmail.com> wrote:
> Hi,
>
> I get an Address in a format (MyAddress, jaxb annotated) and I want to
> convert this address in another format (ExternalAddress, jaxb annotated)
> before invoking an Web service.
>
>
>
> Curiously the second conversion (MyAddress to ExternalAddress, for which I
> wrote a Converter) does not work. In fact my converter is not invoked. It
> seems Camel tries rather a conversion of the original XML to
> ExternalAddress.
>
> When I invoke myself the converter via the ConvertAddress process, it works.
>
> Is there something I do not understand in the behavior of convertBodyTo?
>
> Thanks,
> A. Fe
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Expected-behavior-of-two-consecutive-convertBodyTo-tp5731543.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen