Skip to content
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

Savon >= 0.8.6 not playing nicely with HTTPI >= v0.9.0? #163

Closed
brettfishman opened this issue Mar 9, 2011 · 26 comments
Closed

Savon >= 0.8.6 not playing nicely with HTTPI >= v0.9.0? #163

brettfishman opened this issue Mar 9, 2011 · 26 comments
Milestone

Comments

@brettfishman
Copy link

When trying to make a SOAP request using savon (0.8.6) / httpi (0.9.0), the following exception occurred:

/project/.rvm/gems/ruby-1.9.2-p0@proj/gems/httpi-0.9.0/lib/httpi/adapter/net_http.rb:111:in respond_with': undefined methodto_hash' for nil:NilClass (NoMethodError)
from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/httpi-0.9.0/lib/httpi/adapter/net_http.rb:76:in do_request' from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/httpi-0.9.0/lib/httpi/adapter/net_http.rb:30:inpost'
from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/httpi-0.9.0/lib/httpi.rb:96:in block in post' from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/httpi-0.9.0/lib/httpi.rb:189:inwith_adapter'
from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/httpi-0.9.0/lib/httpi.rb:94:in post' from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/savon-0.8.6/lib/savon/soap/request.rb:25:inblock in response'
from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/savon-0.8.6/lib/savon/soap/request.rb:41:in with_logging' from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/savon-0.8.6/lib/savon/soap/request.rb:25:inresponse'
from /project/.rvm/gems/ruby-1.9.2-p0@proj/gems/savon-0.8.6/lib/savon/client.rb:78:in `request'

When I rolled back the httpi gem to version 0.7.9, I did not have this issue.

Thanks for looking into it.

@twinge
Copy link

twinge commented Mar 9, 2011

I'm getting the same error.

@Tornskaden
Copy link

I have been ripping my hair out over this problem for the last two days.
Same exception as brettfishman on both OS X and Linux
Rolling httpi back to 0.8.0 gives a different exception:
ArgumentError: wrong number of arguments (2 for 1)
from /Users/miqe/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/logger.rb:394:in warn' from /Users/miqe/.rvm/gems/ruby-1.9.2-p0/gems/httpi-0.8.0/lib/httpi/adapter.rb:60:inrescue in load_adapter'
from /Users/miqe/.rvm/gems/ruby-1.9.2-p0/gems/httpi-0.8.0/lib/httpi/adapter.rb:57:in load_adapter' from /Users/miqe/.rvm/gems/ruby-1.9.2-p0/gems/httpi-0.8.0/lib/httpi/adapter.rb:45:infind'
from /Users/miqe/.rvm/gems/ruby-1.9.2-p0/gems/httpi-0.8.0/lib/httpi.rb:186:in with_adapter' from /Users/miqe/.rvm/gems/ruby-1.9.2-p0/gems/httpi-0.8.0/lib/httpi.rb:84:inget'
from /Users/miqe/.rvm/gems/ruby-1.9.2-p0/gems/savon-0.8.6/lib/savon/wsdl/request.rb:21:in `block in response'
....

Rolling httpi back to 0.7.9 also solved it for me.

@Tornskaden
Copy link

Seems to me, the problem is with HTTPI, rather than Savon.
Tried Savon 0.8.4 & 0.8.5 with Httpi 0.9.0 & 0.8.0, giving the same respective exceptions.

The httpi 0.8.0 issue has been bug reported here: https://github.com/rubiii/httpi/issues/closed#issue/22

I have filed this bug under httpi
https://github.com/rubiii/httpi/issues#issue/25

@rubiii
Copy link
Contributor

rubiii commented Apr 4, 2011

thanks for reporting this. please try httpi v0.9.1 and let me know if it fixes the problem.

@Tornskaden
Copy link

httpi v0.9.1 solves the problem
Thanx

@rubiii
Copy link
Contributor

rubiii commented Apr 4, 2011

that's great. thank you!

@rubiii rubiii closed this as completed Apr 4, 2011
@rubiii rubiii closed this as completed Apr 4, 2011
@ghost
Copy link

ghost commented Apr 9, 2011

Still seeing this error on httpi 0.9.1 and 0.9.2 - downgraded to 0.7.9 as suggested and it works fine. Exact same call stack as OP.

Affected: savon 0.9.1 + httpi (0.9.2, 0.9.1) (net/http)
Unaffected: savon 0.9.1 + httpi (0.7.9) (net/http)

