-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass global http request options to wasabi #349
Comments
Same problem when passing ssl_version client = Savon.client(wsdl: "https://webapi.allegro.pl/uploader.php?wsdl", ssl_version: :TLSv1)
client.operations
Could you provide temporary workaround? client.http.auth.ssl.verify_mode = :none but that does not seem to work at 2.0.2 |
this is on top of my todo list right now. i'll try to come up with a fix by tomorrow. |
this needs a bit more time to be fixed properly, but i'm working on it. |
Savon now uses the SOAPRequest and WSDLRequest factory classes to create HTTPI requests for retrieving a remote WSDL document and for executing SOAP requests.
both the global timeout and ssl options are now used for retrieving the wsdl. |
Same problem;/ client = Savon.client(wsdl: "https://webapi.allegro.pl/uploader.php?wsdl", ssl_verify_mode: :none, ssl_version: :TLSv1)
client.operations Same error with and without ssl_version.
|
|
client = Savon.client(wsdl: "https://webapi.allegro.pl/uploader.php?wsdl", ssl_verify_mode: :none, ssl_version: :TLSv1)
response = client.call(:doQuerySysStatus,
message: {"sysver" => 1,
"country-id" => 1,
"webapi-key" => "WEBAPIKEY"} ) |
@arathunku i added an example spec to the i changed the operation name to snakecase, because the wsdl was properly retrieved please try switching to a different HTTPI adapter like httpclient or curb to isolate the problem. |
That Sir, solved the problem! I'm really grateful, thank you! |
you're welcome. may i ask what exactly fixed the problem for you? |
require 'httpclient'
HTTPI.adapter = :httpclient Fixed the problem:) |
oh noez 😢 so it seems like there is still an issue with net/http on windows. |
net/http is working for me on OSX Mountain Lion. Sorry, I do not have access to a Windows machine to test with. |
@matthewrobertson don't know why i thought you were running windows :) |
http request options are passed to wasabi as of v2.1.0. |
It still seems not to work: I am using savon 2.1.0 (on mac) and get
using this piece of code require 'savon'
require 'ruby-debug'
config=YAML.load_file("bg_config.yaml")
username=config[:username]
password=config[:password]
endpoint=config[:endpoint]
client = Savon.client do
ssl_verify_mode :none
wsdl endpoint
log true
log_level :info
pretty_print_xml true
end
puts client.operations
response = client.call(:authenticate) do
message :username => username, :password => password
convert_request_keys_to :camelcase
end
debugger
nil |
I have de same problem: client = Savon.client(ssl_verify_mode: :none) do response = client.call(operation, :message => parameters) HTTPI::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A |
@bwl21 @vairix-gfagalde can you come up with a failing spec to reproduce the problem on travis? |
I found out that the problem is not the self signed certificate any more but the fact that authentification did not work Maybe its worth to open an issue in wasabi to supply the response of the get request in case of failure. |
@bwl21 if you have any suggestions on how to improve this, please feel free to open a new issue. |
@vairix-gfagalde please follow up with further information or some example code to reproduce your problem. |
First I thought this is simple. But then I found out, that wasabi cannot really help. The client needs to capture the exception and inform the user accordingly. As you are already sending the response as an error object, this can be done in the application. But: if log_level in Savon is already set to debug, Savon could report e.g. the body of the failed response. I'll create an issue here. |
closing this one. please follow up with a concrete plan to improve things or a pull request. thanks! |
The problem may lie in outdated/invalid SSL certificates. |
currently, wasabi doesn't know about e.g. whether or not to verify ssl.
are there any other options we need to set to get the wsdl?
The text was updated successfully, but these errors were encountered: