Ejemplo n.º 1
0
 /**
  * This will run the proxy webservice and exit the script execution
  * 
  * @param strign $wsdl The WSDL URI
  */
 public static function RunProxy($wsdl)
 {
     require_once dirname(__FILE__) . '/class.phpwsdlclient.php';
     PhpWsdl::Debug('Run PhpWsdlAjax proxy at ' . $wsdl);
     PhpWsdl::RegisterHook('CreatePhpCallHook', 'ajax', 'PhpWsdlAjax::CreatePhpCall');
     self::$Client = new PhpWsdlClient($wsdl);
     $server = self::$Client->CreateServerFromWsdl();
     if ($server->IsSoapRequest()) {
         eval($server->OutputPhp(false, false, array('class' => 'PhpWsdlAjaxProxy', 'openphp' => false)));
     }
     $server->RunServer(null, 'PhpWsdlAjaxProxy');
 }
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 3 of the License, or (at your option) any later 
version. 

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 

You should have received a copy of the GNU General Public License along with 
this program; if not, see <http://www.gnu.org/licenses/>.
*/
if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) {
    exit;
}
PhpWsdl::RegisterHook('InterpretKeywordpw_complexHook', 'internal', 'PhpWsdlComplex::InterpretComplex');
PhpWsdl::RegisterHook('CreateObjectHook', 'internalcomplex', 'PhpWsdlComplex::CreateComplexTypeObject');
/**
 * This class creates complex types (classes or arrays)
 * 
 * @author Andreas Zimmermann, wan24.de
 */
class PhpWsdlComplex extends PhpWsdlObject
{
    /**
     * The array type
     * 
     * @var string
     */
    public $Type = null;
    /**
     * A list of elements, if this type is a class
This program is free software; you can redistribute it and/or modify it under 
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 3 of the License, or (at your option) any later 
version. 

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 

You should have received a copy of the GNU General Public License along with 
this program; if not, see <http://www.gnu.org/licenses/>.
*/
if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) {
    exit;
}
PhpWsdl::RegisterHook('InterpretKeywordpw_elementHook', 'internal', 'PhpWsdlElement::InterpretElement');
/**
 * An element of a complex type
 * 
 * @author Andreas Zimmermann, wan24.de
 */
