Hi,
I have a web service with ten parameters. All of them are optional except one.
To test my api, I have created a html form which contains auth_token,methd and all other remaining params. This works fine when I give values for all fields. But if I remove any one of them, then the value of next param replaces the removed one. i.e, If i remove the 5th param, then when my php function is called, the value for sixth param comes as the value for fifth param. it goes on until 9th param. And last param has null.
What am I missing? Is there any tutrial on how to test web services?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov

ihayredinov - 0 likes
- Mike Zacher (vazco)@vazco

Mike Zacher (vazco) - 0 likes
- Selvaraj Antonyraj@selvaa89

Selvaraj Antonyraj - 0 likes
You must log in to post replies.Use names for your fields and associative arrays for your exposed methods.
You can also test your exposed methods via curl or file_get_contents
Selvaraj, what you mention is a bug or feature on Elgg's side. You can go around it by setting default value for rest fields which are default, use associative array to pass such fields and by this go around Elgg field control or fix it with core change in api library.
Can anyone say how to pass associative array to a web service?