-
Notifications
You must be signed in to change notification settings - Fork 25
Passing instance of HTTP adapter to constructor throws error #10
Comments
Hey @marc-fez thanks for filing this bug. At first I thought that this was a case of Sekken's experimental nature getting out of date with the documentation but I'm not so sure now... It seems that |
Thanks @tjarratt. At first I thought it was a case of me not knowing what I'm doing. But after looking at it more, it appeared to be a bug. I do also see the same behaviour even if i just pass the
So I'm not sure what wrapping the class would do for me. But maybe I'll try to learn a little about using a debugger in ruby to see what I can figure out. |
@tjarratt fixed it, not sure if i fixed it right or fixed it well, I'm pretty much a n00b at ruby, but it looks like if an instance of an HTTP adapter was passed, it's class ended up being HTTPClient (or whatever) while if nothing was passed, it ended up being a Sekken::HTTPClient. And since I'm not sure how a pull request works... I changed sekken/lib/sekken/http_client.rb line 11
And changed the initialize method in sekken/lib/sekken.rb line 28 to
|
Thanks for the update @marc-fez. I took a look at the tests for this and I'm still not entirely sure what the original design goal was. Will need to take a closer look before I try to fix whatever bug is actually present. The code you posted is extremely helpful though for helping explain how someone might actually use this. My thoughts at this precise moment is that you should be able to pass either a class or an instance of an http client to |
Have you found the answer to this problem? what is the difference between sekken and savon? I am having the same problem with savon... |
Hey @andreorvalho I'm sorry that you're confused by Savon and Sekken. Hopefully we can clear that up.
At some point, @rubiii pointed out that Sekken had a very different interface than Savon, and that users upgrading might have a hard time. Breaking out Sekken into a different gem was the solution to provide an existing library that works (Savon), but allow another experimental one to continue evolving (Sekken).. If you're having problems with Savon, I suggest either filing an issue there, posting to stack overflow, or reading the docs on savonrb.com Hope this helps! |
This is still an issue when doing
|
+1 Exact same scenario as @stuarthannig. I must set the SSL version because the server won't accept SSL3, but seems I can't do it with the current version of Sekken? @tjarratt Any workarounds, if this has not yet been addressed? |
The solution is to use Sekken's own adapter = Sekken::HTTPClient.new
adapter.client.ssl_config.ssl_version = 'TLSv1'
client = Sekken.new(wsdl_url, adapter) I believe the issue with SSL versions will also be resolved by simply upgrading the |
According to the Savon 3 documentation, it is possible to send an instance of an adapter to the Sekken constructor.
If I do this with HTTPClient, either a call to the 'new' method or with an instantiated object, I get an error:
The text was updated successfully, but these errors were encountered: