Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.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# 如何使用WSDL生成的类_C#_Soap_Amadeus - Fatal编程技术网

C# 如何使用WSDL生成的类

C# 如何使用WSDL生成的类,c#,soap,amadeus,C#,Soap,Amadeus,您好,我已经将从Amadeus开发者门户下载的WSDL用于所有服务。我的程序中确实有一个类型 AmadeusPDT.Fare_DisplayFaresForCityPair ap = new BookingEngine.AmadeusPDT.Fare_DisplayFaresForCityPair(); // FLIGHT DATES List<AmadeusPDT.DateAndTimeDetailsTypeI2> flightDa

您好,我已经将从Amadeus开发者门户下载的WSDL用于所有服务。我的程序中确实有一个类型

        AmadeusPDT.Fare_DisplayFaresForCityPair ap = new BookingEngine.AmadeusPDT.Fare_DisplayFaresForCityPair();

        // FLIGHT DATES
        List<AmadeusPDT.DateAndTimeDetailsTypeI2> flightDates = new List<AmadeusPDT.DateAndTimeDetailsTypeI2>();
        flightDates.Add(new AmadeusPDT.DateAndTimeDetailsTypeI2 { date = DepartureDate.ToString("yyyy-MM-dd"), qualifier = Util.GetQualifierFromFlightType(FlightType) });

        // For multiple flight dates? like that plus or minus date thing?
        ap.dateOfFlight = flightDates.ToArray();

        var results = ap.Dosomething?; // <------
amadeupdt.Fare\u displayFaresforcitypap=新建BookingEngine.amadeupdt.Fare\u DisplayFaresForCityPair();
//航班日期
List flightDates=新列表();
添加(新的amadeupdt.DateAndTimeDetailsTypeI2{date=DepartureDate.ToString(“yyyy-MM-dd”),qualifier=Util.GetQualifierFromFlightType(FlightType)});
//多个航班日期?像是加号还是减号?
ap.dateOfFlight=flightDates.ToArray();

var结果=应计剂量?;// 似乎有这样的事情。。现在我必须学习什么是会话、TransactionFlowLinkType和ama_SecurityHostedUser

        AmadeusPDT.AmadeusWebServicesPTClient c = new AmadeusPDT.AmadeusWebServicesPTClient();
        AmadeusPDT.Session thisSession = new AmadeusPDT.Session();
        AmadeusPDT.TransactionFlowLinkType flowType = new AmadeusPDT.TransactionFlowLinkType();
        AmadeusPDT.AMA_SecurityHostedUser aMA_SecurityHostedUser = new AmadeusPDT.AMA_SecurityHostedUser();

        AmadeusPDT.Fare_DisplayFaresForCityPairReply results = c.Fare_DisplayFaresForCityPair(ref thisSession,ref flowType,aMA_SecurityHostedUser,ap);

似乎有这样的事情。。现在我必须学习什么是会话、TransactionFlowLinkType和ama_SecurityHostedUser

        AmadeusPDT.AmadeusWebServicesPTClient c = new AmadeusPDT.AmadeusWebServicesPTClient();
        AmadeusPDT.Session thisSession = new AmadeusPDT.Session();
        AmadeusPDT.TransactionFlowLinkType flowType = new AmadeusPDT.TransactionFlowLinkType();
        AmadeusPDT.AMA_SecurityHostedUser aMA_SecurityHostedUser = new AmadeusPDT.AMA_SecurityHostedUser();

        AmadeusPDT.Fare_DisplayFaresForCityPairReply results = c.Fare_DisplayFaresForCityPair(ref thisSession,ref flowType,aMA_SecurityHostedUser,ap);

答案有点含糊不清,不是吗?是的,不幸的是,文档很少。当我有更多信息时,我会更新。但是它回答了我自己的问题,如何执行一个端点,有点半答案,不是吗?是的,不幸的是,文档很少。当我有更多信息时,我会更新。但它回答了我自己的问题:如何执行端点如果我真的理解你的意思,你只需要执行你的端点;在Amadeus服务类中,您将调用传递RQ对象的方法,然后您将获得响应,例如:/******AmadeuSwebbservicesPtClient\u ws=new AmadeuSwebbservicePtClient();Security_Authenticate Rq=新的Security_Authenticate{……};/*端点执行以获取结果*/var res=\u ws.Security\u Authenticate(ref\u sessionValue,Rq)/*******如果我理解了你的意思,你只需要执行你的端点;在Amadeus服务类中,您将调用传递RQ对象的方法,然后您将获得响应,例如:/******AmadeuSwebbservicesPtClient\u ws=new AmadeuSwebbservicePtClient();Security_Authenticate Rq=新的Security_Authenticate{……};/*端点执行以获取结果*/var res=\u ws.Security\u Authenticate(ref\u sessionValue,Rq)/*******