Created
August 29, 2014 08:25
-
-
Save toast38coza/c7342fcc1dd5762d4c02 to your computer and use it in GitHub Desktop.
Calling a SOAP WebService with Python Suds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from suds.client import Client | |
url="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" | |
client = Client(url) | |
print client ## shows the details of this service | |
result = client.service.GetWeatherInformation() | |
print result ## see: restult.txt below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ArrayOfWeatherDescription){ | |
WeatherDescription[] = | |
(WeatherDescription){ | |
WeatherID = 1 | |
Description = "Thunder Storms" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/thunderstorms.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 2 | |
Description = "Partly Cloudy" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 3 | |
Description = "Mostly Cloudy" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudy.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 4 | |
Description = "Sunny" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/sunny.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 5 | |
Description = "Rain" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/rain.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 6 | |
Description = "Showers" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/showers.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 7 | |
Description = "Haze" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/haze.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 9 | |
Description = "Partly Sunny" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudy.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 10 | |
Description = "Mostly Sunny" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 11 | |
Description = "Clear" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/sunny.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 12 | |
Description = "Fair" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 14 | |
Description = "Cloudy" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudy.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 15 | |
Description = "N/A" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/na.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 17 | |
Description = "Drizzle" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/drizzle.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 18 | |
Description = "Fog" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/fog.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 20 | |
Description = "Flurries" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 21 | |
Description = "Snow and Fog" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 26 | |
Description = "Blowing Snow and Fog" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 27 | |
Description = "Snow" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/snow.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 28 | |
Description = "Rain and Fog" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/rain.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 29 | |
Description = "Blowing Snow" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 32 | |
Description = "Light Rain" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/rain.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 33 | |
Description = "Heavy Rain" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/rain.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 34 | |
Description = "Missing Data" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/na.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 35 | |
Description = "Snow, Blowing Snow, and Fog" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 36 | |
Description = "Unknown Precipitation" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/na.gif" | |
}, | |
(WeatherDescription){ | |
WeatherID = 37 | |
Description = "AM CLOUDS" | |
PictureURL = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment