suds

how can i use sharepoint (via soap?) from python?

久未见 提交于 2019-11-28 18:59:26
I want to use Sharepoint with python (C-Python) Has anyone tried this before ? somewhatoff I suspect that since this question was answered the SUDS library has been updated to take care of the required authentication itself. After jumping through various hoops, I found this to do the trick: from suds import WebFault from suds.client import * from suds.transport.https import WindowsHttpAuthenticated user = r'SERVER\user' password = "yourpassword" url = "http://sharepointserver/_vti_bin/SiteData.asmx?WSDL" ntlm = WindowsHttpAuthenticated(username = user, password = password) client = Client(url,

Python soap using soaplib (server) and suds (client)

我的梦境 提交于 2019-11-28 18:57:11
This question is related to: Python SOAP server / client In the case of soap with python, there are recommendation to use soaplib ( http://wiki.github.com/jkp/soaplib ) as soap server and suds ( https://fedorahosted.org/suds/ ) as soap client. My target is to create soap services in python that can be consumed by several clients (java, etc). I tried the HelloWorld example from soaplib ( http://trac.optio.webfactional.com/wiki/HelloWorld ). It works well when the client is also using soaplib. Then, I tried to use suds as client consuming the HelloWorld services and it fail. -Why this is

SUDS - programmatic access to methods and types

泪湿孤枕 提交于 2019-11-28 16:53:46
I'm investigating SUDS as a SOAP client for python. I want to inspect the methods available from a specified service, and the types required by a specified method. The aim is to generate a user interface, allowing users to select a method, then fill in values in a dynamically generated form. I can get some information on a particular method, but am unsure how to parse it: client = Client(url) method = client.sd.service.methods['MyMethod'] I am unable to programmaticaly figure out what object type I need to create to be able to call the service obj = client.factory.create('?') res = client

Not able to create a SOAP filter in suds

时光毁灭记忆、已成空白 提交于 2019-11-28 14:10:00
I have a SOAP request that takes below XML body <x:Body> <ser:CreateExportJobRequest> <ser:ExportJobTypeName>Products</ser:ExportJobTypeName> <ser:ExportColumns> <ser:ExportColumn>Id</ser:ExportColumn> <ser:ExportColumn>itemName</ser:ExportColumn> </ser:ExportColumns> <ser:ExportFilters> <ser:ExportFilter id="updatedSince"> <ser:Text>2.0</ser:Text> </ser:ExportFilter> </ser:ExportFilters> <ser:Frequency>ONETIME</ser:Frequency> </ser:CreateExportJobRequest> </x:Body> I can make a successful request using Boomerang . Now I actually want to use it in my python code. So I tried, inputElement =

suds install error: no module named client

爷,独闯天下 提交于 2019-11-28 08:55:15
Trying to install suds with pip-3.2 and it fails with the error sudo pip-3.2 install suds Downloading/unpacking suds Running setup.py egg_info for package suds Traceback (most recent call last): File "<string>", line 16, in <module> File "/tmp/pip-build/suds/setup.py", line 20, in <module> import suds File "suds/__init__.py", line 154, in <module> import client ImportError: No module named client Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 16, in <module> File "/tmp/pip-build/suds/setup.py", line 20, in <module> import suds

asynchronous SOAP api call using Python

爱⌒轻易说出口 提交于 2019-11-28 05:54:00
问题 My purpose is to make a request from async SOAP api that take a data from pre-configured database and store it to another pre-configured database. I am using suds SOAP client for it. >>> from suds.client import Client >>> url="http://abcdjkfdsfjlkl?WSDL" >>> client=Client(url) >>> result=client.service.execute('City', 'Utility','147') >>> print result None my api call going well and I am getting data in my database too, but I am not getting response from it whether my task it completed,error

Suds over https with cert

末鹿安然 提交于 2019-11-28 03:41:29
I have soap service under Apache with ssl, suds works greate without ssl. I have client certificate (my.crt and user.p12 files). How I need to configure suds client ot make it work with service over https? without certs i see urllib2.URLError: <urlopen error [Errno 1] _ssl.c:499: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure> nitwit It sounds like you want to authenticate using a client certificate, not a server certificate as was stated in some of the comments. I had the same issue and was able to write a custom transport for SUDS. Here's the code that works for me

How can I pickle suds results?

天大地大妈咪最大 提交于 2019-11-28 00:23:32
问题 To avoid repeatedly accessing a SOAP server during development, I'm trying to cache the results so I can run the rest of my code without querying the server each time. With the code below I get a PicklingError: Can't pickle <class suds.sudsobject.AdvertiserSearchResponse at 0x03424060>: it's not found as suds.sudsobject.AdvertiserSearchResponse when I try to pickle a suds result. I guess this is because the classes are dynamically created. import pickle from suds.client import Client client =

Suds is not reusing cached WSDLs and XSDs, although I expect it to

北城以北 提交于 2019-11-27 14:50:28
I'm pretty sure suds is not caching my WSDLs and XSDs like I expect it to . Here's how I know that cached objects are not being used: It takes about 30 seconds to create a client: client = Client(url) The logger entries show consistent digestion of the XSD and WSDL files during the entire 30 seconds Wireshark is showing consistent TCP traffic to the server storing the XSD and WSDL files during the entire 30 seconds I see the files in the cache being updated each time I run my program I have a small program that creates a suds client, sends a single request, gets the response, then ends. My

How can I output what SUDs is generating/receiving?

故事扮演 提交于 2019-11-27 12:17:42
I have the following code: from suds.client import Client import logging logging.basicConfig(level=logging.INFO) logging.getLogger('suds.client').setLevel(logging.DEBUG) logging.getLogger('suds.transport').setLevel(logging.DEBUG) logging.getLogger('suds.xsd.schema').setLevel(logging.DEBUG) logging.getLogger('suds.wsdl').setLevel(logging.DEBUG) SB_PRIVATE_ACCESS = {"PATH":"https://thisurl.com:443/services/",} client = Client(SB_PRIVATE_ACCESS['PATH']) print client but I am getting 500 errors. I am trying to send what XML is being generated and received through SUDs, to the wsdl developer, but I