PHP SOAP客户端参数 [英] PHP SOAP Client parameters

查看:102
本文介绍了PHP SOAP客户端参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我已经使用PHP在PHP中成功生成了XML响应。



我想知道的另一件事是:

如何在调用Web服务时确定从客户端页面传递了多少参数?



根据传递的参数数量,我的网络服务将做相应的工作。



任何早期的帮助都将受到高度赞赏! />


谢谢和问候,

Anirban



SHOUTING删除 - OriginalGriff [/ edit]

Hi All,

I have successfully generated an XML response using SOAP in PHP.

One additional thing which i would like to know is :
How do I make out how many parameters are passed from the client page when calling the web service?

Based on the number of parameters passed, my web service will be doing things accordingly.

Any early help will be highly appreciated!!!

Thanks and regards,
Anirban

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

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...


这篇关于PHP SOAP客户端参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