Suds 0.3 released.
by Jeff Ortel
All,
Suds version 0.3 is released. See https://fedorahosted.org/suds/ for
details.
For those of you using suds to work with web services that define
multiple ports for the service, you really want to read section:
SERVICES WITH MULTIPLE PORTS in the suds README. In suds 0.2.9 and
earlier, the fact that you may have been working with services with
multiple ports was hidden from you. In order to properly handle
multi-port services, this had to change - a little. Don't worry, if
this affects you, dealing with this is easy ;-).
Regards,
Jeff
15 years
Suds hat-tip
by paul anderson
Jeff, Jesper, Nathan
Very nice work on this; I'd been through a couple of others (SOAPpy etc. - each fine efforts), but didn't get what I was looking for.
This is a sharp piece of design - very nicely done. Client is a pleasure to use. The parameter-type factories - very nicely done. I've only scratched the surface yet, but have had useful results already
This is software as it should be "spoken" - hat tips to you and contributors at large.
15 years
suds is great
by Nathan Van Gheem
Sorry, forgot to click the "reply to all" button at this response....
1. Why not include a setup.py file with the code? Or at least some
> install directions that explain what to do.
>
Adding to this, I think you can use easy_install to install suds also.
-Nathan
---------- Forwarded message ----------
From: Nathan Van Gheem <vangheem(a)gmail.com>
Date: Thu, Sep 11, 2008 at 3:26 PM
Subject: Re: [Fedora-suds-list] suds is great
To: Matthew Wilson <matt(a)tplus1.com>
Hi Matt,
> 1. Why not include a setup.py file with the code? Or at least some
> install directions that explain what to do.
>
I'm almost positive that the setup.py file is included. What package are
you using to install?
2. Are there any tests for suds?
Yes, there are tests for the project. If you download the project or check
it out of the svn, they are located in the tests directory. The way Jeff
has done testing thus far has been a more tedious approach. He has a bunch
of web services on his local machine that he runs the tests against. There
are no formal testing methods really being used though. This is both good
and bad for obvious reasons. On the good side, these are like functional
tests, which allows Jeff to change a lot of the code base without a bunch of
Unit Tests making his code rigid. Conversely, you can't actually runs the
tests on your own machine, and you're not really testing the code itself per
say(unit testing), but rather how the code works together as a whole.
If you're looking for tests to see how to use the library, I'd just have a
look at the README. That gives a pretty good example. Otherwise, Jeff's
code is very clean and easy to understand. Browsing it should not be too
much of a hassle.
I hope that clears up some things for you..
regard,
Nathan
On Thu, Sep 11, 2008 at 2:23 PM, Matthew Wilson <matt(a)tplus1.com> wrote:
> Hi,
>
> I spent all day trying to find a way to write a python client to work
> with a SOAP web service. I looked at ZSI and soaplib, and finally
> found suds, which is exactly what I needed.
>
> A few minor questions:
>
> 1. Why not include a setup.py file with the code? Or at least some
> install directions that explain what to do.
> 2. Are there any tests for suds?
>
> Matt
>
> _______________________________________________
> fedora-suds-list mailing list
> fedora-suds-list(a)redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-suds-list
>
15 years
suds is great
by Matthew Wilson
Hi,
I spent all day trying to find a way to write a python client to work
with a SOAP web service. I looked at ZSI and soaplib, and finally
found suds, which is exactly what I needed.
A few minor questions:
1. Why not include a setup.py file with the code? Or at least some
install directions that explain what to do.
2. Are there any tests for suds?
Matt
15 years
Why suds egg is so big?
by Jeff Ortel
Anyone know why ( python setup.py bdist_egg ) generates such a large
.egg file? The suds egg is almost 300k!
15 years
Problem with nil datetime field
by Benne, Donald
Hello all,
We have an internal Remedy ARS system which we are trying to set web
services up on. Currently if the server sends back a datetime element
which is nil for a request, then we get a typeError: object of type
'NoneType' has no len(). According to the WSDL it looks like nil should
be valid for this element. I have attached the WSDL file and a debug log
showing the error. We can successfully use this same service from a
python client built using ZSI.
Note I'm specifically talking about the OpGet service and the
Scheduled_End_Date element coming back from that service.
Thanks,
Don
15 years
using suds with the google adwords api
by Thierry Schellenbach
After a long struggle with ZSI and SoapPY i found suds.
It looks like a really good solution, code base is pretty clean as well.
I however can't seem to get it too work with the adwords api.
Im using the latest trunk checkout (r267)
Any suggestions as to what is causing this?
Code:
from suds.client import Client
wsdl = 'https://adwords.google.com/api/adwords/v12/CampaignService?wsdl'
c = Client(wsdl)
def headers(c):
headers = ad_settings.headers
tokens = []
for k,v in headers.items():
token = c.factory.create(k)
token.value = v
tokens.append(token)
return tokens
accounts = c.service.getAllAdWordsCampaigns(1, soapheaders=headers(c))
pprint(accounts)
Gives the error:
Traceback (most recent call last):
File "D:\development\workspace\pytm2\ytm\adwords\adwords_api_ytm\test.py",
line 164, in <module>
main()
File "D:\development\workspace\pytm2\ytm\adwords\adwords_api_ytm\test.py",
line 29, in main
accounts = c.service.getAllAdWordsCampaigns(1, soapheaders=headers(c))
File "C:\Python25\lib\site-packages\suds\client.py", line 186, in __call__
result = self.client.invoke(self, args, kwargs)
File "C:\Python25\lib\site-packages\suds\client.py", line 296, in invoke
msg = binding.get_message(method.name, args, soapheaders)
File "C:\Python25\lib\site-packages\suds\bindings\binding.py", line 105,
in get_message
header = self.header(soapheaders)
File "C:\Python25\lib\site-packages\suds\bindings\binding.py", line 283,
in header
node = marshaller.process(value, type, tag)
File "C:\Python25\lib\site-packages\suds\bindings\marshaller.py", line
521, in process
result = MBase.process(self, content)
File "C:\Python25\lib\site-packages\suds\bindings\marshaller.py", line
372, in process
self.append(root, content)
File "C:\Python25\lib\site-packages\suds\bindings\marshaller.py", line
389, in append
if self.start(content):
File "C:\Python25\lib\site-packages\suds\bindings\marshaller.py", line
554, in start
if self.__skip(content):
File "C:\Python25\lib\site-packages\suds\bindings\marshaller.py", line
661, in __skip
if content.type.optional():
File "C:\Python25\lib\site-packages\suds\xsd\sxbasic.py", line 427, in
optional
return ( self.container.optional() or self.min == '0' )
AttributeError: 'NoneType' object has no attribute 'optional'
15 years
ArrayOf_xsd_string not working as expected
by Steffen Steidten
Hallo,
I'm having trouble to generate a service method's input consisting of
an array of strings. WSDL file see below, it works fine with ZSI.
What's wrong with my input variable? Is there a missing feature in suds,
I have to wait for?
Regards,
Steffen
The code is:
from suds.client import Client
clt = Client("file:///wmsservice.xml")
print clt
The output indicates a correctly handled wsdl file:
suds
version=0.2.8
service (WMSClientService)
prefixes:
ns0 = "urn:WMSClientAdapter"
methods (1):
generateEvent(ArrayOf_xsd_string in0, )
types (1):
ArrayOf_xsd_string
When sending the request
in0 = clt.factory.create("ArrayOf_xsd_string")
in0.value = ["x", "-A"]
clt.service.generateEvent(in0)
the following error is returned:
ERROR:suds.resolver:(value) not-found
Traceback (most recent call last):
File "testsuds.py", line 12, in <module>
clt.service.generateEvent(in0)
File "C:\Util\Python25\lib\site-packages\suds\client.py", line
187, in __call__
result = self.client.invoke(self, args, kwargs)
File "C:\Util\Python25\lib\site-packages\suds\client.py", line
297, in invoke
msg = binding.get_message(method.name, args, soapheaders)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\binding.py",
line 77, in get_message
p = self.param(method_name, pdef, arg)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\binding.py",
line 155, in param
return marshaller.process(pdef[0], object, pdef[1])
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 505, in process
result = MBase.process(self, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 366, in process
self.append(root, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 384, in append
self.appender.append(parent, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 123, in append
appender.append(parent, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 286, in append
Appender.append(self, child, cont)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 184, in append
self.marshaller.append(parent, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 383, in append
if self.start(content):
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 535, in start
raise TypeNotFound(content.tag)
suds.TypeNotFound: Type not found: 'value'
--------------- wmsservice.xml -------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:WMSClientAdapter"
xmlns:impl="urn:WMSClientAdapter" xmlns:intf="urn:WMSClientAdapter"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:WMSClientAdapter">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="generateEventResponse">
</wsdl:message>
<wsdl:message name="generateEventRequest">
<wsdl:part name="in0" type="impl:ArrayOf_xsd_string"/>
</wsdl:message>
<wsdl:portType name="WMSClient">
<wsdl:operation name="generateEvent" parameterOrder="in0">
<wsdl:input name="generateEventRequest"
message="impl:generateEventRequest"/>
<wsdl:output name="generateEventResponse"
message="impl:generateEventResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WMSClientSoapBinding" type="impl:WMSClient">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="generateEvent">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="generateEventRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:WMSClientAdapter"/>
</wsdl:input>
<wsdl:output name="generateEventResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:WMSClientAdapter"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WMSClientService">
<wsdl:port name="WMSClient" binding="impl:WMSClientSoapBinding">
<wsdlsoap:address
location="http://localhost:7070/wmsWebService/services/WMSClient"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
15 years
ref attribute issue for suds created types
by Nathan Van Gheem
I'm working on implementing wsrp with suds and everything is going well
with the issues I've described from before, but I have a newly discovered
problem.
When there are attributes defined with the ref attr, suds chokes on me.
For instance,
> <xsd:attribute ref="xml:lang" use="required"/>
does not have a type attribute defined for it and will choke and give a
TypeNotFound: Type not found: '_lang' error.
According to http://www.w3schools.com/Schema/el_attribute.asp for the ref
attribute,
> Optional. Specifies a reference to a named attribute. Name and ref
> attributes cannot both be present. *If ref is present, simpleType element,
> form, and type cannot be present *
So, it shouldn't need to have the type specified for it, right?
This is all within the wsrp specification so they could have defined
something incorrectly. Is there something I could do to get around this
while playing with the factory creation tool and calling the methods that
take the created factory objects?
The wsrp spec docs are here,
http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-bindings.wsdl
http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-interfaces.wsdl
http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-types.xsd
-Nathan
15 years