elixir-soap / soap

SOAP client for Elixir programming language
MIT License
135 stars 75 forks source link

#add-nested-types Nested types has been added #70

Open AKAlexsey opened 5 years ago

AKAlexsey commented 5 years ago

Hello. I have faced to some problem. If some of passed parameters belongs to not primitive type, there is error:

     The following arguments were given to Integer.count_digits/2:

         # 1
         [{"assetToCapture", nil, ""}, {"plannedEndTime", nil, "2010.04.17T14:00:00"}, {"plannedStartTime", nil, "2010.04.17T14:00:00"}]

         # 2
         10

     code: {:ok, response} = test_function.("scheduleRecording", program)
     stacktrace:
       (elixir) lib/integer.ex:243: Integer.count_digits/2
       (elixir) lib/integer.ex:233: Integer.parse/2
       (soap) lib/soap/request/params.ex:80: Soap.Request.Params.validate_param_attributes/3
       (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
       (soap) lib/soap/request/params.ex:43: Soap.Request.Params.validate_params/3
       (soap) lib/soap/request/params.ex:113: Soap.Request.Params.build_soap_body/3
       (soap) lib/soap/request/params.ex:25: Soap.Request.Params.build_body/4
       (soap) lib/soap/request.ex:17: Soap.Request.call/5

It happens because here http://joxi.ru/KAxJ1JDHZ8Mv6m you don't check if value is complex type.
Please check the review. If everything is ok I will fix failed checks http://joxi.ru/V2V3w3JCdYxBxA

Nitrino commented 5 years ago

Hi @CarefreeSlacker. Thanks for the work you've done. I'm very busy right now, but I will try to make code review this week.

Nitrino commented 5 years ago

@CarefreeSlacker Can you please fix CI?

Nitrino commented 5 years ago

And add tests for such case

fmarco commented 2 years ago

hi, any update on this pr? :)