当前位置: 首页>>代码示例>>PHP>>正文


PHP SoapServer::setObject方法代码示例

本文整理汇总了PHP中SoapServer::setObject方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapServer::setObject方法的具体用法?PHP SoapServer::setObject怎么用?PHP SoapServer::setObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SoapServer的用法示例。


在下文中一共展示了SoapServer::setObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: call

 public function call($webservice)
 {
     $webServiceContext = $this->container->get('webservice.context.' . $webservice);
     $this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request'));
     $this->serviceBinder = $webServiceContext->getServiceBinder();
     $this->soapServer = $webServiceContext->getServerFactory()->create($this->soapRequest, $this->soapResponse);
     $this->soapServer->setObject($this);
     ob_start();
     $this->soapServer->handle($this->soapRequest->getSoapMessage());
     $soapResponseContent = ob_get_clean();
     $this->soapResponse->setContent($soapResponseContent);
     return $this->soapResponse;
 }
开发者ID:RogerWebb,项目名称:WebServiceBundle,代码行数:13,代码来源:SoapWebServiceController.php

示例2: processRequest

 public function processRequest(callable $callback)
 {
     $server = new \SoapServer($this->wsdl, array('classmap' => $this->classmap));
     $server->setObject($this);
     $this->callback = $callback;
     $server->handle();
     $this->callback = null;
 }
开发者ID:werkint,项目名称:qiwi,代码行数:8,代码来源:Server.php

示例3: serverAction

 /**
  * @Route("/server", name="server")
  */
 public function serverAction()
 {
     $server = new \SoapServer('web/public/hello.wsdl');
     $server->setObject($this->get('hello_service'));
     $response = new Response();
     $response->headers->set('Content-Type', 'text/xml; charset=ISO-8859-1');
     ob_start();
     $server->handle();
     $response->setContent(ob_get_clean());
     return $response;
 }
开发者ID:jamarboledas,项目名称:Symfony_soapServer,代码行数:14,代码来源:DefaultController.php

示例4: serverAction

 public function serverAction(Request $request)
 {
     $baseurl = $request->getScheme() . '://' . $request->getHttpHost() . $request->getBasePath();
     $server = new \SoapServer($baseurl . '/APIxml.wsdl');
     $server->setObject($this->get('moocsy.api_xml'));
     $response = new Response();
     $response->headers->set('Content-Type', 'text/xml; charset=ISO-8859-1');
     ob_start();
     $server->handle();
     $response->setContent(ob_get_clean());
     return $response;
 }
开发者ID:ArtesanIO,项目名称:MoocsyBundle,代码行数:12,代码来源:APIXMLController.php

示例5: handleRequest

 /**
  * Handle the service request
  */
 protected function handleRequest()
 {
     $server = new \SoapServer(null, ['uri' => $this->getServiceUri()]);
     /** @var object $object */
     $object = GeneralUtility::makeInstance($this->serverClass);
     $server->setObject($object);
     try {
         $server->handle();
     } catch (\Exception $ex) {
         $server->fault($ex->getCode(), $ex->getMessage());
     }
 }
开发者ID:sirdiego,项目名称:autoloader,代码行数:15,代码来源:SoapServer.php

示例6: sendKeyAction

 /**
  * @Route("/soap/key")
  * @Template()
  */
 public function sendKeyAction()
 {
     //        $server = new \SoapServer($this->container->get('templating.helper.assets')->getUrl('cibsoap/soap/test.wsdl'));
     $server = new \SoapServer('/var/www/LicenseManager/web/bundles/cibsoap/soap/licenseSoap.wsdl');
     //        $server = new \SoapServer('C:\wamp\www\LicenseManager\web\bundles\cibsoap\soap\licenseSoapWindows.wsdl');
     $server->setObject($this->get('sendKey'));
     $response = new Response();
     $response->headers->set('Content-Type', 'text/xml; charset=utf-8');
     ob_start();
     $server->handle();
     $response->setContent(ob_get_clean());
     return $response;
 }
开发者ID:wangshipeng,项目名称:LicenseManager,代码行数:17,代码来源:SoapController.php

