这是 wsdl 肥皂字段
<element name="transactionCle" nillable="true" type="xsd:int"/>
当我用 PHP 调用 WS 并用__getLastResponse()
我得到了 transactionCle :
<transactionCle href="#id50"/>
这是该领域的参考:
<multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id50" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:int">12708584</multiRef>
我向使用 php 的 Apache 服务器提供的 wsdl 添加了一个新的 WebReference。
生成的代理类为我提供了该字段:
private System.Nullable<int> transactionCleField;
/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public System.Nullable<int> transactionCle {
get {
return this.transactionCleField;
}
set {
this.transactionCleField = value;
}
}
现在我的问题:
当我在 php 中使用 WS 时,transactionCle 的值为 12708584
当我在 C# 中使用 WS 时,transactionCle 的值为 null
如果我手动修改代理类从 System.Nullable 到 int 现在 C# 给我良好的价值 (12708584)。
但是当我更新 Webreference 时,我必须再次修改代理类。
这是我的问题:如何在
不修改代理类的情况下:或将 transactionCle 设置为 int 类型?
还是让序列化给我带来良好的价值?
编辑:我无法修改 WS php 或 wsdl