PHP Classes
elePHPant
Icontem

Soap Discovery: Generate WSDL for SOAP Web service with reflection

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-05-20 (7 years ago) RSS 2.0 feedStarStarStarStar 63%Total: 4,834 This week: 3All time: 536 This week: 377Up
Version License PHP version Categories
soapdiscovery 1.0.0BSD License5XML, PHP 5, Web services
Description Author

PHP 5 provides an extension to provide built-in support for implementing Web services with SOAP, but it does not generate Web Services descriptions in WSDL to let SOAP clients discover how to use the available Web services.

This class generates WSDL using the reflection API of PHP 5 to reverse engineer the class definitions. It only generates RPC WSDL, not Document WSDL.

It has been tested sharing a HelloWorld PHP class with .NET client and worked successfully.

Innovation Award
PHP Programming Innovation award nominee
May 2005
Number 4


Prize: One downloadable copy of Komodo Pro
PHP 5 has an extension that greatly simplifies the development in PHP of Web services clients and servers that use the SOAP protocol.

However, to expose the details of use a SOAP Web services it is necessary to also provide a specification XML document of the Web service functions in the WDSL format, so the Web service clients can determine how to call it.

Creating an WDSL service manually is not a trivial task as it requires good knowledge of the protocol specification.

This class provides a solution for automatically generating a WDSL document for a Web service by using the class introspection support built-in PHP 5 using the reflection API.

This way the developers of PHP Web services do not need to learn in depth about SOAP protocol.

Manuel Lemos
Picture of Braulio José Solano Rojas
Name: Braulio José Solano ... <contact>
Classes: 1 package by
Country: Costa Rica Costa Rica
Innovation award
Innovation award
Nominee: 1x

Details
Just copy the three PHP files to your server in the same directory.

Create a client that connects to HelloWorldService.php (for instance in .NET add a Web Reference to HelloWorldService.php?wsdl).

Be sure that you are running PHP 5 and that the SOAP extension is loaded.

Good luck!
  Files folder image Files  
File Role Description
Accessible without login Plain text file HelloWorld.class.php Example Hello World Class
Accessible without login Plain text file HelloWorldService.php Example Runs a Hello World Service with
Accessible without login Plain text file readme.txt Doc. Read me first
Plain text file SoapDiscovery.class.php Class SoapDiscovery Class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,834
This week:3
All time:536
This week:377Up
User Ratings User Comments (1)
 All time
Utility:84%StarStarStarStarStar
Consistency:90%StarStarStarStarStar
Documentation:56%StarStarStar
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:63%StarStarStarStar
Rank:806
 
Great work! (buen trabajo chico)
7 years ago (Antonio)
80%StarStarStarStarStar