SOAP 応答の検証で奇妙な問題が発生しています。エラーを再現するために必要な最小限の応答と XSD をハッキングしました。XSD:
<?xml version="1.0"?>
<xs:schema targetNamespace="http://peoplesoft.com/rootResponse" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="ReturnID" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
SOAP 応答:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<root xmlns="http://peoplesoft.com/rootResponse">
<ReturnID />
</root>
</soapenv:Body>
</soapenv:Envelope>
soapUI で元の応答を検証すると、要素 root@http://peoplesoft.com/rootResponse の「ReturnID@http://peoplesoft.com/rootResponse」ではなく、期待される要素「ReturnID」と表示されます。
上記のファイルを Visual Studio 2012 にロードすると (はい、この XSD ファイルを使用して名前空間を検証するように Visual Studio に指示します)、次のようになります: The element 'root' in namespace 'http://peoplesoft.com/rootResponse ' の名前空間 'http://peoplesoft.com/rootResponse' に無効な子要素 'ReturnID' があります。期待される可能な要素のリスト: 'ReturnID'。
どちらの場合も、ReturnID要素について不平を言っていますが、ReturnID要素が必要だと言っていますか?