MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
demo.php
Ir para a documentação deste ficheiro.
1<?php
2
3// This bootstrapper may serve any SOAP webservice with PhpWsdl,
4// if your methods and classes are commented. I developed and
5// tested with Visual Studio 2010 and SoapUI 4.0.0. It seems to
6// work pretty good...
7
8// Include the demonstration classes
9require_once('class.soapdemo.php');
10require_once('class.complextypedemo.php');
11
12// Initialize the PhpWsdl class
13require_once('class.phpwsdl.php');
15 null, // PhpWsdl will determine a good namespace
16 null, // Change this to your SOAP endpoint URI (or keep it NULL and PhpWsdl will determine it)
17 './cache', // Change this to a folder with write access
18 Array( // All files with WSDL definitions in comments
19 'class.soapdemo.php',
20 'class.complextypedemo.php'
21 ),
22 null, // The name of the class that serves the webservice will be determined by PhpWsdl
23 null, // This demo contains all method definitions in comments
24 null, // This demo contains all complex types in comments
25 false, // Don't send WSDL right now
26 false); // Don't start the SOAP server right now
27
28// Disable caching for demonstration
29ini_set('soap.wsdl_cache_enabled',0); // Disable caching in PHP
30PhpWsdl::$CacheTime=0; // Disable caching in PhpWsdl
31
32// Run the SOAP server
33if($soap->IsWsdlRequested()) // WSDL requested by the client?
34 $soap->Optimize=false; // Don't optimize WSDL to send it human readable to the browser
35//$soap->ParseDocs=false; // Uncomment this line to disable the whole documentation features
36//$soap->IncludeDocs=false; // Uncomment this line to disable writing the documentation in WSDL XML
37//$wsdl=$soap->CreateWsdl(); // This would save the WSDL XML string in $wsdl
38//$php=$soap->OutputPhp(false,false); // This would save a PHP SOAP client as PHP source code string in $php
39//$html=$soap->OutputHtml(false,false); // This would save the HTML documentation string in $html
40$soap->RunServer(); // Finally, run the server
static $CacheTime
static CreateInstance( $nameSpace=null, $endPoint=null, $cacheFolder=null, $file=null, $name=null, $methods=null, $types=null, $outputOnRequest=false, $runServer=false)
$soap
Definição demo.php:14