Advertisement

03.27.2008 at 06:14PM PDT, ID: 23276199
[x]
Attachment Details

Using the Cape Clear weather web service

Asked by bobinorlando in Microsoft Visual Basic.Net, Programming for ASP.NET, Web Services Description Language

I've got some old VB.NET code that shows how to access a demo web service.
With a web reference added to the project, it then instantiates a variable with the web reference:
dim aw as New com.capescience.live.AirportWeather

'It then calls the web service to get the summary for an airport code entered in the web form:
dim ws as com.capescience.live.WeatherSummary = aw.getsummary(txtcode.text)

Problem is, instantiating it that way defines a high level of the web service that apparently no longer exists at:
http://developer.capeclear.com/?q=webservices/globalweather/index.shtml

The WSDL file:
http://live.capeclear.com/ccx/GlobalWeather?wsdl

reveals these methods:

'"GlobalWeather" Description
    'Methods
    'getStation(code As string) As Station
    'getWeatherReport(code As string) As WeatherReport
    'isValidCode(code As string) As boolean
    'listCountries() As ArrayOfstring
    'searchByCode(code As string) As ArrayOfStation
    'searchByCountry(country As string) As ArrayOfStation
    'searchByLocation(latitude As Range, longitude As Range, elevation As Range) As ArrayOfStation
    'searchByName(name As string) As ArrayOfStation
    'searchByRegion(region As string) As ArrayOfStation

To avoid repeatedly entering the entire web reference, how would I instantiate a variable at the top level if it doesn't expose anything at that level?
Or does a web service represent a namespace in .Net that I could import?

Thanks in advance.


Start Free Trial
[+][-]03.28.2008 at 07:18AM PDT, ID: 21230581

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.28.2008 at 08:43AM PDT, ID: 21231395

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.28.2008 at 09:33AM PDT, ID: 21231880

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, Programming for ASP.NET, Web Services Description Language
Sign Up Now!
Solution Provided By: TheLearnedOne
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.28.2008 at 03:16PM PDT, ID: 21234489

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628