Simon Fell > Its just code > What's WSDL ?

Saturday, March 3, 2001

What is WSDL ?, Dave just asked this on Scripting News, i'm sure he's not the first to ask, nor will he be the last, this is my take on it.

If you ignore all the politics and WSDL will save the earth hype, and concentrate on what people are doing with WSDL, then things become clearer, WSDL is simply a SOAP server description language, it describes everything you need to know in order to make a sucessfull call to a SOAP endpoint. The information includes methodNames, namespace URI's, encoding styles, soap endpoint URL(s), parameters and data types. If you are a COM or CORBA programmer then you should recognise WSDL as being the IDL of SOAP.

Why is it useful ?, sure you could just write up an english description of what you can do with the SOAP endpoint, you could even give some example SOAP request / response messages ( e.g. see the Manila SOAP inteface docs ). Given this yes you can (and i have) make calls against Manila, and as a client coder, you'd probably make little function stubs in what ever language tool you are using, that make the soap call and handle the request. This soon becomes tedious, from a SOAP client point of view, given a WSDL description of a SOAP server, you can run the WSDL through a stub generator, and have it write all those tedious stubs for you ( this is what tools like SOAP::Lite, IBM's WSTK and MS .NET do ).

But who writes it ?, ideally you don't have to manually write any WSDL file, they are tedious and error prone to produce (hence the WSDL validator project). Most SOAP servers (particular those that are mapping SOAP into existing languages / systems ) have all the information needed to produce the WSDL automatically, and tools such as my own 4s4c, MS .NET and the IBM WSTK will do just this

If you're one of the many people using one of the popular SOAP toolkits with WSDL support, then thats all you really need to know. If however your one of the implementors, well then, you probably need to know a lot more :( The WSDL format is based around an abstract service system, with extensions for SOAP (and with the plan for extensions for other systems i assume), it unfortuantly uses XML Schema as its type system, this makes a fully conforming WSDL implentation a significant challenge, especially at the minute, as there are hardly any existing toolsets for XML Schema.