yavalvas
yavalvas

Reputation: 330

How to set minOccurs="0" or nillable="true" to wsdl element by using of python module with name "pysimplesoap"

We use pysimplesoap module for writting of services. Clients were written on Java. There are problems with convertation of xml datatype to java. I suppose, we need to set minOccurs="0" or nillable="true" to wsdl elements. But in pysimplesoap file with name server.py there is such conversion for Arrays only. Is it possible to make it without kludges and how to do it?

Upvotes: 0

Views: 613

Answers (1)

c4talyst
c4talyst

Reputation: 91

Configure the dispatcher as usual:

dispatcher.register_function('test_function', test,
returns={'Success': str}, 
args={'wanted': str,'optional': str,'another_optional':str })

When defining your method, mark optional fields with defaults:

def test_request(wanted, optional=None, another_optional="Optional"):
return "Success"

Upvotes: 0

Related Questions