Hi,
just to answer my question myself.
Calling method with more parameters than one:
myparamholder = CLIENT.CreateJobInputMessage()
myparamholder.set_element_param1 = 'something here'
myparamholder.set_element_param2 = 'something else here'
iport.myRemoteMethod(myparamholder)
where param1, param2 are parameter names as defined in the wsdl.
It took me a fair amount of time to find this out, as I didn't find any
information in the python tutorial and this topic is just lightly touched in
the java tutorial. I think it should be more explicitly noted in the
documentation.
Bye
Petr Man
On 11/8/07, Petr Man <[EMAIL PROTECTED]> wrote:
>
> 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
>