wsdl ,not able to pass a complex type to a method

Discussion in 'Ruby' started by Rahul Sharma, Oct 1, 2009.

  1. Rahul Sharma

    Rahul Sharma Guest

    I'm trying to use a web service .
    I am using 'soap/rpc/driver' after creating an object of the driver
    class , i am able to authenticate by calling a method on it .

    - <element name="authenticate">
    - <complexType>
    - <sequence>
    <element name="username" type="xsd:string" />
    <element name="password" type="xsd:string" />
    </sequence>
    </complexType>
    </element>

    i am able to authenticate using the code below
    driver = SOAP::RPC::Driver.new(URL, NAMESPACE)
    driver.add_method('authenticate','username','password')
    driver.add_method('authenticateResponse','authenticateReturn')
    sid= driver.authenticate('uname','pwd')

    I want to use the hostCreate method , it takes the instance of
    HostTransport as argument, I cannot figure out ,how can I pass this as
    argument. Pls help .
    I have pasted the related wsdl below


    - <complexType name="TransportObject">
    <sequence />
    </complexType>
    - <complexType name="ConfigurationTransport">
    - <complexContent>
    - <extension base="impl:TransportObject">
    - <sequence>
    <element name="ID" nillable="true" type="xsd:int" />
    <element name="description" nillable="true" type="xsd:string" />
    <element name="name" nillable="true" type="xsd:string" />
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    - <complexType name="HostTransport">
    - <complexContent>
    - <extension base="impl:ConfigurationTransport">
    - <sequence>
    <element name="agentVersion" nillable="true" type="xsd:string" />
    <element name="displayName" nillable="true" type="xsd:string" />
    <element name="external" type="xsd:boolean" />
    <element name="externalID" nillable="true" type="xsd:string" />
    <element name="hostGroupID" nillable="true" type="xsd:int" />
    <element name="platform" nillable="true" type="xsd:string" />
    <element name="securityProfileID" nillable="true" type="xsd:int" />
    </sequence>
    </extension>
    </complexContent>
    </complexType>




    - <element name="hostCreate">
    - <complexType>
    - <sequence>
    <element name="host" type="impl:HostTransport" />
    <element name="sID" type="xsd:string" />
    </sequence>
    </complexType>
    </element>
    --
    Posted via http://www.ruby-forum.com/.
    Rahul Sharma, Oct 1, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dark
    Replies:
    1
    Views:
    4,629
    milfar
    Nov 14, 2008
  2. Stanimir Stamenkov
    Replies:
    2
    Views:
    744
    Stanimir Stamenkov
    Oct 25, 2005
  3. Robert Mark Bram
    Replies:
    0
    Views:
    682
    Robert Mark Bram
    Feb 4, 2007
  4. Replies:
    1
    Views:
    431
    Juha Laiho
    Oct 9, 2007
  5. sed_y
    Replies:
    0
    Views:
    1,013
    sed_y
    Feb 15, 2012
Loading...

Share This Page