How to call server-side class of SOAP in client-side code?

前提是你 提交于 2019-12-08 10:20:52

问题


I have a non-WSDL SOAP working on two servers of mine. There is a lag issue cause of usage I guess. I am trying to use called class instead of calling SOAP each time using my functions.

server-side.php

class soapGlobal {

    public function __construct() {
    }
    public static function hashFunction() {
        //some function...
    }
    public static function siteFunction() {
        //some function...
    }
    public static function encryptFunction() {
        //some function...
    }
    public static function decryptFunction() {
        //some function...
    }
    public static function remoteIPFunction() {
        //some function...
    }

//some more function...

    public function __destruct() {
    }

}

$server = new SoapServer(null, array("uri" => "https://globalurl"));
$server->setClass("soapGlobal");
$server->handle();

Can I call SOAP functions with

soapGlobal::FUNCTION

rather than

$client->FUNCTION

来源:https://stackoverflow.com/questions/57320043/how-to-call-server-side-class-of-soap-in-client-side-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!