Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带Python客户端的Soap PHP服务器_Python_Php_Web Services_Soap_Wsdl - Fatal编程技术网

带Python客户端的Soap PHP服务器

带Python客户端的Soap PHP服务器,python,php,web-services,soap,wsdl,Python,Php,Web Services,Soap,Wsdl,有人知道如何在服务器窗口中显示从客户端收到的消息吗 不幸的是,我在任何地方都找不到示例,当我使用print函数时,不幸的是它不起作用 服务器代码: #=================================================================== { function strToHex($string){ $hex = ''; for ($i=0; $i<strlen($string); $i++){

有人知道如何在服务器窗口中显示从客户端收到的消息吗

不幸的是,我在任何地方都找不到示例,当我使用print函数时,不幸的是它不起作用

服务器代码

    #===================================================================
{

    function strToHex($string){
    $hex = '';
    for ($i=0; $i<strlen($string); $i++){
        $ord = ord($string[$i]);
        $hexCode = dechex($ord);
        $hex .= substr('0'.$hexCode, -2);
        }
    return strToUpper($hex);
    }
    $str = '';
    class PPRSrv {  
            public function simpleService($str){
                $str = (strToHex($str));
                print$str;
            }
        }

        #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        session_start();
        $opt = array( 'uri' => 'http://10.0.2.15/SOAP/PHP2/srv.php' );
        $srv = new SoapServer( NULL, $opt );
        $srv->setClass('PPRSrv');
        while(1 == True){
            $srv->handle();

        }

    }
    #===================================================================
?>
from suds.client import Client
url = 'http://localhost/SOAP/PHP2/srv.wsdl'
client = Client(url)
print(client)
print("Podaj argument, ktory chcesz wyslac do serwera : ")
par1 = input()
result = client.service.simpleService(par1)
print("Wynik : ")
print(result)