I am trying to consume my first WebService in a C# Windows Form in
VS.NET 2003. I have created a Web Reference using the WSDL URL
(http://www.capescience.com/webservic...tWeather.wsdl),
which created the Proxy class. I can see the WebService and its
methods in the Object Browser.
It was my impression that I should be able to simply instantiate the
webservice now and use its methods, so I have the following code:
<code>
CallWebService.com.capescience.www.AirportWeather weather =
new CallWebService.com.capescience.www.AirportWeather();
string summary = weather.getSummary( "KLAX" ).ToString();
</code>
When I run this, I get a 404 not found message. Out of curiosity, I
added a call to ".Discover":
<code>
CallWebService.com.capescience.www.AirportWeather weather =
new CallWebService.com.capescience.www.AirportWeather();
weather.Discover();
string summary = weather.getSummary( "KLAX" ).ToString();
</code>
Now when I run it, I receive a System.Net.WebException "there was an
error downloading 'http://www.capescience.com/ccgw/GWXmlServlet'."
I hate to sound foolish, but does this mean the WebService is not
available? I thought it might be a proxy issue, so I created an
App.config file and added a defaultProxy bypass (found in the
newsgroup) but it made no difference.
Why would I be able to see the Classes and Methods in the Object
Browser but not be able to call it? Does anyone know of a WebService I
can use to test with?
Thanks,
Joel