1

I've implemented a simple SOAP webservice client to test the functionality but whether my client or in iex, and regardless of the target service I always get {:ok, :undefined, :undefined}

Here is my code:

wsdl_url = "http://www.webservicex.net/convertVolume.asmx?WSDL"
action = "ChangeVolumeUnit"
parameters = ["100", "dry", "centiliter"]
Detergentex.call(wsdl_url, action, parameters)

I'm using Versions:

  • Elixir: 1.2.0
  • Detergentex: 0.0.7

My mix.exs deps:

[{:erlsom, github: "willemdj/erlsom"},{:detergentex, "0.0.7"}]

Any suggestions on what I'm missing would be greatly appreciated.

M4N
  • 94,805
  • 45
  • 217
  • 260
  • Possible duplicate of [Elixir call Axis2 Java SOAP Web Service with detergentex and detergent](http://stackoverflow.com/questions/33135605/elixir-call-axis2-java-soap-web-service-with-detergentex-and-detergent) – Svein Fidjestøl Apr 19 '16 at 18:48

1 Answers1

0

1.) It's got a dependency on the detergent package.

Hex Dependencies For Detergentex

Have you added the dependency for detergent? If not modify your mix.exs to this:

[{:erlsom, github: "willemdj/erlsom"},{:detergentex, "0.0.7"}, {:detergent, "~> 0.3.0"}]

2.) You also need to add detergentex to the list of applications as well:

def application do
    [applications: [:logger, :detergentex]]
end

3.) The fact that it's returning {:ok, :undefined, :undefined} may simply indicate an issue with the endpoint or the message you're passing. Therefore I'd try it against an endpoint you're sure is good with a message you're sure will work. Perhaps the valid parameters to the endpoint they mention in their docs have changed since the docs were prepared.

By the way, I did see that you mentioned "regardless of the target service" but given it seems that you failed to add that detergent dependency and the fact that it looks like you forgot to add detergent to the application list, I'd still try some of those other SOAP endpoints again since you've changed things.

Onorio Catenacci
  • 14,928
  • 14
  • 81
  • 132