Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<?php
require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();
class MyClass {
/**
* This method takes ...
*
* @param integer $inputParam
* @return string
*/
public function method1($inputParam) {
return rand(1,10);
}
}
if(isset($_GET['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setBindingStyle(
array('style' => 'document',
'transport' => 'http://schemas.xmlsoap.org/soap/http')
);
$autodiscover->setOperationBodyStyle(
array('use' => 'literal')
);
$autodiscover->setClass('MyClass');
$autodiscover->handle();
} else if (isset($_GET['client'])) {
$client = new Zend_Soap_Client("http://localhost/soap/?wsdl");
echo $client->method1(10);
} else {
$soap = new Zend_Soap_Server("http://localhost/soap/?wsdl");
$soap->setClass('MyClass');
$soap->handle();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.