示例7: build

 /**
  * Finally returns a SoapClient instance.
  *
  * @return \BeSimple\SoapServer\SoapServer
  */
 public function build()
 {
     $this->validateOptions();
     use_soap_error_handler($this->errorReporting);
     $server = new SoapServer($this->wsdl, $this->getSoapOptions());
     if (null !== $this->persistence) {
         $server->setPersistence($this->persistence);
     }
     if (null !== $this->handlerClass) {
         $server->setClass($this->handlerClass);
     } elseif (null !== $this->handlerObject) {
         $server->setObject($this->handlerObject);
     }
     return $server;
 }
开发者ID:mablae,项目名称:BeSimpleSoap,代码行数:20,代码来源:SoapServerBuilder.php

示例8: serverAction

 public function serverAction()
 {
     ini_set("soap.wsdl_cache", "0");
     ini_set("soap.wsdl_cache_enabled", "0");
     ini_set('soap.wsdl_cache_ttl', 0);
     $filePath = $this->getServiceProvider()->getWsdlPath();
     $soap = new \SoapServer($filePath);
     $soap->setObject($this->getServiceProvider()->getService());
     $response = new Response();
     $response->headers->set('Content-Type', 'text/xml');
     ob_start();
     $soap->handle();
     $response->setContent(ob_get_clean());
     return $response;
 }
开发者ID:bxav,项目名称:service_handler,代码行数:15,代码来源:SoapController.php

示例9: SoapFault

<?php

class Foo
{
    function __call($name, $args)
    {
        if ($name == "test") {
            return "Hello World";
        } else {
            return SoapFault("Server", "Function {$name} doesn't exist");
        }
    }
}
$foo = new Foo();
$server = new SoapServer(null, array('uri' => "http://testuri.org"));
$server->setObject($foo);
$HTTP_RAW_POST_DATA = <<<EOF
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  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:si="http://soapinterop.org/xsd">
  <SOAP-ENV:Body>
    <ns1:test xmlns:ns1="http://testuri.org" />
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
EOF;
$server->handle($HTTP_RAW_POST_DATA);
echo "ok\n";
开发者ID:badlamer,项目名称:hhvm,代码行数:31,代码来源:server028.php

示例10: Encoder

<?php

/**
 * LinkQuick - vložení nové adresy do databáze
 * @author Vitex <vitex@hippy.cz>
 * @copyright Vitex@hippy.cz (G) 2009,2011
 */
require_once 'includes/LQInit.php';
require_once 'classes/LQEncoder.php';
$encoder = new Encoder();
$server = new SoapServer(null, ['uri' => EasePage::phpSelf()]);
$server->setObject($encoder);
$server->handle();
/*
 function hello($someone) {
 return "Hello " . $someone . "!";
 }
 $server = new SoapServer(null, array('uri' => "urn://www.herong.home/res"));
 $server->addFunction("hello");
 $server->handle();
*/
开发者ID:VitexSoftware,项目名称:LinkQuick,代码行数:21,代码来源:api.php

示例11: SoapVar

                $file = "LeerlinginfoNietBeschikbaar";
                $foutTemp = 1;
                break;
            case "206314401":
                $file = "LeveringGeweigerd";
                $foutTemp = 1;
                break;
            default:
                $file = "LeerlingNietBekend";
                $foutTemp = 1;
        }
        $fout = $school->sessionResponse->fout;
        if ($school->sessionResponse->fout == 'GeenRelatieMetDoel') {
            $fout = 'LeveringGeweigerd';
        }
        // sessionControlResponse contains fault
        if (isset($school->sessionResponse->fout)) {
            return new SoapVar('<ns1:documentResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema"><ns1:fout>' . $fout . '</ns1:fout></ns1:documentResponse>', XSD_ANYXML);
        } else {
            if ($foutTemp == '1') {
                return new SoapVar('<ns1:documentResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema"><ns1:fout>' . $file . '</ns1:fout></ns1:documentResponse>', XSD_ANYXML);
            } else {
                return new SoapVar('<ns1:documentResponse xmlns="http://www.edustandaard.nl/oso_gegevensset/1.2/dossier" >' . $file . '</ns1:documentResponse>', XSD_ANYXML);
            }
        }
    }
}
//here the documentsRequest is received. From here all the necessary information like bsn, sessionId is passed to the function Document
$server = new SoapServer($wsdl);
$server->setObject(new PSE($wsdl, $my_cert_file3, $passphrase3, "98SS", $aanleverpunt));
$server->handle();
开发者ID:kennisnet,项目名称:phpOsoTestSchool,代码行数:31,代码来源:productieDemoSchool.php

