3
我有一個來自我的客戶及其wsdl文件的web服務URL。我從wsdl文件中添加了一個新項目。'date'對於SoapElementAttribute是無效的值
在WSDL
<element name="ProductionDate" type="xsd:date" minOccurs="0" maxOccurs="1" nillable="true"/>
在reference.cs文件
[System.Xml.Serialization.SoapElementAttribute("ProductionDate", DataType="date", IsNullable=true)]
public System.Nullable<System.DateTime> ProductionDate{
get {
return this.ProductionDate;
}
set {
this.ProductionDate= value;
}
}
當我嘗試創建WebService類的實例,它拋出一個異常:
'日期' 是SoapElementAttribute的值無效。
我在WSDL改變
[System.Xml.Serialization.SoapElementAttribute("ProductionDate", DataType="date")]
public System.DateTime ProductionDate{
get {
return this.ProductionDate;
}
set {
this.ProductionDate= value;
}
}
所以我可以創建WebService類的實例,但是,當我從我的客戶web服務URL調用,拋出一個異常:
法「Q1:布拉布拉未實現:方法名稱或命名空間不是 已識別。
那麼還有什麼其他方式可以使這個工作嗎?