Web服务两次返回相同的XML数据

时间:2016-12-16 14:31:15

标签: c# asp.net xml web-services

我正在使用网络服务使用机场代码获取有关机场的信息。
以下是使用参数值InformationByAirportCode调用方法"MBX"的结果:

web service airport problem


注意相同的标签和值如何重复两次。这是我调用方法的代码:

[WebMethod]
public string InformationByAirportCode(string code)
{
     net.webservicex.www.airport AirportService = new net.webservicex.www.airport();
     string airport_info = AirportService.getAirportInformationByAirportCode(code);

     return airport_info;  
}



问题在哪里,我在一个XML中两次收到相同的结果?

下面是在ASP.NET Web服务应用程序中使用.NET Framework 3.5在Visual Studio 2010中Web引用中Web服务的URL连接。

web references

链接到服务:http://www.webservicex.net/airport.asmx

1 个答案:

答案 0 :(得分:1)

问题出在服务器上,你应该查看服务器代码。当您从互联网上拨打该服务时,您将获得您在所发布的屏幕截图中看到的结果。

相关问题