bgx:components logo
© 2004 -2005
Bernhard Gaul



GET_Weather Proxy Webservice : .NET proxy Web service to allow GET access to the GlobalWeather Web service from CapeScience

News: CapeScience temporarily down

As yo may have noticed the CapeScience Global Weather web service was on and off irregularly over the last months and totally disappeared in January 2006. Apparently this is due to a major revamp of their web site, however, I was told it should be back up by end of Q1/2006.

This is a webservice I created originally as a proxy for my Flash visualization of data provided by CapeScience' GlobalWeather Webservice, to comply with Flash security restrictions and allow convenient GET access, which the original Web service doesn't allow.

As I found out, other developers were also keen to have GET access to this Webservice or would like a proxy to use that data in their own Flash application. Therefore I created this webservice file that mirrors the methods available from GlobalWeather and can simply be deployed on any web server that supports .NET.

View the GET_Weather Web service in action. The HTML interface will show all available methods and the URLs to use when you invoke them.

Note

If you have problems using GET or POST on a server with .NET Framework 1.1 please read the following:
http://support.microsoft.com/default.aspx?scid=kb;en-us;819267

Links

Download the .asmx file (ZIP file, 15 kB)

The original CapeScience GlobalWeather webservice


Read an interview I gave CapeScience regarding building a Flash client for their GlobalWeather Webservice.

When and why shall I use this Proxy Webservice?

  1. You really need GET access

    The GET_Weather Webservice is useful if you absolutely need to get the data using the GET method. E.g. GET is easier if you use Flash MX, Flash MX 2004 has an inbuilt tool that connects to Webservices using SOAP, parses any WSDL in a couple of seconds and prepares all the method calls you need - really easy to use.

    If you build a Flash MX 2004 project for projectors (not web projects) this method would be advisable as you can call the original Webservice and don't have delays by calling my proxy hosted here. (See When it is not advisable to use this Proxy Webservice? below).

  2. You need a proxy for a Flash web project

    For security reasons Flash cannot access data from domains outside the one that hosts the Flash file. In this case you can download my webservice file and install it on your server as a proxy. This is a cheap (effectively free) alternative to using Flash Remoting. However you must host your Flash project on a server that supports ASP.NET.

    For further info about cross-domain data access see
    Macromedia Technote: External data not accessible outside a Flash movie's domain
    Macromedia Technote: Loading data across domains

When it is not advisable to use this Proxy Webservice?

If you build an Application that uses any kind of technology that allows you to access to remote webservices via POST or SOAP like ASP.NET, PHP, JAVA, Flash projectors and many more.

In this case you are better off to connect directly to the CapeScience webservice, not mine, because otherwise you have longer delays receiving the data.

Further links Flash:
Building a Tip of the Day Application (Just one of many examples you can find)
Using the Flash MX 2004 Web Service Classes

Further links .NET:
How to use the .NET Webservice proxy generator from the command line
Generating and using a .NET Webservice proxy with Dreamweaver

Details

This is a single .asmx file that can be deployed at any location on any server that supports ASP.NET, such as IIS on a machine that has the .NET framework installed.

This web service was built using code created with the .NET proxy generator, but instead of compiling it to a DLL it was pasted directly into the .asmx file, so no deployment of DLL files is necessary. Simply upload the GET_weather.asmx file and access it via the server.

If you link directly to "GET_weather.asmx" you will get the HTML interface that .NET provides.

If you link to "GET_weather.asmx?WSDL" you will get the service description.

To invoke the methods via GET use URLs like "GET_Weather.asmx/Get_WeatherReport?code=EDI".

The available methods mirror the ones available from the CapeScience service, but I changed the spelling deliberately to highlight the difference. Please be aware that I just retrieve the data as is and return it again. As you have access to the source code, feel free to improve it.

Changes to licensing (29/7/2004)

Lately I noticed a dramatic increase in web traffic due to the fact that apparently several sites or applications haven't installed their version of the webservice file but link directly to the webservice hosted on this site.

The webservice on this site was meant to be a mere example, not a public service as for most applications it would be more useful to either install the Webservice on their own server or connect directly to CapeScience (see When and why shall I use this Proxy Webservice? and When it is not advisable to use this Proxy Webservice?)

However, for the time being I will provide this service without guarantees of reliability or not to withdraw it in the future (after all you can download the file and host it anywhere else).

The hosted webservice is now available at http://www.bgxcomponents.com/webservices/GET_Weather_hosted.asmx
The old URL is obsolete.

In return I ask for a reference to this site in applications or web sites that use the webservice. It would also be nice if you notify me at info@bgxcomponents.com, I might add a link to your site on this page. I will also be able to inform you of any changes regarding the webservice, which at the moment is impossible.

Apologies for any inconveniences.

License for the downloadable webservice file

License for using the webservice hosted on this site

 

 

Usage examples

Check out Marcos Weskamp's cool geotracker that uses the GET_Weather proxy and other web services to build a global multi user weather map.

The GET_Weather proxy is also included as sample file on the CD to Luar's Book Flash Actionscript 2.0 -RIA

Licenses

License for the downloadable webservice file

License for using the webservice hosted on this site

Info

The download consists of a zipped version of the GET_Weather.asmx file.

The code contains some comments that mark up the sections that are generated by the proxy generator and the ones that make the webservice work.

Required:
Basic understanding of .NET and Webservices.

Language: C#