美好的一天,我正在使用基于WCF客户端构建在Apache轴上的soap 1.1服务。问题是,错误和正常的响应都不是通过内置的WCF去稠化器来分析的,而且当通过wcf客户端调用web操作时,我得到了与XML解析相关的异常。当我检查的消息,我得到这个:无法解析SOAP 1.1消息wcf客户端
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" />
<soapenv:Body>
<V2Response xmlns="urn:ETS">
<V2Return xsi:type="ns1:TResponse" xmlns:ns1="urn:ETS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fulfilmentRef></fulfilmentRef>
<paymentRef></paymentRef>
<statusCode>2013</statusCode>
<statusDescription>ePayments: Invalid client password specified in request.</statusDescription>
<transactionId xsi:nil="true" />
<transactionTimeStamp>2013-06-21T08:22:16.483Z</transactionTimeStamp>
</V2Return>
</V2Response>
</soapenv:Body>
</soapenv:Envelope>
这我得到的例外是:
> The specified type was not recognized: name='TResponse', namespace='urn:ETS', at <V2Return xmlns='urn:ETS'>
我在Reference.cs
有效TResponse
类,请让我知道如果这可以通过处理改变配置,我期待WCF客户端解析任何肥皂消息,但它不能,我不能改变任何东西在服务器端,这是第三方API。
你的服务有WSDL吗? – Aron
是的我有wsdl,我在我的.Net项目中添加服务参考 – MSUH
V2Return是否继承了TResponse? – Adil