PHP利用SOAP进行webservice开发(客户端)
来源:互联网 发布:大数据和计算思维 编辑:程序博客网 时间:2024/06/07 03:48
参考:http://blog.sina.com.cn/s/blog_777f9dbb01010fd1.html
配置
windows php.ini配置:extension = php_soap.dll
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension = "soap.so"
并把soap.so放到/usr/local/lib/php/extensions/no-debug-non-zts-20060613目录下
php支持soap参考:http://blog.csdn.net/bytxl/article/details/9284123
示例-WSDL模式:
ini_set( 'default_socket_timeout', 7 ); // timeout
ini_set("soap.wsdl_cache_enabled", "0"); // no cache
示例-非WSDL模式:
ini_set( 'default_socket_timeout', 7 ); // timeout
ini_set("soap.wsdl_cache_enabled", "0"); // no cache
手册上有人对上面加粗部分代码(函数参数)的注释
注释1:
If your service is a .NET doc/lit, which means the input message has a single part named 'parameters' that is a structure that wraps the parameters. Your call should look like this:
<?php
$params = array('param_name_1'=>$val_1,'param_name_2'=>$val_2);
$client->call('MethodName', array('parameters'=>$params));
?>
注释2:
Note that calling __soapCall and calling the generated method from WSDL requires specifying parameters in two different ways.
For example, if you have a web service with method login that takes username and password, you can call it the following way:
<?php
$params= array('username'=>'name','password'=>'secret');
$client->login($params);
?>
If you want to call __soapCall, you must wrap the arguments in another array as follows:
<?php
$client->__soapCall('login', array($params));
?>
- PHP利用SOAP进行webservice开发(客户端)
- 利用SOAP扩展开发WebService(PHP)
- 利用SOAP扩展开发WebService(PHP)
- 【soap】利用php的soap实现webservice
- linux环境下,利用gsoap生成webservice客户端进行应用程序开发的小结 (轉)
- Python开发Webservice(SOAP)
- 【soap】利用soap实现webservice
- 基于SOAP编写WebService客户端(一)
- 利用SOAP(Webservice)上传文件
- php 如何利用 soap调用.Net的WebService asmx文件
- 利用NuSoap开发WebService(PHP)
- 利用NuSoap开发WebService(PHP)
- 利用NuSoap开发WebService(PHP)
- 利用NuSoap开发WebService(PHP)
- 利用NuSoap开发WebService(PHP)
- 使用CXF 开发SOAP 的webService接口客户端
- 在Linux下,利用gSoap生成的WebService客户端进行开发时遇到的问题
- linux环境下,利用gsoap生成webservice客户端进行应用程序开发的小结
- 每次修改对话框模版,.rc文件中的#include "afxwin.h"就会少了后边的双引号
- pdf2swf+flexpaper解决pdf在线阅读(类百度文库)
- PowerDesigner批量生成日期型、中文字符型、数字型测试数据
- sql server 2008 提示重新启动计算机(两种方案)
- Android屏幕、键盘背光Framework和Linux led_classdev
- PHP利用SOAP进行webservice开发(客户端)
- 上海地区可收听的广播电台频率一览
- <constant name="struts.dev…
- 计算机分类经典书籍推荐
- linux平台libpcap函数分析及流程(…
- linux平台libpcap函数分析及流程(…
- 解读C指针(1)——内存与地址
- 解读C指针(2)——类型说明
- (转)C# (线程安全的哈希表)Hashtable Synchronized vs SyncRoot