Subject: | enumeration of xs:QName |
In SOAP 1.2 fault code is defined as:
<xs:simpleType name="faultcodeEnum">
<xs:restriction base="xs:QName">
<xs:enumeration value="tns:DataEncodingUnknown"/>
<xs:enumeration value="tns:MustUnderstand"/>
<xs:enumeration value="tns:Receiver"/>
<xs:enumeration value="tns:Sender"/>
<xs:enumeration value="tns:VersionMismatch"/>
</xs:restriction>
</xs:simpleType>
I trying to parse SOAP 1.2 fault response:
<s:Envelope xml:lang="ru-RU"
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer"
xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"
xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:388AABBA-7069-4FE0-BECF-392172479BF0</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:24E0E618-DAC7-11DF-B23F-876D98000C21</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value>w:InternalError</s:Value></s:Subcode></s:Code><s:Reason><s:Text
xml:lang=""></s:Text></s:Reason><s:Detail><f:WSManFault
xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault"
Code="2152992672" Machine="xxx.xxx.xxx.xxx"><f:Message><f:ProviderFault
provider="PowerShellplugin"
path="%windir%\system32\pwrshplugin.dll">Remoting data is missing
HostInfo property.
</f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>
The reported error is:
error: invalid enumerate
`{http://www.w3.org/2003/05/soap-envelope}Receiver' at
{http://www.w3.org/2003/05/soap-envelope}Fault/Code/Value#facet
XML::Compile::Schema::BuiltInFacets::_enumeration() compares QName in
form '{ns}name' (value received as 's:Receiver' from server and
translated to '{http://www.w3.org/2003/05/soap-envelope}Receiver') with
simplified form 'tns:name' of possible values from schema.