From: Ben Myles Date: 2005-09-08T11:14:27+09:00 Subject: Re: soap4r and ASP.NET problems I had some problems with soap4r and asp.net too. Try the latest snapshot: http://dev.ctor.org/download/soap4r-20050722.tar.gz On 9/8/05, Pete Elmore wrote: > Hello, > > I'm having some difficulty getting Ruby to be able to successfully talk > to an ASP.NET application. (The answer to this question may be totally > obvious to someone familiar with XML, SOAP, etc.; sorry if my question > is a bit naive.) I was hoping someone might be able to help. > > I'm getting a SOAP::FaultError trying to send a simple request to the > ASP.NET application. My test code looks like this: > > require 'soap/rpc/driver' > sd = SOAP::RPC::Driver.new serv_url, namespace > sd.add_method_with_soapaction_as('get_venues', 'GetVenues', > 'http://tickettechnology/GetVenues", 'UserName', 'Password', > 'DomainName', 'bVerbose') > sd.default_encodingstyle = > SOAP::EncodingStyle::ASPDotNetHandler::Namespace > sd.generate_explicit_type = false > sd.get_venues username, password, domain_name, false > > which yields: > SOAP::FaultError: Server was unable to process request. --> Validating > User Name: the submitted user name contains forbidden characters: null > string > > The data the server expects looks like this: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > > > string > string > string > boolean > > > > > But my code is generating this: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > username > password > domainname > false > > > > > (Of course, I cut out the actual username and password.) > > It looked to me as if it was not finding the username string, since it > was definitely not null. Having very little knowledge of XML/SOAP, my > guess was that the problem was the 'n1:' bit, and so I spent the better > part of today trying to figure out how to get rid of it, with no > success. Any help at all would be greatly appreciated. > > Thanks, > Pete > >