andersinno / suds-jurko Goto Github PK
View Code? Open in Web Editor NEWImport of suds-jurko from https://bitbucket.org/jurko/suds
License: GNU Lesser General Public License v3.0
Import of suds-jurko from https://bitbucket.org/jurko/suds
License: GNU Lesser General Public License v3.0
I can't set the timeout options in client
Using the latest from master, and python3 I am getting a strange issue.
Here's the code:
someRequestMethod = theClient.factory.create("createUser")
someRequestMethod.username = "joeUser"
someRequestMethod.firstName = "joe"
someRequestMethod.lastName = "user"
someRequestMethod.email = "[email protected]"
someRequestMethod.role = theRole
someRequestMethod.disabled = "false"
someRequestMethod.password = "thisIsMyPassword"
print("The createUserMethod: " )
print( str(someRequestMethod))
response = theClient.service.createUser( someRequestMethod )
Here's the log:
The createUserMethod:
(createUser){
username = "joeUser"
firstName = "joe"
lastName = "user"
email = "[email protected]"
role = "User"
password = "thisIsMyPassword"
disabled = "false"
attributes =
(ArrayOfTTUserAttribute){
item[] =
}
}
ERROR:suds.client:<suds.sax.document.Document object at 0x1038a6748>
And here's what the post looks like (see that opening tags for <username>
are there twice:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fs-tests-ws.theportal.int/v/2/soap/portal/"><SOAP-ENV:Header/><ns0:Body><ns1:createUser><username><username>joeUser</username><firstName>joe</firstName><lastName>user</lastName><email>[email protected]</email><role>User</role><password>thisIsMyPassword</password><disabled>false</disabled></username><firstName/><lastName/><email/><role/><password/><disabled/></ns1:createUser></ns0:Body></SOAP-ENV:Envelope>
As the suds
and suds-jurko
projects appear to be largely abandoned, I've decided to revive the project as suds-bis. Please consider updating the README here to point to that project, where I'm happy to keep the project alive with pull requests from its users.
Hi, I am facing this issue while trying to install suds-jurko.
My python version is 3.7.3 and pip version is 20.0.1
ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aq1d_1x5/suds-jurko_99c7f674655c40cb8b6582552bf426e5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aq1d_1x5/suds-jurko_99c7f674655c40cb8b6582552bf426e5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-507p176x cwd: /tmp/pip-install-aq1d_1x5/suds-jurko_99c7f674655c40cb8b6582552bf426e5/ Complete output (1 lines): error in suds-jurko setup command: use_2to3 is invalid.
Hi,
I want to connect to a protected webservice (BasicAuthentication)
What is the right approach?
I have tried this
from requests.auth import _basic_auth_str
from suds.client import Client
from suds.cache import NoCache
my_client = Client(WSDL_URL,
location=WSDL_URL,
cache=NoCache(),
headers={'Authorization':_basic_auth_str(username,password)})
but without luck
Thank you in advance
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/client.py", line 115, in __init__
test_1 | self.wsdl = reader.open(url)
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/reader.py", line 150, in open
test_1 | d = self.fn(url, self.options)
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/wsdl.py", line 136, in __init__
test_1 | d = reader.open(url)
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/reader.py", line 74, in open
test_1 | d = self.download(url)
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/reader.py", line 92, in download
test_1 | fp = self.options.transport.open(Request(url))
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/transport/https.py", line 62, in open
test_1 | return HttpTransport.open(self, request)
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/transport/http.py", line 67, in open
test_1 | return self.u2open(u2request)
test_1 | File "/usr/local/lib/python3.6/site-packages/suds/transport/http.py", line 132, in u2open
test_1 | return url.open(u2request, timeout=tm)
test_1 | File "/usr/local/lib/python3.6/urllib/request.py", line 526, in open
test_1 | response = self._open(req, data)
test_1 | File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
test_1 | '_open', req)
test_1 | File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
test_1 | result = func(*args)
test_1 | File "/usr/local/lib/python3.6/urllib/request.py", line 1361, in https_open
test_1 | context=self._context, check_hostname=self._check_hostname)
test_1 | File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
test_1 | encode_chunked=req.has_header('Transfer-encoding'))
test_1 | TypeError: request() got an unexpected keyword argument 'encode_chunked'
In Python 3.6 http.client.HTTPConnection.request, a new keyword argument of encode_chunked was added. Currently, it doesn't look like suds-jurko does not support this change so you get a stacktrace.
https://docs.python.org/3.6/library/http.client.html#http.client.HTTPConnection.request
I'm not sure but it seems that modifying https://github.com/andersinno/suds-jurko/blob/44e27560b328ec6482459ea2d75516849dc209ff/suds/transport/__init__.py to accept *args and **kwargs should be enough.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.