Open HaNdlezz opened 4 years ago
@HaNdlezz Hi. Nested maps should work. what error do you get?
I checked with a test WSDL file:
params = params = %{example: %{key: "key_data", key2: %{key3: "key3_data"}}}
Soap.call(wsdl, "getRates", params)
result:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<env:Envelope xmlns:=\"http://schemas.xmlsoap.org/wsdl/\"
xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
<env:Header/>
<env:Body>
<getRates xmlns=\"http://fedex.com/ws/rate/v26\">
<example>
<key>key_data</key>
<key2>
<key3>key3_data</key3>
</key2>
</example>
</getRates>
</env:Body>
</env:Envelope>
Hi, thanks for you answer.
I have this file: http://serviciosdls.starken.cl/TrackingCarga/TrackingCargaServiceWS?WSDL, when i run Soap.init_model(file_path, :file), y get a response without operations (operations: [ ]), in this case, i modified the file, in specific: before:
after:
Whit this modification in the file, Soap.init_model(file_path, :file), recognize the operation "detalleTrackingCarga", so, i run: Soap.call(wsld, "detalleTrackingCarga", params).. and i get:
Here the operations availables:
Here, the full process:
Ty for your answers my friend, cheers
I've got the same issue. Looks like it tries to Enum.find(fn x -> x[:name] == operation end)
in our WSDL file, but there is an empty wsdl[:complex_types]
list.
It crashes on /deps/soap/lib/soap/request/params.ex:220
UPD:
I was outstep that issue (and finally got a SoapFault) when I changed mix.exs in line [{:soap, git: "https://github.com/elixir-soap/soap"}]
, after it mix deps.unlock soap && mix deps.get
.
It is not a solution, but it's one step closer to it
Hi, the params in the call, are defined in the documentation as: %{key: value}, if i need define map into map,is accepted as valid params? i try, but i get a error
example:%{key: value, key2: %{key3: value}}