Skip to content

Instantly share code, notes, and snippets.

@leoluz
Created August 23, 2009 03:42
Show Gist options
  • Save leoluz/173149 to your computer and use it in GitHub Desktop.
Save leoluz/173149 to your computer and use it in GitHub Desktop.
Accessing a SOAP-WS within python using suds
# Esse exemplo foi testado com o exercicio do capitulo 20
# do curso da Caelum (fj31)
#
# Para instalar a lib do suds faca como root:
# $sudo easy_install suds
# digite python no terminal para invocar o interpretador do python.
# Em seguida digite as seguintes linhas:
>>>from suds.client import Client
>>>client = Client('http://localhost:8080/ConsultaDeLivrosBeanService/ConsultaDeLivrosBean?wsdl')
>>>livros = client.service.buscaLivro('Pais e Filhos')
>>>print livros
# Mais intuitivo que ruby. :P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment