PHP code example of goetas-webservices / wsdl-reader

1. Go to this page and download the library: Download goetas-webservices/wsdl-reader library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

goetas-webservices / wsdl-reader example snippets


use GoetasWebservices\XML\WSDLReader\DefinitionsReader;

$reader = new DefinitionsReader();
$definitions = $reader->readFile("http://www.example.com/exaple.wsdl");

// $definitions is instance of GoetasWebservices\XML\WSDLReader\Wsdl\Definitions;
// Now you can navigate the entire WSDL structure

foreach ($definitions->getServices() as $service){

}
foreach ($definitions->getProtTypes() as $portType){

}
foreach ($definitions->getBindings() as $binding){

}
foreach ($definitions->getMessages() as $message){

}