0

I am trying to establish a connection using the SOAP gem, called Savon. I can't make sense from the documentation on the website, I have this URL: "https://www.example.com/loginWeb/rvu.aspx", and this credentials username: "user", password: "pass".

My code is this (rails console):

client = Savon::Client.new("https://www.example.com/loginWeb/rvu.aspx")
client.wsse.credentials 'user', 'pass'

I get this: (event trying with "digest")

HTTPI executes HTTP GET using the net_http adapter
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

I downloaded SoapUI and I get this error when I try to connect to the URL:

Error loading [http://www.example.com/loginWeb/rvu.aspx?WSDL]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 3): '&

So what is going on ? Any help?

Test Test
  • 2,831
  • 8
  • 44
  • 64

1 Answers1

0

I suppose it's the same issue as here: you're trying to access a site with self-signed SSL certificate.

One way to fix it is to prevent Savon checking it:

client = Savon::Client.new("https://www.example.com/loginWeb/rvu.aspx")
client.http.auth.ssl.verify_mode = :none
client.wsse.credentials 'user', 'pass'
Community
  • 1
  • 1
raina77ow
  • 103,633
  • 15
  • 192
  • 229
  • I did what u told me, and now I get this when I run "client.wsdl.soap_actions", => [], which mean the actions are null? – Test Test Oct 01 '12 at 10:10
  • same thing. If I use the ?wsdl extension it gives me the same thing – Test Test Oct 01 '12 at 10:24
  • Can you log the whole response? It looks like you get the `wsdl` file in the end, but this file itself is faulty. Will you be able to validate this file ([here](http://www.w3.org/wiki/WsdlValidator), for example)? – raina77ow Oct 01 '12 at 10:32