且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP SOAP客户端参数

更新时间:2022-02-11 21:14:41

SOAP不支持不同数量的参数(参数数组)。在定义SOAP信封时,您不仅要定义方法名称和参数列表,甚至参数的顺序也很重要。

一种可能的解决方案是在SOAP信封中仅声明一个参数并通过该信封传递参数序列化(xml或json或你知道的任何)字符串,而不是分析服务器上的那个字符串......
SOAP doesn't support varying numbers of parameters (parameter array). While defining the SOAP envelope you not only define the method name and the parameter list, but even the order of the parameters matters.
One possible solution is declaring only one parameter in the SOAP envelope and pass via that parameter a serialized (xml or json or whatever you know) string, than analyze that string on the server...