EWS issues
by Brendan Miller
Are there any issues using suds with Exchange Web Service?
I only ask because there's a fork of this suds here:
http://bitbucket.org/daevaorn/suds-ews/src/
that purports to offer "better EWS (Microsoft Exchange Web Services) support".
The site doesn't seem to have much other information, aside from the
source, so I'm unclear what changes he's made... Anyone familiar with
the fork?
Thanks,
Brendan
13 years, 9 months
WSDL imported Types
by Bjoern Schrader
Hello,
What is wrong with the WSDL at:
http://www.sloono.de/API/wsdl.php?soapsms1
I get:
>>> url = 'http://www.sloono.de/API/wsdl.php?soapsms1'
>>> from suds.client import Client
>>> client = Client(url)
>>> print client
Suds ( https://fedorahosted.org/suds/ ) version: 0.3.9 (beta) build:
R658-20100210
Service ( soapsms1 ) tns="urn:soapsms1"
Prefixes (2)
ns0 = "http://schemas.xmlsoap.org/soap/encoding/"
ns1 = "urn:soapsms1"
Ports (1):
(soapsms1Port)
Methods (1):
smssenden1(SMS1 msg, )
Types (50):
Antwort
ns0:Array
ns0:ENTITIES
ns0:ENTITY
ns0:ID
ns0:IDREF
ns0:IDREFS
ns0:NCName
ns0:NMTOKEN
ns0:NMTOKENS
ns0:NOTATION
ns0:Name
ns0:QName
SMS1
ns0:Struct
ns0:anyURI
ns0:arrayCoordinate
ns0:base64
ns0:base64Binary
.....
So why are all those Types imported, I would expect only "SMS1" and
"Antwort" to get imported.
Is there any help on the net about how to use SUDS with complex types?
Regards,
Björn
13 years, 9 months
Suds 0.3.9 release candidate
by Jeff Ortel
All,
Because of the amount of code churn I delayed release of 0.3.9 for a few extra days hoping
that the community would shake out any remaining issues with the beta. Assuming there are
no reported issues (related to changes in this release), 0.3.9 will release today with r658.
Big thanks to those of you that ran the beta. As always, your effort was invaluable to a
quality suds release.
Last chance to test drive ;)
Details here: https://fedorahosted.org/suds/#Development
Regards,
Jeff
13 years, 9 months
Soaplib server and suds client. Array integers
by Federico Frenguelli
Hello everyone,
i'm developing a simple application that manages a publishing company,
it's a little project for an exam. I'm using soaplib 0.8.1 as server
with cherrypy and suds 0.3.8 as client.
Here's the problem. I got a BookSoap class defined as follows:
class BookSoap(ClassSerializer):
class types:
id = Integer
title = String
description = String
authors = Array(Integer)
genres = Array(Integer)
products = Array(Integer)
this is the soaplib def.
On the client side, after connection:
book = client.factory.create('BookSoap')
print book
(BookSoap){
genres =
(integerArray){
integer[] = <empty>
}
description = None
title = None
products =
(integerArray){
integer[] = <empty>
}
authors =
(integerArray){
integer[] = <empty>
}
id = None
}
arrays are mapped to an integer[] attribute, so if i want to add a
genre for example:
book.genres.integer.append(1)
ok, it's a little bit complicated but i can handle this. Now i call my
service to retrieve book:
book = client.service.get_books()[1][2]
print book
(BookSoap){
genres =
(integerArray){
_type = "tns:integerArray"
}
description = None
title = "L'Airone"
products =
(integerArray){
_type = "tns:integerArray"
}
authors =
(integerArray){
_type = "tns:integerArray"
integer[] =
5,
}
id = 2
}
If you take a look at genres or products, there is no integer[]
attribute, and if i want to add some genres:
book.genres.integer.append(1)
AttributeError: integerArray instance has no attribute 'integer'
I can't imagine what happened there, i think it's an incompatibility
issue between soaplib and suds. Same thing using suds 0.3.9. If i use
soaplib as client everything works fine.
here is the soap message: http://shortText.com/jzcuckfsgw
wsdl: http://shortText.com/5cfp56biez
i hosted my project on google code: http://code.google.com/p/pybookler-soap/
i can use soaplib as client, yes, but i like suds style, so if you can
help me find a workaround to this problem i would appreciate it very
much.
Thanks a lot
--
Federico Frenguelli
13 years, 9 months
Broken remote references in WSDL header
by Marco Zanetti
Hi,
this is my first post, so first of all I'd like to say a big Hello to
everybody.
I'm trying to get in touch with a webserver using local WSDLs and a
remote server, but I can't create the client object.
When I attempt to initializate it using client =
Client(wsdl,location=url) I get the following message:
> Traceback (most recent call last):
> File "<console>", line 1, in <module>
> File "build\bdist.win32\egg\suds\client.py", line 106, in __init__
> self.sd = ServiceDefinition(self.wsdl)
> File "build\bdist.win32\egg\suds\servicedefinition.py", line 52, in
> __init__
> self.paramtypes()
> File "build\bdist.win32\egg\suds\servicedefinition.py", line 132, in
> paramtypes
> item = (pd[1], pd[1].resolve())
> File "build\bdist.win32\egg\suds\xsd\sxbasic.py", line 681, in resolve
> raise TypeNotFound(qref)
> TypeNotFound: Type not found: '(WOID_Type,
> http://schemas.datastream.net/MP_functions/MP0012_001, )'
where url = 'http://ourserver/axis/services/EWSConnector'
and wsdl = 'file:///c:/wsdl/Work/MP0012_GetWorkRequest_001.wsdl'
wsdl header is the following (I copied the whole WSDL/XSD tree in order
to avoid broken local references, so local paths should be ok):
> <wsdl:definitions
> targetNamespace="http://wsdls.datastream.net/MP0012_GetWorkRequest_001" xmlns:tns="http://wsdls.datastream.net/MP0012_GetWorkRequest_001"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:rqst0="http://schemas.datastream.net/MP_functions/MP0012_001"
> xmlns:resp0="http://schemas.datastream.net/MP_results/MP0012_001"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:hdr="http://schemas.datastream.net/MP_functions"
> xmlns:wssi="http://schemas.xmlsoap.org/ws/2002/04/secext"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:types>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:import
> namespace="http://schemas.datastream.net/MP_functions"
> schemaLocation="../../schemas/headers.xsd"/><xsd:import
> namespace="http://schemas.xmlsoap.org/ws/2002/04/secext"
> schemaLocation="../../schemas/secext.xsd"/><xsd:import
> namespace="http://schemas.datastream.net/MP_functions/MP0012_001"
> schemaLocation="../../schemas/Work/MP0012_GetWorkRequest_001.xsd"/><xsd:import
> namespace="http://schemas.datastream.net/MP_results/MP0012_001"
> schemaLocation="../../schemas/Work/MP0012_GetWorkRequest_001_Result.xsd"/></xsd:schema>
> </wsdl:types>
Since I can't ping wsdls.datastream.net/MP0012_GetWorkRequest_001 I
think it's a fake address which is defined here in the WSDL, and if I'm
right so the <xsd:import
namespace="http://schemas.datastream.net/MP_functions/MP0012_001"
schemaLocation="../../schemas/Work/MP0012_GetWorkRequest_001.xsd"/> line
is defining a namespace with the definition stored in the xsd.
My question is: where is the error located? Should the namespace be
defined/imported before creating the client object?
Thanks in advance
--
Marco
13 years, 9 months
invalid literal for float(): NaN problem
by Elyrwen Dynesh
Hi,
Recently I came across a very odd problem. I am using suds quit a time and
have not spotted similar problems until now.
When I try to call a remote method - getPointList - defined in my wsdl as:
<message name="getPointList">
<part name="authString" type="xsd:string"/>
<part name="filter" type="eds:PointFilter"/>
<part name="order" type="xsd:string"/>
<part name="startIdx" type="xsd:int"/>
<part name="maxCount" type="xsd:int"/>
<part name="includeWithoutPermission" type="xsd:boolean"/>
</message>
getPointList( ..., maxCount = 1 ) everything is fine.
However calling this same method as getPointList( ..., maxCount = 1000 )
produces the following exceptions in suds source code:
Traceback (most recent call last):
File "E:\working\ess2head\ess2\webapi\tests\webapiTestCases.py", line 202,
in testAllPointsNumber
File "build\bdist.win32\egg\suds\client.py", line 539, in __call__
return client.invoke(args, kwargs)
File "build\bdist.win32\egg\suds\client.py", line 598, in invoke
result = self.send(msg)
File "build\bdist.win32\egg\suds\client.py", line 627, in send
result = self.succeeded(binding, reply.message)
File "build\bdist.win32\egg\suds\client.py", line 659, in succeeded
r, p = binding.get_reply(self.method, reply)
File "build\bdist.win32\egg\suds\bindings\binding.py", line 160, in
get_reply
result = unmarshaller.process(nodes[0], resolved)
File "build\bdist.win32\egg\suds\umx\typed.py", line 66, in process
return Core.process(self, content)
File "build\bdist.win32\egg\suds\umx\core.py", line 48, in process
return self.append(content)
File "build\bdist.win32\egg\suds\umx\core.py", line 63, in append
self.append_children(content)
File "build\bdist.win32\egg\suds\umx\core.py", line 140, in
append_children
cval = self.append(cont)
File "build\bdist.win32\egg\suds\umx\core.py", line 63, in append
self.append_children(content)
File "build\bdist.win32\egg\suds\umx\core.py", line 140, in
append_children
cval = self.append(cont)
File "build\bdist.win32\egg\suds\umx\core.py", line 64, in append
self.append_text(content)
File "build\bdist.win32\egg\suds\umx\typed.py", line 133, in append_text
content.text = self.translated(content.text, known)
File "build\bdist.win32\egg\suds\umx\typed.py", line 139, in translated
return resolved.translate(value)
File "build\bdist.win32\egg\suds\xsd\sxbuiltin.py", line 123, in translate
return float(value)
ValueError: invalid literal for float(): NaN
I spotted this error only on windows (although linux tests were very
limited).
It *sometimes* works with maxCount = 1000 ( or any other number different
than 1 ) only to crash after getPointList has been called several times.
What can be the cause of this behaviour?
I am using suds rev 658.
13 years, 9 months
Problem returning arrays
by Johan Gill
I've been trying suds to access a SOAP server we're developing at
work, but I ran into this problem: whenever a call is supposed to
return an array, it returns some string instead, typically o255d830 or
similar.
Using a SOAPpy client, a list is returned, so the server should be fine.
Did anyone else see this?
Regards
Johan Gill
13 years, 9 months
create client without online wsdl
by pier carteri
Hi to all,
this is my firt post so, fist of all thank you for this awesome library!
Back to my question...
I' ve a soap server that does not expose wsdl (so no wsdl link available).
Instead the wsdls are present in the web toolkit, so I have these
files in my pc.
As far as i can see the creation of the client needs an url where to
grab the wsdl file, and this can not be a path on the filesystem..
Is that correct?
So I need a way to
-load the wsdl definition from local file
-specify the url where to send request
How can I do it?
Thank you!
Regards!
Pier
13 years, 9 months
Sabre webservices with Python Suds : OTA_AirAvailRQ method attributes
by Paul Poulet
Hello,
I'm trying to call a Sabre webservice (OTA_AirAvailRQ) like this :
# @see: WSDL
http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirAvailLLS1.8.1...
TPA_Extensions = self.session.client.factory.create('ns1:TPA_Extensions')
OriginDestinationInformation =
self.session.client.factory.create('ns1:OriginDestinationInformation')
OriginDestinationInformation.DepartureDateTime =
self.session.client.factory.create("ns1:DepartureDateTime")
OriginDestinationInformation.DepartureDateTime._DateTime =
'2010-02-26T00:00:00'
OriginDestinationInformation.DepartureDateTime._WindowAfter =
'2010-02-26T00:00:00'
OriginDestinationInformation.DepartureDateTime._WindowBefore =
'2010-02-27T00:00:00'
OriginDestinationInformation.OriginLocation._CodeContext = 'IATA'
OriginDestinationInformation.OriginLocation._LocationCode = 'PAR'
OriginDestinationInformation.DestinationLocation._CodeContext = 'IATA'
OriginDestinationInformation.DestinationLocation._LocationCode = 'TPE'
SpecificFlightInfo =
self.session.client.factory.create('ns1:SpecificFlightInfo')
SpecificFlightInfo = None
TravelPreferences =
self.session.client.factory.create('ns1:TravelPreferences')
TravelPreferences._MaxStopsQuantity = 2
TravelPreferences.VendorPref =
self.session.client.factory.create('ns1:VendorPref')
TravelPreferences.VendorPref._Code = "CX"
TravelPreferences.TPA_Extensions.DirectAccess._Ind = "false"
TravelPreferences.TPA_Extensions.CharteredAirline = None
TravelPreferences.TPA_Extensions = None
response = self.session.client.service.OTA_AirAvailRQ(
self.session._getPOS('ns1'),
TPA_Extensions,
OriginDestinationInformation,
SpecificFlightInfo,
TravelPreferences)
SOAP request seems well-formed :
(...)
<SOAP-ENV:Body>
<ns0:OTA_AirAvailRQ>
<POS xmlns="http://webservices.sabre.com/sabreXML/2003/07">
<Source PseudoCityCode="07LB" />
</POS>
<OriginDestinationInformation xmlns="
http://webservices.sabre.com/sabreXML/2003/07">
<DepartureDateTime xsi:type="ns0:DepartureDateTime"
WindowBefore="2010-02-28T00:00:00" WindowAfter="2010-02-26T00:00:00" />
<OriginLocation LocationCode="PAR" CodeContext="IATA" />
<DestinationLocation LocationCode="TPE" CodeContext="IATA" />
</OriginDestinationInformation>
<TravelPreferences xmlns="http://webservices.sabre.com/sabreXML/2003/07"
MaxStopsQuantity="2">
<VendorPref Code="CX" />
</TravelPreferences>
</ns0:OTA_AirAvailRQ>
</SOAP-ENV:Body>
But the service requires attributes on <ns0:OTA_AirAvailRQ /> node
(typically, a "Version" attribute).
I have read Python Suds documentation : I don't know how to append
attributes on this node.
Somebody can help me ?
Thank you for your help.
Kind regards.
---
Paul Poulet
13 years, 9 months