Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi! I must use a PHP WebService by C# but I can't send multidimensional array parameter to PHP WebService. How can I send a multidimensional array to PHP WebService.

C#
string[,] _multidimensionelArray = new string[5, 5];
richTextBox1.Text = _imp.importSelling(_token, _selling, _multidimensionelArray);

Turned error message is: Error 2 Argument '3': cannot convert from 'string[*,*]' to 'WindowsFormsApplication2.exportSelling.SepetList' D:\Belgelerim\Desktop\WindowsFormsApplication2\WindowsFormsApplication2\Form1.cs
Posted
Updated 11-May-12 22:53pm
v2

1 solution

Error 2 Argument '3': cannot convert from 'string[*,*]' to 'WindowsFormsApplication2.exportSelling.SepetList
Error says it all. Your 3rd parameter in webservice is of type SepetList defined by you. But, in the code lines above, you are trying to pass a string[*,*] as a parameter. Hence the error.

Either, convert your data into 'WindowsFormsApplication2.exportSelling.SepetList' and then pass it.
OR
Change the implementation in the webservice. Replace the argument with type string[*,*]
OR
Overload webservice with a new method to allow your call.
 
Share this answer
 
Comments
Yasin KARATAŞ 12-May-12 5:04am    
I can't change the webservice because it is programmed by another human.
Sandeep Mewara 12-May-12 5:29am    
I already told why the error and how it can be handled. Pick the one that you can do.
Yasin KARATAŞ 12-May-12 5:52am    
Thank you very much.
Sandeep Mewara 12-May-12 5:56am    
Your welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900