<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">
a:DeserializationFailed
</faultcode>
<faultstring xml:lang="en-US">
The formatter threw an exception while trying to deserialize the
message: There was an error while trying to deserialize parameter
http://URI/v1:Input. The InnerException message was \'\'EndElement\'
\'Input\' from namespace \'http://URI/v1\' is
not expected. Expecting element \'Username\'.\'. Please see
InnerException for more details.
</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
这是我收到的错误,这是我发送的请求:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="uri" xmlns:wsu="http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract">
<soap:Header></soap:Header>
<soap:Body>
<tns:LogIn xmlns:tns="uri" xmlns="uri">
<tns:Input>
<tns:Username>user</tns:Username>
<tns:Password>pass</tns:Password>
</tns:Input>
</tns:LogIn>
</soap:Body>
</soap:Envelope>
请注意,出于隐私目的,插入了两个案例中的“uri”(请求/响应中存在真实的uri)。我对SOAP知之甚少 - 如果有人能指出我的方向是否存在明显错误的请求?