我正在尝试使用以下WCF服务。 http://staging.timatic.aero/timaticwebservices/timatic3services?WSDL
这是我的约束力
<bindings>
<basicHttpBinding>
<binding name="timatic3servicesPort2" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://staging.timatic.aero:80/timaticwebservices/timatic3services"
binding="basicHttpBinding" bindingConfiguration="timatic3servicesPort2"
contract="TimaticStag.timatic3servicesPort" name="timatic3servicesPort1" />
</client>
这是我的代码
TimaticStag.timatic3servicesPort timatic3serviceportStg = new TimaticStag.timatic3servicesPortClient();
TimaticStag.processLoginRequest longinRequestStg = new TimaticStag.processLoginRequest();
longinRequestStg.processLogin = Guid.NewGuid().ToString();
timatic3serviceportStg.processLogin(longinRequestStg);
每当我试图调用processLogin()时,我都会遇到异常
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://www.opentravel.org/OTA/2003/05/beta:processLoginResponse. The InnerException message was 'Element processLoginResponse from namespace http://www.opentravel.org/OTA/2003/05/beta 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.
我有什么问题吗?
编辑1-添加内部异常以获取更多详细信息。
Element processLoginResponse from namespace http://www.opentravel.org/OTA/2003/05/beta cannot have child contents to be deserialized as an object. Please use XmlNode[] to deserialize this pattern of XML.