Webservice consumption over SSL

Hi, as long as nobody answered to my previous question, i’ll try to
write in another way.
I have:
webservice WSDL link (https://something?WSDL, that’s .net webservice)
pem file (certificate, needed to authentificate for gettting data)

i need :
to consume that webservice without describing API’s for each method (i
mean use WSL to construct needed structures or objects).

condition:
use as litle lines of code as possible :slight_smile:
btw, i would prefer solution, that would work on standart ruby
instalation (without additional installs, is that possible)

i’ve tried by my self SOAP::WSDLFactoryDriver, but that didn’t worked
correct (may be because of the lack of information about working using
SSL,
but looks like problem is more serious - it didn’t recognized some xml
elements in .net standart webservice WSDL description)

I didn’t see your previous message, so I hope I understand your
question correctly.

Look at http://dev.ctor.org/soap4r/wiki/HowtouseWSDL4R to see how to
generate Ruby classes from the WSDL files. Make sure you’re using the
latest stable SOAP4R (or even trunk).

Just set your endpoint to the https location:
https://my.web.service/service.cgi (or whatever extension asp.net
uses).

If your server has a self-generated certificate you’ll need to set a
few more options:

@service_type = 

ServiceType.new(“https://my.web.service/service.cgi”)
@service_type.options[“protocol.http.ssl_config.verify_mode”] = nil

And, if you also need to authenticate with http basic authentication:

@service_type.options["protocol.http.basic_auth"] <<

[“https://my.web.service/service.cgi” “username”, “password”]

Finally, when you generate the Ruby classes from the WSDL files, you
will receive a ‘Client.rb’ class for each type. Have a look at that
for examples on consuming the web services.

Hope that helps a bit?

Ben

Thanks a lot, i’ve seen that example before, but only now i’ve payed
attention, that they are using wsdl2ruby first :slight_smile:
anyway, now i’m having problems with wsdl2ruby, it comes with
NoMethodError :frowning: