[Soap-Python] Spyne and the basic use of Arrays
Alex Railean
ralienpp at gmail.com
Thu Aug 30 22:22:23 CEST 2012
The last suggestion was the first one I tried, and it works.
As a reference for future generations, here's a code sample, it uses
the type definitions from my previous email:
{
class DSearchService(ServiceBase):
@srpc(DSearchRequest, _returns = DSearchResponse)
def Search(request):
result = DSearchResponse()
resultElement = SearchResult()
resultElement.subjectName = 'dummy'
testList = []
testList.append(resultElement)
testList.append(resultElement)
testList.append(resultElement)
result.results = testList
return result
}
To sum things up:
- just declare a list
- populate it with what you need
- set the array attribute to that list
Thank you for your help.
More information about the Soap
mailing list