Hi Marc,
I tried the following but it did not work and failed. I hope you know how to
overcome this.
What I tried:
------------------------------------------------------------
C:\xml>xsd MethodRQ.xsd /c /language:CS
Error message:
------------------------------------------------------------
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 337, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength1to2000' is not declared. Line 357, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:CommentType' is not declared, or is not a simple type. Line 358, position
6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 578, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to255' is not declared. Line 749, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteCustomerType' is not declared, or is not a simple type. Line
840, po
sition 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YYYYMMDDDate' is not declared, or is not a simple type. Line 858,
position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:HHMMTime' is not declared, or is not a simple type. Line 863, position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:SimpleGroup' is not declared, or is not a simple type. Line 891, position
4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YYYYMMDDDate' is not declared, or is not a simple type. Line 973,
position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YYYYMMDDDate' is not declared, or is not a simple type. Line 978,
position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YYYYMMDDDate' is not declared, or is not a simple type. Line 1133,
position 4
..
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 1239, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 1452, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared, or is not a simple type. Line 1523, position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength1to50' is not declared. Line 1534, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength1to4000' is not declared. Line 1562, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:EmailType' is not declared. Line 1612, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:Number1To99999' is not declared. Line 1750, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:Number1To999999999' is not declared. Line 1772, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared, or is not a simple type. Line 1849, position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared, or is not a simple type. Line 1877, position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 1958, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:SimpleGroup' is not declared, or is not a simple type. Line 1959,
position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to2000' is not declared. Line 2027, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:SimpleGroup' is not declared, or is not a simple type. Line 2028,
position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to1024' is not declared. Line 2332, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to1024' is not declared. Line 2352, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to255' is not declared. Line 2366, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength1to255' is not declared. Line 2394, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es
referLevelType' is not declared, or is not a simple type. Line 2740,
positio
n 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es
referLevelType' is not declared, or is not a simple type. Line 2804,
positio
n 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared, or is not a simple type. Line 2927, position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteServiceStatus' is not declared, or is not a simple type. Line
2932,
position 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to255' is not declared. Line 2976, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:SimpleGroup' is not declared, or is not a simple type. Line 2977,
position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength1to1024' is not declared. Line 3053, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to255' is not declared. Line 3154, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteInsuranceCoverageType' is not declared, or is not a simple
type. Lin
e 3155, position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 3373, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to50' is not declared. Line 3389, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteTransferType' is not declared, or is not a simple type. Line
3433, p
osition 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteTransferType' is not declared, or is not a simple type. Line
3467, p
osition 4.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:StringLength0to255' is not declared. Line 3506, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:SimpleGroup' is not declared, or is not a simple type. Line 3507,
position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteZoneServiceType' is not declared, or is not a simple type. Line
3523
, position 6.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteServiceStatus' is not declared. Line 2578, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsitePurchaseStatus' is not declared. Line 2435, position 5.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteFacilityAccessType' is not declared. Line 1726, position 7.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:VehicleTransmissionSimpleType' is not declared. Line 1391, position 7.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared. Line 1396, position 7.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared. Line 1417, position 7.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared. Line 1422, position 7.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:YesNo' is not declared. Line 1427, position 7.
Schema validation warning: Type '
http://www.targetsite.com/schema/messag
es:targetsiteServiceStatus' is not declared. Line 295, position 5.
Warning: Schema could not be validated. Class generation may fail or may
produce
incorrect results.
Error: Error generating classes for schema 'PurchaseCancelRQ'.
- The datatype '
http://www.targetsite.com/schema/messages:EmailType' i
s missing.
If you would like more help, please type "xsd /?".
The XSD I have:
------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns="
http://www.tagetsite.com/xmlns"
targetNamespace="
http://www.targetSiteNamespace.com"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="CommonTypes.xsd" />
<xs:element name="MethodRQ">
<xs:annotation>
<xs:documentation>Documentation text</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="CoreRequest">
<xs:sequence>
<xs:element name="PurchaseReference" type="Reference">
<xs:annotation>
<xs:documentation>Documentation text</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="type" use="required">
<xs:annotation>
<xs:documentation>Documentation text</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>