diff --git a/README.md b/README.md index 3ff2008d..1eb09423 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Code coverage: Support ------- -For community support, please fell free to fill an [issue](https://github.com/pysimplesoap/pysimplesoap/issues/new) or send a email to [soap@python.org](https://mail.python.org/mailman/listinfo/soap). +For community support, please fell free to fill an [issue](https://github.com/pysimplesoap/pysimplesoap/issues/new) or send an email to [soap@python.org](https://mail.python.org/mailman/listinfo/soap). Please do not add comment to wiki pages if you have technical questions. For priority commercial technical support, you can contact [Mariano Reingart](mailto:reingart@gmail.com) (project creator and main maintainer, see [AUTHORS](AUTHORS.md) for more info). diff --git a/pysimplesoap/__init__.py b/pysimplesoap/__init__.py index f62376dc..a00e0f93 100644 --- a/pysimplesoap/__init__.py +++ b/pysimplesoap/__init__.py @@ -8,7 +8,7 @@ __author_email__ = "reingart@gmail.com" __copyright__ = "Copyright (C) 2013 Mariano Reingart" __license__ = "LGPL 3.0" -__version__ = "1.16" +__version__ = "1.16.2" TIMEOUT = 60 diff --git a/pysimplesoap/client.py b/pysimplesoap/client.py index 2518bcab..48eefad2 100755 --- a/pysimplesoap/client.py +++ b/pysimplesoap/client.py @@ -300,7 +300,7 @@ def send(self, method, xml): } if self.action is not None: - headers['SOAPAction'] = soap_action + headers['SOAPAction'] = '"' + soap_action + '"' headers.update(self.http_headers) log.info("POST %s" % location) diff --git a/pysimplesoap/helpers.py b/pysimplesoap/helpers.py index b6e6ce04..49c07d22 100644 --- a/pysimplesoap/helpers.py +++ b/pysimplesoap/helpers.py @@ -237,7 +237,7 @@ def process_element(elements, element_name, node, element_type, xsd_uri, key = make_key(type_name, ref_type, fn_namespace) fn = elements.setdefault(key, Struct(key)) - if e['maxOccurs'] == 'unbounded' or (uri == soapenc_uri and type_name == 'Array'): + if (e['maxOccurs'] == 'unbounded' or int(e['maxOccurs'] or 0) > 1) or (uri == soapenc_uri and type_name == 'Array'): # it's an array... TODO: compound arrays? and check ns uri! if isinstance(fn, Struct): if len(children) > 1 or (dialect in ('jetty', )): diff --git a/pysimplesoap/transport.py b/pysimplesoap/transport.py index 9c27fc56..8e541d18 100644 --- a/pysimplesoap/transport.py +++ b/pysimplesoap/transport.py @@ -16,6 +16,8 @@ import logging import ssl import sys +from distutils.version import LooseVersion + try: import urllib2 from cookielib import CookieJar @@ -62,7 +64,7 @@ def supports_feature(cls, feature_name): # try: import httplib2 - if sys.version > '3' and httplib2.__version__ <= "0.7.7": + if sys.version > '3' and LooseVersion(httplib2.__version__) <= LooseVersion("0.7.7"): import http.client # httplib2 workaround: check_hostname needs a SSL context with either # CERT_OPTIONAL or CERT_REQUIRED @@ -92,9 +94,9 @@ def __init__(self, timeout, proxy=None, cacert=None, sessions=False): log.info("using proxy %s" % proxy) # set optional parameters according to supported httplib2 version - if httplib2.__version__ >= '0.3.0': + if LooseVersion(httplib2.__version__) >= LooseVersion('0.3.0'): kwargs['timeout'] = timeout - if httplib2.__version__ >= '0.7.0': + if LooseVersion(httplib2.__version__) >= LooseVersion('0.7.0'): kwargs['disable_ssl_certificate_validation'] = cacert is None kwargs['ca_certs'] = cacert httplib2.Http.__init__(self, **kwargs) diff --git a/setup.py b/setup.py index 9e08f5ff..19621293 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ long_description=long_desc, author=__author__, author_email=__author_email__, - url='http://code.google.com/p/pysimplesoap', + url='https://github.com/pysimplesoap/pysimplesoap', packages=['pysimplesoap'], license=__license__, # console=['client.py'],