| Parameters misplaced when soap function is called
|
ac1982

msg:4100293 | 12:30 pm on Mar 18, 2010 (gmt 0) | I currently have a web service function in php that accepts a few parameters. When I call this function if I do not provide all the parameters, all my parameters are misplaced. See the following example: function myWebService(param1, param2, param3, param4){} //from .net using c# calling myWebService : param1 = "zxcxzc" param2 = "zxcxzc" param4 = "zxcxzc" i did not pass param3, so when my function will get the parameters it will be like this: param3 will have the contents of param4. i have check and debug in .net everything seems find. Also i called this soap function using php and its fine. I notice that when i pass an empty string in a parameter it works properly but not when there is no parameter.
|
rocknbil

msg:4101079 | 4:46 pm on Mar 19, 2010 (gmt 0) | | I notice that when i pass an empty string in a parameter it works properly but not when there is no parameter. |
| Kind of answered your own question. :-) A function is not aware of what you're expecting, only what it receives. There is no "associative" flagging (that I know of.) So it just takes them in the order you pass them, like a list array. I don't do .net or c, but do a lot of other languages - when you pass to a function, you're probably doing $some_result = some_function (1,2,3); Leaving parameter 4 null. $some_result = some_function (1,2,NULL,3); $some_result = some_function (1,2,'',3);
|
|
|