On Wed, May 2, 2012 at 12:04 PM, Meeraj Kunnumpurath
<[email protected]> wrote:
> Hi,
>
> I have a need to apply custom transformation using a third party library.
> My plan is to write a new data format. However, I am not sure whether it is
> the right component for me, as the need is to have one transform method,
> which doesn't fit well with the marshal/unmarshal pair.
>

A data format dont have to support both. For example tiny markup only
support one of them.


> A second question I have on this is once I have defined the component, how
> do I integrate that into the Spring DSL. With a custom data format, I ran
> into the following problems ..
>
> 1. Since the JAXB context used by loadRouteDefinitions has hard-wired the
> packages it recognizes, I am unable to introduce any new vocabulary into
> the DSL
> 2. If I override loadRouteDefinitions to recognize my packages, some of the
> types like UnmarshalDefinition within Camel are constrained in terms of the
> types of children it can have. So I am unable to introduce any new types in
> there.
>

You can't. Although I think I have seen some ppl post about some hacks
he did in the XML DSL to extend with custom namespaces.
But its not easy thought. But maybe you can google that, if you really
really want to go down that path.

You can use a custom data format in the DSL, and just refer to that
using the generic marshal / unmarshal.


> Kind regards
> Meeraj



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to