Giter VIP home page Giter VIP logo

pysimplesoap's Introduction

PySimpleSOAP / soap2py

Python simple and lightweight SOAP library for client and server webservices interfaces, aimed to be as small and easy as possible, supporting most common functionality. Initially it was inspired by PHP Soap Extension (mimicking its functionality, simplicity and ease of use), with many advanced features added.

Supports Python 3 (same codebase, no need to run 2to3)

Goals

  • Simple: originally less than 200LOC client/server concrete implementation for easy maintainability and enhancements.
  • Flexible: adapted to several SOAP dialects/servers (Java Axis, .Net, WCF, JBoss, "jetty"), with the possibility of fine-tuning XML request and responses
  • Pythonic: no artifacts, no class generation, no special types, RPC calls parameters and return values are simple python structures (dicts, list, etc.)
  • Dynamic: no definition (WSDL) required, dynamic generation and parsing supported (cached in a pickle file for performance, supporting fixing broken WSDL)
  • Easy: simple xml manipulation, including basic serialization and raw object-like access to SOAP messages
  • Extensible: supports several HTTP wrappers (httplib2, pycurl, urllib2) for special transport needs over SSL and proxy (ISA)
  • WSGI compliant: server dispatcher can be integrated to other python frameworks (web2py, django, etc.)
  • Backwards compatible: stable API, no breaking changes between releases
  • Lightweight: low memory footprint and fast processing (an order of magnitude in some situations, relative to other implementations)

History

