Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7608851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:01:35+00:00 2026-05-31T01:01:35+00:00

I need to get some information from a delivery company who is using soap

  • 0

I need to get some information from a delivery company who is using soap to get the list of delivery points. I finished my classes to call and execute the soap request and this is the format of the response :

{
:error_message=> "Code retour OK", 
:liste_point_retrait =>
[
    {
        :horaires_ouverture_dimanche => "00:00-00:00 00:00-00:00", 
        :poids_maxi => "20000", 
        :conges_partiel => false, 
        :horaires_ouverture_vendredi => "09:00-12:00 14:30-18:00", 
        :acces_personne_mobilite_reduite => false, 
        :horaires_ouverture_jeudi => "09:00-12:00 14:30-17:30", 
        :nom => "BUREAU DE POSTE SAINT LEU D ESSERENT BP"
    }, 
    {
        :horaires_ouverture_dimanche => "00:00-00:00 00:00-00:00", 
        :poids_maxi => "20000", 
        :conges_partiel => false, 
        :horaires_ouverture_vendredi => "09:00-12:00 14:00- 17:00", 
        :acces_personne_mobilite_reduite => true, 
        :horaires_ouverture_jeudi => "09:00-12:00 14:00-17:00", 
        :nom => "BUREAU DE POSTE PRECY SUR OISE BP"
    }, 
    {
        :horaires_ouverture_dimanche => "00:00-00:00 00:00-00:00", 
        :poids_maxi=> "20000",  
        :conges_partiel => false, 
        :horaires_ouverture_vendredi => "08:30-12:00 14:30-17:00",
        :acces_personne_mobilite_reduite => false, 
        :horaires_ouverture_jeudi => "08:30-12:00 14:30-17:00", 
        :nom => "BUREAU DE POSTE SAINT MAXIMIN BP"
    }
], 
:error_code=> "0", 
:qualite_reponse=> "1", 
:ws_request_id => "01587849465dc81b5eb19996cdd5d1cae4ead7766316f12e4fbfa6e86037caae"
}

The problem now is that I don’t like the way I currently get the information to display it in my views, for example if @points contains this hash I use this in my code:

<% @points[:liste_point_retrait].each do |point| %>
  <%= point[:nom] %>
<% end %>

Is there a better way to handle this response? I would like to have the possibilty to do something like this :

<% @points.each do |point| %>
   <%= point.name %>
<% end %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:01:37+00:00Added an answer on May 31, 2026 at 1:01 am

    If you only want the data inside of the :liste_point_retrait key then only use that key?:

    @points = @points[:liste_point_retrait]
    

    Then you can continue to traverse this with

    <% @points.each do |point| %>
      <%= point[:nom] %>
    <% end %>
    

    If you would rather use point.nom over point[:nom] then you can create an OpenStruct from each Hash element. That is:

    @points.map! { |p| OpenStruct.new(p)
    

    I see you have name vs nom in your example and I’m not sure if that’s intentional or not. If so, you need to translate all of these keys yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JInternalFrame and I need to get some Information from user (a
I desperately need to be able to get some information from the request array
I need to get some information from user by showing a JFrame I need
I am writing java code where i need to get some information from a
I am using some XML parser to get some information from API, blah blah...
I am working so some stuffs where I need to get some information using
I need to get some information from an JSONArray and i thought tokener would
I'm using WMI, I need to get some information, but when class is not
i'm using regex to get some information from a website, i have this code:
Sometimes I have classes which need to get some information for construction. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.