camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From contactreji <contactr...@gmail.com>
Subject Camel JAXB component - schema attribute not present in element JAXB
Date Mon, 14 Apr 2014 08:45:34 GMT
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>&lt;setExchangePattern pattern="InOnly"/&gt;</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" />
			</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.

Mime
View raw message