Skip to content

Instantly share code, notes, and snippets.

Created October 11, 2017 03:37
Show Gist options
  • Select an option

  • Save anonymous/04cd511c57c573313c486d045841494c to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/04cd511c57c573313c486d045841494c to your computer and use it in GitHub Desktop.
SOAP, zeep
from zeep import Client, helpers
client = Client('https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl')
resp = client.service.consultaCEP('06694720')
resp = helpers.serialize_object(resp)
resp = {k: resp[k] for k in resp}
print(resp)
client = Client('http://www.webservicex.com/globalweather.asmx?wsdl')
resp = client.service.GetCitiesByCountry('New York')
resp = helpers.serialize_object(resp)
#resp = {k: resp[k] for k in resp}
print(resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment