Lyex - A SOAP client that will hopefully work

lyex
soap
wsdl

#1

Greetings, Alchemists.

I have a really old project that I’ve been maintaining for the last 8 years. It’s written in .NET and has been growing very long in the tooth for a long time. It talks to around 10 SOAP services (yay…not). Lately I’ve been wanting to port it to Elixir but haven’t had much luck finding a SOAP lib that works. I could have settled on hard coding each service with templates and calling it a day. But the dirty developer in me thinks that’s insanely boring.

So I set out to build a client of my own.

I had to learn about how WSDL files are structured. Fun…yeah no.
Once I got a WSDL parsed into Elixir, I had to figure out how to use that. So what better chance to learn a bit about macros. That was fun!

Anyway, with a boring/typical name, Lyex was born.

The idea is to feed it a WSDL URI and it will download and cache the file(s). It will then generate a full client based on the operations found in the WSDL.

The client includes functions for every operation and typed structs based on the inputs and outputs of each operation.

This is an initial commit of Lyex and my first real used of macros in elixir-land.

I’d appreciate it if someone could throw a WSDL or two at it let me know how you fare.

Lyex @ GitHub

Cheers,
Chris


#2

It seems that Lyex has an issue with WSDL containing multiple bindings. I will fix that up over the weekend


#3

:clap: Great work, you did what I wanted to, I only had to talk to 1 SOAP service so I ended up hardcoding the templates and response parsers with sweet xml.


#4

Thanks. I started and got obsessed with achieving the end goal. I’m sure a lot of you can understand that! Haha.

I’m committed to making this usable.


#5

Ooo, I’m sorry, I had to do that at my last job almost 10 years ago, that was a horror… ^.^;

Yep, had to do the same… ^.^;

Seems punny to me. ^.^

This is awesome!

Does it generate docs about the interface as well? Can it be generated out with the projects docs as well? :slight_smile:

Sadly/Happily I don’t have to deal with SOAP/WSDL anymore so I don’t have anything I can test it with. ^.^;


#6

haha.

I generates minimal moduledocs and docs. I don’t know about anything else. :wink:

Thanks for lookin.


#7

I’ve just spent the evening putting together a test app in Node to interact with a SOAP service. The Node code is something I eventually want to port to Elixir (during this year hopefully) so please keep working on Lyex! I’ll try to take a look at it in a few days and try it against the service I have to use. Your hard work might well save me from a whole load of grief, thank you in advance!


#8

I haven’t had a chance to work on this at all recently. I’m really hoping to find some time this weekend. Please post up some WSDLs in the github issues.


#9

I’ll see what I can do but my problem is that it is a client’s SOAP service and use of it is under NDA so I might not be able to. It’s doubly frustrating because your code encounters an issue with the WSDLs but I’ll see if I can isolate the problem and give you an example to look at.


#10

I understand. I’ll do what I can to make it work with a bunch of wsdls. I’m no expert on how they actually work. I’m learning as I go. :wink:


#11

Keep at it! :grinning:


#12

I’m currently rewriting the parser. Which will require me to rewrite the code gen. Which is good. It got quite messy.


#13

Just pushed the “rewrite” if anyone is testing. I got it working with a few new WSDL files.