PHP Classes

PHP WSDL Generator: Generate WSDL from PHP classes code

Recommend this page to a friend!
  Info   View files View files (36)   DownloadInstall with Composer Download .zip   Reputation   Support forum (32)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (1 month ago) RSS 2.0 feedStarStarStarStar 66%Total: 16,694 This week: 1All time: 49 This week: 119Down
Version License PHP version Categories
php2wsdl 0.19MIT/X Consortium ...5.4PHP 5, Web services
Description 

Author

This package can be used to generate a Web Services Definition Language (WSDL) document from the code of a class that implements Web services calls.

It parses the code of a given PHP class script files and generates a WSDL definition from the list of the class functions.

Certain functions may be skipped to not be included in the WSDL definition based on the function access type.

The generated WSDL may be saved to a given file, returned as a string or served for download.

Picture of Protung Dragos
Name: Protung Dragos is available for providing paid consulting. Contact Protung Dragos .
Classes: 10 packages by
Country: Romania Romania
Age: 40
All time rank: 281 in Romania Romania
Week rank: 131 Down1 in Romania Romania Equal
Innovation award
Innovation award
Nominee: 3x

Details

PHP2WSDL

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Create WSDL files from PHP classes.

Install

Via Composer

$ composer require php2wsdl/php2wsdl

Usage

$class = "Vendor\\MyClass";
$serviceURI = "https://www.myservice.com/soap";
$wsdlGenerator = new PHP2WSDL\PHPClass2WSDL($class, $serviceURI);
// Generate the WSDL from the class adding only the public methods that have @soap annotation.
$wsdlGenerator->generateWSDL(true);
// Dump as string
$wsdlXML = $wsdlGenerator->dump();
// Or save as file
$wsdlXML = $wsdlGenerator->save('foo/example.wsdl');

Testing

$ vendor/bin/simple-phpunit

Security

If you discover any security related issues, please email instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.


  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (2 files)
Files folder imagetests (1 file, 3 directories)
Accessible without login Plain text file .gitignore Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file build.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file PHPClass2WSDL.php Class Class source
  Plain text file WSDL.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageExpected (4 files, 1 directory)
Files folder imageFixtures (4 files, 1 directory)
Files folder imageStub (3 files)
  Accessible without login Plain text file PHP2WSDLTest.php Test Unit test script

  Files folder image Files  /  tests  /  Expected  
File Role Description
Files folder imageDataProvider (7 files)
  Accessible without login Plain text file TestGenerateWSDLFo...hAllComponents.wsdl Data Auxiliary data
  Accessible without login Plain text file testGenerateWSDLWithStylesheet.wsdl Data Auxiliary data
  Accessible without login Plain text file TestSimpleClassWit...TagAnnotations.wsdl Data Auxiliary data
  Accessible without login Plain text file TestSimpleClassWit...TagAnnotations.wsdl Data Auxiliary data

  Files folder image Files  /  tests  /  Expected  /  DataProvider  
File Role Description
  Accessible without login Plain text file TestElementWithMaxOccurrences.wsdl Data Auxiliary data
  Accessible without login Plain text file TestElementWithMin...currencesOfOne.wsdl Data Auxiliary data
  Accessible without login Plain text file TestElementWithMinOccurrences.wsdl Data Auxiliary data
  Accessible without login Plain text file TestMethodInputArrayOfObjects.wsdl Data Auxiliary data
  Accessible without login Plain text file TestMethodInputArrayOfScalars.wsdl Data Auxiliary data
  Accessible without login Plain text file TestMethodInputBase64Binary.wsdl Data test expectation
  Accessible without login Plain text file TestMethodInputWithScalars.wsdl Data Auxiliary data

  Files folder image Files  /  tests  /  Fixtures  
File Role Description
Files folder imageDataProvider (7 files)
  Accessible without login Plain text file TestGenerateWSDLFo...thAllComponents.php Aux. Auxiliary script
  Accessible without login Plain text file TestGenerateWSDLWithStylesheet.php Aux. Auxiliary script
  Accessible without login Plain text file TestSimpleClassWit...pTagAnnotations.php Aux. Auxiliary script
  Accessible without login Plain text file TestSimpleClassWit...pTagAnnotations.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Fixtures  /  DataProvider  
File Role Description
  Accessible without login Plain text file TestElementWithMaxOccurrences.php Aux. Auxiliary script
  Accessible without login Plain text file TestElementWithMin...ccurrencesOfOne.php Aux. Auxiliary script
  Accessible without login Plain text file TestElementWithMinOccurrences.php Aux. Auxiliary script
  Accessible without login Plain text file TestMethodInputArrayOfObjects.php Aux. Auxiliary script
  Accessible without login Plain text file TestMethodInputArrayOfScalars.php Aux. Auxiliary script
  Plain text file TestMethodInputBase64Binary.php Class test fixture
  Accessible without login Plain text file TestMethodInputWithScalars.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Stub  
File Role Description
  Accessible without login Plain text file MaxOccurrences.php Aux. Auxiliary script
  Accessible without login Plain text file MinMaxOccurrencesOfOne.php Aux. Auxiliary script
  Accessible without login Plain text file MinOccurrences.php Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:16,694
This week:1
All time:49
This week:119Down
User Ratings User Comments (11)
 All time
Utility:90%StarStarStarStarStar
Consistency:77%StarStarStarStar
Documentation:66%StarStarStarStar
Examples:-
Tests:68%StarStarStarStar
Videos:-
Overall:66%StarStarStarStar
Rank:543
 
wasted time,the smallest example fails
5 years ago (Alex Solano)
20%StarStar
completely useless time waster.
9 years ago (kissmyassbastards)
0%Star
Nice kickstart for PHP5 SOAP.
12 years ago (vesperto)
67%StarStarStarStar
Must manually edit the generated WSDL file to add location at...
13 years ago (Zhengsheng Zhou)
75%StarStarStarStar
Brilliant work!
14 years ago (Ian)
70%StarStarStarStar
Excellent
14 years ago (kishore kumar)
80%StarStarStarStarStar
function test22222 ($p1, $p2) { return array($p1, $p2); }...
14 years ago (liuxiulin)
75%StarStarStarStar
This saved me a lot of time.
14 years ago (Matt Lintz)
80%StarStarStarStarStar
Support for Arrays would be nice.
15 years ago (Rob Janssen)
55%StarStarStar
really nice tool! -inherited public methods won't work :(
15 years ago (spoom)
70%StarStarStarStar
Excellent resource the produced wsdl accurately creates a cli...
15 years ago (Jon Diamond)
77%StarStarStarStar