Browse Source

Revert "remove import string"

This reverts commit 8b9e5903e6.
main
Julien Iguchi-Cartigny 10 years ago
parent
commit
9469ecc418
2 changed files with 12 additions and 15 deletions
  1. +11
    -10
      wstools/Utility.py
  2. +1
    -5
      wstools/XMLSchema.py

+ 11
- 10
wstools/Utility.py View File

@@ -21,6 +21,7 @@ import types
import socket
import weakref
from os.path import isfile
from string import join, strip, split
from UserDict import UserDict
import urllib

@@ -293,7 +294,7 @@ class DOM:
def GetSOAPEnvUri(self, version):
"""Return the appropriate SOAP envelope uri for a given
human-friendly SOAP version string (e.g. '1.1')."""
attrname = 'NS_SOAP_ENV_%s' % version.split('.').join('_')
attrname = 'NS_SOAP_ENV_%s' % join(split(version, '.'), '_')
value = getattr(self, attrname, None)
if value is not None:
return value
@@ -304,7 +305,7 @@ class DOM:
def GetSOAPEncUri(self, version):
"""Return the appropriate SOAP encoding uri for a given
human-friendly SOAP version string (e.g. '1.1')."""
attrname = 'NS_SOAP_ENC_%s' % version.split('.').join('_')
attrname = 'NS_SOAP_ENC_%s' % join(split(version, '.'), '_')
value = getattr(self, attrname, None)
if value is not None:
return value
@@ -315,7 +316,7 @@ class DOM:
def GetSOAPActorNextUri(self, version):
"""Return the right special next-actor uri for a given
human-friendly SOAP version string (e.g. '1.1')."""
attrname = 'SOAP_ACTOR_NEXT_%s' % version.split('.').join('_')
attrname = 'SOAP_ACTOR_NEXT_%s' % join(split(version, '.'), '_')
value = getattr(self, attrname, None)
if value is not None:
return value
@@ -393,7 +394,7 @@ class DOM:
)

def GetWSDLUri(self, version):
attr = 'NS_WSDL_%s' % version.split('.').join('_')
attr = 'NS_WSDL_%s' % join(split(version, '.'), '_')
value = getattr(self, attr, None)
if value is not None:
return value
@@ -402,7 +403,7 @@ class DOM:
)

def GetWSDLSoapBindingUri(self, version):
attr = 'NS_SOAP_BINDING_%s' % version.split('.').join('_')
attr = 'NS_SOAP_BINDING_%s' % join(split(version, '.'), '_')
value = getattr(self, attr, None)
if value is not None:
return value
@@ -411,7 +412,7 @@ class DOM:
)

def GetWSDLHttpBindingUri(self, version):
attr = 'NS_HTTP_BINDING_%s' % version.split('.').join('_')
attr = 'NS_HTTP_BINDING_%s' % join(split(version, '.'), '_')
value = getattr(self, attr, None)
if value is not None:
return value
@@ -420,7 +421,7 @@ class DOM:
)

def GetWSDLMimeBindingUri(self, version):
attr = 'NS_MIME_BINDING_%s' % version.split('.').join('_')
attr = 'NS_MIME_BINDING_%s' % join(split(version, '.'), '_')
value = getattr(self, attr, None)
if value is not None:
return value
@@ -429,7 +430,7 @@ class DOM:
)

def GetWSDLHttpTransportUri(self, version):
attr = 'NS_SOAP_HTTP_%s' % version.split('.').join('_')
attr = 'NS_SOAP_HTTP_%s' % join(split(version, '.'), '_')
value = getattr(self, attr, None)
if value is not None:
return value
@@ -554,9 +555,9 @@ class DOM:
if nodetype == child.TEXT_NODE or \
nodetype == child.CDATA_SECTION_NODE:
result.append(child.nodeValue)
value = result.join('')
value = join(result, '')
if preserve_ws is None:
value = value.strip()
value = strip(value)
return value

def findNamespaceURI(self, prefix, node):


+ 1
- 5
wstools/XMLSchema.py View File

@@ -22,11 +22,7 @@ import warnings
import logging
from Namespaces import SCHEMA, XMLNS, SOAP, APACHE
from Utility import DOM, DOMException, Collection, SplitQName, basejoin

try:
from io import StringIO
except ImportError:
from cStringIO import StringIO
from StringIO import StringIO

# If we have no threading, this should be a no-op
try:


Loading…
Cancel
Save