Develop a Soap service in elixir and phoenix

Could not find any clue anywhere, struggling to get a proper response. Any suggestions?

Iā€™ve been down the same path as others have mentioned here. The incompatibilities will continue to bite you for months and months, as you find small details that are not handled the same way in whichever client youā€™ve chosen. I have seen this in python, perl, php, erlang, elixir, and even SOAPUI - every tool has a slightly different interpretation of what features it supports, and how to access them. The SOAP Way is pure darkness.

My advice is:Keep it simple, donā€™t use SOAP.

  • Generate your requests in plain XML using Eex templates
  • Use a sensible elixir HTTP library
  • use sweet_xml or floki (yes really) to extract responses

You will have working code, locally testable, in no time at all.

10 Likes

I think the proposal of skunkwerks is the most sensible one.

And thatā€™s really funny, because thatā€™s almost exactly what i did.

1 Like

Itā€™s what everyone should do. WSDL and SOAP were dead on arrival. They were born in some pretty dark times; people thought that imposing a huge and slow formal processes by organisations full of academics who have zero exposure to the real world was actually a good idea.

Iā€™ve known a ton of Java devs back then (and I was one; talking about 2003-2009). At least 80% of them just made their own SOAP parsing and generating code and were done months before the others who insisted on using heavyweight libraries for it.

2 Likes

Itā€™s still a very real integration requirement for a lot of Legacy (and not so legacy) services.

Really donā€™t see that changing anytime soon

3 Likes

Thanks guys for all your valuable inputs. I had followed the approach suggested by skunkwerks.

Sure, thatā€™s true. But you can still inch your way out of the problems, even if it takes years (as long as you are happy working on that for years).