warpdriv
warpdriv

Reputation: 11

Attribute jaxb-context is not allowed to appear in element mulexml:jaxb-xml-to-object-transformer

I'm using MuleStudio 3.5EE running off 1.7_15 JDK and it is complaining about the following error:

org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'jaxb-context' is not allowed to appear in element 'mulexml:jaxb-object-to-xml-transformer'.

I have a global element:

<mulexml:jaxb-context name="JAXB_Context" packageNames="org.mule.jaxb.model" doc:name="JAXB Context"/></code>

and this in my flow

<mulexml:jaxb-object-to-xml-transformer returnClass="com.ca.eai.esb.model.ProjectUpsertRequest" jaxb-context="JAXB_Context" doc:name="JAXB Object to XML"/>

this was not a problem in the previous version.

Does anyone have an idea how to fix this?

Thank you for your help.

Upvotes: 0

Views: 1235

Answers (1)

Naveen Raj
Naveen Raj

Reputation: 801

Please use the following link for help

http://www.mulesoft.org/documentation/display/current/JAXB+Transformers

the syntax seems to be wrong where it should not be "jaxb-context" and it should be "jaxbContext-ref"

<mulexml:jaxb-xml-to-object-transformer name="XmlToPerson" jaxbContext-ref="myJaxb" returnClass="org.mule.jaxb.model.Person"/>

Upvotes: 2

Related Questions