Hello, I'm facing a problem which has been discussed on this mailing list before - http://www.mail-archive.com/[email protected]/msg04355.html
Here is the the issue: I am using castor 1.1.2.1 to generate the java classes that correspond to the XACML 2.0 XSD which makes use of substitution groups. An element "Apply" can appear wherever an element "Expression" is expected. Based on the schema the following is a valid document: --------------------------------------------------- <PolicySet xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='urn:oasis:names:tc:xacml:2.0:policy:schema:os' xsi:schemaLocation='urn:oasis:names:tc:xacml: 2.0:policy:schema:os http://docs.oasis-open.org/xacml/access_control-xacml-2.0-policy-schema-os.xsd ' PolicySetId="policy-set" PolicyCombiningAlgId="urn:oasis:names:tc:xacml: 1.0:policy-combining-algorithm:deny-overrides"> <Target/> <Policy PolicyId="policy" RuleCombiningAlgId="urn:oasis:names:tc:xacml: 1.0:rule-combining-algorithm:first-applicable"> <Target/> <Rule RuleId="primary-rule" Effect="Permit"> <Condition> <Apply FunctionId="urn:oasis:names:tc:xacml: 1.0:function:string-at-least-one-member-of"> <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"> Admin </AttributeValue> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"> Operator </AttributeValue> </Apply> <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string" SubjectCategory="urn:oasis:names:tc:xacml: 1.0:subject-category:access-subject" /> </Apply> </Condition> </Rule> </Policy> </PolicySet> ------------------------------------- However, when I try to unmarshal it - the code fails with the following exception: ------------------------------------- org.exolab.castor.xml.MarshalException: unable to find FieldDescriptor for 'Apply' in ClassDescriptor of ConditionType ------------------------------------- Apparently, the unmarshalling code does not seem to understand the substitution group. Based on the suggestions I found on the web I enabled the following options in my castorbuilder.properties file: ------------------------------------- org.exolab.castor.builder.automaticConflictResolution=true org.exolab.castor.builder.javaclassmapping=type ------------------------------------- However, it still doesn't work. Any help on this would be appreciated. thanks, -- ajd.

