Generating WSDL Automatically






Generating WSDL Automatically

Problem

You want to expose a set of methods via a SOAP web service. You want to automatically generate a WSDL file that describes this service.

Solution

The ext/soap extension does not support WSDL generation. However, there are a few other PHP scripts that you can use.

Discussion

Given the nature of SOAP, it's vital to provide clients with a WSDL file they can use to configure themselves for your server. Unfortunately, ext/soap does not support WSDL generation.

Therefore, you must either generate WSDL by hand from scratch, modify an existing document that supports a similar set of operations, or use an unofficial script, such as:


WSDL_Gen, by George Schlossnagle

http://www.schlossnagle.org/~george/blog/index.php?/archives/234-WSDLGeneration.html


wsdl-writer, by Katy Coe based on code by David Griffin

http://www.djkaty.com/drupal/php-wsdl


Web service helper, by David Kingma

http://jool.nl/new/

None of these scripts supports the entire SOAP and WSDL specifications, and each one uses a slightly different syntax to accomplish its goal. You should investigate all of them to see if they do what you need and fit your programming styles.

See Also

The WSDL specification at http://www.w3.org/TR/wsdl.



 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows