Title: XML Schema Validation Error
Probably attributes are unqualified in the soap envelope schema.  If so you should omit the namespace prefix (those attributes are *not* in the soap envelope schema -- they are in no namespace and hence meet the namespace matching criterion "##other" on the anyAttribute component.
 
Jeff
----- Original Message -----
Sent: Tuesday, August 26, 2003 12:12 PM
Subject: XML Schema Validation Error

...

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>

Reply via email to