Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# soap复杂类型数组项值_C#_Xml_Soap - Fatal编程技术网

C# soap复杂类型数组项值

C# soap复杂类型数组项值,c#,xml,soap,C#,Xml,Soap,我有一个wsdl。我引用并运行它。我可以在fiddler中看到项目值 答复: <ns1:Results> <ns1:Result> <ns1:Status>true</ns1:Status> <ns1:Message>Başarılı</ns1:Message> <ns1:Vendor

我有一个wsdl。我引用并运行它。我可以在fiddler中看到项目值

答复:

        <ns1:Results>
            <ns1:Result>
                <ns1:Status>true</ns1:Status>
                <ns1:Message>Başarılı</ns1:Message>
                <ns1:VendorAccount/>
                <ns1:DeliveryNumberList>
                    <ns1:DeliveryNumber PackingSlipNo="X100327233" VendorAccount="0002230728" Vat="">008740774</ns1:DeliveryNumber>
                </ns1:DeliveryNumberList>
            </ns1:Result>
        </ns1:Results>

真的
巴亚尔
008740774
我的响应类有三个属性:PackingSlipNo、VendorAccount、Vat

但我无法达到008740774值。我怎么办

DeliveryNumberType类:

public partial class DeliveryNumberType : object, System.ComponentModel.INotifyPropertyChanged {

        private string vendorAccountField;

        private string vatField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string VendorAccount {
            get {
                return this.vendorAccountField;
            }
            set {
                this.vendorAccountField = value;
                this.RaisePropertyChanged("VendorAccount");
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Vat {
            get {
                return this.vatField;
            }
            set {
                this.vatField = value;
                this.RaisePropertyChanged("Vat");
            }
        }

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
public分部类deliveryNumbertType:对象,System.ComponentModel.INotifyPropertyChanged{
私有字符串vendorAccountField;
私有字符串字段;
/// 
[System.Xml.Serialization.XmlAttributeAttribute()]
公共字符串VendorAccount{
得到{
返回此.VendorAccount字段;
}
设置{
this.vendorAccountField=值;
本.提高产权变更(“卖方账户”);
}
}
/// 
[System.Xml.Serialization.XmlAttributeAttribute()]
公共字符串增值税{
得到{
返回此.vatField;
}
设置{
this.vatField=值;
本次提存财产变更(“增值税”);
}
}
公共事件System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
受保护的void RaisePropertyChanged(字符串propertyName){
System.ComponentModel.PropertyChangedEventHandler propertyChanged=this.propertyChanged;
如果((propertyChanged!=null)){
propertyChanged(这是新的System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
编辑2:

我认为给我的wsdl是错误的。
它包含简单类型和复杂类型。

值为文本。但是如果我不知道您正在使用什么方法来解析xml,我就无能为力了。需要知道它是如何反序列化的。您是使用自定义反序列化还是仅使用类,如果是类,请向我们显示DeliveryNumber类的代码。我在问题中添加了DeliveryNumberType类。