Client initially developed for AFIP (Argentina's IRS) web services: electronic invoice, tax bonus, insurance, foreign trade, agriculture, customs, etc. (http://code.google.com/p/pyafipws/wiki/ProjectSummary)

Now it has been extended to support other webservices like Currency Exchange Control and TrazaMed (National Traceability of Medical Drugs Program)

Also, includes Server side support (a generic dispatcher, in order to be exposed from web2py service framework, adaptable to other webservers, including examples for standalone WSGI and django)

Source Code originally available on GoogleCode

Changelog

Recent changes (2014/2015):

  • Plug-in system to support for WSSE (Web-Services Security extensions)
  • WSSE UsernameToken, UsernameDigestToken and BinaryTokenSignature support
  • Pythonic XML Security Library basic implementation (canonicalization, SHA1 hashing and RSA signing / verification using X509 digital certificates)
  • Improved SOAP Fault details
  • Several fixes (basic python3 support, CDATA, )
  • [Breaking] Fixed bugs that occur when dealing with WSDL's that contain nested complex types. Such WSDL's are commonly generated by .NET WCF services that have been developed using "contract first" style where developers define classes with a full inheritance hierarchy that are implicitly converted to WCF soap services. See Issue #42 (#42).

Ongoing efforts:

  • Unit Tests update & clean up (removing old tests, better framework, fixing non-deterministic results, etc.)
  • WSDL advanced support (unifying nested elements structure dialects)
  • Python3 support for WSSE XMLSec (M2Crypto alternatives?)
  • Source code refactoring to improve readability and maintainability
  • Improving interop with .NET WCF services

Previous contributed features (circa 2013, forked and merged back):

  • Corrected support for multiple SOAP ports/bindings
  • Support for both import and include stanzas in WSDL
  • Support for a WSDL base directory to deal with relative pathnames in import/include stanzas
  • Somewhat saner tracing/logging (traces now go to log.debug(), which you can handle per module)
  • Somewhat more readable logic (by removing a bunch of helpers to a separate file)

Testing

Using Python 2.7+:

python -m unittest discover

Using older Python versions:

python -m unittest tests/suite.py

Code coverage:

sudo pip install coverage
coverage run tests/suite.py
coverage report -m
coverage html

Support

For community support, please fell free to fill an issue or send an email to [email protected]. Please do not add comment to wiki pages if you have technical questions.

For priority commercial technical support, you can contact Mariano Reingart (project creator and main maintainer, see AUTHORS for more info).

pysimplesoap's People

Contributors

akramparvez avatar anton-ryzhov avatar dbarbeau avatar dotnetdan avatar fouladi avatar fuzeman avatar gaetano-guerriero avatar gerardoallende avatar jc2k avatar john5223 avatar jtatum avatar jwilk avatar lawrenceakka avatar matee911 avatar mbi avatar mgrant-hcn avatar n1k9 avatar nickrw avatar oczkers avatar rcarmo avatar reingart avatar rhertzog avatar seanmil avatar secretions avatar siglud avatar syntaxcoloring avatar tamasbogi avatar tanderson3 avatar the-allanc avatar uxio0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pysimplesoap's Issues

TypeError: Tag: IMKAD_Perceel invalid (type not found). Bug in pysimplesoap?

I'm trying to use pysimplesoap to get information from a SOAP service from the Dutch land register (full WSDL here) with PySimpleSoap. Unfortunately it is a paid service, so it will be hard/impossible for anybody here to replicate. But maybe I can explain what the problem is.

So far I managed to connect and request information about a specific property with the following code:

from pysimplesoap.client import SoapClient
client = SoapClient(wsdl='http://www1.kadaster.nl/1/schemas/kik-inzage/20141101/verzoekTotInformatie-2.1.wsdl', username='xxx', password='xxx', trace=True)

response = client.VerzoekTotInformatie(
    Aanvraag={
        'berichtversie': '4.7',  # Refers to the schema version: 
        'klantReferentie': klantReferentie,  # A reference we can set ourselves.
        'productAanduiding': '1185',  # a four-digit code referring to whether the response should be in "XML" (1185), "PDF" (1191) or "XML and PDF" (1057).
        'Ingang': {
            'Object': {
                'IMKAD_KadastraleAanduiding': {
                    'gemeente': 'ARNHEM AC',  # municipality
                    'sectie': 'AC',  # section code
                    'perceelnummer': '1234'  # Lot number
                }
            }
        }
    }
)

Because I set trace=True I get extensive log messages, and in those log messages I see a humongous xml output which includes all info which I request. BUT, I also get this traceback:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
    'perceelnummer': perceelnummer
  File "/Library/Python/2.7/site-packages/pysimplesoap/client.py", line 181, in <lambda>
    return lambda *args, **kwargs: self.wsdl_call(attr, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pysimplesoap/client.py", line 346, in wsdl_call
    return self.wsdl_call_with_args(method, args, kwargs)
  File "/Library/Python/2.7/site-packages/pysimplesoap/client.py", line 372, in wsdl_call_with_args
    resp = response('Body', ns=soap_uri).children().unmarshall(output)
  File "/Library/Python/2.7/site-packages/pysimplesoap/simplexml.py", line 433, in unmarshall
    value = children and children.unmarshall(fn, strict)
  File "/Library/Python/2.7/site-packages/pysimplesoap/simplexml.py", line 433, in unmarshall
    value = children and children.unmarshall(fn, strict)
  File "/Library/Python/2.7/site-packages/pysimplesoap/simplexml.py", line 433, in unmarshall
    value = children and children.unmarshall(fn, strict)
  File "/Library/Python/2.7/site-packages/pysimplesoap/simplexml.py", line 380, in unmarshall
    raise TypeError("Tag: %s invalid (type not found)" % (name,))
TypeError: Tag: IMKAD_Perceel invalid (type not found)

as far as I understand, this means that the IMKAD_Perceel tag cannot be understood by the simplexml parser which I guess is because it could not read/find the definition of this tag in the wdsl file.

I used SoapUI to introspect the WSDL file, and I found an url to an .xsd-file in which I find a definition of the IMKAD_Perceel:

<xs:element name="IMKAD_Perceel" 
    substitutionGroup="ipkbo:IMKAD_OnroerendeZaak" 
    type="ipkbo:IMKAD_Perceel"
    />

The tag seams to be closing itself though. I guess this means the definition is empty. Am I correct in this? And if so, is this the reason that pysimplesoap thinks that IMKAD_Perceel is not defined?

And most importantly: is this a bug in pysimplesoap, or is this something which I can somehow solve myself? All tips are welcome!

Error occurs when soap request is too large

The following error is occurring when sending large requests from the client to a service. It definitely appears to be related to size because the repro is as follows:

client = SoapClient(wsdl="https://server/myService")
client.Insert(largeList[1:100]) # succeeds
client.Insert(largeList[1:150]) # error occurs

The error is:

No handlers could be found for logger "pysimplesoap.simplexml"
Traceback (most recent call last):
  File "rate.py", line 76, in <module>
    insertResult = r.bulkInsert()
  File "rate.py", line 51, in bulkInsert
    insertResult = self.client.BulkInsertFrom(contracts=rates)
  File "C:\Users\dling\Envs\lib\site-packages\pysimplesoap\client.py", line 181, in <lambda>
    return lambda *args, **kwargs: self.wsdl_call(attr, *args, **kwargs)
  File "C:\Users\dling\Envs\lib\site-packages\pysimplesoap\client.py", line 346, in wsdl_call
    return self.wsdl_call_with_args(method, args, kwargs)
  File "C:\Users\dling\Envs\lib\site-packages\pysimplesoap\client.py", line 370, in wsdl_call_with_args
    response = self.call(method, *params)
  File "C:\Users\dling\Envs\lib\site-packages\pysimplesoap\client.py", line 262, in call
    jetty=self.__soap_server in ('jetty',))
  File "C:\Users\dling\Envs\lib\site-packages\pysimplesoap\simplexml.py", line 56, in __init__
    self.__document = xml.dom.minidom.parseString(text)
  File "C:\Python27\Lib\xml\dom\minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "C:\Python27\Lib\xml\dom\expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "C:\Python27\Lib\xml\dom\expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0

marshalling list args

I had to replace line 218 of client.py with:

if isinstance(v, list):
     for i in v:
        getattr(request, method).marshall(k, i, ns=ns)
else:                       
     getattr(request, method).marshall(k, v, ns=ns)

otherwise my axis server would only process the first item of the list. Is this because my server is not following XML standards?

Support multiple occurrence of a XML node

I encountered problems with a vendor's API where the XML contained multiple occurrences of a node and pysimplesoap was unable to process it.

I have submitted a pull request with tests demonstrating the issue and a fix which breaks none of the other existing tests. However, so far it has gotten no attention so I thought perhaps I should enter an issue referencing it.

Please see pull request #84

Thank you.

I just wanted to run tests, but I could not

Excuse my ignorance
I just wanted to run tests, but I could not.

Before...

git clone this project
cd /pysimplesoap

I tried (1)....

python -m unittest discover

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

also tried (2)...

python -m unittest tests/suite.py
----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

and tried (3)

sudo pip install coverage
coverage run tests/suite.py
Traceback (most recent call last):
  File "tests/suite.py", line 40, in <module>
    test()
  File "tests/suite.py", line 12, in test
    from . import soapdispatcher_test
ValueError: Attempted relative import in non-package

using server let to a TypeError

Using a list or dict as return of a SOAP method let to an error:
File "pysimplesoap/server.py", line 372, in parse_element
if v in TYPE_MAP.keys():
TypeError: unhashable type: 'list'

Reoder the type check and add a comment to avoid this error.

server:

from pysimplesoap.server import SoapDispatcher, SOAPHandler
from http.server import HTTPServer

def getlist():
    "Return a list"
    return {'list': [{'col': 'A'}, {'col': 'B'}, {'col': 'C'}]}

dispatcher = SoapDispatcher(
        'my_dispatcher',
        location = "http://localhost:8008/",
        action = 'http://localhost:8008/', # SOAPAction
        namespace = "http://example.com/sample.wsdl", prefix="ns0",
        trace = True,
        ns = True)

# register the user function
dispatcher.register_function('GetList', getlist,
                             returns = {'list': [{'col': str}]},
                             args = {})

print ("Starting server...")
httpd = HTTPServer(("", 8008), SOAPHandler)
httpd.dispatcher = dispatcher
httpd.serve_forever()

client:

from suds.client import Client

client = Client ("http://127.0.0.1:8008/")
result = client.service.GetList ()
print result

0001-reorder-type-check-to-avoid-a-TypeError.txt

Remove transitional stuff from setup.py?

Hi

Calling setup() in setup.py twice is weird and confuses pip.

One example is if you try to use wheels. We use wheels to speed up our Travis CI - our requirements.txt is fetched and compiled once, and future builds are about 10 minutes quicker (lots of dependencies!). Unfortunately, because setup() is called twice this no longer works:

  Running setup.py bdist_wheel for pysimplesoap
  Destination directory: /home/travis/wheelhouse
  Complete output from command /home/travis/virtualenv/python2.7.9/bin/python -c "import setuptools;__file__='/tmp/pip-build-v0_SSU/pysimplesoap/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /home/travis/wheelhouse:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/pysimplesoap
  copying pysimplesoap/__init__.py -> build/lib/pysimplesoap
  copying pysimplesoap/helpers.py -> build/lib/pysimplesoap
  copying pysimplesoap/c14n.py -> build/lib/pysimplesoap
  copying pysimplesoap/transport.py -> build/lib/pysimplesoap
  copying pysimplesoap/simplexml.py -> build/lib/pysimplesoap
  copying pysimplesoap/xmlsec.py -> build/lib/pysimplesoap
  copying pysimplesoap/plugins.py -> build/lib/pysimplesoap
  copying pysimplesoap/wsse.py -> build/lib/pysimplesoap
  copying pysimplesoap/client.py -> build/lib/pysimplesoap
  copying pysimplesoap/server.py -> build/lib/pysimplesoap
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/__init__.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/helpers.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/c14n.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/transport.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/simplexml.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/xmlsec.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/plugins.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/wsse.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/client.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  copying build/lib/pysimplesoap/server.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  running install_egg_info
  running egg_info
  creating soap2py.egg-info
  writing soap2py.egg-info/PKG-INFO
  writing top-level names to soap2py.egg-info/top_level.txt
  writing dependency_links to soap2py.egg-info/dependency_links.txt
  writing manifest file 'soap2py.egg-info/SOURCES.txt'
  warning: manifest_maker: standard file '-c' not found
  reading manifest file 'soap2py.egg-info/SOURCES.txt'
  writing manifest file 'soap2py.egg-info/SOURCES.txt'
  Copying soap2py.egg-info to build/bdist.linux-x86_64/wheel/soap2py-1.16-py2.7.egg-info
  running install_scripts
  creating build/bdist.linux-x86_64/wheel/soap2py-1.16.dist-info/WHEEL
  running bdist_wheel
  running build
  running build_py
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  copying build/lib/pysimplesoap/__init__.py -> build/bdist.linux-x86_64/wheel/pysimplesoap
  error: [Errno 2] No such file or directory: 'build/bdist.linux-x86_64/wheel/pysimplesoap/__init__.py'
  ----------------------------------------
  Failed building wheel for pysimplesoap

I recreated this locally, and fixed it by only calling setup() once.

Another weird thing is that if you pip install pysimplesoap in an empty virtualenv and do pip freeze you get:

$ pip freeze
PySimpleSOAP==1.16
soap2py==1.16

That's because setup.py is executed by pip during the install. So pip downloads pysimplesoap but setup.py install will install pysimplesoap and soap2py from that .tar.gz. Of course, depending on which one you install, the other won't have the correct installed_files.txt in its egg-info, so pip uninstall gets weird:

$ pip uninstall soap2py
Uninstalling soap2py-1.16:
  lib/python2.7/site-packages/pysimplesoap
  lib/python2.7/site-packages/soap2py-1.16-py2.7.egg-info
Proceed (y/n)? n

$ pip uninstall pysimplesoap
Uninstalling PySimpleSOAP-1.16:
  lib/python2.7/site-packages/PySimpleSOAP-1.16-py2.7.egg-info
  lib/python2.7/site-packages/pysimplesoap/__init__.py
  lib/python2.7/site-packages/pysimplesoap/__init__.pyc
  lib/python2.7/site-packages/pysimplesoap/c14n.py
  lib/python2.7/site-packages/pysimplesoap/c14n.pyc
  <snip>
  lib/python2.7/site-packages/pysimplesoap/xmlsec.py
  lib/python2.7/site-packages/pysimplesoap/xmlsec.pyc
Proceed (y/n)? n

And if you uninstall one of these it will leave the egg-info directory for the other.

And if someone else then installs your requirements.txt that you made with pip freeze then pip will install pysimplesoap which will install both, then soap2py which will install both. Fun times!

There are a couple of alternatives you could try:

  • Dummy project for the old name that just depends on the new name and has no other code, with a README.rst that gets shown on pypi to explain further.
  • Dummy project for the old name that just explodes when setup.py is run (with a message saying what the new name is). Same README as above.

On successful Soap call I get "secret_key" invalid (type not found)

I am trying to use in internal soap system so I can't show the wsdl file. However, it seems I just eed to send the user and password and I get the secret_key to use for the next hours. But it seem to create when trying to get the key.
If I use an invalid user and password then I get...
"errNumber invalid (type not found)" error. So I know the message is coming across ok.
I have tried this on v1.10 1.11 and 1.16 with the exact same result.
I am currently on 1.16.
Any ideas on how I can get this working?
BR,
Jason Brower

Includes not turned in to Services/Operations

I'm using a WSDL where operations are defined in an include as follows:

<wsdl:types>
    <xsd:schema targetNamespace="http://mangled.com" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:include schemaLocation="xsd/FindServiceProviderLocationIdRequest.xsd" />
    </xsd:schema>
</wsdl:types>

These includes are then not turned into operations with the error RuntimeError: Operation FindServiceProviderLocationIdRequest not found in WSDL: Service/Port Type: (u'MANGLED', u'MANGLED')

The XML files seemed to be imported correctly, they're just not added to the services list.

TypeError: Tag: diffgram invalid (type not found)

Using Python 2.7 and pysimplesoap 1.16, the following test program:

from pysimplesoap.client import SoapClient
client = SoapClient(wsdl='http://www.boosey.com/webservices/composer_Info.asmx?WSDL',trace=False)
response = client.getComposerPerformances(ComposerID=2770, userName='', password='')

fails with the following exception trace:

Traceback (most recent call last):
  File "tst.py", line 3, in <module>
    response = client.getComposerPerformances(ComposerID=2770, userName='', password='')
  File "/var/britten/brittenweb/datafeeds/venv/lib/python2.7/site-packages/pysimplesoap/client.py", line 181, in <lambda>
    return lambda *args, **kwargs: self.wsdl_call(attr, *args, **kwargs)
  File "/var/britten/brittenweb/datafeeds/venv/lib/python2.7/site-packages/pysimplesoap/client.py", line 346, in wsdl_call
    return self.wsdl_call_with_args(method, args, kwargs)
  File "/var/britten/brittenweb/datafeeds/venv/lib/python2.7/site-packages/pysimplesoap/client.py", line 372, in wsdl_call_with_args
    resp = response('Body', ns=soap_uri).children().unmarshall(output)
  File "/var/britten/brittenweb/datafeeds/venv/lib/python2.7/site-packages/pysimplesoap/simplexml.py", line 433, in unmarshall
    value = children and children.unmarshall(fn, strict)
  File "/var/britten/brittenweb/datafeeds/venv/lib/python2.7/site-packages/pysimplesoap/simplexml.py", line 433, in unmarshall
    value = children and children.unmarshall(fn, strict)
  File "/var/britten/brittenweb/datafeeds/venv/lib/python2.7/site-packages/pysimplesoap/simplexml.py", line 380, in unmarshall
    raise TypeError("Tag: %s invalid (type not found)" % (name,))
TypeError: Tag: diffgram invalid (type not found)

The WSDL is here: http://www.boosey.com/webservices/composer_Info.asmx?WSDL

Using this online tester: http://wsdlbrowser.com

I can see that the XML response for the SOAP call is:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <getComposerRecordingsResponse
            xmlns="http://www.boosey.com/webservices/composer_Info.asmx">
            <getComposerRecordingsResult>
                <xs:schema id="Recordings"
                    xmlns=""
                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
                    <xs:element name="Recordings" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
                        <xs:complexType>
                            <xs:choice minOccurs="0" maxOccurs="unbounded">
                                <xs:element name="Recording">
                                    <xs:complexType>
                                        <xs:sequence>
                                            <xs:element name="ComposerID" type="xs:int" minOccurs="0" />
                                            <xs:element name="LastName" type="xs:string" minOccurs="0" />
                                            <xs:element name="FirstName" type="xs:string" minOccurs="0" />
                                            <xs:element name="RecordingID" type="xs:int" minOccurs="0" />
                                            <xs:element name="Title" type="xs:string" minOccurs="0" />
                                            <xs:element name="SnapshotMenu" type="xs:boolean" minOccurs="0" />
                                            <xs:element name="NewRecording" type="xs:boolean" minOccurs="0" />
                                            <xs:element name="RecordingID1" type="xs:int" minOccurs="0" />
                                            <xs:element name="RecordingText" type="xs:string" minOccurs="0" />
                                            <xs:element name="PhotoName" type="xs:string" minOccurs="0" />
                                            <xs:element name="RecordingOnline" type="xs:boolean" minOccurs="0" />
                                            <xs:element name="WhatsNew" type="xs:boolean" minOccurs="0" />
                                            <xs:element name="RecordingQuote" type="xs:string" minOccurs="0" />
                                        </xs:sequence>
                                    </xs:complexType>
                                </xs:element>
                            </xs:choice>
                        </xs:complexType>
                    </xs:element>
                </xs:schema>
                <diffgr:diffgram
                    xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
                    xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" />
                </getComposerRecordingsResult>
            </getComposerRecordingsResponse>
        </soap:Body>
    </soap:Envelope>

The diffgram tag is visible towards the end.

Incorrect mapping complex types - arrays

The following wsdl snippet is where the problem occurs. I have not had a chance (and may not) trace into the code but the issue is we have a complexType term, that contains an array ArrayOfExtensionProperty which is named ExtensionProperty and includes an array of name/value pairs.

Everything runs without error and the name value pairs have the expected names, but the values are always None and there are values being returned (stepped into the code very quickly)

I am running the latest version - PySimpleSOAP (1.16) installed directly from github.

Any ideas?

//
<xsd:complexType name="Term">xsd:sequence<xsd:element name="auxiliaryId" nillable="true" type="xsd:string"/><xsd:element name="createdAt" nillable="true" type="xsd:string"/><xsd:element name="createdBy" nillable="true" type="ns1:User"/><xsd:element name="extensionProperties" nillable="true" type="ns1:ArrayOfExtensionProperty"/><xsd:element name="externalId" nillable="true" type="xsd:string"/><xsd:element name="id" nillable="true" type="xsd:string"/><xsd:element name="isPlaceHolder" type="xsd:boolean"/><xsd:element name="lastModified" nillable="true" type="xsd:string"/><xsd:element name="localizedValues" nillable="true" type="ns1:ArrayOfLocalizedValue"/><xsd:element name="modifiedBy" nillable="true" type="ns1:User"/><xsd:element name="name" nillable="true" type="xsd:string"/><xsd:element name="notes" nillable="true" type="xsd:string"/>/xsd:sequence/xsd:complexType

//
<xsd:complexType name="ArrayOfExtensionProperty">xsd:sequence<xsd:element maxOccurs="unbounded" minOccurs="0" name="ExtensionProperty" nillable="true" type="ns1:ExtensionProperty"/>

//
/xsd:sequence/xsd:complexType<xsd:complexType name="ExtensionProperty">xsd:sequence<xsd:element name="name" nillable="true" type="xsd:string"/><xsd:element name="value" nillable="true" type="xsd:anyType"/>/xsd:sequence</xsd:complexType

Marshaling time data missing colons (v1.16)

I'm trying to create a client/server that passes datetime.time objects, however I'm getting the following error:

SoapFault: Client.ValueError: Tag: LatestTime: time data '140000' does not match format '%H:%M:%S'

In helpers.py should the time marshaling include colons? It currently has this:

time_m = lambda d: d.strftime("%H%M%S")

I would have expected:

time_m = lambda d: d.strftime("%H:%M:%S")

Problems with Nested ComplexTypes in WSDL

There are issues interpreting XML schema definitions with nested complex types. It looks like there are multiple different symptoms of this issue, but I am providing a repro of a case where the service wsdl defines a property as an array, yet the PySimpleSoap client sees it as a single object.

I've been able to reproduce this using .NET WCF services, defined as such:

classdiagram1

The relevant schema from the wsdl looks like this:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/ComplexWsdl" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/ComplexWsdl">
    <xs:complexType name="IcedCoffee">
        <xs:complexContent mixed="false">
            <xs:extension base="tns:Coffee">
                <xs:sequence>
                    <xs:element minOccurs="0" name="IceCubes" type="xs:int" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="IcedCoffee" nillable="true" type="tns:IcedCoffee" />
    <xs:complexType name="Coffee">
        <xs:complexContent mixed="false">
            <xs:extension base="tns:Beverage">
                <xs:sequence>
                    <xs:element minOccurs="0" name="Beans" nillable="true" type="tns:ArrayOfCoffeeBean" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="Coffee" nillable="true" type="tns:Coffee" />
    <xs:complexType name="Beverage">
        <xs:sequence>
            <xs:element minOccurs="0" name="Ingredients" nillable="true" type="tns:ArrayOfIngredient" />
            <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="Beverage" nillable="true" type="tns:Beverage" />
    <xs:complexType name="ArrayOfIngredient">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="Ingredient" nillable="true" type="tns:Ingredient" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ArrayOfIngredient" nillable="true" type="tns:ArrayOfIngredient" />
    <xs:complexType name="Ingredient">
        <xs:sequence>
            <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="Ingredient" nillable="true" type="tns:Ingredient" />
    <xs:complexType name="ArrayOfCoffeeBean">
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="CoffeeBean" nillable="true" type="tns:CoffeeBean" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="ArrayOfCoffeeBean" nillable="true" type="tns:ArrayOfCoffeeBean" />
    <xs:complexType name="CoffeeBean">
        <xs:sequence>
            <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
            <xs:element minOccurs="0" name="Roast" nillable="true" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="CoffeeBean" nillable="true" type="tns:CoffeeBean" />
</xs:schema>

The PySimpleSoap client is incorrectly interpreting that the Ingredients property as single object of Ingredient:

Port name: BasicHttpBinding_ICoffeeService
Operation Name:  SubmitIcedCoffee
SOAPAction:  http://tempuri.org/ICoffeeService/SubmitIcedCoffee
Input:  {
    "SubmitIcedCoffee": {
        "icedCoffee": {
            "IceCubes": "<type 'int'>",
            "Beans": [
                {
                    "CoffeeBean": {
                        "Name": "<type 'str'>",
                        "Roast": "<type 'str'>"
                    }
                }
            ],
            "Name": "<type 'str'>",
            "Ingredients": {
                "Ingredient": {
                    "Name": "<type 'str'>"
                }
            }
        }
    }
}
Output:  {'SubmitIcedCoffeeResponse': {u'SubmitIcedCoffeeResult': <type 'bool'>}}

The code for interpreting the wsdl schema types, is defined in the two recursive routines of helpers.py, postprocess_element and process_element. It appears that the postprocess_element function is responsible for interpreting extended classes, yet it is failing to fully process all of the complex types when there is an inheritance hierarchy 3 levels deep.

There are lots of comments mentioning that the recursion needs to be fixed. If anyone can help or provide any insight on to the issue it would be greatly appreciated!

Should decode base64 encoded strings

As reported at http://bugs.debian.org/799650

this bugreport is a follow-up to #799528 (affecting reportbug and
reportbug-ng).

>>> import debianbts
>>> [bug] = debianbts.get_status(711111)
>>> print bug.originator
Ik1pY2hhxYIgS3XFgmFjaCIgPG1pY2hhbGt1bGFjaEBnbWFpbC5jb20+

Compare with a non-unicode Name:
>>> [bug] = debianbts.get_status(111111)
>>> print bug.originator
>>> # some correct name <[email protected]>

If you look at the XML that is sent, you'll note that in the first case
the originator is of type xsd:base64Binary, while the second one is of
type xsd:string. I think it would be sensible if simplesoap would
automatically decode base64 encoded strings. If it doesn't it is
impossible for other libraries to guess if the string was base64 encoded
or not, because in both cases the returned python type is <str>.

this is from a python module in debian, called 'debianbts'; the bugs referred could be seen at

http://bugs.debian.org/111111
http://bugs.debian.org/711111 (this has the sender with unicode chars)

Args keys not in parameter error when parameter is xml code

Hi!

I try to get data from a SharePoint list with pysimplesoap v1.16.

I want to call GetListItems from a SharePoint list.
The simplest request should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<soap12env:Envelope xmlns:sharepoint="http://schemas.microsoft.com/sharepoint/soap/"
                    xmlns:soap12env="http://www.w3.org/2003/05/soap-envelope">
  <soap12env:Header/>
  <soap12env:Body>
    <sharepoint:GetListItems>
      <sharepoint:listName>MyList</sharepoint:listName>
      <sharepoint:viewName/>
      <sharepoint:query/>
      <sharepoint:viewFields/>
      <sharepoint:rowLimit/>
      <sharepoint:queryOptions><QueryOptions /></sharepoint:queryOptions>
      <sharepoint:webID/>
    </sharepoint:GetListItems>
  </soap12env:Body>
</soap12env:Envelope>

I would generate this with the following PySimpleSoap calls:

    client = SoapClient(wsdl='https://my.sharepoint.site.com/_vti_bin/lists.asmx?wsdl',
                        soap_ns="soap12env", ns="sharepoint",
                        trace=True)
    response = client.GetListItems(listName='MyList',
                                   viewName='',
                                   query='',
                                   viewFields='',
                                   rowLimit='',
                                   queryOptions='<QueryOptions />',
                                   webID=''
                                   )

But I get the following error:

Failed: Invalid Args Structure. Errors: [u'Args keys not in parameter. parameter: {}, args: <QueryOptions />']

How can I pass xml formated parameter values like <QueryOptions /> to a function call?

Thanks in advance.

