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

httpi errors connecting to navteq #165

Closed
rossi-jeff opened this issue Mar 15, 2011 · 5 comments
Closed

httpi errors connecting to navteq #165

rossi-jeff opened this issue Mar 15, 2011 · 5 comments

Comments

@rossi-jeff
Copy link

Error back trace from my coworkers system, the code works on my system

Processing NavteqController#get_link_info (for 24.26.0.59 at 2011-03-09 17:02:30) [POST]

Parameters: {"action"=>"get_link_info", "lng"=>"-81.9666337966919", "controller"=>"navteq", "lat"=>"28.043008403218785"}

ArgumentError (odd number of arguments for Hash):
httpi (0.7.8) lib/httpi/adapter/httpclient.rb:93:in []' httpi (0.7.8) lib/httpi/adapter/httpclient.rb:93:inrespond_with'
httpi (0.7.8) lib/httpi/adapter/httpclient.rb:64:in do_request' httpi (0.7.8) lib/httpi/adapter/httpclient.rb:31:inpost'
httpi (0.7.8) lib/httpi.rb:96:in post' httpi (0.7.8) lib/httpi.rb:189:inwith_adapter'
httpi (0.7.8) lib/httpi.rb:94:in post' savon (0.8.3) lib/savon/soap/request.rb:25:inresponse'
savon (0.8.3) lib/savon/soap/request.rb:41:in with_logging' savon (0.8.3) lib/savon/soap/request.rb:25:inresponse'
savon (0.8.3) lib/savon/client.rb:78:in request' lib/navteq_routing.rb:22:inlinkInfo'
app/controllers/navteq_controller.rb:9:in `get_link_info'

Class methods being used

def self.linkInfo(lat,lng)
xml = ''
doc = Builder::XmlMarkup.new(:target => xml)
doc.RequestHeader do |header|
header.Map24ID(NavteqRouting::MAP_24_ID)
end
doc.LinkInfoRequest do |request|
request.Coordinate do |coordinate|
coordinate.Longitude(lng.to_f * 60)
coordinate.Latitude(lat.to_f * 60)
end
end
get_client
@logger.info("Request at #{Time.now}")
response = @client.request(:link_info) do |soap|
soap.body = xml
end
@logger.info("Response at #{Time.now}")
response_hash = response.to_hash[:link_info_response][:link_info_response]
return_val = {
:status => response_hash[:status],
:speed_limit => response_hash[:speed_limit],
:speed_category => response_hash[:speed_category],
:road_type => response_hash[:road_type],
:road_type_class => RoadSpeed::ROAD_TYPES[response_hash[:road_type].to_i][:road_class],
:description => RoadSpeed::ROAD_TYPES[response_hash[:road_type].to_i][:description],
:road_name => response_hash[:road_name],
:road_number => response_hash[:road_number],
:city => response_hash[:city2]
}
return return_val
end

def self.get_client
@client = Savon::Client.new do |wsdl|
wsdl.document = "#{RAILS_ROOT}/lib/navteq/Map24Routing.xml"
wsdl.endpoint = "http://" + NavteqRouting::DOMAIN + "/map24/webservices1.5?soap=Map24Routing"
end
start_logger
Savon.configure do |config|
config.logger = @logger
end
end

@rubiii
Copy link
Contributor

rubiii commented Mar 24, 2011

which version of the httpclient gem are you using?

@rossi-jeff
Copy link
Author

On 03/24/2011 03:29 PM, rubiii wrote:

which version of the httpclient gem are you using?

I have included gem lists from My local environ ment which is
functional, as well as from staging and My co-workers system which are
not. I'm running slackware 13.1, Richard is on windows, and staging is
ubuntu.

Jeff Rossi
Application Developer | InTouch MVC
Office: 800-881-6343 | Cell: 863-669-6488 | Fax: 863-687-0077
5101 Great Oak Dr. Lakeland, Fl 33815


http://www.intouchmvc.com
Asset Monitoring Solutions
*** LOCAL GEMS ***

actionmailer (2.3.6, 2.3.2)
actionpack (2.3.6, 2.3.2)
activerecord (2.3.6, 2.3.2)
activeresource (2.3.6, 2.3.2)
activesupport (2.3.8, 2.3.6, 2.3.2)
archive-tar-minitar (0.5.2)
binarylogic-searchlogic (2.3.5)
builder (2.1.2)
calendar_date_select (1.16.1)
capistrano (2.5.19)
color (1.4.1)
crack (0.1.8)
curb (0.7.14, 0.7.9)
diff-lcs (1.1.2)
dmclient (0.0.9791)
fastercsv (1.5.3)
flexmock (0.8.6)
geokit (1.5.0)
gyoku (0.3.1, 0.2.0)
handsoap (1.1.8)
highline (1.5.2)
hoe (2.6.1)
hpricot (0.8.2)
http-access (2.0.9)
httpclient (2.1.5.2)
httpi (0.7.8)
i18n (0.5.0)
json (1.4.3)
json_pure (1.4.3)
little-plugger (1.1.2)
lockfile (1.4.3)
log4r (1.1.8)
logging (1.4.3)
macaddr (1.0.0)
mime-types (1.16)
mislav-will_paginate (2.3.11)
mysql (2.8.1)
net-scp (1.0.2)
net-sftp (2.0.4)
net-ssh (2.0.23)
net-ssh-gateway (1.0.1)
newrelic_rpm (2.13.4)
nokogiri (1.4.4, 1.4.2)
ntlm-http (0.1.1)
polyglot (0.3.1)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-graph (0.0.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rack (1.2.1, 1.1.0)
rack-test (0.5.4)
rails (2.3.6, 2.3.2)
rake (0.8.7)
rcov (0.9.8)
rspec (1.3.0)
rspec-rails (1.3.2)
rubyforge (2.0.4)
rubygems-update (1.4.2)
savon (0.8.6, 0.8.5)
searchlogic (2.4.19)
soap4r (1.5.8)
treetop (1.4.9)
troelskn-handsoap (0.5.7)
uuid (2.3.1)
webrat (0.7.1)
ZenTest (4.3.3)
*** LOCAL GEMS ***

actionmailer (2.3.2, 2.1.0)
actionpack (2.3.2, 2.1.0)
activerecord (2.3.2, 2.1.0)
activeresource (2.3.2, 2.1.0)
activesupport (2.3.8, 2.3.5, 2.3.2, 2.1.0)
binarylogic-searchlogic (2.3.5)
builder (3.0.0)
calendar_date_select (1.15)
cgi_multipart_eof_fix (2.5.0)
crack (0.1.8)
daemons (1.0.10)
dmclient (0.0.5277)
facter (1.5.7)
fastercsv (1.4.0)
fastthread (1.0.7)
formtastic (0.9.8)
gateway_install_support (0.0.8785)
gem_plugin (0.2.3)
gemcutter (0.3.0)
gyoku (0.2.0)
handsoap (1.1.8)
hoe (2.3.3)
hpricot (0.8.1)
http-access (2.0.9)
httpclient (2.1.5.2)
httpi (0.7.8)
json (1.2.0)
json_pure (1.2.0)
log4r (1.0.5)
macaddr (1.0.0)
mislav-will_paginate (2.3.11)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
net-scp (1.0.2)
net-ssh (2.0.16)
newrelic_rpm (2.13.4)
ParseTree (2.1.1)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
puppet (0.25.4)
rack (1.0.1)
rails (2.3.2, 2.1.0)
rake (0.8.7, 0.8.4)
rcov (0.8.1.2.0)
ruby2ruby (1.1.8)
rubyforge (2.0.3)
RubyInline (3.8.3)
sake (1.0.15)
savon (0.8.3)
searchlogic (2.4.19)
soap4r (1.5.8)
thoughtbot-factory_girl (1.2.1)
troelskn-handsoap (0.5.7)
uuid (2.1.0)
xml-simple (1.0.12)
ZenTest (4.1.4)

actionmailer (2.3.6, 2.3.2)
actionpack (2.3.6, 2.3.2)
activerecord (2.3.6, 2.3.2)
activeresource (2.3.6, 2.3.2)
activesupport (2.3.6, 2.3.4, 2.3.2, 2.2.2)
adeptware-lindo (0.6)
autotest (4.4.6)
builder (3.0.0)
calendar_date_select (1.16.1)
capistrano (2.5.19)
cgi_multipart_eof_fix (2.5.0)
crack (0.1.8)
diff-lcs (1.1.2)
dmclient (0.0.9791)
faker (0.9.5)
fastercsv (1.5.3)
fastthread (1.0.1 i386-mswin32)
fxri (0.3.6)
fxruby (1.6.16 x86-mswin32-60)
gem_plugin (0.2.3)
gyoku (0.3.1, 0.2.0)
handsoap (1.1.8)
highline (1.6.1)
hoe (2.8.0)
hpricot (0.6.164 mswin32)
httpclient (2.1.5.2)
httpi (0.7.9)
i18n (0.5.0)
json (1.4.6 x86-mswin32)
linecache (0.43 mswin32)
log4r (1.1.9, 1.0.5)
macaddr (1.0.0)
mislav-will_paginate (2.3.11)
mocha (0.9.10)
mysql (2.8.1 x86-mswin32)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.0.23)
net-ssh-gateway (1.0.1)
newrelic_rpm (2.13.4)
nokogiri (1.4.4.1 x86-mswin32)
ntlm-http (0.1.1)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
ptools (1.1.6)
rack (1.2.1, 1.1.1)
rack-test (0.5.7)
rails (2.3.6, 2.3.2)
rake (0.8.7, 0.8.1)
rcov (0.8.1.2.0 mswin32)
rr (1.0.2)
rspec (2.4.0)
rspec-core (2.4.0)
rspec-expectations (2.4.0)
rspec-mocks (2.4.0)
ruby-debug-base (0.10.3 mswin32)
ruby-debug-ide (0.4.5)
ruby-opengl (0.60.0 i386-mswin32)
rubygems-update (1.3.7)
savon (0.8.6, 0.8.3)
searchlogic (2.4.27, 2.4.19)
soap4r (1.5.8)
test-unit (2.0.1)
thoughtbot-factory_girl (1.2.2)
thoughtbot-shoulda (2.10.2)
timecop (0.3.5)
troelskn-handsoap (0.5.7)
uuid (2.3.1)
webrat (0.7.3)
win32-api (1.2.1 x86-mswin32-60, 1.2.0 x86-mswin32-60)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)
xml-simple (1.0.12)
ZenTest (4.4.2)

@rossi-jeff
Copy link
Author

On 03/24/2011 03:29 PM, rubiii wrote:

which version of the httpclient gem are you using?

Also Richard says he tried several versions of httpi

aftcorich: tried using httpi gem version 0.7.8, 0.7.9 and 0.9.0

Jeff Rossi
Application Developer | InTouch MVC
Office: 800-881-6343 | Cell: 863-669-6488 | Fax: 863-687-0077
5101 Great Oak Dr. Lakeland, Fl 33815


http://www.intouchmvc.com
Asset Monitoring Solutions

@rubiii
Copy link
Contributor

rubiii commented Apr 5, 2011

please try upgrading httpi to v0.9.2 and let me know if this solves your problem.

@rubiii
Copy link
Contributor

rubiii commented May 14, 2011

this should be solved. please let me know if it isn't.

@rubiii rubiii closed this as completed May 14, 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

2 participants