本文整理汇总了PHP中SOAP_Server::bind方法的典型用法代码示例。如果您正苦于以下问题:PHP SOAP_Server::bind方法的具体用法?PHP SOAP_Server::bind怎么用?PHP SOAP_Server::bind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SOAP_Server
的用法示例。
在下文中一共展示了SOAP_Server::bind方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$c = count($inputStructArray);
for ($i = 0; $i < $c; $i++) {
$ra[] = $inputStructArray[$i]->__to_soap('item');
}
}
return $ra;
}
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$groupd = new SOAP_Interop_GroupDImport3();
$server = new SOAP_Server();
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/import3.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="http://soapinterop.org/xsd"
xmlns:ns5="http://soapinterop/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
示例2: SOAPStruct
$inputStruct = get_object_vars($inputStruct);
}
$struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap($ns . 'echoStructReturn');
}
}
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$options = array('use' => 'literal', 'style' => 'document');
$groupd = new SOAP_Interop_GroupDDocLit();
$server = new SOAP_Server($options);
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop.org/WSDLInteropTestDocLit');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLit.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : NULL);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="http://soapinterop.org/xsd"
>
<SOAP-ENV:Body>
<ns4:echoStructParam>
示例3: echoStruct
}
}
return new SOAP_Value('echoStringArrayReturn', null, $ra);
}
function echoStruct($inputStruct)
{
if (is_object($inputStruct) && strtolower(get_class($inputStruct)) == 'soapstruct') {
return $inputStruct->__to_soap('return');
} else {
if (is_object($inputStruct)) {
$inputStruct = get_object_vars($inputStruct);
}
$struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap('return');
}
}
function echoVoid()
{
return null;
}
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$groupd = new SOAP_Interop_GroupDRpcEnc();
$server = new SOAP_Server();
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->addObjectMap($groupd, 'http://soapinterop.org/WSDLInteropTestRpcEnc');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestRpcEnc.wsdl.php');
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
示例4: echoDocument
}
function echoDocument($document)
{
$ns = '{http://soapinterop.org/xsd}';
return new SOAP_Value($ns . 'result_Document', $ns . 'x_Document', $document);
}
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$options = array('use' => 'literal', 'style' => 'document');
$groupd = new SOAP_Interop_GroupDCompound1();
$server = new SOAP_Server($options);
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/compound1.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="http://soapinterop.org/xsd"
>
<SOAP-ENV:Body>
<ns4:x_Document>Test Document Here</ns4:x_Document>
示例5:
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$groupd = new SOAP_Interop_GroupDImport2();
$server = new SOAP_Server();
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
if (isset($_SERVER['SERVER_NAME'])) {
$baseurl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/soap_interop/';
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
$baseurl = 'http://localhost/soap_interop/';
$server->bind($baseurl.'wsdl/import2.wsdl.php');
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="http://soapinterop.org/xsd"
xmlns:ns5="http://soapinterop/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns5:echoStruct>
<inputStruct xsi:type="ns4:SOAPStruct">
<varString xsi:type="xsd:string">arg</varString>