# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
from zeep import Client

def test(url):
    soap = Client(url)
    o = soap.service.getOne(123)
    print('%d %s' % (o.f1,o.f2))
    for one in soap.service.getAll():
        print('%d %s' % (o.f1,o.f2))
    print(soap.service.save(123,'ABC'))
    print(soap.service.saveObject(o))
    print(soap.service.delete(123))

test('http://localhost:8080/wssoap/Test?wsdl')
test('http://localhost/TestService.asmx?WSDL')
test('http://localhost/Test.svc?wsdl')
test('http://localhost/TestAlt.svc?wsdl')
test('http://localhost:8080/wssoapx/TestService?wsdl');