@brettfishman
Copy link
Author

For me as well, the error still exists using httpi 0.9.1

@rubiii rubiii reopened this Apr 9, 2011
@rubiii
Copy link
Contributor

rubiii commented Apr 9, 2011

are you guys using ntlm?

@ghost
Copy link

ghost commented Apr 9, 2011

not using ntlm anything

@brettfishman
Copy link
Author

I'm also not using ntlm.

@zepplock
Copy link

Was this issue resolved? Still having problem with with httpi-0.9.2

@rubiii
Copy link
Contributor

rubiii commented Apr 23, 2011

unfortunately not. i was able to reproduce the problem using httpi v0.9.0 on ruby 1.9.2, but (at least for me) both v0.9.1 and v0.9.2 don't seem to be affected. don't ask me why that is. somehow net/http just doesn't return a response object.

for now i'd suggest switching to a different http client like httpclient or curb via:

HTTPI::Adapter.use = :curb  # or one of [:httpclient, :net_http]

@zepplock
Copy link

Yes, if you have "httpclient" gem installed then the bug goes away. I suspect it is net_http bug.

@LeoNogueira
Copy link

Confirmed :

require 'net/http'

solved the issue on 0.9.1.

@alanbuxton
Copy link

FWIW I had the same problem with

savon 0.9.1 and httpi 0.9.3

Rolled httpi back to 0.9.1 and all ok now

@rubiii
Copy link
Contributor

rubiii commented May 2, 2011

Please manually require 'net/http' (if you're using the Net::HTTP adapter with httpi) for now.
The problem seems to be related to ntlm-http as reported in issue 25.

@julesce
Copy link

julesce commented May 3, 2011

I can confirm as well that I was running savon 0.9.2 and httpi 0.9.3, and rolling both of them down to 0.9.1 (along with the require statement) fixed the problem.

@plentz
Copy link

plentz commented May 5, 2011

related #183

@rubiii
Copy link
Contributor

rubiii commented May 9, 2011

starting to think about rolling back support for ntlm, because i don't feel like they're going to solve this issue.
any ideas? comments?

@hakanensari did you receive any feedback from the ntml-http guys?
@Tornskaden sorry, don't bother with my ping ;)

@Tornskaden
Copy link

@rubii Pong halted ;-)

@rubiii
Copy link
Contributor

rubiii commented May 10, 2011

ping (pyu10055) pulled the request by @hakanensari and released his fork called pyu-ntlm-http. can you guys please check if this works for you?

if you need me to create a testversion, please just let me know. otherwise i'll focus on getting this fixed.

@rubiii
Copy link
Contributor

rubiii commented May 15, 2011

please update httpi to version 0.9.4 and let me know if it fixes the problem.

@ghost
Copy link

ghost commented May 20, 2011

I've installed the Savon gem, along with httpi 0.9.4, and I am unable to load any wsdl file. I've no experience with soap, but I get the feeling it's related to this issue. I receive the following error. I'll try some of the fixes above and post back.

irb(main):004:0> client.wsdl.soap_actions
Retrieving WSDL from: http://developer.ebay.com/webservices/latest/ebaySvc.wsdl
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
from /usr/local/lib/ruby/gems/1.9.1/gems/httpi-0.9.4/lib/httpi/adapter.rb:40:in load' from /usr/local/lib/ruby/gems/1.9.1/gems/httpi-0.9.4/lib/httpi.rb:191:inwith_adapter'
from /usr/local/lib/ruby/gems/1.9.1/gems/httpi-0.9.4/lib/httpi.rb:84:in get' from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/request.rb:21:inblock in response'
from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/request.rb:30:in with_logging' from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/request.rb:21:inresponse'
from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/document.rb:93:in http_request' from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/document.rb:77:indocument'
from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/document.rb:104:in parser' from /usr/local/lib/ruby/gems/1.9.1/gems/savon-0.9.2/lib/savon/wsdl/document.rb:46:insoap_actions'
from (irb):4
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:8:instart'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:23:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

@ghost
Copy link

ghost commented May 20, 2011

Right, so installing httpclient and adding:

HTTPI::Adapter.use = :httpclient

to boot.rb seems to have sorted it.

@rubiii
Copy link
Contributor

rubiii commented Jun 29, 2011

decided to move ntlm support into a separate gem: httpi-ntlm until it's stable
and release savon v0.9.3. please read the changelog.

@rubiii rubiii closed this as completed Jun 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants