Thanks, Claus.

Further, how can I define the data format in Blueprint XML. This ..

        <!-- define Jackson data format -->
        <dataFormats>
                <json id="jackson" library="Jackson" />
        </dataFormats>

doesn't work as "dataFormats" isn't allowed.

This ..

        <!-- define Jackson data format -->
        <bean id="json" class="org.apache.camel.spi.DataFormat.JsonDataFormat">
                <property name="library" value="Jackson"></property>
        </bean>

requires (osgi.wiring.package=org.apache.camel.spi.DataFormat).

Best
- Gerald

> Claus Ibsen <[email protected]> hat am 6. Januar 2020 um 10:09 
> geschrieben:
> 
> 
> Hi
> 
> Btw you can do this in 2.x also, and the ref attribute was also
> deprecated on 2.x
> https://github.com/apache/camel/blob/camel-2.x/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java#L135
> 
> On Mon, Jan 6, 2020 at 10:04 AM Claus Ibsen <[email protected]> wrote:
> >
> > Hi
> >
> > Use <custom ref="xx"> to refer to a custom data format (eg its custom
> > when its a <bean>)
> >
> > <marshal>
> >    <custom ...>
> > </marshal>
> >
> >
> > On Mon, Jan 6, 2020 at 9:57 AM Gerald Kallas <[email protected]> wrote:
> > >
> > > Dear community,
> > >
> > > I've following snippet
> > >
> > > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";>
> > > ...
> > > <bean id="jsonDataformat" 
> > > class="org.apache.camel.model.dataformat.JsonDataFormat">
> > > ...
> > > <marshal ref="jsonDataformat" />
> > >
> > > While deploying I'm getting
> > >
> > > Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: 
> > > Attribute 'ref' is not allowed to appear in element 'marshal'.
> > >
> > > In Spring XML of older Camel installation the ref attribute works. What 
> > > I'm doing wrong here?
> > >
> > > Many tx in advance for any hints.
> > >
> > > Best
> > > - Gerald
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to