From: Roland Schmitt Date: 2005-09-09T16:29:33+09:00 Subject: Re: soap4r and ASP.NET problems Pete Elmore schrieb: > Ben Myles wrote: > >> I had some problems with soap4r and asp.net too. Try the latest >> snapshot: http://dev.ctor.org/download/soap4r-20050722.tar.gz > > > Roland Schmitt wrote: > > Hi, > > > > i had problems with the namespace declarations too when using soap4r > > version 1.5.4 and Suns JWSDP web services, but ASP.NET works. > > With 1.5.4 there are no namespaces "n1:" in the soap body, so i think > > you can try this version. > > Thanks for your responses! Unfortunately, the 'n1:' still appears and > the request still fails. I've tried it both under 1.8.2 and 1.8.3 > preview 2, with the newest version of soap4r (on three separate OSs), > with identical results. A few of the samples in the source tree (icd > was the one I looked at most closely, since it seems closest to what I'm > trying to do) appear broken, too. :( > > Hi, sorry, you are right. I've tested a ASP.NET service with both soap4r 1.5.4 and the version that ships with ruby 1.8.2 (i think soap4r 1.5.3). With 1.5.3 all env:Body elements have the namespace n1, with 1.5.4 not. As a result, the ASP.NET service did not find the parameters, because of the missing namespace, and sets the parametera to "null". So, with 1.5.3 the return value of ASP.NET in this example is "Hello, Mike", with 1.5.4 it return only "Hello,". Here are the results. With 1.5.4: Mike And with 1.5.3: Mike The code is: require "soap/rpc/driver" include SOAP::RPC class Test def initialize() @driver = Driver.new('http://127.0.0.1:80/WebService/Service1.asmx','http://localhost/WebService/') @driver.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler::Namespace @driver.add_method_with_soapaction ('SayHello','http://localhost/WebService/SayHello','name') puts("Ergebnis: " + @driver.SayHello("Mike")) end end Test.new()