def bind_xml_xsd(): import pkg_resources import os.path from suds.xsd.sxbasic import Import xml_xsd_url = 'file://%s' % os.path.abspath( pkg_resources.resource_filename('ewsclient', 'xml.xsd')) Import.bind('http://www.w3.org/XML/1998/namespace', xml_xsd_url)
def bind_schema_to_location(self, namespace, location): """Sets the `location` for the given `namespace` of a schema. This is for when an import statement specifies a schema but not its location. If the schemaLocation is present and incorrect, this will not override that. Bound schemas are shared amongst all instances of SudsLibrary. Schemas should be bound if necessary before `Add Doctor Import` or `Create Soap Client` where appropriate. """ BasicImport.bind(namespace, location)
# along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from chimera.util.position import Position import chimera.util.etree.ElementTree as ET from chimera.core.exceptions import ObjectNotFoundException from xml.parsers.expat import ExpatError import chimera.core.log import logging logging.getLogger("suds").setLevel(1000000000) from suds.xsd.sxbasic import Import Import.bind('http://schemas.xmlsoap.org/soap/encoding/') from suds.client import Client class Simbad (object): WSDL = 'http://cdsws.u-strasbg.fr/axis/services/Sesame?wsdl' __cache = {} __client = None @staticmethod def lookup (name): if not Simbad.__client:
# You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. from chimera.util.position import Position from xml.etree import ElementTree as ET from chimera.core.exceptions import ObjectNotFoundException from xml.parsers.expat import ExpatError import logging logging.getLogger("suds").setLevel(1000000000) from suds.xsd.sxbasic import Import Import.bind('http://schemas.xmlsoap.org/soap/encoding/') from suds.client import Client class Simbad(object): WSDL = 'http://cdsws.u-strasbg.fr/axis/services/Sesame?wsdl' __cache = {} __client = None @staticmethod def lookup(name): if not Simbad.__client:
from suds.client import Client from suds.xsd.sxbasic import Import url="https://www.usaepay.com/soap/gate/26FA8F7A/usaepay.wsdl" imp = Import('http://schemas.xmlsoap.org/soap/encoding/', location='http://schemas.xmlsoap.org/soap/encoding/') imp.filter.add('http://ws.client.com/Members.asmx') client = Client(url,plugins=[ImportDoctor(imp)]