TravelItineraryReadService VB错误

时间:2016-11-15 13:35:38

标签: vb.net web-services wsdl sabre

尝试通过VB使用TravelItineraryReadService 3.8.0服务时,只需执行以下操作即可获得以下错误

Private service As TravelItineraryReadService     
service = New TravelItineraryReadService

错误输出:

at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
   at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
   at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
   at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
   at PricingContingency.TravelItineraryRQ1.TravelItineraryReadService..ctor()

我正在使用visual studio 2015, 将WSDL添加为webservice wsdl added

如果我添加标题信息并不重要。它总是失败。

1 个答案:

答案 0 :(得分:1)

这是由于生成的Web服务代理类中的响应对象问题。 改变了以下内容,对我来说效果很好。

1。  Private associatedDataField()()As TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem

----更改如下 - Private associatedDataField()As

TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem

  1. Public Property AssociatedData()As TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem()()
  2. ----改变如下 -

    Public Property AssociatedData()As TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem()