I am trying to call the webservice that can be seen at:
http://www.flexiblecarhire.com/flexibleservice/fchxmlinterface.asmx?op=GetAirportLocations
I am using VB.net, but any solution in C# will be very welcome.
The way I am doing it is:
-
I am adding a new Service Reference to http://www.flexiblecarhire.com/flexibleservice/fchxmlinterface.asmx and selecting fchXMLInterface > fchXMLInterfaceHttpPost
-
In my code I have:
Dim API As New ServiceReference1.fchXMLInterfaceSoapClient
When I run that, I am having an error message saying that:
An endpoint configuration section for contract 'ServiceReference1.fchXMLInterfaceSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name.
I checked the help at the first link I posted here and I could not find that. How can I fix that?
If I can't call this webservice as ServiceReference, how can I call this webservice?
Best Answer
It has created configuration provided below when I added service reference. There you can see two endpoints for the same contact.
You should either specify endpoint name what you are going to use like
or just remove unneeded endpoint configuration.