diff options
author | jortel <devnull@localhost> | 2009-02-18 00:07:04 +0000 |
---|---|---|
committer | jortel <devnull@localhost> | 2009-02-18 00:07:04 +0000 |
commit | 810f411294a421cb17726ca5854bccdbbd59f02b (patch) | |
tree | 2eb6f913badcb842bc808717030b866bcb707f57 /tests | |
parent | 12fb1eac7246b1dbc164ee2015cbe1e5e61ad4f0 (diff) | |
download | suds-810f411294a421cb17726ca5854bccdbbd59f02b.tar.gz |
Update public and axis1 tests to work with prefix changes. Update wsdl so that soap body namespaces always have a prefix (body defaults to 'b0' and headers default to 'h0'). Update servicedefinitiion to omit (None) namespaces from mappings. Add default for Element.findPrefix(). Fix Element.nsdeclaration() so that mixed expns and prefixed ns works properly. Fix marshaller to work properly with elementFromDefault=unqualified -- nodes are not qualified; this expects root to be qualified elsewhere; may need to revisit this. Update binding PartElement to be unqualified
Diffstat (limited to 'tests')
-rw-r--r-- | tests/axis1.py | 17 | ||||
-rw-r--r-- | tests/public.py | 7 |
2 files changed, 9 insertions, 15 deletions
diff --git a/tests/axis1.py b/tests/axis1.py index 73692ef..e89556f 100644 --- a/tests/axis1.py +++ b/tests/axis1.py @@ -34,9 +34,6 @@ credentials = dict(username='jortel', password='abc123') setup_logging() -from suds.xsd.sxbasic import Import -Import.bind('http://schemas.xmlsoap.org/soap/encoding/') - #logging.getLogger('suds.client').setLevel(logging.DEBUG) @@ -54,7 +51,7 @@ try: # create a name object using the wsdl # print 'create name' - name = client.factory.create('ns1:Name') + name = client.factory.create('ns0:Name') name.first = u'jeff'+unichr(1234) name.last = 'ortel' print name @@ -62,24 +59,24 @@ try: # create a phone object using the wsdl # print 'create phone' - phoneA = client.factory.create('ns1:Phone') + phoneA = client.factory.create('ns0:Phone') phoneA.npa = 410 phoneA.nxx = 555 phoneA.number = 5138 - phoneB = client.factory.create('ns1:Phone') + phoneB = client.factory.create('ns0:Phone') phoneB.npa = 919 phoneB.nxx = 555 phoneB.number = 4406 # # create a dog # - dog = client.factory.create('ns1:Dog') + dog = client.factory.create('ns0:Dog') dog.name = 'Chance' dog.trained = True # # create a person object using the wsdl # - person = client.factory.create('ns1:Person') + person = client.factory.create('ns0:Person') print '{empty} person=\n%s' % person person.name = name person.age = 43 @@ -95,13 +92,13 @@ try: # # create a new name object used to update the person # - newname = client.factory.create('ns1:Name') + newname = client.factory.create('ns0:Name') newname.first = 'Todd' newname.last = None # # create AnotherPerson using Person # - ap = client.factory.create('ns1:AnotherPerson') + ap = client.factory.create('ns0:AnotherPerson') ap.name = person.name ap.age = person.age ap.phone = person.phone diff --git a/tests/public.py b/tests/public.py index 399c053..485780d 100644 --- a/tests/public.py +++ b/tests/public.py @@ -28,9 +28,6 @@ errors = 0 setup_logging() -from suds.xsd.sxbasic import Import -Import.bind('http://schemas.xmlsoap.org/soap/encoding/') - #logging.getLogger('suds.client').setLevel(logging.DEBUG) #logging.getLogger('suds.metrics').setLevel(logging.DEBUG) #logging.getLogger('suds').setLevel(logging.DEBUG) @@ -208,9 +205,9 @@ try: start(url) client = Client(url) print client - env = client.factory.create('ns3:Envelope') + env = client.factory.create('ns2:Envelope') print env - options = client.factory.create('ns5:MapImageOptions') + options = client.factory.create('ns4:MapImageOptions') print options except WebFault, f: errors += 1 |