user5654873
user5654873

Reputation:

Web service returns same XML data twice

I am using web service to get information about an airport using the airport code.
Here is the result for calling the method InformationByAirportCode with parameter value "MBX":

web service airport problem


Notice how the same tags and values are repeated twice. Here is my code for calling the method:

[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;  
}



Where is the problem, that I receive same results twice in one XML?

Here is the URL connection to the web service in Web References in Visual Studio 2010, using .NET Framework 3.5 in an ASP.NET Web Service Application.

web references

Link to the service: http://www.webservicex.net/airport.asmx

Upvotes: 0

Views: 134

Answers (1)

Peter
Peter

Reputation: 27944

The problem is at the server, you should check the server code. When you call the service from the internet, you get the result you see in the screenshot you posted.

Upvotes: 1

Related Questions