class PhpWsdlElement extends PhpWsdlParam
{
    /**
     * Can the value be NULL?
     * 
     * @var boolean
     */
    public $NillAble = true;
    /**
     * Minimum number of elements
Ejemplo n.º 4
0
//
// Note: The NuSOAP adapter won't work with the PhpWsdlProxy!
PhpWsdl::Debug('NuSOAP adapter loaded');
PhpWsdl::RegisterHook('CreateWsdlHeaderHook', 'nusoap', 'PhpWsdlNuSOAP::CreateWsdl');
PhpWsdl::RegisterHook('PrepareServerHook', 'nusoap', 'PhpWsdlNuSOAP::PrepareServer');
PhpWsdl::RegisterHook('RunServerHook', 'nusoap', 'PhpWsdlNuSOAP::RunServer');
// Disable the PhpWsdl WSDL Generator (we need to use the one from NuSOAP)
PhpWsdl::UnregisterHook('CreateWsdlHeaderHook', 'internal');
PhpWsdl::UnregisterHook('CreateWsdlTypeSchemaHook', 'internal');
PhpWsdl::UnregisterHook('CreateWsdlMessagesHook', 'internal');
PhpWsdl::UnregisterHook('CreateWsdlPortsHook', 'internal');
PhpWsdl::UnregisterHook('CreateWsdlBindingsHook', 'internal');
PhpWsdl::UnregisterHook('CreateWsdlServiceHook', 'internal');
PhpWsdl::UnregisterHook('CreateWsdlFooterHook', 'internal');
// Comment out this line to get rid of the NuSOAP information in the HTML output
PhpWsdl::RegisterHook('CreateHtmlGeneralHook', 'nusoap', 'PhpWsdlNuSOAP::CreateHtmlGeneral');
/**
 * This class will run a NuSOAP SOAP server with PhpWsdl
 * 
 * @author Andreas Müller-Saala, wan24.de
 */
class PhpWsdlNuSOAP
{
    /**
     * The current server object
     * 
     * @var nusoap_server
     */
    public static $Server = null;
    /**
     * Create WSDL
Ejemplo n.º 5
0
PhpWsdlZend::Init();
//TODO Uncomment to let Zend create the WSDL
//PhpWsdl::RegisterHook('CreateWsdlHeaderHook','zend','PhpWsdlZend::CreateWsdl');
PhpWsdl::RegisterHook('PrepareServerHook', 'zend', 'PhpWsdlZend::PrepareServer');
PhpWsdl::RegisterHook('RunServerHook', 'zend', 'PhpWsdlZend::RunServer');
// Disable the PhpWsdl WSDL Generator (we need to use the one from Zend)
//TODO Uncomment to let Zend create the WSDL
/*PhpWsdl::UnregisterHook('CreateWsdlHeaderHook','internal');
PhpWsdl::UnregisterHook('CreateWsdlTypeSchemaHook','internal');
PhpWsdl::UnregisterHook('CreateWsdlMessagesHook','internal');
PhpWsdl::UnregisterHook('CreateWsdlPortsHook','internal');
PhpWsdl::UnregisterHook('CreateWsdlBindingsHook','internal');
PhpWsdl::UnregisterHook('CreateWsdlServiceHook','internal');
PhpWsdl::UnregisterHook('CreateWsdlFooterHook','internal');*/
// Comment out this line to get rid of the Zend information in the HTML output
PhpWsdl::RegisterHook('CreateHtmlGeneralHook', 'zend', 'PhpWsdlZend::CreateHtmlGeneral');
/**
 * This class will run a Zend SOAP server with PhpWsdl
 * 
 * @author Andreas Müller-Saala, wan24.de
 */
class PhpWsdlZend
{
    /**
     * The current server object
     * 
     * @var Zend_Soap_Server
     */
    public static $Server = null;
    /**
     * Options for the Zend server
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 3 of the License, or (at your option) any later 
version. 

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 

You should have received a copy of the GNU General Public License along with 
this program; if not, see <http://www.gnu.org/licenses/>.
*/
if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) {
    exit;
}
PhpWsdl::RegisterHook('InterpretKeywordparamHook', 'internal', 'PhpWsdlParam::InterpretParam');
PhpWsdl::RegisterHook('InterpretKeywordreturnHook', 'internal', 'PhpWsdlParam::InterpretReturn');
/**
 * A parameter or return value definition for a method
 * 
 * @author Andreas Zimmermann, wan24.de
 */
class PhpWsdlParam extends PhpWsdlObject
{
    /**
     * The parameter type name
     * 
     * @var string
     */
    public $Type;
    /**
     * Documentation
Ejemplo n.º 7
0
 /**
  * Constructor
  * 
  * @param PhpWsdl $server The PhpWsdl object
  */
 public function PhpWsdlServers($server)
 {
     $this->GUID = uniqid();
     PhpWsdl::Debug('New PhpWsdlServers "' . $this->GUID . '"');
     $this->Server = $server;
     self::$UseServer = $this;
     PhpWsdl::RegisterHook('ReadCacheHook', 'servers', array($this, 'ReadCacheHook'));
     PhpWsdl::RegisterHook('WriteCacheHook', 'servers', array($this, 'WriteCacheHook'));
 }
version. 

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 

You should have received a copy of the GNU General Public License along with 
this program; if not, see <http://www.gnu.org/licenses/>.
*/
if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) {
    exit;
}
PhpWsdl::RegisterHook('InterpretKeywordpw_omitfncHook', 'internal', 'PhpWsdlMethod::InterpretOmit');
PhpWsdl::RegisterHook('InterpretKeywordignoreHook', 'internal', 'PhpWsdlMethod::InterpretOmit');
PhpWsdl::RegisterHook('InterpretKeywordpw_setHook', 'internal', 'PhpWsdlMethod::InterpretSetting');
PhpWsdl::RegisterHook('CreateObjectHook', 'internalmethod', 'PhpWsdlMethod::CreateMethodObject');
/**
 * A method definition object
 * 
 * @author Andreas Zimmermann, wan24.de
 */
class PhpWsdlMethod extends PhpWsdlObject
{
    /**
     * A list of parameters
     * 
     * @var PhpWsdlParam[]
     */
    public $Param = array();
    /**
     * The return value
Ejemplo n.º 9
0
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 3 of the License, or (at your option) any later 
version. 

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 

You should have received a copy of the GNU General Public License along with 
this program; if not, see <http://www.gnu.org/licenses/>.
*/
if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) {
    exit;
}
PhpWsdl::RegisterHook('InterpretKeywordpw_enumHook', 'internal', 'PhpWsdlEnum::InterpretEnum');
PhpWsdl::RegisterHook('CreateObjectHook', 'internalenum', 'PhpWsdlEnum::CreateEnumTypeObject');
/**
 * This class creates enumerations
 * 
 * @author Andreas Müller-Saala, wan24.de
 */
class PhpWsdlEnum extends PhpWsdlObject
{
    /**
     * The enumeration base type
     * 
     * @var string
     */
    public $Type;
    /**
     * A list of elements