|
|
|
[
Permlink
| « Hide
]
Ronald R. DiFrango - 18/Mar/08 08:10 AM
Just and FYI, I am not using a mapping file, but I am using an ANT task to generate the source code. I will submit the XSD along with an ANT script to build it for my tests.
Attached is what should be a full Ecplise project along with an ANT build to re-create the issue.
JUnit test case relative to codegen/src/test.
As a workaround, please set the following property in a custom castor.properties as follows:
# Property specifying whether sequence order validation should be lenient; # Defaults to false # org.exolab.castor.xml.lenient.sequence.order=true This turns off sequence validation. I added the above to a file called castor.properties and now I am getting the following exception:
org.exolab.castor.xml.MarshalException: The following exception occured while validating field: _responseTypeSequence of class: xml.template.gen.CreditApplicationResponse: The field '_applicationKey' (whose xml name is 'ApplicationKey') is a required field of class 'xml.template.gen.ResponseTypeSequence{File: [not available]; line: 8; column: 29}
I put castor.properties at the root level of my src/classes folder. I also tried re-generating the code with this option turned on and I got the same error. And here is my castorbuild.properties file that I used to compile the schema.
Hmm .. looks like there's a more serious problem. In case you are using XML parser validation to validate against an XML schema, you can always turn off validation completely, by setting
# True if all documents should be validated by the marshaling framework # Defaults to true. # org.exolab.castor.marshalling.validation=false in your castor.properties file. But that will turn off (object-level) validation completely. But it might be a work-around for you. Ronald, can I (safely) assume that this is till an issue for you ?
Werner, yes this still is an issue for me. It "works" OK if I turn off validation, but I would prefer to not do that if I could. So fixing this would be great.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||