Hello ghewgill,
Thanks for the tip. I was able to create my DirectFlight.cs (man I feel dumb for not just searching for wsdl.exe, especially in Vista!), which I then added to my test project. So far so good.
I had a couple of hiccups while trying to compile, but those were solved by adding System.Web.Services to the Refereces category in the Solution Explorer (these compilation errors were stemmed by expressions in DirectFlight.cs, which needed this reference).
After straightening those out, I had a very simple code that compiled. It is when trying to run it that I ran into a problem I was not able to debug or troubleshoot, probably due to my inexperience in Web Services. I have attached some pictures to make it a little clearer.
In trying to eliminate unkowns, I then ran an exact copy of your .NET example you mentioned above, and got the same exact result for the df.Enroute method. I removed that call, and got the same exception for the df.METAR method.
Picture 1: This is an overall view of the IDE, with the thrown exception being displayed.
http://www.leadingedgesim.com/miguez/pics/DirectFlight/ide.png
Picture 2: This is a close-up view of the exception.
http://www.leadingedgesim.com/miguez/pics/DirectFlight/exception.png
Picture 3: This is my test code, which should retrieve a METAR for KTEB.
http://www.leadingedgesim.com/miguez/pics/DirectFlight/code.png
When running your sample code, I did copy the exception results (from both the entire code and the one where df.Enroute had beem removed) to the clipboard, and this is what I got respectively:
System.Net.WebException was unhandled
Message="The server committed a protocol violation. Section=ResponseStatusLine"
Source="System.Web.Services"
StackTrace:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object] parameters)
at DirectFlight.Enroute(String airport, Int32 howMany, String filter, Int32 offset) in C:\Users\Fabio\Documents\Visual Studio 2005\Projects\ConsoleApplication1\ConsoleApplication1\DirectFlight.cs:line 472
at test.Main(String] args) in C:\Users\Fabio\Documents\Visual Studio 2005\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 9
at System.AppDomain.nExecuteAssembly(Assembly assembly, String] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
System.Net.WebException was unhandled
Message="The server committed a protocol violation. Section=ResponseStatusLine"
Source="System.Web.Services"
StackTrace:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object] parameters)
at DirectFlight.METAR(String airport) in C:\Users\Fabio\Documents\Visual Studio 2005\Projects\ConsoleApplication1\ConsoleApplication1\DirectFlight.cs:line 874
at test.Main(String] args) in C:\Users\Fabio\Documents\Visual Studio 2005\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 15
at System.AppDomain.nExecuteAssembly(Assembly assembly, String] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
It seems to me the GetWebResponse method might be the culprit, but I am not 100% on that. Is it possible my authentication is no good, and therefore I get no response from the server? Just thinking out loud…
For the record, I am running Vista RC1, and using VS 2005 with .NET 2.0 installed.
Anyhow, thanks for the help so far, looking forward to getting this working.
Best regards,
Fabio Miguez