當試圖僅僅通過操作的方式從VB我收到以下錯誤使用TravelItineraryReadService 3.8.0服務TravelItineraryReadService VB錯誤
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添加爲
如果我添加標題信息,則無關緊要。它總是失敗。
不應該'TravelItineraryReadService service'是'昏暗的服務爲TravelItineraryReadService'變化? –
更正了代碼 – GriffiN
@ProGrammer通過wsdl發現了generationg的問題。 實例化的服務,我得到以下錯誤時: 錯誤CS0030:無法將類型「TravelItineraryTest.TravelItineraryReadRQ1.TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem []」到「TravelItineraryTest.TravelItineraryReadRQ1.TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem」 – GriffiN