Ruby and SOAP

N

Nick Black

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?WSDL"

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.blacksworld.net/projects/stuff/wsdl.xml

Thanks for the help - I know my post is slightly confused - it
reflects my state of mind!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top