Hi,
I am using Xerces Schema Cache. http://xml.apache.org/xerces2-j/faq-grammars.html
I am using the attached SOAP envelope schema to validate my xml file which has 'actor' and 'mustUnderstand' attributes in the SOAP header.
Given below is the sample XML which i am trying to validate
<env:Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header env:actor="https://www.xmlswitch.net" env:mustUnderstand="1">
</env:Header>
<env:Body>
</env:Body>
</env:Envelope>
I am getting the following error when i try to validate the above XML with the cached soap-envelope schema.
[Error] file1.xml:2:75: cvc-complex-type.3.2.2: Attribute 'env:actor' is not allowed to appear in element 'env:Header'.
[Error] file1.xml:2:75: cvc-complex-type.3.2.2: Attribute 'env:mustUnderstand' is not allowed to appear in element 'env:Header'.
The Header element in SOAP envelope is defined as following. So i should be able to use any attribute in my header. Then what am i doing wrong?
<xs:element name="Header" type="tns:Header"/>
<xs:complexType name="Header">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
regards,
Mukulika Kapas
soap-envelope.xsd
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
