GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Where is the WDSL?  XML
Forum Index -> FAQ - frequently asked questions
Author Message
JustinS



Joined: 29/09/2008 09:17:34
Messages: 3
Offline

Hi,

I am looking to use these webservices in a Adobe Flex application and when calling a webservice, it requires a WDSL describing the webservice.

I can't find this information anywhere for these webservices and I came across one forum message saying these webservices were REST format (which I know nothing about).

Can anyone help me with this in Flex?

Don't shoot me down for being a noob.

Thanks
Justin
marc



Joined: 08/12/2005 07:39:47
Messages: 3992
Offline

Hi Justin

REST means it is so simple that it does not need a WDSL and it does not have one. Check out the methods in Flex to parse xml.

Best

Marc

[WWW]
JustinS



Joined: 29/09/2008 09:17:34
Messages: 3
Offline

Thanks marc,

I did actually work it out yesterday and was trying to get on to the forum to reply but couldn't get it to load.

Here is some basic code for calling some functions in Flex if anyone is interested.

Code:
<?xml version="1.0" encoding="utf-8"?>
 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="*" creationComplete="retrieve_CountryList()">
 
     <mx:Script>
         
         <![CDATA[
             
             private var sCountryCode:String;
             
             private function retrieve_CountryList():void {
                 countryInfo.send();
             }
             private function retrieve_Country():void {
                 countryDetails.text="";
                 countryInfo2.send();
             }
             
         ]]>
         
     </mx:Script>
     
     <mx:DataGrid id="dgCountryList" x="10" y="10" dataProvider="{countryInfo.lastResult.country}" width="386" height="287" click="retrieve_Country()">
         <mx:columns>
             <mx:DataGridColumn headerText="Code" dataField="countryCode" width="60" textAlign="center"/>
             <mx:DataGridColumn headerText="Name" dataField="countryName" textAlign="left"/>
         </mx:columns>
     </mx:DataGrid>
 
     <mx:TextArea x="10" y="305" width="386" height="297" wordWrap="true" editable="false" id="countryDetails" text="{countryInfo2.lastResult.country}"/>
     
     <mx:HTTPService id="countryInfo" url="http://ws.geonames.org/countryInfo?" useProxy="false" method="GET" showBusyCursor="true" resultFormat="e4x">
         <mx:request xmlns=""/>
     </mx:HTTPService>
 
     <mx:HTTPService id="countryInfo2" url="http://ws.geonames.org/countryInfo?" useProxy="false" method="GET" showBusyCursor="true" resultFormat="e4x">
         <mx:request xmlns="">
             <country>{dgCountryList.selectedItem.countryCode}</country>
         </mx:request>
     </mx:HTTPService>
 
 </mx:Application>
marc



Joined: 08/12/2005 07:39:47
Messages: 3992
Offline

Arnaud FOUCAL has written a blog posting about calling geonames web services from Flex:
http://afoucal.free.fr/index.php/2008/10/05/httpservice-fill-city-field-zip-code-country-flex-form/

Marc

[WWW]
 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team