From: "NAKAMURA, Hiroshi" Date: 2004-09-22T15:19:55+09:00 Subject: Re: soap4r. I just dont get it. Hi, On Wed, 22 Sep 2004 14:35:50 +0900, nkb wrote: > I have tried for a hours but I still cannot get it. What is wrong with > my codes? I keep getting this error > #: Fault occurred --> > System.Xml.XmlElement (SOAP::FaultError) Do you have the WSDL for the service you want to connect with? If you don't... try below. > Below is my code to access the webservice. According to the logs from > the webservice server, I am able to access to the webservice. But there > seems to be something wrong in the way I place my input argument. > > ####### > require 'soap/rpc/driver' > > Host = "http://mysite/serviceA/serviceA1.asmx" > NS = "urn:mysite.co.uk:webservices" > client = SOAP::RPC::Driver.new(Host, NS) > client.add_method_with_soapaction('mygetData', 'getData', 'dataID') client.add_method_with_soapaction('getData', "soapactionthattheserverrequires", 'DataID', "inputstring") client.generate_explicit_type = false > p client.mygetData(1) p client.getData(5, ["string1", "string2"]) It should send a request as follows: 5 string1 <== XXX string2 <== XXX The server may not accept the request because of the element name at XXX part above does not match with expected one (). Then you need WSDL. Regards, // NaHi