Visual Studio で XSD.exe ツールを使用してクラス ファイルを作成しようとしている xml ファイルがあります。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://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 Schemas/DataTypes サポート ユーティリティ [Microsoft (R) .NET Framework、バージョン 2.0.50727.3038] Copyright (C) Microsoft Corporation. 全著作権所有。スキーマ検証の警告: 「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」要素が宣言されていません. 行 18、位置 16。
警告: スキーマを検証できませんでした。クラスの生成が失敗するか、正しくない結果が生成される可能性があります。
エラー: スキーマ 'myxmlRESfile' のクラスを生成中にエラーが発生しました。- 要素「http://schemas.xmlsoap.org/ws/2004/08/addressing:Action」がありません。
さらにヘルプが必要な場合は、「xsd /?」と入力してください。
これらのクラスファイルを生成する際に、どんな助けもいただければ幸いです。私はこれまでこのツールを使用したことがありません。
ありがとう!