客户端soap提供的PHP类构造函数参数

时间:2016-04-04 16:03:25

标签: php soap wsdl soap-client soapserver

我有一堆服务于php类的SOAP服务器和一个访问这些服务器的客户端。服务的php类与本地数据库建立连接,并在construtor方法中设置此连接。

我看到你可以在服务器端为构造函数设置参数:

$server = new SoapServer($wsdlFile);
$server->setClass('Class', $arg);

有没有办法让客户端为类构造函数提供参数?

1 个答案:

答案 0 :(得分:0)

Yes there is a way but , first are you using any soap library for the php like NuSoap , zendsoap or something like that?

on Nusoap you get the methods and after that you can resend that information to the database.