Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Ruby and SOAP
Nick Black
2/7/2007 12:31:00 PM
Hello,
I'm trying to access a SOAP webservice written in C# .NET from Ruby
(running on Ubuntu). The server has two classes within its namespace:
AddressSearch
ServiceAuthentication
The namespace is
http://local/blah/AddressSearch.asmx
The problem is that the client only knows about one method,
findAddress - a method of the AddressSearch class. I cannot get it to
see the ServiceAuthentication class. Apparently I need to pass an
instance of the Service Authentication class to a method of the
Address search class. I'm basing this on some sampel C# .NET client
code. I have been told that the response I am getting from the server
is because I am not authenticated.
My problem is that in all the examples of SOAP I have seen, looking
through the ruby mailing list archives, there is only one class dealt
with at a time. Basically, I need to know if my understanding of what
I am trying to do is wrong, if one SOAP namespace can contain multiple
classes, and if so, how I can use these two different classes in the
same ruby code.
My client code is:
def soap_me(postcode, streetname, town)
@postcode = postcode
@streetname = streetname
@town = town
wsdl_url = "
http://10.0.0.35/iedirectimage/AddressSearch.asmx?...
soap = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
auth = soap.ServiceAuthentication(:login => "addresstest",
:password => "password")
#The above line gives a undefined method `ServiceAuthentication' error
res = soap.findAddress(:postcode => @postcode, :streetName =>
@streetname, :town => @town)
puts res.inspect
end
soap_me("SW15 6JH", "Upper Richmond Road", "London")
The WSDL is posted here:
http://www.black...
/projects/stuf...
Thanks for the help - I know my post is slightly confused - it
reflects my state of mind!
--
Nick Black
--------------------------------
http://www.black...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Ruby and SOAP
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password