Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schema Validation Warnings and Errors

Tags:

c#

xsd

When I run the xsd tool to generate vb classes against:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Security" type="SecurityType"/>
<xs:complexType name="SecurityType">
   <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="UsernameToken" type="UsernameToken"/>
    </xs:sequence> 
    <xs:attribute name="mustUnderstand" type="xs:string"/>
    <xs:anyAttribute/>
</xs:complexType>
<xs:complexType name="UsernameToken">
    <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="Username" type="xs:string"/>
        <xs:element minOccurs="0" maxOccurs="1" name="Password" type="Password"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:string"/>
</xs:complexType>
<xs:complexType name="Password">
    <xs:simpleContent>
        <xs:extension base="xs:string">
            <xs:attribute name="Type" type="xs:string"/>
        </xs:extension>
    </xs:simpleContent>
</xs:complexType>
</xs:schema>

I get the following schema validation warnings:

Type Password is not declared
Type UsernameToken is not declared
Type SecurityType is not declared

I get the following Error:

The datatype 'SecurityType' is missing

like image 344
Xaisoft Avatar asked Aug 19 '11 19:08

Xaisoft


1 Answers

I added xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" and it worked.

like image 98
Xaisoft Avatar answered Sep 28 '22 04:09

Xaisoft