php通过SoapClient进行SOA调用
2008-11-19 17:22
393 查看
要使用这个功能,需要在php.ini中配置以下内容:
[soap]
; Enables or disables WSDL caching feature.
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
soap.wsdl_cache_dir="/tmp"
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
soap.wsdl_cache_ttl=86400
然后,使用这些代码进行调用:
$client = new SoapClient("CNBrowseoptWS.wsdl");
$result =(object)$client->BrowseLite(array("callParams" => $param));
$hitcounts=$result->BrowseLiteResult->HitCount;
其中的方法是由SOA服务器提供的。关键其实还是在wsdl文件中。这是个xml文件,需要指定soa调用的服务器地址,方法等。
之前仅用过java去执行SOA调用,貌似是使用axis2程序生成的wsdl文件,这次问了组里的一个前辈:
这个是soap接口,各个语言都会有soap的api,用api去生成就应该可以了。
[soap]
; Enables or disables WSDL caching feature.
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
soap.wsdl_cache_dir="/tmp"
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
soap.wsdl_cache_ttl=86400
然后,使用这些代码进行调用:
$client = new SoapClient("CNBrowseoptWS.wsdl");
$result =(object)$client->BrowseLite(array("callParams" => $param));
$hitcounts=$result->BrowseLiteResult->HitCount;
其中的方法是由SOA服务器提供的。关键其实还是在wsdl文件中。这是个xml文件,需要指定soa调用的服务器地址,方法等。
之前仅用过java去执行SOA调用,貌似是使用axis2程序生成的wsdl文件,这次问了组里的一个前辈:
这个是soap接口,各个语言都会有soap的api,用api去生成就应该可以了。
相关文章推荐
- 通过PHP SOAP Client调用OBIEE WebService的例子
- php利用SoapClient调用webservices
- php进行soap调用
- PHP calss类与extends继承、通过调用类的方法与表单数据进行交互
- 在raspberry通过PHP调用python中simplecv进行远程监控
- php 通过 SoapClient 获取天气情况
- php利用SoapClient调用webservices
- PHP调用webservice soap soapclient
- php利用SoapClient调用webservices
- php调用webservice报错Class 'SoapClient' not found
- 通过SoapClient调用天气预报
- 通过SoapClient调用天气预报
- php利用SoapClient调用webservices你会不?
- 通过CXF的jaxws:client调用SOAP服务
- python通过http请求发送soap报文进行webservice接口调用
- PHP通过soap调用c#的WebService
- PHP调用wsdl接口实例化SoapClient抛出异常
- php实现通过soap调用.Net的WebService asmx文件
- PHP通过php-java-bridge调用Java类中方法
- mtk82平台上通过libcamera_client.so调用camera预览流程