fix for suds 0.4.0 and Salesforce
by Colin Stolley
This is not a question but a proposed solution to a problem. As I'm
sure many of you know, the current version of Suds does not work with
the Salesforce SOAP API, or I suppose any WSDL that includes cyclic
type definitions. I have looked into the salesforce-python-toolkit,
but I preferred a solution that improved Suds rather than relied on a
band-aid type solution. I endeavored to fix Suds, and I believe I have
a patch that works. I have posted a page which briefly explains my
findings and a link to a patch file:
http://pages.cs.wisc.edu/~stolley/suds_salesforce.html
The (small) patch file is here:
http://pages.cs.wisc.edu/~stolley/suds_0.4_sforce.patch
Be advised that I've only tested this with a small subset of objects
and functions, and only with the so-called Salesforce Enterprise WSDL.
I hope that someone might find it useful, or better yet, that the
changes (or something like them) be folded into the next version of
Suds. Comments are welcome.
Thank you,
Colin Stolley
13 years, 1 month
passing additional attributes to the client.service method
by Lukas Baron
Hello everyone,
i interact with an exchange 2003 server via exchange webservice using suds.
the exchange server requieres in some requests, that the service method tag
has some attributes set.
e.g.:
<FindItem Traversal="Shallow">
how may i pass this option to the Client.service.FindItem(Parameter) method?
the parameter only affect the client nodes...
--
Lukas Baron
13 years, 1 month
suds not building complex types correctly
by Jeremy Boyd
Hi all,
I'm trying to use suds to consume a WSDL and use a vendor's service. I've found that things work pretty well unless I need to get a complex argument as a response. The WSDL defines a type ArrayOfInt as follows:
<complexType name="ArrayOfInt">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:int[]" />
</restriction>
</complexContent>
</complexType>
A typical request/response using ArrayOfInt might look something like this:
>>> client.service.getUserDeviceList(test_settings.username, test_settings.password, 41768)
83133
Here's the raw XML from that response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getUserDeviceListResponse xmlns="https://www.roamsecure.net/Roamalert">
<s-gensym3 xsi:type="xsd:int">83133</s-gensym3>
<s-gensym5 xsi:type="xsd:int">83134</sgensym5>
</getUserDeviceListResponse>
</soap:Body>
</soap:Envelope>
The trouble I'm having is that suds is failing to convert this response into an ArrayOfInt. It only gives me the first number - e.g. 83133. And the type of the result, per suds, is 'int', so it's not like it's creating an ArrayOfInt with only 1 element.
Is there something I should be doing to get an ArrayOfInt out of this response?
Thanks.
--
Jeremy Boyd
e: boydjj(a)gmail.com
c: (512) 586-4587
13 years, 1 month
Error opening WSDL file from local disk - Windows 7, Python 2.7
by daniele visaggio
Hi all,
my problem is the following:
###################################################################
from suds.client import Client
from suds.sax.element import Element
wsdl = 'file:\\\E:\\schema\\6.0\\AXLAPI.wsdl'
client = Client(wsdl, location="https://1.1.1.1:8443/axl/
",username='usernamel',password='password')
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
client = Client(wsdl, location="https://10.129.93.135:8443/axl/
",username='Admin_axl',password='massimo')
File "build\bdist.win32\egg\suds\client.py", line 112, in __init__
self.wsdl = reader.open(url)
File "build\bdist.win32\egg\suds\reader.py", line 152, in open
d = self.fn(url, self.options)
File "build\bdist.win32\egg\suds\wsdl.py", line 158, in __init__
self.resolve()
File "build\bdist.win32\egg\suds\wsdl.py", line 207, in resolve
c.resolve(self)
File "build\bdist.win32\egg\suds\wsdl.py", line 491, in resolve
qref = qualify(op.input, self.root, definitions.tns)
File "build\bdist.win32\egg\suds\xsd\__init__.py", line 56, in qualify
raise Exception('prefix (%s) not resolved' % p)
Exception: prefix (s0) not resolved
###################################################################
As you can see, i'm not able to open the wsdl file stored on my disk. I've
already tried various versions of the path stored in the variable called
wsdl, like
wsdl = 'file:///C://schema//6.0//AXLAPI.wsdl'
I don't understand what this error means:
Exception('prefix (%s) not resolved' % p)
Exception: prefix (s0) not resolved
Can you help me please?
Kind regards,
Daniele
13 years, 1 month
Multipart replies
by Alejandro Blanco Escudero
Hi everyone!
I've been using suds lately. The server I'm interacting with is returning
multipart replies. I've looked around and I found this patch:
https://fedorahosted.org/suds/ticket/308
It works fine (at least for my use cases), but it's only available for the
3.9 version of suds. It would be great to have multipart support in the
newer releases. ¿Is there any intention to integrate this patch (or give
support of multipart) into mainstream development?
Best regards,
Alejandro.
--
Alejandro Blanco
ablanco(a)yaco.es
Yaco Sistemas S.L.
http://www.yaco.es/
C/ Rioja 5, 41001 Sevilla
Teléfono +34 954 50 00 57
Fax +34 954 50 09 29
13 years, 1 month
We care about your Education
by Genevieve Oakley
The diplomas for the progressive people.
We show the progressive people the nearest way to the big life.
Develop authority and sense of self as best way to obtain good job. Improve career and find new job with potential.
We offer you a wide range of diplomas for any specialties and any degrees.
Bachelors, Masters, PHD degree.
It takes four-six weeks
Make better use of time
Be more confident.
Be more assertive.
Contact us right now!
-------------
+ 1 - 646 - 537 - 1732
-------------
Please leave us the infarmation:
1) Your Name
2) Your Country
3) Telephone No. with country code if you are outside USA
Please Do Not Reply to this Email.
We do not reply to text inquiries, and our server will reject all response traffic.
We apologize for any inconvenience this may have caused you.
13 years, 1 month
We care about your Education
by Santos Tompkins
The diplomas for the progressive people.
We show the progressive people the nearest way to the big life.
Develop authority and sense of self as best way to obtain good job. Improve career and find new job with potential.
We offer you a wide range of diplomas for any specialties and any degrees.
Bachelors, Masters, PHD degree.
It takes four-six weeks
Make better use of time
Be more confident.
Be more assertive.
Contact us right now!
-----------------------------------------------------
+ 1 - 646 - 537 - 1732
-----------------------------------------------------
Please leave us the infarmation:
1) Your Name
2) Your Country
3) Telephone No. with country code if you are outside USA
Please Do Not Reply to this Email.
We do not reply to text inquiries, and our server will reject all response traffic.
We apologize for any inconvenience this may have caused you.
13 years, 1 month