The WSDL from the SharePoint site looks like this:

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://schemas.microsoft.com/sharepoint/soap/">
  <script/>
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/sharepoint/soap/">
      <s:import namespace="http://www.w3.org/2001/XMLSchema"/>
      <s:import namespace="http://microsoft.com/wsdl/types/"/>
      <s:element name="GetList">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListAndView">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="viewName" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListAndViewResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListAndViewResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteList">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="listName" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteListResponse">
        <s:complexType/>
      </s:element>
      <s:element name="AddList">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="description" type="s:string"/>
            <s:element minOccurs="1" maxOccurs="1" name="templateID" type="s:int"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddListResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AddListResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddListFromFeature">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="description" type="s:string"/>
            <s:element minOccurs="1" maxOccurs="1" name="featureID" type="s1:guid"/>
            <s:element minOccurs="1" maxOccurs="1" name="templateID" type="s:int"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddListFromFeatureResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AddListFromFeatureResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateList">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="listProperties">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="newFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="updateFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="deleteFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="listVersion" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateListResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UpdateListResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListCollection">
        <s:complexType/>
      </s:element>
      <s:element name="GetListCollectionResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListCollectionResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItems">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="viewName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="query">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="viewFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="rowLimit" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="queryOptions">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="webID" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemsResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListItemsResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemChanges">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="viewFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="since" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contains">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemChangesResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListItemChangesResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemChangesWithKnowledge">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="viewName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="query">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="viewFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="rowLimit" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="queryOptions">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="syncScope" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="knowledge">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="contains">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemChangesWithKnowledgeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListItemChangesWithKnowledgeResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemChangesSinceToken">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="viewName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="query">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="viewFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="rowLimit" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="queryOptions">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="changeToken" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contains">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListItemChangesSinceTokenResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListItemChangesSinceTokenResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateListItems">
        <s:complexType>
          <s:sequence>
            <s:element name="listName" type="s:string"/>
            <s:element name="updates">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateListItemsResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UpdateListItemsResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateListItemsWithKnowledge">
        <s:complexType>
          <s:sequence>
            <s:element name="listName" type="s:string"/>
            <s:element name="updates">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="syncScope" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="knowledge">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateListItemsWithKnowledgeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UpdateListItemsWithKnowledgeResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddDiscussionBoardItem">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="message" type="s:base64Binary"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddDiscussionBoardItemResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AddDiscussionBoardItemResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddWikiPage">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="strListName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="listRelPageUrl" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="wikiContent" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddWikiPageResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AddWikiPageResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetVersionCollection">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="strlistID" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="strlistItemID" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="strFieldName" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetVersionCollectionResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetVersionCollectionResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddAttachment">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="listItemID" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="fileName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="attachment" type="s:base64Binary"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="AddAttachmentResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AddAttachmentResult" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetAttachmentCollection">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="listItemID" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetAttachmentCollectionResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetAttachmentCollectionResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteAttachment">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="listItemID" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="url" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteAttachmentResponse">
        <s:complexType/>
      </s:element>
      <s:element name="CheckOutFile">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pageUrl" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="checkoutToLocal" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="lastmodified" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="CheckOutFileResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="CheckOutFileResult" type="s:boolean"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UndoCheckOut">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pageUrl" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UndoCheckOutResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="UndoCheckOutResult" type="s:boolean"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="CheckInFile">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pageUrl" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="comment" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="CheckinType" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="CheckInFileResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="CheckInFileResult" type="s:boolean"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListContentTypes">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListContentTypesResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListContentTypesResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListContentTypesAndProperties">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="propertyPrefix" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="includeWebProperties" type="s:boolean"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListContentTypesAndPropertiesResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListContentTypesAndPropertiesResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListContentType">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetListContentTypeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetListContentTypeResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="CreateContentType">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="displayName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="parentType" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="fields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeProperties">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="addToView" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="CreateContentTypeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="CreateContentTypeResult" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateContentType">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeProperties">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="newFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="updateFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="deleteFields">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="addToView" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateContentTypeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UpdateContentTypeResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteContentType">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteContentTypeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="DeleteContentTypeResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateContentTypeXmlDocument">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="newDocument">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateContentTypeXmlDocumentResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UpdateContentTypeXmlDocumentResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateContentTypesXmlDocument">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="newDocument">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="UpdateContentTypesXmlDocumentResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UpdateContentTypesXmlDocumentResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteContentTypeXmlDocument">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="documentUri" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="DeleteContentTypeXmlDocumentResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="DeleteContentTypeXmlDocumentResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="ApplyContentTypeToList">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="webUrl" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="contentTypeId" type="s:string"/>
            <s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="ApplyContentTypeToListResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ApplyContentTypeToListResult">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any/>
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
    <s:schema elementFormDefault="qualified" targetNamespace="http://microsoft.com/wsdl/types/">
      <s:simpleType name="guid">
        <s:restriction base="s:string">
          <s:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/>
        </s:restriction>
      </s:simpleType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="GetListSoapIn">
    <wsdl:part name="parameters" element="tns:GetList"/>
  </wsdl:message>
  <wsdl:message name="GetListSoapOut">
    <wsdl:part name="parameters" element="tns:GetListResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListAndViewSoapIn">
    <wsdl:part name="parameters" element="tns:GetListAndView"/>
  </wsdl:message>
  <wsdl:message name="GetListAndViewSoapOut">
    <wsdl:part name="parameters" element="tns:GetListAndViewResponse"/>
  </wsdl:message>
  <wsdl:message name="DeleteListSoapIn">
    <wsdl:part name="parameters" element="tns:DeleteList"/>
  </wsdl:message>
  <wsdl:message name="DeleteListSoapOut">
    <wsdl:part name="parameters" element="tns:DeleteListResponse"/>
  </wsdl:message>
  <wsdl:message name="AddListSoapIn">
    <wsdl:part name="parameters" element="tns:AddList"/>
  </wsdl:message>
  <wsdl:message name="AddListSoapOut">
    <wsdl:part name="parameters" element="tns:AddListResponse"/>
  </wsdl:message>
  <wsdl:message name="AddListFromFeatureSoapIn">
    <wsdl:part name="parameters" element="tns:AddListFromFeature"/>
  </wsdl:message>
  <wsdl:message name="AddListFromFeatureSoapOut">
    <wsdl:part name="parameters" element="tns:AddListFromFeatureResponse"/>
  </wsdl:message>
  <wsdl:message name="UpdateListSoapIn">
    <wsdl:part name="parameters" element="tns:UpdateList"/>
  </wsdl:message>
  <wsdl:message name="UpdateListSoapOut">
    <wsdl:part name="parameters" element="tns:UpdateListResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListCollectionSoapIn">
    <wsdl:part name="parameters" element="tns:GetListCollection"/>
  </wsdl:message>
  <wsdl:message name="GetListCollectionSoapOut">
    <wsdl:part name="parameters" element="tns:GetListCollectionResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListItemsSoapIn">
    <wsdl:part name="parameters" element="tns:GetListItems"/>
  </wsdl:message>
  <wsdl:message name="GetListItemsSoapOut">
    <wsdl:part name="parameters" element="tns:GetListItemsResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListItemChangesSoapIn">
    <wsdl:part name="parameters" element="tns:GetListItemChanges"/>
  </wsdl:message>
  <wsdl:message name="GetListItemChangesSoapOut">
    <wsdl:part name="parameters" element="tns:GetListItemChangesResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListItemChangesWithKnowledgeSoapIn">
    <wsdl:part name="parameters" element="tns:GetListItemChangesWithKnowledge"/>
  </wsdl:message>
  <wsdl:message name="GetListItemChangesWithKnowledgeSoapOut">
    <wsdl:part name="parameters" element="tns:GetListItemChangesWithKnowledgeResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListItemChangesSinceTokenSoapIn">
    <wsdl:part name="parameters" element="tns:GetListItemChangesSinceToken"/>
  </wsdl:message>
  <wsdl:message name="GetListItemChangesSinceTokenSoapOut">
    <wsdl:part name="parameters" element="tns:GetListItemChangesSinceTokenResponse"/>
  </wsdl:message>
  <wsdl:message name="UpdateListItemsSoapIn">
    <wsdl:part name="parameters" element="tns:UpdateListItems"/>
  </wsdl:message>
  <wsdl:message name="UpdateListItemsSoapOut">
    <wsdl:part name="parameters" element="tns:UpdateListItemsResponse"/>
  </wsdl:message>
  <wsdl:message name="UpdateListItemsWithKnowledgeSoapIn">
    <wsdl:part name="parameters" element="tns:UpdateListItemsWithKnowledge"/>
  </wsdl:message>
  <wsdl:message name="UpdateListItemsWithKnowledgeSoapOut">
    <wsdl:part name="parameters" element="tns:UpdateListItemsWithKnowledgeResponse"/>
  </wsdl:message>
  <wsdl:message name="AddDiscussionBoardItemSoapIn">
    <wsdl:part name="parameters" element="tns:AddDiscussionBoardItem"/>
  </wsdl:message>
  <wsdl:message name="AddDiscussionBoardItemSoapOut">
    <wsdl:part name="parameters" element="tns:AddDiscussionBoardItemResponse"/>
  </wsdl:message>
  <wsdl:message name="AddWikiPageSoapIn">
    <wsdl:part name="parameters" element="tns:AddWikiPage"/>
  </wsdl:message>
  <wsdl:message name="AddWikiPageSoapOut">
    <wsdl:part name="parameters" element="tns:AddWikiPageResponse"/>
  </wsdl:message>
  <wsdl:message name="GetVersionCollectionSoapIn">
    <wsdl:part name="parameters" element="tns:GetVersionCollection"/>
  </wsdl:message>
  <wsdl:message name="GetVersionCollectionSoapOut">
    <wsdl:part name="parameters" element="tns:GetVersionCollectionResponse"/>
  </wsdl:message>
  <wsdl:message name="AddAttachmentSoapIn">
    <wsdl:part name="parameters" element="tns:AddAttachment"/>
  </wsdl:message>
  <wsdl:message name="AddAttachmentSoapOut">
    <wsdl:part name="parameters" element="tns:AddAttachmentResponse"/>
  </wsdl:message>
  <wsdl:message name="GetAttachmentCollectionSoapIn">
    <wsdl:part name="parameters" element="tns:GetAttachmentCollection"/>
  </wsdl:message>
  <wsdl:message name="GetAttachmentCollectionSoapOut">
    <wsdl:part name="parameters" element="tns:GetAttachmentCollectionResponse"/>
  </wsdl:message>
  <wsdl:message name="DeleteAttachmentSoapIn">
    <wsdl:part name="parameters" element="tns:DeleteAttachment"/>
  </wsdl:message>
  <wsdl:message name="DeleteAttachmentSoapOut">
    <wsdl:part name="parameters" element="tns:DeleteAttachmentResponse"/>
  </wsdl:message>
  <wsdl:message name="CheckOutFileSoapIn">
    <wsdl:part name="parameters" element="tns:CheckOutFile"/>
  </wsdl:message>
  <wsdl:message name="CheckOutFileSoapOut">
    <wsdl:part name="parameters" element="tns:CheckOutFileResponse"/>
  </wsdl:message>
  <wsdl:message name="UndoCheckOutSoapIn">
    <wsdl:part name="parameters" element="tns:UndoCheckOut"/>
  </wsdl:message>
  <wsdl:message name="UndoCheckOutSoapOut">
    <wsdl:part name="parameters" element="tns:UndoCheckOutResponse"/>
  </wsdl:message>
  <wsdl:message name="CheckInFileSoapIn">
    <wsdl:part name="parameters" element="tns:CheckInFile"/>
  </wsdl:message>
  <wsdl:message name="CheckInFileSoapOut">
    <wsdl:part name="parameters" element="tns:CheckInFileResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListContentTypesSoapIn">
    <wsdl:part name="parameters" element="tns:GetListContentTypes"/>
  </wsdl:message>
  <wsdl:message name="GetListContentTypesSoapOut">
    <wsdl:part name="parameters" element="tns:GetListContentTypesResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListContentTypesAndPropertiesSoapIn">
    <wsdl:part name="parameters" element="tns:GetListContentTypesAndProperties"/>
  </wsdl:message>
  <wsdl:message name="GetListContentTypesAndPropertiesSoapOut">
    <wsdl:part name="parameters" element="tns:GetListContentTypesAndPropertiesResponse"/>
  </wsdl:message>
  <wsdl:message name="GetListContentTypeSoapIn">
    <wsdl:part name="parameters" element="tns:GetListContentType"/>
  </wsdl:message>
  <wsdl:message name="GetListContentTypeSoapOut">
    <wsdl:part name="parameters" element="tns:GetListContentTypeResponse"/>
  </wsdl:message>
  <wsdl:message name="CreateContentTypeSoapIn">
    <wsdl:part name="parameters" element="tns:CreateContentType"/>
  </wsdl:message>
  <wsdl:message name="CreateContentTypeSoapOut">
    <wsdl:part name="parameters" element="tns:CreateContentTypeResponse"/>
  </wsdl:message>
  <wsdl:message name="UpdateContentTypeSoapIn">
    <wsdl:part name="parameters" element="tns:UpdateContentType"/>
  </wsdl:message>
  <wsdl:message name="UpdateContentTypeSoapOut">
    <wsdl:part name="parameters" element="tns:UpdateContentTypeResponse"/>
  </wsdl:message>
  <wsdl:message name="DeleteContentTypeSoapIn">
    <wsdl:part name="parameters" element="tns:DeleteContentType"/>
  </wsdl:message>
  <wsdl:message name="DeleteContentTypeSoapOut">
    <wsdl:part name="parameters" element="tns:DeleteContentTypeResponse"/>
  </wsdl:message>
  <wsdl:message name="UpdateContentTypeXmlDocumentSoapIn">
    <wsdl:part name="parameters" element="tns:UpdateContentTypeXmlDocument"/>
  </wsdl:message>
  <wsdl:message name="UpdateContentTypeXmlDocumentSoapOut">
    <wsdl:part name="parameters" element="tns:UpdateContentTypeXmlDocumentResponse"/>
  </wsdl:message>
  <wsdl:message name="UpdateContentTypesXmlDocumentSoapIn">
    <wsdl:part name="parameters" element="tns:UpdateContentTypesXmlDocument"/>
  </wsdl:message>
  <wsdl:message name="UpdateContentTypesXmlDocumentSoapOut">
    <wsdl:part name="parameters" element="tns:UpdateContentTypesXmlDocumentResponse"/>
  </wsdl:message>
  <wsdl:message name="DeleteContentTypeXmlDocumentSoapIn">
    <wsdl:part name="parameters" element="tns:DeleteContentTypeXmlDocument"/>
  </wsdl:message>
  <wsdl:message name="DeleteContentTypeXmlDocumentSoapOut">
    <wsdl:part name="parameters" element="tns:DeleteContentTypeXmlDocumentResponse"/>
  </wsdl:message>
  <wsdl:message name="ApplyContentTypeToListSoapIn">
    <wsdl:part name="parameters" element="tns:ApplyContentTypeToList"/>
  </wsdl:message>
  <wsdl:message name="ApplyContentTypeToListSoapOut">
    <wsdl:part name="parameters" element="tns:ApplyContentTypeToListResponse"/>
  </wsdl:message>
  <wsdl:portType name="ListsSoap">
    <wsdl:operation name="GetList">
      <wsdl:input message="tns:GetListSoapIn"/>
      <wsdl:output message="tns:GetListSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListAndView">
      <wsdl:input message="tns:GetListAndViewSoapIn"/>
      <wsdl:output message="tns:GetListAndViewSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="DeleteList">
      <wsdl:input message="tns:DeleteListSoapIn"/>
      <wsdl:output message="tns:DeleteListSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="AddList">
      <wsdl:input message="tns:AddListSoapIn"/>
      <wsdl:output message="tns:AddListSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="AddListFromFeature">
      <wsdl:input message="tns:AddListFromFeatureSoapIn"/>
      <wsdl:output message="tns:AddListFromFeatureSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UpdateList">
      <wsdl:input message="tns:UpdateListSoapIn"/>
      <wsdl:output message="tns:UpdateListSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListCollection">
      <wsdl:input message="tns:GetListCollectionSoapIn"/>
      <wsdl:output message="tns:GetListCollectionSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListItems">
      <wsdl:input message="tns:GetListItemsSoapIn"/>
      <wsdl:output message="tns:GetListItemsSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChanges">
      <wsdl:input message="tns:GetListItemChangesSoapIn"/>
      <wsdl:output message="tns:GetListItemChangesSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChangesWithKnowledge">
      <wsdl:input message="tns:GetListItemChangesWithKnowledgeSoapIn"/>
      <wsdl:output message="tns:GetListItemChangesWithKnowledgeSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChangesSinceToken">
      <wsdl:input message="tns:GetListItemChangesSinceTokenSoapIn"/>
      <wsdl:output message="tns:GetListItemChangesSinceTokenSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UpdateListItems">
      <wsdl:input message="tns:UpdateListItemsSoapIn"/>
      <wsdl:output message="tns:UpdateListItemsSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UpdateListItemsWithKnowledge">
      <wsdl:input message="tns:UpdateListItemsWithKnowledgeSoapIn"/>
      <wsdl:output message="tns:UpdateListItemsWithKnowledgeSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="AddDiscussionBoardItem">
      <wsdl:input message="tns:AddDiscussionBoardItemSoapIn"/>
      <wsdl:output message="tns:AddDiscussionBoardItemSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="AddWikiPage">
      <wsdl:input message="tns:AddWikiPageSoapIn"/>
      <wsdl:output message="tns:AddWikiPageSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetVersionCollection">
      <wsdl:input message="tns:GetVersionCollectionSoapIn"/>
      <wsdl:output message="tns:GetVersionCollectionSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="AddAttachment">
      <wsdl:input message="tns:AddAttachmentSoapIn"/>
      <wsdl:output message="tns:AddAttachmentSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetAttachmentCollection">
      <wsdl:input message="tns:GetAttachmentCollectionSoapIn"/>
      <wsdl:output message="tns:GetAttachmentCollectionSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="DeleteAttachment">
      <wsdl:input message="tns:DeleteAttachmentSoapIn"/>
      <wsdl:output message="tns:DeleteAttachmentSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="CheckOutFile">
      <wsdl:input message="tns:CheckOutFileSoapIn"/>
      <wsdl:output message="tns:CheckOutFileSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UndoCheckOut">
      <wsdl:input message="tns:UndoCheckOutSoapIn"/>
      <wsdl:output message="tns:UndoCheckOutSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="CheckInFile">
      <wsdl:input message="tns:CheckInFileSoapIn"/>
      <wsdl:output message="tns:CheckInFileSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListContentTypes">
      <wsdl:input message="tns:GetListContentTypesSoapIn"/>
      <wsdl:output message="tns:GetListContentTypesSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListContentTypesAndProperties">
      <wsdl:input message="tns:GetListContentTypesAndPropertiesSoapIn"/>
      <wsdl:output message="tns:GetListContentTypesAndPropertiesSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="GetListContentType">
      <wsdl:input message="tns:GetListContentTypeSoapIn"/>
      <wsdl:output message="tns:GetListContentTypeSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="CreateContentType">
      <wsdl:input message="tns:CreateContentTypeSoapIn"/>
      <wsdl:output message="tns:CreateContentTypeSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentType">
      <wsdl:input message="tns:UpdateContentTypeSoapIn"/>
      <wsdl:output message="tns:UpdateContentTypeSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="DeleteContentType">
      <wsdl:input message="tns:DeleteContentTypeSoapIn"/>
      <wsdl:output message="tns:DeleteContentTypeSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentTypeXmlDocument">
      <wsdl:input message="tns:UpdateContentTypeXmlDocumentSoapIn"/>
      <wsdl:output message="tns:UpdateContentTypeXmlDocumentSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentTypesXmlDocument">
      <wsdl:input message="tns:UpdateContentTypesXmlDocumentSoapIn"/>
      <wsdl:output message="tns:UpdateContentTypesXmlDocumentSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="DeleteContentTypeXmlDocument">
      <wsdl:input message="tns:DeleteContentTypeXmlDocumentSoapIn"/>
      <wsdl:output message="tns:DeleteContentTypeXmlDocumentSoapOut"/>
    </wsdl:operation>
    <wsdl:operation name="ApplyContentTypeToList">
      <wsdl:input message="tns:ApplyContentTypeToListSoapIn"/>
      <wsdl:output message="tns:ApplyContentTypeToListSoapOut"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ListsSoap" type="tns:ListsSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="GetList">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetList" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListAndView">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListAndView" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteList">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteList" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddList">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddList" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddListFromFeature">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddListFromFeature" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateList">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateList" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListCollection">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListCollection" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItems">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItems" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChanges">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItemChanges" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChangesWithKnowledge">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItemChangesWithKnowledge" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChangesSinceToken">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItemChangesSinceToken" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateListItems">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateListItems" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateListItemsWithKnowledge">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateListItemsWithKnowledge" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddDiscussionBoardItem">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddDiscussionBoardItem" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddWikiPage">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddWikiPage" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetVersionCollection">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetVersionCollection" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddAttachment">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddAttachment" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetAttachmentCollection">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetAttachmentCollection" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteAttachment">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteAttachment" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="CheckOutFile">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/CheckOutFile" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UndoCheckOut">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UndoCheckOut" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="CheckInFile">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/CheckInFile" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListContentTypes">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListContentTypes" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListContentTypesAndProperties">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListContentTypesAndProperties" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListContentType">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListContentType" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="CreateContentType">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/CreateContentType" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentType">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateContentType" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteContentType">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteContentType" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentTypeXmlDocument">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateContentTypeXmlDocument" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentTypesXmlDocument">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateContentTypesXmlDocument" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteContentTypeXmlDocument">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteContentTypeXmlDocument" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="ApplyContentTypeToList">
      <soap:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/ApplyContentTypeToList" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ListsSoap12" type="tns:ListsSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="GetList">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetList" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListAndView">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListAndView" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteList">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteList" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddList">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddList" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddListFromFeature">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddListFromFeature" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateList">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateList" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListCollection">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListCollection" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItems">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItems" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChanges">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItemChanges" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChangesWithKnowledge">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItemChangesWithKnowledge" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListItemChangesSinceToken">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItemChangesSinceToken" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateListItems">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateListItems" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateListItemsWithKnowledge">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateListItemsWithKnowledge" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddDiscussionBoardItem">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddDiscussionBoardItem" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddWikiPage">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddWikiPage" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetVersionCollection">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetVersionCollection" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="AddAttachment">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/AddAttachment" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetAttachmentCollection">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetAttachmentCollection" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteAttachment">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteAttachment" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="CheckOutFile">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/CheckOutFile" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UndoCheckOut">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UndoCheckOut" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="CheckInFile">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/CheckInFile" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListContentTypes">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListContentTypes" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListContentTypesAndProperties">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListContentTypesAndProperties" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetListContentType">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/GetListContentType" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="CreateContentType">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/CreateContentType" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentType">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateContentType" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteContentType">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteContentType" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentTypeXmlDocument">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateContentTypeXmlDocument" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UpdateContentTypesXmlDocument">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/UpdateContentTypesXmlDocument" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DeleteContentTypeXmlDocument">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/DeleteContentTypeXmlDocument" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="ApplyContentTypeToList">
      <soap12:operation soapAction="http://schemas.microsoft.com/sharepoint/soap/ApplyContentTypeToList" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Lists">
    <wsdl:port name="ListsSoap" binding="tns:ListsSoap">
      <soap:address location="https://my.sharepoint.site.com/_vti_bin/lists.asmx"/>
    </wsdl:port>
    <wsdl:port name="ListsSoap12" binding="tns:ListsSoap12">
      <soap12:address location="https://my.sharepoint.site.com/_vti_bin/lists.asmx"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Problem with nested element types

