Skip to content

Instantly share code, notes, and snippets.

@spac3
Created November 17, 2015 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spac3/b1bf88e1f840f80613ca to your computer and use it in GitHub Desktop.
Save spac3/b1bf88e1f840f80613ca to your computer and use it in GitHub Desktop.
from pysimplesoap.client import SoapClient
client = SoapClient(wsdl="https://server/wsdl/SessionAdminService.wsdl",trace=True, action="https://server/soap",cert=None, , cacert=None)
response = client.LoginRequest(user="test",password="incorrect")
print (response)
DEBUG:pysimplesoap.client:Parsing wsdl url: https://server/wsdl/SessionAdminService.wsdl
INFO:pysimplesoap.helpers:GET https://server/wsdl/SessionAdminService.wsdl using urllib2 3.4
DEBUG:pysimplesoap.helpers:Importing schema None from Types.xsd
DEBUG:pysimplesoap.helpers:Scheme not found, trying http
INFO:pysimplesoap.helpers:GET http://server\wsdl\Types.xsd using urllib2 3.4
ERROR:pysimplesoap.helpers:<urlopen error [Errno 11001] getaddrinfo failed>
DEBUG:pysimplesoap.helpers:Scheme not found, trying https
INFO:pysimplesoap.helpers:GET https://server\wsdl\Types.xsd using urllib2 3.4
ERROR:pysimplesoap.helpers:<urlopen error [Errno 11001] getaddrinfo failed>
DEBUG:pysimplesoap.helpers:Scheme not found, trying file
INFO:pysimplesoap.helpers:Fetching url file:server\wsdl\Types.xsd using urllib2
ERROR:pysimplesoap.helpers:<urlopen error [WinError 3] The system cannot find the path specified: 'server\\wsdl\\Types.xsd'>
Traceback (most recent call last):
File "F:\Programing\GIT\Python\soap-test\main.py", line 4, in <module>
client = SoapClient(wsdl="https://server/wsdl/SessionAdminService.wsdl",
trace=True, action="https://server/soap")
File "C:\Python34\lib\site-packages\pysimplesoap\client.py", line 169, in __init__
self.services = wsdl and self.wsdl_parse(wsdl, cache=cache)
File "C:\Python34\lib\site-packages\pysimplesoap\client.py", line 846, in wsdl_parse
services = self._xml_tree_to_services(wsdl, cache, force_download)
File "C:\Python34\lib\site-packages\pysimplesoap\client.py", line 608, in _xml_tree_to_services
global_namespaces=global_namespaces)
File "C:\Python34\lib\site-packages\pysimplesoap\helpers.py", line 408, in preprocess_schema
xml = fetch(schema_location, http, cache, force_download, wsdl_basedir)
File "C:\Python34\lib\site-packages\pysimplesoap\helpers.py", line 58, in fetch
raise RuntimeError('No scheme given for url: %s' % url)
RuntimeError: No scheme given for url: Types.xsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment