Hey Nick. Welcome to suds!
To start with, I'd review the documentation here:
https://fedorahosted.org/suds/.
Specifically,
https://fedorahosted.org/suds/wiki/Documentation
I ran your WSDL and updateTestStatus() takes an ns0:remoteTestResult argument that is a
complex type (object).
<xs:complexType name="remoteTestResult"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:sequence
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element minOccurs="0" name="encTestScheduleId"
type="xs:string"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
<xs:element minOccurs="0" name="executionDate"
type="xs:dateTime"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
<xs:element minOccurs="0" name="executionNotes"
type="xs:string"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
<xs:element minOccurs="0" name="executionStatus"
type="xs:string"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
<xs:element minOccurs="0" name="id"
type="xs:long"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
<xs:element minOccurs="0" name="testerId"
type="xs:long"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
<xs:element minOccurs="0" name="timeTaken"
type="xs:int"
xmlns:xs="http://www.w3.org/2001/XMLSchema" />
</xs:sequence>
</xs:complexType>
So, you'll want to create using the factory:
result = client.factory.create('ns0:remoteTestResult')
print result
(remoteTestResult){
encTestScheduleId = None
executionDate = None
executionNotes = None
executionStatus = None
id = None
testerId = None
timeTaken = None
}
You'll need to set the attributes /something/ like:
from datetime import datetime as dt
result.encTestScheduleId = 'xxx'
result.executionDate = dt.now()
result.executionNotes = 'your notes'
result.executionStatus = 'some status'
result.id = 123
result.testerId = 345
result.timeTaken = 100
Then invoke:
client.service.updateTestStatus(result)
Hope this helps.
-jeff
On 10/26/2009 10:47 AM, Nick Wiesmueller wrote:
Hi,
I'm trying to use the attached WSDL's and I'm having some difficulties.
I've got this working in C# .NET but I think I don't understand how suds
works.
I can create my client
>>> from suds import *
>>> from suds.client import Client
>>> client =
Client("http://10.1.10.11:81/flex/rpc/zephyrrpcservice?wsdl")
My client looks like this.
>>> print client
Suds (
https://fedorahosted.org/suds/ ) version: 0.3.7 GA build:
R580-20091016
Service ( zephyrrpcservice )
tns="http://impl.rpc.thed.com/"
Prefixes (1)
ns0 = "http://rpc.thed.com/"
Ports (1):
(ZephyrRPCServicesImplPort)
Methods (1):
updateTestStatus(ns0:remoteTestResult testResult, )
Types (4):
ns0:exception
ns0:remoteTestResult
ns0:updateTestStatus
ns0:updateTestStatusResponse
With other WSDL's I was just able to access the methods at this point
like this
>>>client.someMethod()
This doesn't work with the attached WSDL's.
It looks like
client.service.updateTestStatus(remoteTestResult testResult)
might work (I could be totally wrong), but I don't know how to properly
create a remoteTestResult object.
Thanks for your help,
Nick Wiesmueller
QA Analyst
Singlewire Software
PO Box 46218
Madison, WI 53744-6218
Phone Direct - 608.298.1625
www.singlewire.com <
http://www.singlewire.com>
------------------------------------------------------------------------
_______________________________________________
fedora-suds-list mailing list
fedora-suds-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list