我的server 端 :(只是结构,具体方法没实现呢)
<?phpclass clientsoap{
public function Login($id) {
$fp=fopen("1.txt", "a");
fwrite($fp, $id."\n");
fclose($fp);
return 30;
}
public function Logout($id) {
return 0;
}
public function Register($id) {

}
public function Unregister($id) {

}
public function Report($id, $headers, $content) {

}
public function UpdataStatus($id) {

}}
$server=new SoapServer("client.wsdl",array('soap_version'=>SOAP_1_2));
$server->setClass('clientsoap');
$server->handle();?>请问我应该如何修改wsdl 以适用于我的server端呢?   我的server端只是方法没实现,接口跟wsdl给的几乎差不多~  

解决方案 »

  1.   

    我想借用的wsdl文件:http://219.138.458.138/services/clien.asmx?wsdl太长了 我贴不上来……   
    主要给我说说需要改什么地方就好了啊~ 谢谢各位啦~~ 
      

  2.   

    不好意思 上边写错啦 , 这个 :http://219.238.45.138/services/client.asmx?WSDL
      

  3.   

    记得Zend Studio可生成wsdl文件,,不需要去参考别人的,,,除非你想手写
      

  4.   

    我用的是zend studio8 但是我自己生成的不能用,跟现有的客户端连不上,只能连上我自己写的客户端。  请问要是借用别人的,都需要改哪些地方啊 ?
      

  5.   

     还有就是zend studio8 能怎样才能根据类来生成wsdl文件呢?  我新手 找不到怎么生成的~~ 
    大侠帮帮我呗~~ 
      

  6.   

    这是用自己的客户端调用别人的wsdl时报的错 
    Debug Warning: /services/testClient.php line 2 - SoapClient::SoapClient(http://192.168.0.251/services/client.asmx?WSDL) [<a href='soapclient.soapclient'>soapclient.soapclient</a>]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Service ErrorDebug Warning: /services/testClient.php line 2 - SoapClient::SoapClient() [<a href='soapclient.soapclient'>soapclient.soapclient</a>]: I/O warning : failed to load external entity &quot;http://192.168.0.251/services/client.asmx?WSDL&quot;
    Debug Error: /services/testClient.php line 2 - SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.0.251/services/client.asmx?WSDL' : failed to load external entity "http://192.168.0.251/services/client.asmx?WSDL"Debug Error: /services/testClient.php line 2 - Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.0.251/services/client.asmx?WSDL' : failed to load external entity "http://192.168.0.251/services/client.asmx?WSDL"
     in D:\PHPWeb\services\testClient.php:2
    Stack trace:
    #0 D:\PHPWeb\services\testClient.php(2): SoapClient->SoapClient('http://192.168....')
    #1 C:\Users\Echo\AppData\Local\Temp\dummy.php(1): include('D:\PHPWeb\servi...')
    #2 {main}
      thrown
    这是我写的客户端:<?php 
    $client= new SoapClient("http://192.168.0.251/services/client.asmx?WSDL");
    /*$client= new SoapClient("http://219.238.45.138/services/client.asmx?WSDL");*/
    var_dump($client->__getFunctions(),"<br><br><br>",$client->__getTypes());
    echo "<br><br><br><br>";
    $a=$client->Login("D200F1E2-C364-16CB-A0CF-CC59E7380E45");
    var_dump($a);
    /*$client->Unregister("FABD9CF5-5F0C-88FA -68FF-7BAC89260335");*/
    /*echo "D200F1E2-C364-16CB-A0CF-CC59E7380E45";*/
    echo "<br><br><br>";
    var_dump($client->__getLastRequest());
    echo "<br>";
    var_dump($client->__getLastRequestHeaders());
    ?>