php中使用soap的client和server
来源:互联网 发布:ajax 上传文件和数据 编辑:程序博客网 时间:2024/06/03 21:12
以下是无wsdl模式
创建server端的时候,uri是基本需要的参数
<?php function myMethod(){return var_export(func_get_args(),true);}$soapServer = new SoapServer(null,array('uri'=>'http://localhost/test/soap/soapServer.php'));$soapServer->addFunction('myMethod');$soapHeader = new SoapHeader('namespace','namespace');$soapServer->addSoapHeader($soapHeader);$soapServer->handle();//接受客户端的请求并处理
客户端的代码
<?php $client = new SoapClient(null,array('location'=>'http://localhost/test/soap/soapServer.php','uri'=>'http://localhost/test/soap/soapServer.php'));$soapHeader = new SoapHeader('namespace','namespace');$client->__setSoapHeaders($soapHeader);var_dump( $client->__call('myMethod',array(1,2,3,4,5)) );
header看自己的需要,如果需要验证就带上header。
0 0
- php中使用soap的client和server
- php的SOAP-CLIENT详解
- 【soap】php中使用soap
- php使用websocket示例 client 和 server
- PHP 中使用 SOAP
- PHP的SOAP扩展原理和使用
- php soap的使用
- PHP的soap使用
- 如何使用PHP调用ArcGIS Server的Soap接口
- PHP 中使用 SOAP(1)
- PHP 中使用 SOAP(2)
- PHP 中使用 SOAP(1)
- PHP 中使用 SOAP(2)
- SOAP Client(ActiveBEPL)使用
- 通过PHP SOAP Client调用OBIEE WebService的例子
- php的SOAP安装使用
- php中使用soap的建立共享接口
- PHP的SOAP扩展原理和使用(转)
- 01电话拨号器
- 用条件格式提高数据易用性(5)-找特定值 设计要点:可视化、条件格式
- TouchID
- 仿淘宝底栏点击效果
- boost bind性能开销分析
- php中使用soap的client和server
- python中关于装饰器的理解
- nyoj111分数加减法
- 用条件格式提高数据易用性(6)-依据公式 设计要点:可视化、条件格式
- 电视节目必是可搜索的
- ubuntu常用命令
- html5实现弹出提示框,并且伴随遮罩层并且可以关闭弹出框
- 一些职位的jd
- 求学随记——珍惜时间≠赶进度