From: David Ross Date: 2004-09-22T21:24:53+09:00 Subject: Re: soap4r. I just dont get it. I might asd well start writing english SOAP documentation that explains details of soap4r. Where should I start? I know I should definitely document where I was having trouble at first. you are at gmail now, why? -dross --- "NAKAMURA, Hiroshi" wrote: > 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: > > > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > 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 > > _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com