示例12: SoapServer

<?php

ini_set('display_errors', 1);
require_once "MyServer.php";
$soapServer = new SoapServer("schema.wsdl");
$soapServer->setObject(new MyServer());
$soapServer->handle();
开发者ID:tashik,项目名称:dklab_soapclient,代码行数:7,代码来源:server.php

示例13: updateConnectionBandwidth

            $path->path_order = $i;
            $i++;
            $path->setPortBySTP($dst->item(0)->nodeValue);
            $path->setDomainBySTP($dst->item(0)->nodeValue);
            if (!$path->save()) {
                Yii::trace($path);
                return false;
            }
        }
        return true;
    }
    private function updateConnectionBandwidth($conn, $response)
    {
        $criteria = $response->reservation->criteria;
        Yii::trace(print_r($criteria, true));
        $p2pXml = $criteria->any;
        $p2pXml = str_replace("<nsi_p2p:p2ps>", "<p2p>", $p2pXml);
        $p2pXml = str_replace("</nsi_p2p:p2ps>", "</p2p>", $p2pXml);
        $p2pXml = '<?xml version="1.0" encoding="UTF-8"?>' . $p2pXml;
        $xml = new \DOMDocument();
        $xml->loadXML($p2pXml);
        $parser = new \DOMXpath($xml);
        $cap = $parser->query("//capacity");
        $conn->bandwidth = $cap->item(0)->nodeValue;
        return true;
    }
}
$wsdl = Url::to('@web/wsdl/ogf_nsi_connection_requester_v2_0.wsdl', true);
$requester = new \SoapServer($wsdl, array('encoding' => 'UTF-8'));
$requester->setObject(new RequesterController('req', Module::getInstance()));
$requester->handle();
开发者ID:ufrgs-hyman,项目名称:meican,代码行数:31,代码来源:RequesterController.php

示例14: SoapServer

<?php

use Lib\Config;
// Inclusao do arquivo de bootstrap
require __DIR__ . '/bootstrap.php';
if ($_GET) {
    if (isset($_GET['modulo'])) {
        $modulo = "Model\\{$_GET['modulo']}";
        $objeto = new $modulo();
        $servidor_soap = new SoapServer(Config::get('path') . "wsdl/{$_GET['modulo']}.wsdl");
        $servidor_soap->setObject($objeto);
        $servidor_soap->handle();
    }
}
开发者ID:TxrWall,项目名称:xml,代码行数:14,代码来源:ws_soap.php

示例15: echoString

        return getXml($myresponse);
    }
}
//
function echoString($inputString)
{
    return $inputString;
}
//create a new SOAP server in non - WSDL mode
$server = new SoapServer(NULL, $options);
// NG with functions and addFunction(SOAP_FUNCTIONS_ALL) you get all the php functions and everything else NG
// looks like you can addFunction or setClass, but you can't mix and match
//$server->addFunction("echoString");
//attach the API class to the SOAP Server
//$server->setClass('MyAPI','arg1 maybe a cert');
$server->setObject(new MyService());
//start the SOAP requests handler
$server->handle();
//$server->addFunction(SOAP_FUNCTIONS_ALL);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $server->handle();
} else {
    echo "This SOAP server can handle following functions:<br>";
    $functions = $server->getFunctions();
    foreach ($functions as $func) {
        echo $func . "<br>";
    }
}
//nada nothing zip zilch wtf
//$definedVars = get_defined_vars(); // return empty if from here
//error_log('ss defined variable'. displaydefinedVariables($definedVars),0);
开发者ID:gmgj,项目名称:gjsoap,代码行数:31,代码来源:hwsoapserver.php


注:本文中的SoapServer::setObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。