Skip to content

Instantly share code, notes, and snippets.

@trfiladelfo
Forked from anonymous/__main__.py
Created October 11, 2017 03:38
Show Gist options
  • Select an option

  • Save trfiladelfo/5962417e58b20fc788575411446917f9 to your computer and use it in GitHub Desktop.

Select an option

Save trfiladelfo/5962417e58b20fc788575411446917f9 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