On Mon, Apr 14, 2014 at 1:45 AM, contactreji <contactr...@gmail.com> wrote: > Hi friends > > I was just trying to use Camel JaXB element to unmarshall an incoming XML to > java object. > > My code is as follows > > <camelContext xmlns="http://camel.apache.org/schema/spring" > xmlns:eamns="http://www.ibm.com/maximo"> > <route> > <from uri="cxf:bean:PRCxfEndpoint?dataFormat=PAYLOAD" > /> > <convertBodyTo type="java.lang.String"> > <description><setExchangePattern > pattern="InOnly"/></description> > </convertBodyTo> > <log message="Data Received for Purchase Requisition > ${body}" > loggingLevel="INFO" logName="PRInterface" /> > > <setHeader headerName="CamelFileName"> > > <simple>PR_Create_Request_${date:now:yyyyMMdd}${bean:dateClass?method=currentTimeMillis}</simple> > > </setHeader> > > <to > uri="xslt:file:C:\FactoryESB-PropertyFiles\PR.xsl" /> > <log message="Successfully applied XSLT and converted > into \n ${body}" > loggingLevel="INFO" logName="PRInterface" /> > > * <unmarshal> > <jaxb id="jaxb" > schema="classpath:OutputSchema.xsd" />
There is no attribute named schema in camel-jaxb according to its documentation http://camel.apache.org/jaxb > </unmarshal>* > > > > <log message="marshalling works! output XML is > %{body}" > loggingLevel="INFO" logName="PRInterface" /> > > > <log > message="Successfully stored file into FTP > location > D:\\FTPShare\\EAMTrans\\out\\pr" > loggingLevel="INFO" logName="PRInterface" /> > <to uri="bean:responseBuilder" /> > > </route> > > > </camelContext> > > > But on saving the Camel-XML file, I am getting error like * > "cvc-complex-type.3.2.2: Attribute 'schema' is not allowed to appear in > element 'jaxb'."* > Indeed, I was following the documentation at > http://camel.apache.org/jaxb.html > > Can someone help me in configuring a JAXB unmarshaller using XSD file. > Cheers > Reji > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-JAXB-component-schema-attribute-not-present-in-element-JAXB-tp5750179.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/