>>> h = client.help('AddSzamla')
>>> print h
AddSzamla(szla={u'InfoText': <type 'str'>, u'Ev': <type 'int'>, u'BtoKod': <type 'str'>, u'Sorszam': <type 'int'>, u'PartnerKod': <type 'str'>, u'TargyNap': <type 'datetime.datetime'>, u'UzeKod': <type 'int'>, u'IdegenSzlaAzonosito': <type 'str'>, u'Tetelek': [{u'WebTehelesiTetel': {u'InfoText': <type 'str'>, u'UzeKod': <type 'int'>, u'CikNum': <type 'int'>, u'Szekek': <type 'int'>, u'Mennyiseg': <alias 'double' for '<type 'float'>'>, u'BruttoOsszeg': <alias 'double' for '<type 'float'>'>, u'AfaOsszeg': <alias 'double' for '<type 'float'>'>, u'AfaNum': <type 'int'>}}], u'Fizetesek': [{u'WebFizetesiTetel': {u'InfoText': <type 'str'>, u'FizetesiMod': <type 'int'>, u'ValutaOsszege': <alias 'double' for '<type 'float'>'>, u'ValutaKod': <type 'str'>, u'Arfolyam': <alias 'double' for '<type 'float'>'>, u'Osszeg': <alias 'double' for '<type 'float'>'>, u'Res': {u'Src': <type 'int'>, u'Num': <type 'int'>}, u'Rst': {u'Src': <type 'int'>, u'Num': <type 'int'>}, u'Lak': {u'Src': <type 'int'>, u'Num': <type 'int'>}, u'KarKod': <type 'str'>, u'KartyaSzam': <type 'str'>, u'Tulajdonos': <type 'str'>}}]})
 -> {u'AddSzamlaResult': {u'Code': <type 'int'>, u'Message': <type 'str'>}}:

