示例#1
0
 public function testGenerateWSDLForURIWithAllComponents()
 {
     $class = 'PHP2WSDL\\Test\\Fixtures\\TestGenerateWSDLForURIWithAllComponents';
     $expectedWSDLFile = __DIR__ . '/Expected/TestGenerateWSDLForURIWithAllComponents.wsdl';
     $uri = 'http://*****:*****@example.com:81/path/file.ext?r=a/b/c&a=1&b[]=2&b[]=3';
     $wsdlGenerator = new PHPClass2WSDL($class, $uri);
     $wsdlGenerator->generateWSDL(false);
     $actual = $wsdlGenerator->dump();
     $this->assertWSDLFileEqualsWSDLString($expectedWSDLFile, $actual);
 }
示例#2
0
 /**
  * @see Service::generateWsdl()
  */
 protected function generateWsdlInternal($className, $serviceUrl)
 {
     $wsdlGenerator = new PHPClass2WSDL($className, $serviceUrl);
     $wsdlGenerator->generateWSDL(true);
     return $wsdlGenerator->dump();
 }
示例#3
0
<?php

use PHP2WSDL\PHPClass2WSDL;
include "php2wsdlxxx/vendor/autoload.php";
include "library.php";
$class = "Calculator";
$serviceURI = "http://localhost/test/web-service/server/service.php";
$wsdlGenerator = new PHPClass2WSDL($class, $serviceURI);
// Generate thw WSDL from the class adding only the public methods that have @soap annotation.
$wsdlGenerator->generateWSDL(true);
$wsdlXML = $wsdlGenerator->dump();
echo $wsdlXML;