PHP与JAVA通信之 SOAP
首先开启php.ini里的extension=php_soap.dll
把php_soap.dll复制到windows去
php的简单代码
<?php
$wsdl="http://localhost:8080/axis2/services/CalculateService?wsdl";
//setupwebserviceclient
$client=newSoapClient($wsdl);
//setupparameter
$parms=array("x"=>1,"y"=>2);
//calltheplusmethod
$response=$client->plus($parms);
echo$response->return;
?>
简单说明:
1.首先建立webservice访问对象
2.设置参数x和y的值
3.访问plus方法,计算x与y的和
4.输出返回结果
相关推荐
Noneyes 2020-11-10
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23