G
Gregory Dyke
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=3DSOAP::WSDLDriverFactory.new('http://people.epfl.ch/wsdl/PeopleWS.w=
sdl')
driver=3Dserver.createDriver
driver.wSgetProfiles(["147980"])
ArgumentError: wrong number of arguments (1 for 2)
from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:448:in `wSgetProfil=
es'
from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:448:in `wSgetProfil=
es'
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
----------------------------------------------------------------
-
=09<definitions name=3D"PeopleWS" targetNamespace=3D"http://people.epfl.ch/=
PeopleWS">
-
=09<types>
-
=09<s:schema elementFormDefault=3D"qualified"
targetNamespace=3D"http://people.epfl.ch/PeopleWS">
-
=09<s:element name=3D"WSgetProfiles">
-
=09<s:complexType>
-
=09<s:sequence>
<s:element name=3D"ScipersList" type=3D"s:string"/>
</s:sequence>
</s:complexType>
</s:element>
+
=09<s:element name=3D"WSgetProfilesByUnit">
-
=09<s:complexType>
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"unitID" type=3D"s:string=
"/>
<s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"funct" type=3D"s:string"=
/>
<s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"subtree" type=3D"s:strin=
g"/>
</s:sequence>
</s:complexType>
</s:element>
-
=09<s:element name=3D"UnitResponse">
-
=09<s:complexType>
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"UnitResult"
type=3D"s0rofileType"/>
</s:sequence>
</s:complexType>
</s:element>
+
=09<s:complexType name=3D"ProfileType">
-
=09<s:all>
<s:element name=3D"nom" type=3D"s:string"/>
<s:element name=3D"prenom" type=3D"s:string"/>
<s:element name=3D"sciper" type=3D"s:string"/>
<s:element name=3D"mail" type=3D"s:string"/>
<s:element name=3D"rooms" type=3D"s:string"/>
<s:element name=3D"phones" type=3D"s:string"/>
<s:element name=3D"origine" type=3D"s:string"/>
<s:element name=3D"nat" type=3D"s:string"/>
<s:element name=3D"fax" type=3D"s:string"/>
<s:element name=3D"tel_prive" type=3D"s:string"/>
<s:element name=3D"web_perso" type=3D"s:string"/>
<s:element name=3D"photourl" type=3D"s:string"/>
<s:element name=3D"affects" type=3D"s0:ArrayOfAffects"/>
<s:element name=3D"frcv" type=3D"s0:refCV"/>
<s:element name=3D"encv" type=3D"s0:refCV"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"ArrayOfAffects">
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"Affects"
type=3D"s0:Affects"/>
</s:sequence>
</s:complexType>
+
=09<s:complexType name=3D"Affects">
-
=09<s:all>
<s:element name=3D"sigle_unite" type=3D"s:string"/>
<s:element name=3D"hier_unite" type=3D"s:string"/>
<s:element name=3D"fonction" type=3D"s:string"/>
<s:element name=3D"accred_ordre" type=3D"s:string"/>
<s:element name=3D"accred_statut" type=3D"s:string"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"refCV">
-
=09<s:all>
<s:element name=3D"creator" type=3D"s:string"/>
<s:element name=3D"lastmodby" type=3D"s:string"/>
<s:element name=3D"datecr" type=3D"s:string"/>
<s:element name=3D"datemod" type=3D"s:string"/>
<s:element name=3D"cvlang" type=3D"s:string"/>
<s:element name=3D"titre" type=3D"s:string"/>
<s:element name=3D"curriculum" type=3D"s:string"/>
<s:element name=3D"expertise" type=3D"s:string"/>
<s:element name=3D"mission" type=3D"s:string"/>
<s:element name=3D"arrayOfPubItems" type=3D"s0:ArrayOfPubItems"/>
<s:element name=3D"arrayOfBoxes" type=3D"s0:ArrayOfBoxes"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"ArrayOfBoxes">
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"Boxes" type=3D"s=
0:Box"/>
</s:sequence>
</s:complexType>
+
=09<s:complexType name=3D"ArrayOfPubItems">
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"PubItems"
type=3D"s0ubItem"/>
</s:sequence>
</s:complexType>
+
=09<s:complexType name=3D"Box">
-
=09<s:all>
<s:element name=3D"boxlabel" type=3D"s:string"/>
<s:element name=3D"boxcontent" type=3D"s:string"/>
<s:element name=3D"boxpos" type=3D"s:string"/>
<s:element name=3D"boxordre" type=3D"s:string"/>
<s:element name=3D"boxlang" type=3D"s:string"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"PubItem">
-
=09<s:all>
<s:element name=3D"item" type=3D"s:string"/>
</s:all>
</s:complexType>
<s:element name=3D"ProfileType" type=3D"s0rofileType"/>
<s:element name=3D"ArrayOfAffects" type=3D"s0:ArrayOfAffects"/>
</s:schema>
</types>
-
=09<message name=3D"ScipersIn">
<part name=3D"parameters" element=3D"s0:WSgetProfiles"/>
</message>
+
=09<message name=3D"UnitIn">
<part name=3D"parameters" element=3D"s0:WSgetProfilesByUnit"/>
</message>
+
=09<message name=3D"UnitOut">
<part name=3D"parameters" element=3D"s0:UnitResponse"/>
</message>
-
=09<portType name=3D"peopleSOAP">
+
=09<operation name=3D"WSgetProfilesByUnit">
<input message=3D"s0:UnitIn"/>
<output message=3D"s0:UnitOut"/>
</operation>
-
=09<operation name=3D"WSgetProfiles">
<input message=3D"s0:ScipersIn"/>
<output message=3D"s0:UnitOut"/>
</operation>
</portType>
-
=09<binding name=3D"peopleSOAP" type=3D"s0eopleSOAP">
<soap:binding transport=3D"http://schemas.xmlsoap.org/soap/http"
style=3D"document"/>
+
=09<operation name=3D"WSgetProfilesByUnit">
<soapperation
soapAction=3D"http://people.epfl.ch/PeopleWS#WSgetProfilesByUnit"/>
-
=09<input>
<soap:body use=3D"literal"/>
</input>
-
=09<output>
<soap:body use=3D"literal"/>
</output>
</operation>
-
=09<operation name=3D"WSgetProfiles">
<soapperation soapAction=3D"http://people.epfl.ch/PeopleWS#WSgetProfiles"=
/>
-
=09<input>
<soap:body use=3D"literal"/>
</input>
-
=09<output>
<soap:body use=3D"literal"/>
</output>
</operation>
</binding>
-
=09<service name=3D"PeopleWS">
-
=09<port name=3D"peopleSOAP" binding=3D"s0eopleSOAP">
<soap:address location=3D"http://people.epfl.ch/cgi-bin/PeopleWS.pl"/>
</port>
</service>
</definitions>
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=3DSOAP::WSDLDriverFactory.new('http://people.epfl.ch/wsdl/PeopleWS.w=
sdl')
driver=3Dserver.createDriver
driver.wSgetProfiles(["147980"])
ArgumentError: wrong number of arguments (1 for 2)
from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:448:in `wSgetProfil=
es'
from /usr/local/lib/ruby/1.8/soap/wsdlDriver.rb:448:in `wSgetProfil=
es'
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
----------------------------------------------------------------
-
=09<definitions name=3D"PeopleWS" targetNamespace=3D"http://people.epfl.ch/=
PeopleWS">
-
=09<types>
-
=09<s:schema elementFormDefault=3D"qualified"
targetNamespace=3D"http://people.epfl.ch/PeopleWS">
-
=09<s:element name=3D"WSgetProfiles">
-
=09<s:complexType>
-
=09<s:sequence>
<s:element name=3D"ScipersList" type=3D"s:string"/>
</s:sequence>
</s:complexType>
</s:element>
+
=09<s:element name=3D"WSgetProfilesByUnit">
-
=09<s:complexType>
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"unitID" type=3D"s:string=
"/>
<s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"funct" type=3D"s:string"=
/>
<s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"subtree" type=3D"s:strin=
g"/>
</s:sequence>
</s:complexType>
</s:element>
-
=09<s:element name=3D"UnitResponse">
-
=09<s:complexType>
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"UnitResult"
type=3D"s0rofileType"/>
</s:sequence>
</s:complexType>
</s:element>
+
=09<s:complexType name=3D"ProfileType">
-
=09<s:all>
<s:element name=3D"nom" type=3D"s:string"/>
<s:element name=3D"prenom" type=3D"s:string"/>
<s:element name=3D"sciper" type=3D"s:string"/>
<s:element name=3D"mail" type=3D"s:string"/>
<s:element name=3D"rooms" type=3D"s:string"/>
<s:element name=3D"phones" type=3D"s:string"/>
<s:element name=3D"origine" type=3D"s:string"/>
<s:element name=3D"nat" type=3D"s:string"/>
<s:element name=3D"fax" type=3D"s:string"/>
<s:element name=3D"tel_prive" type=3D"s:string"/>
<s:element name=3D"web_perso" type=3D"s:string"/>
<s:element name=3D"photourl" type=3D"s:string"/>
<s:element name=3D"affects" type=3D"s0:ArrayOfAffects"/>
<s:element name=3D"frcv" type=3D"s0:refCV"/>
<s:element name=3D"encv" type=3D"s0:refCV"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"ArrayOfAffects">
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"Affects"
type=3D"s0:Affects"/>
</s:sequence>
</s:complexType>
+
=09<s:complexType name=3D"Affects">
-
=09<s:all>
<s:element name=3D"sigle_unite" type=3D"s:string"/>
<s:element name=3D"hier_unite" type=3D"s:string"/>
<s:element name=3D"fonction" type=3D"s:string"/>
<s:element name=3D"accred_ordre" type=3D"s:string"/>
<s:element name=3D"accred_statut" type=3D"s:string"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"refCV">
-
=09<s:all>
<s:element name=3D"creator" type=3D"s:string"/>
<s:element name=3D"lastmodby" type=3D"s:string"/>
<s:element name=3D"datecr" type=3D"s:string"/>
<s:element name=3D"datemod" type=3D"s:string"/>
<s:element name=3D"cvlang" type=3D"s:string"/>
<s:element name=3D"titre" type=3D"s:string"/>
<s:element name=3D"curriculum" type=3D"s:string"/>
<s:element name=3D"expertise" type=3D"s:string"/>
<s:element name=3D"mission" type=3D"s:string"/>
<s:element name=3D"arrayOfPubItems" type=3D"s0:ArrayOfPubItems"/>
<s:element name=3D"arrayOfBoxes" type=3D"s0:ArrayOfBoxes"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"ArrayOfBoxes">
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"Boxes" type=3D"s=
0:Box"/>
</s:sequence>
</s:complexType>
+
=09<s:complexType name=3D"ArrayOfPubItems">
-
=09<s:sequence>
<s:element minOccurs=3D"0" maxOccurs=3D"unbounded" name=3D"PubItems"
type=3D"s0ubItem"/>
</s:sequence>
</s:complexType>
+
=09<s:complexType name=3D"Box">
-
=09<s:all>
<s:element name=3D"boxlabel" type=3D"s:string"/>
<s:element name=3D"boxcontent" type=3D"s:string"/>
<s:element name=3D"boxpos" type=3D"s:string"/>
<s:element name=3D"boxordre" type=3D"s:string"/>
<s:element name=3D"boxlang" type=3D"s:string"/>
</s:all>
</s:complexType>
+
=09<s:complexType name=3D"PubItem">
-
=09<s:all>
<s:element name=3D"item" type=3D"s:string"/>
</s:all>
</s:complexType>
<s:element name=3D"ProfileType" type=3D"s0rofileType"/>
<s:element name=3D"ArrayOfAffects" type=3D"s0:ArrayOfAffects"/>
</s:schema>
</types>
-
=09<message name=3D"ScipersIn">
<part name=3D"parameters" element=3D"s0:WSgetProfiles"/>
</message>
+
=09<message name=3D"UnitIn">
<part name=3D"parameters" element=3D"s0:WSgetProfilesByUnit"/>
</message>
+
=09<message name=3D"UnitOut">
<part name=3D"parameters" element=3D"s0:UnitResponse"/>
</message>
-
=09<portType name=3D"peopleSOAP">
+
=09<operation name=3D"WSgetProfilesByUnit">
<input message=3D"s0:UnitIn"/>
<output message=3D"s0:UnitOut"/>
</operation>
-
=09<operation name=3D"WSgetProfiles">
<input message=3D"s0:ScipersIn"/>
<output message=3D"s0:UnitOut"/>
</operation>
</portType>
-
=09<binding name=3D"peopleSOAP" type=3D"s0eopleSOAP">
<soap:binding transport=3D"http://schemas.xmlsoap.org/soap/http"
style=3D"document"/>
+
=09<operation name=3D"WSgetProfilesByUnit">
<soapperation
soapAction=3D"http://people.epfl.ch/PeopleWS#WSgetProfilesByUnit"/>
-
=09<input>
<soap:body use=3D"literal"/>
</input>
-
=09<output>
<soap:body use=3D"literal"/>
</output>
</operation>
-
=09<operation name=3D"WSgetProfiles">
<soapperation soapAction=3D"http://people.epfl.ch/PeopleWS#WSgetProfiles"=
/>
-
=09<input>
<soap:body use=3D"literal"/>
</input>
-
=09<output>
<soap:body use=3D"literal"/>
</output>
</operation>
</binding>
-
=09<service name=3D"PeopleWS">
-
=09<port name=3D"peopleSOAP" binding=3D"s0eopleSOAP">
<soap:address location=3D"http://people.epfl.ch/cgi-bin/PeopleWS.pl"/>
</port>
</service>
</definitions>