You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Magnus Heino <ma...@filur.org> on 2008/02/18 13:14:41 UTC

jaxb and spring xml.

http://activemq.apache.org/camel/jaxb.html shows:

<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
  <route>
    <from uri="direct:start"/>
    <unmarshal>
      <jaxb prettyPrint="true" contextPath="org.apache.camel.example"/>
    </unmarshal>
    <to uri="mock:result"/>
  </route>
</camelContext>


But the schema for the jaxb-tag shows:

<xs:element name="jaxb" type="tns:jaxbDataFormat"/>

  <xs:complexType name="jaxbDataFormat">
    <xs:complexContent>
      <xs:extension base="tns:dataFormatType">
        <xs:sequence/>
        <xs:attribute name="prettyPrint" type="xs:boolean"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>


So how am I supposed to enter the contextPath attribute?

A related question: What are people using? Java config or spring config? Is
everything supported, or supposed to be supported, in the spring config?

-- 

 /Magnus Heino

Re: jaxb and spring xml.

Posted by James Strachan <ja...@gmail.com>.
On 18/02/2008, Magnus Heino <ma...@filur.org> wrote:
> http://activemq.apache.org/camel/jaxb.html shows:
>
>  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>   <route>
>     <from uri="direct:start"/>
>     <unmarshal>
>       <jaxb prettyPrint="true" contextPath="org.apache.camel.example"/>
>     </unmarshal>
>     <to uri="mock:result"/>
>   </route>
>  </camelContext>
>
>
>  But the schema for the jaxb-tag shows:
>
>  <xs:element name="jaxb" type="tns:jaxbDataFormat"/>
>
>   <xs:complexType name="jaxbDataFormat">
>     <xs:complexContent>
>       <xs:extension base="tns:dataFormatType">
>         <xs:sequence/>
>         <xs:attribute name="prettyPrint" type="xs:boolean"/>
>       </xs:extension>
>     </xs:complexContent>
>   </xs:complexType>
>
>
>  So how am I supposed to enter the contextPath attribute?

This is just an old schema you are looking at. If you use trunk of
Camel its got the contextPath attribute added to the camel-spring.xsd
that is included inside the camel-spring.jar.

The 1.3.0 release of Camel will also have this fixed if you are
referring to a remote XSD in your XML editor.


>  A related question: What are people using? Java config or spring config?

A mixture of both; usually down to personal preference.

> Is
>  everything supported, or supposed to be supported, in the spring config?

Everything should be supported in the spring config; if its not we
need to raise a JIRA :)


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com