-
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
httpi errors connecting to navteq #165
Comments
which version of the httpclient gem are you using? |
On 03/24/2011 03:29 PM, rubiii wrote:
Jeff Rossi http://www.intouchmvc.com actionmailer (2.3.6, 2.3.2) actionmailer (2.3.2, 2.1.0) actionmailer (2.3.6, 2.3.2) |
On 03/24/2011 03:29 PM, rubiii wrote:
aftcorich: tried using httpi gem version 0.7.8, 0.7.9 and 0.9.0 Jeff Rossi http://www.intouchmvc.com |
please try upgrading httpi to v0.9.2 and let me know if this solves your problem. |
this should be solved. please let me know if it isn't. |
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:in
respond_with'httpi (0.7.8) lib/httpi/adapter/httpclient.rb:64:in
do_request' httpi (0.7.8) lib/httpi/adapter/httpclient.rb:31:in
post'httpi (0.7.8) lib/httpi.rb:96:in
post' httpi (0.7.8) lib/httpi.rb:189:in
with_adapter'httpi (0.7.8) lib/httpi.rb:94:in
post' savon (0.8.3) lib/savon/soap/request.rb:25:in
response'savon (0.8.3) lib/savon/soap/request.rb:41:in
with_logging' savon (0.8.3) lib/savon/soap/request.rb:25:in
response'savon (0.8.3) lib/savon/client.rb:78:in
request' lib/navteq_routing.rb:22:in
linkInfo'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
The text was updated successfully, but these errors were encountered: