SOAP (again?)

Richard Cameron camster@REDACTED
Fri Dec 23 15:25:06 CET 2005


On 22 Dec 2005, at 10:11, Claes Wikstom wrote:

> I've been doing quite a lot of SOAP client programming
> lately and I sure can't say I liked it. It sucks bigtime.

I have to agree. It's the join product of a technical committee's  
twisted minds, and a marketing department's irony-free use of the  
word "simple" in the acronym.

> 1. Ask the WebServices provider to give me a good
>    tcpdump capture of one good and one bad case.
>
> 2. Send raw XML structures to the WebServices provider
>    with my dataitems inserted,
>
> 3. xmerl parse the reply.

I tried that initially, but slowly got caught with anything but the  
simplest calls. For instance when an optional element I hadn't seen  
before in a complex data type appeared then I just didn't know what  
to do with it (not having read the .wsdl file to understand the schema).

> To my knowledge there is no good SOAP lib available today,
> One key componenet that is missing is an XML-Schema parser
> which is non trivial.

I tried various "proper" SOAP clients in the end.

My first attempt was to use a Java node running Apache Axis and make  
it visible to Erlang using jinterface. That worked reasonably well,  
but tended to be quite CPU-heavy when processing *lots* of messages  
per second.

I eventually went with gSoap <http://www.cs.fsu.edu/~engelen/ 
soap.html> which compiles the .wsdl file into C or C++ code which can  
act as either as a client or a server. I then got Erlang to talk to  
this C process over a port.

The advantage is that it runs absolutely blindingly fast (about 3%  
CPU versus Apache Axis's 60% - although it was a while ago, so the  
Java implementation may now have improved). The downside is that  
there's some incredibly dull "glue code" to write for every single  
method which can drive the average man insane in next to no time.

Richard.



More information about the erlang-questions mailing list