C# 使用Visual Studio XML架构定义工具(Xsd.exe)架构验证时出错警告
我有一个xml文件,我正试图使用Visual Studio中的XSD.exe工具创建一个类文件。以下是XML文件:C# 使用Visual Studio XML架构定义工具(Xsd.exe)架构验证时出错警告,c#,xml,xsd,C#,Xml,Xsd,我有一个xml文件,我正试图使用Visual Studio中的XSD.exe工具创建一个类文件。以下是XML文件: <?xml version="1.0" encoding="utf-8" ?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://ww
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<PayloadManifest xmlns="http://www.starstandards.org/webservices/2005/10/transport">
<manifest contentID="Content0" namespaceURI="?" element="?" relatedID="?" version="?" />
</PayloadManifest>
<wsa:Action>http://www.starstandards.org/webservices/2005/10/transport/operations/ProcessMessageResponse</wsa:Action>
<wsa:MessageID>urn:uuid:b56c3b11-d4a7-4372-9e6a-7498aa2aeb06</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:71089910-41d4-4104-bbd7-2b3ac7cece0f</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-abc8d6ea-d75d-42a2-b042-87309692c2bb">
<wsu:Created>2012-06-27T19:14:43Z</wsu:Created>
<wsu:Expires>2012-06-27T19:19:43Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<ProcessMessageResponse xmlns="http://www.starstandards.org/webservices/2005/10/transport">
<payload>
<content id="Content0">
<VehicleSaleGroupsTable xmlns="">
<VehicleSaleGroupRecord xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyNumber>ZE7</CompanyNumber>
<FranchiseType>N</FranchiseType>
<FranchiseCode>NC</FranchiseCode>
<FranchiseDescription>NEW CAR</FranchiseDescription>
<Manufacturer />
<UsedSaleAccount />
<UsedInventoryAccount />
</VehicleSaleGroupRecord>
<VehicleSaleGroupRecord xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyNumber>ZE7</CompanyNumber>
<FranchiseType>N</FranchiseType>
<FranchiseCode>NT</FranchiseCode>
<FranchiseDescription>NEW TRUCK</FranchiseDescription>
<Manufacturer />
<UsedSaleAccount />
<UsedInventoryAccount />
</VehicleSaleGroupRecord>
<VehicleSaleGroupRecord xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyNumber>ZE7</CompanyNumber>
<FranchiseType>U</FranchiseType>
<FranchiseCode>UC</FranchiseCode>
<FranchiseDescription>USED CAR</FranchiseDescription>
<Manufacturer />
<UsedSaleAccount>USALE</UsedSaleAccount>
<UsedInventoryAccount>UINV</UsedInventoryAccount>
</VehicleSaleGroupRecord>
<VehicleSaleGroupRecord xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyNumber>ZE7</CompanyNumber>
<FranchiseType>U</FranchiseType>
<FranchiseCode>UT</FranchiseCode>
<FranchiseDescription>USED TRUCK</FranchiseDescription>
<Manufacturer />
<UsedSaleAccount>USALE</UsedSaleAccount>
<UsedInventoryAccount>UINV</UsedInventoryAccount>
</VehicleSaleGroupRecord>
</VehicleSaleGroupsTable>
</content>
</payload>
</ProcessMessageResponse>
</soap:Body>
</soap:Envelope>
我打开Visual Studio命令行程序并键入以下内容:
C:\xml2xsd\xsd myXML.xml
它生成了5个xsd文件,然后我键入以下内容:
C:\xml2xsd\xsd/C myXML.xsd
在没有创建类文件的情况下,我收到了以下消息:
Microsoft R Xml架构/数据类型支持实用程序
[Microsoft R.NET Framework,版本2.0.50727.3038]
微软公司版权所有。版权所有。
架构验证警告:错误为'http://www.starstandards.org/webservices/2005/10/transport:ProcessMessageResponse'元素未声明。第25行,位置16。
架构验证警告:错误为'http://schemas.xmlsoap.org/ws/2004/08/addressing:Action'元素未声明。第13行,位置16。
架构验证警告:错误为'http://schemas.xmlsoap.org/ws/2004/08/addressing:MessageID'元素未声明。第14行,位置16。
架构验证警告:错误为'http://schemas.xmlsoap.org/ws/2004/08/addressing:RelatesTo'元素未声明。第15行,位置16。
架构验证警告:错误为'http://schemas.xmlsoap.org/ws/2004/08/addressing:To'元素未声明。第16行,位置16。
架构验证警告:错误为'http://www.starstandards.org/webservices/2005/10/transport:PayloadManifest'元素未声明。第17行,位置
16
架构验证警告:错误为'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:Security'元素未声明。L
第18行,第16位
警告:无法验证架构。类生成可能失败或产生不正确的结果
错误:为架构“myxmlRESfile”生成类时出错。
-元素的http://schemas.xmlsoap.org/ws/2004/08/addressing:Action“不见了
如果需要更多帮助,请键入xsd/
如果您能帮助生成这些类文件,我们将不胜感激。我以前从未使用过这个工具
谢谢