None
Headers: None

>>> res = client.AddSzamla(szla=dict(
...    Tetelek=[{'WebTehelesiTetel': dict(
...                    BruttoOsszeg=450.0,
...                )}],
... ))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-92-d7ec6fbb4e3d> in <module>()
      1 res = client.AddSzamla(szla=dict(
      2     Tetelek=[{'WebTehelesiTetel': dict(
----> 3                     BruttoOsszeg=450.0,
      4                 )}],
      5 

/usr/lib/python2.7/site-packages/pysimplesoap/client.pyc in <lambda>(*args, **kwargs)
    179             return lambda self=self, *args, **kwargs: self.call(attr, *args, **kwargs)
    180         else:  # using WSDL:
--> 181             return lambda *args, **kwargs: self.wsdl_call(attr, *args, **kwargs)
    182 
    183     def call(self, method, *args, **kwargs):

/usr/lib/python2.7/site-packages/pysimplesoap/client.pyc in wsdl_call(self, method, *args, **kwargs)
    344     def wsdl_call(self, method, *args, **kwargs):
    345         """Pre and post process SOAP call, input and output parameters using WSDL"""
--> 346         return self.wsdl_call_with_args(method, args, kwargs)
    347 
    348     def wsdl_call_with_args(self, method, args, kwargs):

/usr/lib/python2.7/site-packages/pysimplesoap/client.pyc in wsdl_call_with_args(self, method, args, kwargs)
    365         if header:
    366             self.__call_headers = sort_dict(header, self.__headers)
--> 367         method, params = self.wsdl_call_get_params(method, input, args, kwargs)
    368 
    369         # call remote procedure

/usr/lib/python2.7/site-packages/pysimplesoap/client.pyc in wsdl_call_get_params(self, method, input, args, kwargs)
    399             valid, errors, warnings = self.wsdl_validate_params(input, all_args)
    400             if not valid:
--> 401                 raise ValueError('Invalid Args Structure. Errors: %s' % errors)
    402             # sort and filter parameters acording wsdl input structure
    403             tree = sort_dict(input, all_args)

ValueError: Invalid Args Structure. Errors: [u"Type mismatch. parameter(<class 'pysimplesoap.helpers.Alias'>): <alias 'double' for '<type 'float'>'>, value(<type 'float'>): 450.0"]

Procedure not present?

Traceback (most recent call last):
File "/home/verwilst/code/test.py", line 10, in
response = client.getAssetByTag('abc123')
File "/usr/local/lib/python3.4/dist-packages/pysimplesoap/client.py", line 181, in
return lambda _args, *_kwargs: self.wsdl_call(attr, _args, *_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pysimplesoap/client.py", line 346, in wsdl_call
return self.wsdl_call_with_args(method, args, kwargs)
File "/usr/local/lib/python3.4/dist-packages/pysimplesoap/client.py", line 370, in wsdl_call_with_args
response = self.call(method, *params)
File "/usr/local/lib/python3.4/dist-packages/pysimplesoap/client.py", line 274, in call
detail)
pysimplesoap.client.SoapFault: SOAP-ENV:Server: Procedure 'getAssetByTagIn' not present

I'm seeing the client ( with Trace=True ) doing this request:

'<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;\n&lt;soap:Header/&gt;\n&lt;soap:Body&gt;\n <getAssetByTagIn xmlns="http://www.w3.org/2001/XMLSchema"&gt;\n <assetTag>abc123</assetTag></getAssetByTagIn>\n</soap:Body>\n</soap:Envelope>'

While ( when i do it in SoapUI ), it sends this:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://127.0.0.1/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:getAssetByTag soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<assetTag xsi:type="xsd:string">abc123</assetTag>
</soap:getAssetByTag>
</soapenv:Body>
</soapenv:Envelope>

Why is pysimplesoap sending such a different request to the SOAP server?

Thanks!

Iterables in not parsed correct for some values of `PYTHONHASHSEED`

Consider the following client code

from pysimplesoap.client import SoapClient
client = SoapClient(wsdl="http://127.0.0.1:8000?WSDL", trace=False)
print(client.sayHello())

And a server that uses the following handle function

def sayHello():
    return 2* ['Hello World', 'Hello World']

When running python3 you will get mixed results. Sometime the client will print {'sayHelloResult': {'string': 'Hello World'}} and some times it will print {'sayHelloResult': [{'string': 'Hello World'}, {'string': 'Hello World'}]}.

I figured out that this depend on the value of the environment variable PYTHONHASHSEED.

soap2py is still registered

Hi,
in setup.py we can find

# in the transition, register both:
for name in ('soap2py', 'PySimpleSOAP'):

it's a bit unclear if the transition is over and thus we can remove the registration of soap2py

thanks
Sandro

Alias in TYPE_MAP check can fail.

At https://github.com/pysimplesoap/pysimplesoap/blob/master/pysimplesoap/client.py#L441 there is a check to see if a struct is in the TYPE_MAP where there are defined aliases.

It is possible to have a spec where an Alias is part of the operation's inputs.

Although this Alias is identical to the one in the TYPE_MAP, it appears to be referentially different. This will cause the type check to incorrectly fail.

I've worked around this issue within my own project by doing the following:

    alias =  self.client.services.values()[0]['ports'].values()[0]['operations']['OPERATION_WITH_DOUBLE']['input']['OPERATION_WITH_DOUBLE']['DOUBLE_VALUE']
    # alias is now <alias 'double' for '<type 'float'>'>
    pysimplesoap.helpers.TYPE_MAP[alias] = 'float'

Latest release does not actually support Python 3

As seen in #97, the latest release (1.16) has syntax that is incompatible with Python 3, while the project page says that Python 3 is supported. Current master branch works great in Python 3, so I suggest making a new release ASAP, because Python 3 support is very important.

EDIT: For anyone who encounters this problem: you can install packages directly from github with pip:

pip install -e [email protected]:pysimplesoap/pysimplesoap.git@7078d1a34554719fd8fb432a9e79ce356c0e751d#egg=PySimpleSOAP-master

This will install development version of pysimplesoap which might be unstable, but works just fine with python 3.
You can change the commit hash to a branch name or a tag name. For more info on using pip with CVS see this link.

iteritems error in python 3.5

Leftovers of old syntax:

Installing collected packages: pysimplesoap
  Running setup.py install for pysimplesoap
Successfully installed pysimplesoap-1.16
(env) [shipperizer@archer portal]$ python
Python 3.5.0 (default, Sep 20 2015, 11:28:25) 
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysimplesoap
>>> from pysimplesoap.client import SoapClient
>>> client = SoapClient(wsdl="http://localhost:8080/services/AdministrationService?wsdl", trace=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shipperizer/development/portal/env/lib/python3.5/site-packages/pysimplesoap/client.py", line 173, in __init__
    self.services = wsdl and self.wsdl_parse(wsdl, cache=cache)
  File "/home/shipperizer/development/portal/env/lib/python3.5/site-packages/pysimplesoap/client.py", line 836, in wsdl_parse
    services = self._xml_tree_to_services(wsdl, cache, force_download)
  File "/home/shipperizer/development/portal/env/lib/python3.5/site-packages/pysimplesoap/client.py", line 757, in _xml_tree_to_services
    for name, msg in op['fault_msgs'].iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Add some missing types to reverseTypeMap

Some data types, defined by .NET soap generators are missing from typeMap. REVERSE_TYPE_MAP should be updated like this:

REVERSE_TYPE_MAP.update({
    'base64Binary': str,
    'unsignedByte': byte,
    'unsignedInt': int,
    'unsignedLong': long,
    'unsignedShort': short
})

@dotnetdan, this issue is originated from #42

self=self in lambda expression in method dispatch

Hallo pysimplesoap devs and thanks for a great lib.

We recently wanted to use pysimplesoap for SoCo, but we ran into some problems using the method dispatch for "without WSDL" and with the elements listed as args. The problem we have, is that the service we want to connect with, is dependent on a specific order of the elements. This means that we cannot use the keyword form of the call spec. When reading through the code, one discovers that it should be possible to call it with the elements as (tag_name, value) args. But when doing that with the method dispatch, one gets an exception AttributeError: 'int' object has no attribute 'call'. I did not save a traceback, but I can re-create the behavior with this test code:

class Foo(object):
    def __getattr__(self, attr):
        return lambda *args, **kwargs: self.call(attr, *args, **kwargs)

    def call(self, attr, *args, **kwargs):
        print "self", self
        print "attr", attr
        print "args", args
        print "kwargs", kwargs

class Bar(object):
    def __getattr__(self, attr):
        return lambda self=self, *args, **kwargs: self.call(attr, *args, **kwargs)

    def call(self, attr, *args, **kwargs):
        print "attr", attr
        print "args", args
        print "kwargs", kwargs

if __name__ == '__main__':
    foo = Foo()
    print "No self=self"
    print "\nargs only"
    foo.fancy_name(1, 2, 3)
    print "\nkwargs only"
    foo.fancy_name(c=4, d=5, e=6)
    print "\nmixed"
    foo.fancy_name(1, 2, 3, c=4, d=5, e=6)

    print "\n\nWith self=self"
    bar = Bar()
    print "\nargs only"
    bar.fancy_name(1, 2, 3)
    print "\nkwargs only"
    bar.fancy_name(c=4, d=5, e=6)
    print "\nmixed"
    bar.fancy_name(1, 2, 3, c=4, d=5, e=6)

If we use the call method directly with the method name as first arg, it works fine.

At a glance, and the way I understand the lambdas, that something=something syntax is used to lock a lambda call value to the value it had at lambda creation time, but I do not see why that should be necessary here (if it is even possible with mutable objects), or why it should be any different from the WSDL case two lines below.

It may of course just be that I missed something, so I look forward to your input.

If you require the actual traceback, I can re-create it for you.

Regards Kenneth

Example SoapServer using SSL?

Can anyone provide an example of using SoapServer with SSL (HTTPS)? The wiki page doesn't give any clues (for someone new to PySimpleSoap and the Python server implementation in general.

Thanks.

Python 3 should be specified in setup.py

This is helpful for CLI tools like "caniusepython3". I erroneously thought this lib didn't have python 3 support because of that.
Fixing this is easy. In setup.py:

classifiers=[
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 3',
],

Args keys not in parameter error for Complex Types

I'm running into the same issue that was described (and reportedly patched) in the Google Code Issue here https://code.google.com/p/pysimplesoap/issues/detail?id=141

I'm trying to make the following call:

qualifyProductRequest = {'endCSN':'0280147370'}
a = client.qualifyProduct(parameters=qualifyProductRequest)

I get the following error when making this call.

ValueError: Invalid Args Structure. Errors: [u"Args keys not in parameter. parameter: {}, args: {'endCSN': '0280147370'}"]

and running

client.help(qualifyProduct)

returns the following as the method's input

qualifyProduct(parameters={})

From reading the WSDL files, qualifyProduct takes a qualifyProductRequest, which can contain (only) one of a number of Complex Types that define different products that can be qualified.

I've successfully been able to make a call sing PHP's SoapClient as described here: http://stackoverflow.com/questions/32473302/calling-a-complextype-as-a-function-in-pysimplesoap, but the same/similar Python syntax doesn't work.

Sending a call and retrieving the xml output response.

Because of issues I would like to get the raw response from the call I make in pysimplesoap. That way soap can make the calls and I can manually parse the xml when I need to. Is there a parameter to make that happen or should I create the feature?

SoapClient() raises "Part not found"

When trying to create a SoapClient, an exception is thrown:

DEBUG:pysimplesoap.client:Parsing wsdl url: file:///root/ds/sample.wsdl
INFO:pysimplesoap.helpers:Fetching url file:///root/ds/sample.wsdl using urllib2
ERROR:pysimplesoap.helpers:Part  not found for getStatusRequest
Unable to create SOAP client: 'NoneType' object is not iterable

Tested with today's git as well as older versions.

The WSDL is properly parsed by other SOAP libraries.

sample.wsdl:

<?xml version = '1.0' encoding = 'UTF-8'?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://services.org/MySvc/" name="MySvc" targetNamespace="http://services.org/MySvc/">
    <types>
        <xsd:schema targetNamespace="http://www.example.org/MySvc/"/>
    </types>
    <message name="getStatusRequest">
        <part name="p1" type="xsd:string"/>
        <part name="p2" type="xsd:int"/>
        <part name="p3" type="xsd:string"/>
        <part name="p4" type="xsd:string"/>
        <part name="p5" type="xsd:string"/>
    </message>
    <message name="getStatusResponse">
        <part name="r1" type="xsd:long"/>
        <part name="r2" type="xsd:long"/>
        <part name="r3" type="xsd:string"/>
        <part name="r4" type="xsd:string"/>
        <part name="r5" type="xsd:int"/>
    </message>
    <portType name="MySvc">
        <operation name="getStatus">
            <input message="tns:getStatusRequest"/>
            <output message="tns:getStatusResponse"/>
        </operation>
    </portType>
    <binding name="MySvcBinding1_5" type="tns:MySvc">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getStatus">
            <soap:operation soapAction="http://services.org/MySvc/getStatus"/>
            <input>
                <soap:body use="literal" namespace="http://services.org/MySvc/"/>
            </input>
            <output>
                <soap:body use="literal" namespace="http://services.org/MySvc/"/>
            </output>
        </operation>
    </binding>
    <service name="MySvc">
        <port name="MySvcSOAP1_5" binding="tns:MySvcBinding1_5">
            <soap:address location="http://services.org/services"/>
        </port>
    </service>
</definitions>

The code:

#!/usr/bin/python
from pysimplesoap.client import SoapClient
try:
    client = SoapClient(wsdl='file:///root/ds/sample.wsdl', trace=True)
except Exception, e:
    print 'Unable to create SOAP client: %s' % str(e)

Can't implement wsdl that specifies a fault

I am trying to re-implement a server for an existing wsdl file which for various reasons I can't change. I have a wdsl file that specifies an operation with a fault definition like this:-

    <element name="SomethingError">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="code" type="xsd:integer"/>
                        <xsd:element name="desc" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </element>

    <message name="SomethingFault">
        <part name="fault" element="tns:SomethingError"/>
    </message>

    <wsdl:operation name="doSomething">
            <wsdl:input message="tns:doSomethingRequest" name="doSomethingRequest"/>
            <wsdl:output message="tns:doSomethingResponse" name="doSomethingResponse"/>
            <fault name="faultMessage" message="tns:SomethingFault"/>
        </wsdl:operation>

I added a CustomSoapFault class in server.py that must be constructed with a dict.

class CustomSoapFault(Exception):
    def __init__(self, faultDict):
        self.faultDict = faultDict

And where the SoapFault exception is caught added

        except CustomSoapFault as e:
            fault.update( e.faultDict )

Now the application can return any fault type by raising CustomSoapFault with dict.

Non-deterministic results after processing SOAP-reply.

I've spent most of Friday seeing if I could run/fix the test sets, and ran into some interesting issues. For example, in the issues_test set, test_issue109 sometimes succeeds, and sometimes fails; even when I record the response from the server and just play it back (vcrpy ftw)

test_issue109 tests multirefs, and some runs response['doEnsembleURIQueryReturn'] is None, and other times it's the expected list of returnvalues.

I've also run into a non-determinism issue with the sri_ec_test set, the result of the first test sometimes contains lists, and sometimes not. (NB the second test does not seem to be viable any more)

I think some other tests also succeed/fail randomly (after recording the server response so as to eliminate that variable), but I forgot to write those down. If I find some more time (coming Friday) I may add those and finish my work on the tests.

Problem with Soap request to Dolibarr web service

Hi everyone,

I've a big problem to talk to a Dolibarr database with soapserver. Indeed, when I try to retrieve Users values the python command prompt show me an empty response.

I try to understand Dolibarr doc, but it's insane !
Yhapps.com it's my web application

dolibarr list of ws : http://barrdoli.yhapps.com/webservices/
getUser WS : http://barrdoli.yhapps.com/webservices/server_user.php#
wsdl User : http://barrdoli.yhapps.com/webservices/server_user.php?wsdl

My soapservice.views.py

# A simple views.py file sample for dispatcher
from pysimplesoap.client import SoapClient, SoapFault

def listThirdParties():
    # create a simple consumer
    try:
        # client = SoapClient(
        # "http://barrdoli.yhapps.com/webservices/server_user.php")
        # print(client) 
        client = SoapClient(
            location = "http://barrdoli.yhapps.com/",
            action = 'http://barrdoli.yhapps.com/', # SOAPAction
            namespace = "http://barrdoli.yhapps.com/webservices/server_user.php?wsdl", 
            soap_ns='soap',
            trace = True,
            ns = False)
        print("connected bitch")
    except:
        print("error connect")

    auth = dict()
    auth['dolibarrkey'] = 'eab098********************1364d6700b7'
    auth['sourceapplication'] = 'user'
    auth['login'] = '********'
    auth['password'] = '*********'
    auth['entity'] = ''

    # call the remote method
    response = client.call(method='getUser', authentication=auth, id=1)

    # extract and convert the returned value
    # result = response.getUser
    # return int(result)
    print(response.callResult)
    pass
Python 3.4.3 (default, May 30 2015, 02:34:55) 
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from soapservice.views import listThirdParties
>>> from soapservice.views import listThirdParties
>>> listThirdParties()
connected bitch
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Library/WebServer/Documents/lesal-sppahy/sales/soapservice/views.py", line 29, in listThirdParties
    response = client.call(method='getUser', authentication=auth, id=1)
  File "/Users/geoffreytrambolho/.virtualenvs/sales.yhapps/lib/python3.4/site-packages/pysimplesoap/client.py", line 262, in call
    jetty=self.__soap_server in ('jetty',))
  File "/Users/geoffreytrambolho/.virtualenvs/sales.yhapps/lib/python3.4/site-packages/pysimplesoap/simplexml.py", line 56, in __init__
    self.__document = xml.dom.minidom.parseString(text)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/xml/dom/minidom.py", line 1970, in parseString
    return expatbuilder.parseString(string)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/xml/dom/expatbuilder.py", line 925, in parseString
    return builder.parseString(string)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 32, column 110
>>> 

Can you help me to fix it please ?

Thanks you

Array of array problem in validation

I have problem with system which want on input dict, which is located in two arrays. I have this variable in Python, which I passing as argument to soap function:

variables_key = [
[
{
'IsKey': True,
'Key': 'GUID',
'Value': '2905a75f-414d-44d5-ba0c-c4307c92666f'
}
]
]

In this attachment is WSDL regarding types used in this application. Argument is using type ArrayOfArrayOfKeyValuePair.
wsdl.xml.txt

When I run query with this argument, script fails with error TypeError: unhashable type: 'dict' in client.py:465. I've tried some debugging and I believe that there is some bug in validation function or in completing struct. Issue is that struct seems like that:
[{u'ArrayOfKeyValuePair': [{u'KeyValuePair': {u'IsKey': <type 'bool'>, u'Key': <type 'str'>, u'Value': <type 'str'>}}]}]

When validation function starts validating first array, it consider struct as dict (because struct is u'ArrayOfKeyValuePair': ...) and starts iterating list. So it takes first value of list (which is dict) and test if it's in struct. And condition dict in dict fails because dict can't be key of dict.

Arrays of complex elements in SOAP response returns SimpleXmlNode

I've run into a problem with unmarshalling complex types from arrays encoded with SOAP-ENC:arrayType type definition.

One of the web services I am working with returns most of the contents as arrays of complex types defined with xsi:type and SOAP-ENC:arrayType, with children stored as item elements.

Here is the example fragment from the response:

<hotspots_zones SOAP-ENC:arrayType="ns1:hotspotsZonesType[6]" xsi:type="ns1:hotspotsZonesArrayType">
     <item xsi:type="ns1:hotspotsZonesType">
        <enabled xsi:type="xsd:boolean">false</enabled>
        <shop_id xsi:type="xsd:int">1</shop_id>
        <promotion xsi:type="xsd:boolean">false</promotion>
        <discount xsi:type="xsd:boolean">false</discount>
        <distinguished xsi:type="xsd:boolean">false</distinguished>
        <special xsi:type="xsd:boolean">false</special>
     </item>
     (...5 more)
</hotspot>

In this particular case what I get are SimpleXmlElements for each item, instead of unmarshalled dictionaries.

'hotspots_zones': [{'item': <item xsi:type="ns1:hotspotsZonesType"> (...)

When I tinker with the response before it reaches pysimplesoap so that item elements are not named item but after the particular type as such:

<hotspots_zones SOAP-ENC:arrayType="ns1:hotspotsZonesType[6]" xsi:type="ns1:hotspotsZonesArrayType">
     <hotspotsZonesType xsi:type="ns1:hotspotsZonesType">
         (...)
     </hotspotsZonesType>
     (...5 more)
</hotspot>

it works like a charm. I can also reach the desired effect by mangling what comes from WSDL with client.services and changing the key hotspotsZonesType in

services['getProductsService']['ports'][...]['hotspots_zones'][0]['hotspotsZonesType']

into

services['getProductsService']['ports'][...]['hotspots_zones'][0]['item']

to trick the parser into digging into those item elements inside the array, but this solution is unfeasible due to the size and frequency of changes in the aforementioned WSDL.

Am I missing something or are arrays of complex types declared using xsi:type and SOAP-ENC:arrayType not supported at all?

Thank you!

When passing an invalid datetime to the server the exception is not caught

When passing an invalid datetime to the server an IndexError is thrown and not correctly handled.

In simplexml.py following exceptions are handled:

                except (ValueError, TypeError) as e:
                    raise ValueError("Tag: %s: %s" % (name, e))

However when parsing a datetime with for example the value "1" an index error is thrown as shown in the returned SOAP fault:

     <faultcode>Client.IndexError</faultcode>
     <faultstring>string index out of range</faultstring>

Propose to also catch the IndexError and have same handling as the ValueError and TypeError.

Interop problem with Apache CXF causes "Found element {<namespace>}<returnMessageName> but could not find matching RPC/Literal part" when using rpc/literal

Basically, Apache CXF expects no namespaces in response message, but currently xml default namespace is set for response message if a global namespace is used.

At https://github.com/pysimplesoap/pysimplesoap/blob/master/pysimplesoap/server.py#L256
the WS main namespace is added to the response message, and at:
https://github.com/pysimplesoap/pysimplesoap/blob/master/pysimplesoap/simplexml.py#L75
"xmlns=" is set, but it seems that Apache CXF expects for rpc / literal no namespaces.

Python3 give syntax errors when installing from pypi

$ pip3 install PySimpleSOAP
Downloading/unpacking PySimpleSOAP
  Downloading PySimpleSOAP-1.16.tar.gz
  Running setup.py (path:/tmp/pip_build_root/PySimpleSOAP/setup.py) egg_info for package PySimpleSOAP


Installing collected packages: PySimpleSOAP
  Running setup.py install for PySimpleSOAP
      File "/opt/python34/lib/python3.4/site-packages/pysimplesoap/c14n.py", line 177
        raise TypeError, str(node)
                       ^
    SyntaxError: invalid syntax

      File "/opt/python34/lib/python3.4/site-packages/pysimplesoap/xmlsec.py", line 206
        print canonicalize(sample_xml)
                         ^
    SyntaxError: invalid syntax


      File "/opt/python34/lib/python3.4/site-packages/pysimplesoap/c14n.py", line 177
        raise TypeError, str(node)
                       ^
    SyntaxError: invalid syntax

      File "/opt/python34/lib/python3.4/site-packages/pysimplesoap/xmlsec.py", line 206
        print canonicalize(sample_xml)
                         ^
    SyntaxError: invalid syntax


Successfully installed PySimpleSOAP
Cleaning up...

Client doesn't handle self-signed certificate?

If I connect to a server (https) with a self signed certificate I get the following error:

    raise ValueError("check_hostname needs a SSL context with "
ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.