Hi,

I found out, that it works great if i compile the beans with XMLBeans
2.3.0 only. But when i use Axis2 with XMLBeans the validation fails.
I even tried the xmlbeans version that is deliverd with Axis2 with the
xmlbeans generated classes and it validates fine. It must be something
at the bean generation in combination with Axis2.
I took a look at the resolver but could not find anything.

I debugged validation process and found that the the SchemaParticleImpl
has minoccurs set to 1 when using the axis2+xmlbeans generated  beans.

Very strange,

any idea?
 
Radu Preotiuc-Pietro wrote:
> This one too works for me. Only if I change "minOccurs" on the <any> to
> "1", I get the error that you are getting. Use the "validate" script
> (under bin/) to easily check this.
>
> Radu
>
> On Mon, 2008-03-10 at 13:42 +0100, Stefan Lischke wrote:
>   
>> hi,
>>
>> XMLBeans seems to ignore the minOccurs="0" attribute on xs:any, it
>> always expects an element.... very strange:
>>
>>
>> i have the following schema:
>> ...
>> <xs:element name="CAdata" minOccurs="0" maxOccurs="1">
>>                 <xs:complexType>
>>                     <xs:sequence>
>>                         <xs:any namespace="##other"
>> processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
>>                     </xs:sequence>
>>                     <xs:attribute name="CAname" type="xs:string"
>> use="required"/>
>>                     <xs:attribute name="value" type="xs:string"
>> use="optional"/>
>>                  </xs:complexType>
>>             </xs:element>
>> ...
>>
>> and the following instance:
>>
>> junit.framework.AssertionFailedError: EntityManagerException 'XML Format
>> of KeyCertPair is not valid.
>> error: cvc-complex-type.2.4d: Expected element(s) in element
>> [EMAIL PROTECTED]://www.zertificon.com/erpconnector/v1/entity_management
>>
>> <X>
>> ...
>>   <CAdata value="ich bin die id" CAname="testCA"/>
>> ...
>> </X>
>>
>> And .validate() fails with
>>
>> 'XML Format of KeyCertPair is not valid.
>> error: cvc-complex-type.2.4d: Expected element(s) in element
>> [EMAIL PROTECTED]://www........
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>     
>
> Notice:  This email message, together with any attachments, may contain 
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
> entities,  that may be confidential,  proprietary,  copyrighted  and/or 
> legally privileged, and is intended solely for the use of the individual or 
> entity named in this message. If you are not the intended recipient, and have 
> received this message in error, please immediately return this by email and 
> then delete it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to