向邮递员请求wcf Web服务

时间:2018-07-16 08:46:46

标签: c# soap soapui postman

我正在尝试请求WCF Web服务,但此消息出现错误500

  

格式化程序尝试反序列化消息时引发异常:尝试反序列化参数http://tempuri.org/:messageSet时出错。 InnerException消息为“来自名称空间http://schemas.datacontract.org/2004/07/Sanay.Suip.Library的元素值不能具有要反序列化为对象的子内容。请使用XmlNode []反序列化这种XML模式。

如果您知道我该怎么办,请帮助 谢谢

my request xml img

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:san="http://schemas.datacontract.org/2004/07/Sanay.Suip.Library">
<x:Header/>
<x:Body>
    <tem:QueryMessage>
        <tem:messageSet>
            <san:ActionId>?</san:ActionId>
            <san:Ip>::1</san:Ip>
            <san:Parameters>
                  <san:Parameter>
                    <san:Name>Username</san:Name>
                    <san:Value>tipex</san:Value>
                </san:Parameter>

                 <san:Parameter>
                    <san:Name>Password</san:Name>
                    <san:Value>123456</san:Value>
                </san:Parameter>

            </san:Parameters>
            <san:Title>Authenticate</san:Title>
            <san:Token>?</san:Token>
            <san:Username>?</san:Username>
        </tem:messageSet>
    </tem:QueryMessage>
</x:Body>

<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://tempuri.org/:messageSet. The InnerException message was 'Element Value from namespace http://schemas.datacontract.org/2004/07/Sanay.Suip.Library cannot have child contents to be deserialized as an object. Please use XmlNode[] to deserialize this pattern of XML.'.  Please see InnerException for more details.</faultstring>
    </s:Fault>
</s:Body>

0 个答案:

没有答案