Hello list,
I have a question about definig methods with more than one parameters in WS.
I tried to send an email to the pygridware mailing list, but it seems that
it is not very active.

The definition in myservice.wsdl looks like this:

<xsd:element name="createJob">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element name="name" type="xsd:string"/>

                                <xsd:element name="launch"
type="xsd:string"/>
                        </xsd:sequence>
                </xsd:complexType>
</xsd:element>

Then I try to call the method from my client:

def main(**kw):
    locator = CLIENT.ToscaServiceLocator()
    port = locator.getToscaPort(**kw)
    msg = port.createResource(CLIENT.CreateInputMessage ())
    iport = locator.getToscaPort(endPointReference=msg.EndpointReference,
**kw)
    iport.createJob(CLIENT.CreateJobInputMessage('parameter one here', 'and
the second here'))
    reactor.stop ()

But this causes an error, which says
exceptions.TypeError: __init__() takes exactly 1 argument (3 given)

All this works perfectly fine with methods which have only one parameter and
are defined in my wsdl file like this:

<xsd:element name="startJob" type="xsd:string"/>

So my question is now, if my wsdl definition is wrong or I am trying to call
the method in a wrong way or the wsdl2web tool is broken and does not
generate proper stub methods.

Petr Man

Reply via email to