Hi,
I'm trying to connect to a webservice which is only "documented" by
its wsdl. So far I have the following code:
require 'soap/wsdlDriver'
server=SOAP::WSDLDriverFactory.new('http://people.epfl.ch/wsdl/PeopleWS.wsdl')
driver=server.createDriver
driver.wSgetProfiles(["147980"])
ArgumentError: wrong number of arguments (1 for 2)
from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:448:in `wSgetProfiles'
from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:448:in `wSgetProfiles'
from (irb):7
I don't know whether the wsdl is accessible from outside, so I've
copied it at the end of the email.
I can't figure out what the two arguments that it is asking for are.
From what I understand, it's asking for a list of strings. Is this a
problem with ruby-understanding or with wsdl understanding?
Greg
···
----------------------------------------------------------------
-
<definitions name=“PeopleWS” targetNamespace=“http://people.epfl.ch/PeopleWS”>
-
<types>
-
<s:schema elementFormDefault="qualified"
targetNamespace=“http://people.epfl.ch/PeopleWS”>
-
<s:element name=“WSgetProfiles”>
-
<s:complexType>
-
<s:sequence>
<s:element name=“ScipersList” type=“s:string”/>
</s:sequence>
</s:complexType>
</s:element>
+
<s:element name=“WSgetProfilesByUnit”>
-
<s:complexType>
-
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“unitID” type=“s:string”/>
<s:element minOccurs=“0” maxOccurs=“1” name=“funct” type=“s:string”/>
<s:element minOccurs=“0” maxOccurs=“1” name=“subtree” type=“s:string”/>
</s:sequence>
</s:complexType>
</s:element>
-
<s:element name=“UnitResponse”>
-
<s:complexType>
-
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“unbounded” name="UnitResult"
type=“s0:ProfileType”/>
</s:sequence>
</s:complexType>
</s:element>
+
<s:complexType name=“ProfileType”>
-
<s:all>
<s:element name=“nom” type=“s:string”/>
<s:element name=“prenom” type=“s:string”/>
<s:element name=“sciper” type=“s:string”/>
<s:element name=“mail” type=“s:string”/>
<s:element name=“rooms” type=“s:string”/>
<s:element name=“phones” type=“s:string”/>
<s:element name=“origine” type=“s:string”/>
<s:element name=“nat” type=“s:string”/>
<s:element name=“fax” type=“s:string”/>
<s:element name=“tel_prive” type=“s:string”/>
<s:element name=“web_perso” type=“s:string”/>
<s:element name=“photourl” type=“s:string”/>
<s:element name=“affects” type=“s0:ArrayOfAffects”/>
<s:element name=“frcv” type=“s0:refCV”/>
<s:element name=“encv” type=“s0:refCV”/>
</s:all>
</s:complexType>
+
<s:complexType name=“ArrayOfAffects”>
-
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“unbounded” name="Affects"
type=“s0:Affects”/>
</s:sequence>
</s:complexType>
+
<s:complexType name=“Affects”>
-
<s:all>
<s:element name=“sigle_unite” type=“s:string”/>
<s:element name=“hier_unite” type=“s:string”/>
<s:element name=“fonction” type=“s:string”/>
<s:element name=“accred_ordre” type=“s:string”/>
<s:element name=“accred_statut” type=“s:string”/>
</s:all>
</s:complexType>
+
<s:complexType name=“refCV”>
-
<s:all>
<s:element name=“creator” type=“s:string”/>
<s:element name=“lastmodby” type=“s:string”/>
<s:element name=“datecr” type=“s:string”/>
<s:element name=“datemod” type=“s:string”/>
<s:element name=“cvlang” type=“s:string”/>
<s:element name=“titre” type=“s:string”/>
<s:element name=“curriculum” type=“s:string”/>
<s:element name=“expertise” type=“s:string”/>
<s:element name=“mission” type=“s:string”/>
<s:element name=“arrayOfPubItems” type=“s0:ArrayOfPubItems”/>
<s:element name=“arrayOfBoxes” type=“s0:ArrayOfBoxes”/>
</s:all>
</s:complexType>
+
<s:complexType name=“ArrayOfBoxes”>
-
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“unbounded” name=“Boxes” type=“s0:Box”/>
</s:sequence>
</s:complexType>
+
<s:complexType name=“ArrayOfPubItems”>
-
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“unbounded” name="PubItems"
type=“s0:PubItem”/>
</s:sequence>
</s:complexType>
+
<s:complexType name=“Box”>
-
<s:all>
<s:element name=“boxlabel” type=“s:string”/>
<s:element name=“boxcontent” type=“s:string”/>
<s:element name=“boxpos” type=“s:string”/>
<s:element name=“boxordre” type=“s:string”/>
<s:element name=“boxlang” type=“s:string”/>
</s:all>
</s:complexType>
+
<s:complexType name=“PubItem”>
-
<s:all>
<s:element name=“item” type=“s:string”/>
</s:all>
</s:complexType>
<s:element name=“ProfileType” type=“s0:ProfileType”/>
<s:element name=“ArrayOfAffects” type=“s0:ArrayOfAffects”/>
</s:schema>
</types>
-
<message name=“ScipersIn”>
<part name=“parameters” element=“s0:WSgetProfiles”/>
</message>
+
<message name=“UnitIn”>
<part name=“parameters” element=“s0:WSgetProfilesByUnit”/>
</message>
+
<message name=“UnitOut”>
<part name=“parameters” element=“s0:UnitResponse”/>
</message>
-
<portType name=“peopleSOAP”>
+
<operation name=“WSgetProfilesByUnit”>
<input message=“s0:UnitIn”/>
<output message=“s0:UnitOut”/>
</operation>
-
<operation name=“WSgetProfiles”>
<input message=“s0:ScipersIn”/>
<output message=“s0:UnitOut”/>
</operation>
</portType>
-
<binding name=“peopleSOAP” type=“s0:peopleSOAP”>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style=“document”/>
+
<operation name=“WSgetProfilesByUnit”>
<soap:operation
soapAction=“http://people.epfl.ch/PeopleWS#WSgetProfilesByUnit”/>
-
<input>
<soap:body use=“literal”/>
</input>
-
<output>
<soap:body use=“literal”/>
</output>
</operation>
-
<operation name=“WSgetProfiles”>
<soap:operation soapAction=“http://people.epfl.ch/PeopleWS#WSgetProfiles”/>
-
<input>
<soap:body use=“literal”/>
</input>
-
<output>
<soap:body use=“literal”/>
</output>
</operation>
</binding>
-
<service name=“PeopleWS”>
-
<port name=“peopleSOAP” binding=“s0:peopleSOAP”>
<soap:address location=“http://people.epfl.ch/cgi-bin/PeopleWS.pl”/>
</port>
</service>
</definitions>