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

undefined method `sax_parse' for Ox:Module #53

Open
anildias opened this issue Aug 26, 2016 · 1 comment
Open

undefined method `sax_parse' for Ox:Module #53

anildias opened this issue Aug 26, 2016 · 1 comment

Comments

@anildias
Copy link

anildias commented Aug 26, 2016

Im using faraday and faraday_middleware libraries for the xml response parsing from external API.

Im running this in a multi threaded process
Im getting this error when I call object.get.body

object = Faraday.new 'url' do |conn|
conn.headers['referer'] = 'referer url'
conn.response :xml
conn.adapter Faraday.default_adapter
end

object.params = {:id => 123}

when I call object.get.body , throws this exception

error backtrace

/usr/local/rvm/gems/ruby-2.2.2/gems/multi_xml-0.5.5/lib/multi_xml.rb:138:in parse' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response/parse_xml.rb:9:inblock in class:ParseXml'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:48:in call' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:48:inparse'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:39:in process_response' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:32:inblock in call'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/response.rb:57:in on_complete' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:incall'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in build_response' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/connection.rb:377:inrun_request'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/connection.rb:140:in `get'

@olleolleolle
Copy link
Contributor

This is the code at that version of the middleware:

No options, no nothing:

::MultiXml.parse(body)

https://github.com/lostisland/faraday_middleware/blob/v0.9.1/lib/faraday_middleware/response/parse_xml.rb

(I merely wanted to rule out something that could have been wonky in the old faraday middleware.)

Well, without more details on the actual input that could create this error, this Issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants