php soap 中有个register方法,用php访问时可以不用,但是不标准,其他语言访问不了

解决方案 »

  1.   

    顶一下,CSDN人气现在怎么也这么差啊
      

  2.   

    $server = new SoapServer('./wps.wsdl');$soap = new SoapClient('http://localhost/soap/wps.wsdl');这两个黑箱子 还真不知道是啥样的 读读代码吧 两个点之间通讯 需要个协议 例如HTTP协议 PHP应用大多是HTTP协议PHP也支持原生的TCP/IP协议 socket扩展 不过不是很底层 一般应用足够 你可以实现大多数应用 例如游戏外挂 也就是平常说的封包public function connectMaster()
    {
    if (@socket_connect($this->socket, $this->config->server->master_ip, $this->config->server->master_port) == false){
    $this->log->setLog('ConnectMasterServerError', socket_strerror(socket_last_error()));
    $this->log->setError();
    }else {
    $this->log->setLog('ConnectmasterServerOK');
    }
    }
    public function masterLogin($user, $pass)
    {
    if ($this->config->server->type == 4)
    {

    }else {
    $msg = pack('v1', 0x64) . pack('V', $this->config->server->version);
    $msg .= pack('a24', $user) . pack('a24', $pass);
    $msg .= pack('C*', $this->config->server->master_version);
    }
    $this->send($msg);
    $this->log->setLog('setMasterServer', strlen($msg).'BIT</p>');
    }protected function send($msg)
    {
    socket_write($this->socket, $msg, strlen($msg));
    }RO脱机外挂 登录MAST
    协议:2位动作编号2位游戏版本号 24位用户名24位密码其余登录服务器版本号 不足用0补齐
      

  3.   

    $server = new SoapServer('./wps.wsdl'); 
    $soap = new SoapClient('http://localhost/soap/wps.wsdl'); 上面这两个是PHP5内置的Soap类,可以直接用来创建soap服务器端和客户端,但是也正是PHP对soap这种奇怪的实现方法,让VC客户端(如一楼所示代码)无从解读,不是爆错误的编码格式就是直接运行时错误。
      

  4.   

    最后还是没有弄出来。感觉PHP的SOAP并不通用,无法跟Java里的Soap相比。Axis开发SOAP还是很快的。
      

  5.   

    个人觉得是structure的问题,我也遇到了这种情况,在php里面直接用字符串作为输入输出参数就可以,但是在vc或者.net生成的wsdl里面,参数进入和返回结果都是用特定的数据类型,在php里面表现为stdClass,你可以看看我写的两篇文章,希望能有帮助。我也因为这个东西折腾了好长事件。
    http://blog.csdn.net/flowerain/archive/2008/03/30/2229563.aspx
    http://blog.csdn.net/flowerain/archive/2008/05/27/2488213.aspx