suds

Suds write request missing datatype?

霸气de小男生 提交于 2019-12-23 05:09:24
问题 I am trying to communicate to a webservice using Suds, reading from the service works fine, however writing throws an error. suds.WebFault: Server raised fault: 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:tagValues. The InnerException message was 'Element Value from namespace http://schemas.datacontract.org/2004/07/NOV.Api.Messages cannot have child contents to be deserialized as an

Python SUDS - Interrogating the WSDL for MinOccurs and MaxOccurs values

落花浮王杯 提交于 2019-12-23 04:44:27
问题 I would like to interrogate a WSDL using SUDS to get the parameters and attributes of a web service. I'm pretty much down to this one last thing. How do I interrogate the service to find the minOccurs and maxOccurs values of the parameters? I see there's a property in the suds.xsd.sxbase object called required, but, assuming my starting point is the client object, I don't see path to get to it. http://jortel.fedorapeople.org/suds/doc/suds.xsd.sxbase-pysrc.html#SchemaObject.required client =

Creating Soap messages with objectTypes using SUDS library in Robot Framework

不想你离开。 提交于 2019-12-23 01:52:52
问题 i am struggling to create this part of the soap message using robot framework with SUDS library. <ns1:Request> <ns0:ID objectType="SomeType">Value</ns0:ID> </ns1:Request> If i do like this, then i get all i need but not the objectType. ${object}= Create Wsdl Object ns19:RequestTypeSingle Set Wsdl Object Attribute ${object} ID 1234 Output <ns1:Request> <ns0:ID>1234</ns0:ID> </ns1:Request> If i check what my ns19:RequestTypeSingle wants i get this: ${object} = (RequestTypeSingle){ ID = (ID){

Exchange Web Services (EWS) - Exchange 2010 soap calls via suds

风流意气都作罢 提交于 2019-12-22 11:32:57
问题 Im trying to send an email via Exchange Web Services using suds 0.4.1: import suds from suds.client import Client from suds.transport.https import WindowsHttpAuthenticated url = "file:///C:/Services.wsdl" user = 'domain\\user' password = "hardtoguess" ntlm = WindowsHttpAuthenticated(username=user,password=password) c = Client(url, transport=ntlm) xml = ''' <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=

suds and choice tag

吃可爱长大的小学妹 提交于 2019-12-22 07:57:23
问题 how to generate request to method with "choice" arguments? part of wsdl at http://127.0.0.1/service?wsdl: <xs:complexType name="ByA"> <xs:sequence> ... </xs:sequence> </xs:complexType> <xs:complexType name="ByB"> <xs:sequence> ... </xs:sequence> </xs:complexType> <xs:complexType name="GetMethodRequest"> <xs:choice> <xs:element name="byA" type="s0:ByA" /> <xs:element name="byB" type="s0:ByB" /> </xs:choice> </xs:complexType> when I do from suds.client import Client client = Client("http://127

Strange behavior from HTTP authentication with suds SOAP library

前提是你 提交于 2019-12-22 06:08:10
问题 I have a working python program that is fetching a large volume of data via SOAP using suds. The web service is implemented with a paging function such that I can grab nnn rows with each fetch call and grab the next nnn with subsequent calls. If I authenticate to the HTTP server with code like the following client = suds.client.Client(url=url, location=location, username=username, password=password, timeout=timeout) everything works great. If, however, I use the following t = suds.transport

Is it possible to cache a python suds client?

浪尽此生 提交于 2019-12-21 18:59:47
问题 I'm currently running python suds against a wsdl file and its corresponding 50+ xsd files. The following call to Client takes about 90 seconds: from suds.client import Client url = 'http://localhost:7080/webservices/WebServiceTestBean?wsdl' client = Client(url) After I run the last line above, I get a Client instance. Creating that client takes a long time. Does caching work with Python objects or is it restricted to primitives like strings and integers? Here's what I want to do in code, the

Is it possible to cache a python suds client?

*爱你&永不变心* 提交于 2019-12-21 18:59:20
问题 I'm currently running python suds against a wsdl file and its corresponding 50+ xsd files. The following call to Client takes about 90 seconds: from suds.client import Client url = 'http://localhost:7080/webservices/WebServiceTestBean?wsdl' client = Client(url) After I run the last line above, I get a Client instance. Creating that client takes a long time. Does caching work with Python objects or is it restricted to primitives like strings and integers? Here's what I want to do in code, the

How to get unparsed XML from a suds response, and best django model field to use for storage

情到浓时终转凉″ 提交于 2019-12-21 18:32:45
问题 I am using suds to request data from a 3rd party using a wsdl. I am only saving some of the data returned for now, but I am paying for the data that I get so I would like to keep all of it. I have decided that the best way to save this data is by capturing the raw xml response into a database field both for future use should I decide that I want to start using different parts of the data and as a paper trail in the event of discrepancies. So I have a two part question: Is there a simple way

Using Suds for SOAP in python, are suds.client.Client objects thread safe?

感情迁移 提交于 2019-12-21 05:29:06
问题 I'm using Suds to access a SOAP web service from python. If I have multiple threading.Thread threads of execution, can each of them safely access the same suds.client.Client instance concurrently, or must I create separate Client objects for each thread? 回答1: As far as I know they are NOT thread safe. You could safely use the same client object so long as you are using a queue or thread pool. That way when one thread is done with the client, the next one can use it. For network-based events