summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2010-04-05 19:51:57 +0000
committerjortel <devnull@localhost>2010-04-05 19:51:57 +0000
commit51757ebeda57aad373db3168e04636acc7d44955 (patch)
treea172d76c848d919826060691f6cb88db70286a44
parent82a9d5e19422b233461fb035473c21c42da8ded2 (diff)
downloadsuds-51757ebeda57aad373db3168e04636acc7d44955.tar.gz
Change content-type http header to be: 'text/xml; charset=utf-8' per ticket 251. Also, add <?xml version='1.0' encoding='UTF-8'>
-rw-r--r--suds/__init__.py2
-rw-r--r--suds/bindings/binding.py7
-rw-r--r--suds/client.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/suds/__init__.py b/suds/__init__.py
index 24853ce..6a9cacc 100644
--- a/suds/__init__.py
+++ b/suds/__init__.py
@@ -27,7 +27,7 @@ import sys
#
__version__ = '0.4'
-__build__="(beta) R669-20100331"
+__build__="(beta) R671-20100405"
#
# Exceptions
diff --git a/suds/bindings/binding.py b/suds/bindings/binding.py
index 5f9b9e4..959c339 100644
--- a/suds/bindings/binding.py
+++ b/suds/bindings/binding.py
@@ -22,6 +22,7 @@ from logging import getLogger
from suds import *
from suds.sax import Namespace
from suds.sax.parser import Parser
+from suds.sax.document import Document
from suds.sax.element import Element
from suds.sudsobject import Factory, Object
from suds.mx import Content
@@ -109,8 +110,8 @@ class Binding:
@type args: list
@param kwargs: Named (keyword) args for the method invoked.
@type kwargs: dict
- @return: The soap message.
- @rtype: str
+ @return: The soap envelope.
+ @rtype: L{Document}
"""
content = self.headercontent(method)
@@ -123,7 +124,7 @@ class Binding:
env.promotePrefixes()
else:
env.refitPrefixes()
- return env
+ return Document(env)
def get_reply(self, method, reply):
"""
diff --git a/suds/client.py b/suds/client.py
index b91a7da..a67e50f 100644
--- a/suds/client.py
+++ b/suds/client.py
@@ -640,7 +640,7 @@ class SoapClient:
@rtype: dict
"""
action = self.method.soap.action
- stock = { 'Content-Type' : 'text/xml', 'SOAPAction': action }
+ stock = { 'Content-Type' : 'text/xml; charset=utf-8', 'SOAPAction': action }
result = dict(stock, **self.options.headers)
log.debug('headers = %s', result)
return result