Sabre Web服务中EPS_EXT_ProfileBulkReadRQ的C#类型转换错误

时间:2018-08-23 22:06:50

标签: c# .net web-services wsdl sabre

我正在尝试连接到Saber Web Service,以从给定的伪城市代码中提取配置文件数据,并且从WSDL file构建的参考文件出现错误。实例化EPS_ProfileBulkReadService对象时发生我的运行时错误-运行时错误为:

  

错误CS0030:无法将类型“ SabreWebServices.BulkProfileReadRQReference.BusinessSystemIdentityInfoSynchronizationCriterionTypeExcludeCombination”转换为“ SabreWebServices.BulkProfileReadRQReference.BusinessSystemIdentityInfoSynchronizationCriterionTypeIncludeCombination”   错误CS0029:无法将类型'SabreWebServices.BulkProfileReadRQReference.BusinessSystemIdentityInfoSynchronizationCriterionTypeIncludeCombination'隐式转换为'SabreWebServices.BulkProfileReadRQReference.BusinessSystemIdentityInfoSynchronizationCriterionTypeExcludeCombination'

我知道Visual Studio中的其他WSDL转换存在与双数组声明有关的问题,但是我不认为这是问题所在。我认为reference.cs文件中有问题的代码是:

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3056.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.sabre.com/eps/schemas")]
public partial class BusinessSystemIdentityInfoSynchronizationCriterionType {

    private BusinessSystemIdentityInfoSynchronizationCriterionTypeExcludeCombination[] itemsField;

    private ItemsChoiceType1[] itemsElementNameField;

    /// <remarks/>
    //[System.Xml.Serialization.XmlElementAttribute("ExcludeCombination", typeof(BusinessSystemIdentityInfoSynchronizationCriterionTypeExcludeCombination))]
    [System.Xml.Serialization.XmlElementAttribute("IncludeCombination", typeof(BusinessSystemIdentityInfoSynchronizationCriterionTypeIncludeCombination))]
    [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
    public BusinessSystemIdentityInfoSynchronizationCriterionTypeExcludeCombination[] Items {
        get {
            return this.itemsField;
        }
        set {
            this.itemsField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
    [System.Xml.Serialization.XmlIgnoreAttribute()]
    public ItemsChoiceType1[] ItemsElementName {
        get {
            return this.itemsElementNameField;
        }
        set {
            this.itemsElementNameField = value;
        }
    }
}

我已经花了几个小时来研究reference.cs文件,但是我对WSDL的工作方式并不熟悉,所以我很茫然。是否有人在.NET中使用此API或其他类似这样的复杂WSDL问题有任何经验?

0 个答案:

没有答案