Search code examples
vb.netweb-serviceswsdlsabre

TravelItineraryReadService VB error


When trying to use the TravelItineraryReadService 3.8.0 service via VB i get the following error just by doing

Private service As TravelItineraryReadService     
service = New TravelItineraryReadService

the error output:

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()

i am using visual studio 2015, added the WSDL as webservice wsdl added

it doesn't matter if i add the header info or not. it always fails.


Solution

  • This is due to response object issue in generated web service proxy class. Changed the following and works well for me.

    1. Private associatedDataField()() As TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem

    ----change as below-- Private associatedDataField() As

    TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem

    1. Public Property AssociatedData() As TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem()()

    ----change as below--

    Public Property AssociatedData() As TravelItineraryReadRSTravelItineraryItineraryInfoItineraryPricingPriceQuoteMiscInformationTicketingFeesFeeInformationAssociatedDataAssociatedDataItem()