开发者

ignoring SSL error with Ruby SOAP

I'm trying to use wsdl on an https url. with reference to How do I tell Ruby's OpenSSL library to ignore a self-signed certificate error?

when i try this:

... OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE ::SOAP::WSDLDriverFactory.new(SERVICE_URL).create_rpc_driver ...

I'm getting this error:

SyntaxError in ReportsController#wsdlCaller

开发者_运维问答

/rails-root/app/controllers/reports_controller.rb:220: dynamic constant assignment ... = OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE::SO...

How do i resolve this?

Thanks!


ok so i changed the syntax to

const_set(OpenSSL::SSL::VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)

and i resolved the dynamic constant assignment error. that was probably because i was trying to assign a value to a constant in a method.

i'm now stuck at a new error: uninitialized constant OpenSSL::SSL::VERIFY_PEER. does anyone know why this is happening?

help! thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