PHP Classes

Soap Discovery: Generate WSDL for SOAP Web service with reflection

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 63%Total: 4,900 All time: 560 This week: 524Up
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
Age: 47
All time rank: 6051 in Costa Rica Costa Rica
Week rank: 195 Up1 in Costa Rica Costa Rica Equal
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 (4)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,900
This week:0
All time:560
This week:524Up
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:778
 
Great work! (buen trabajo chico)
15 years ago (Antonio)
80%StarStarStarStarStar