从C#将ArrayList发送到PHP WebService [英] Sending ArrayList to PHP WebService from C#

查看:124
本文介绍了从C#将ArrayList发送到PHP WebService的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我必须使用C#编写的PHP WebService,但无法将多维数组参数发送到PHP WebService.如何将多维数组发送到PHP WebService.

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.

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


转为错误消息是:错误2参数"3":无法从"string [*,*]"转换为"WindowsFormsApplication2.exportSelling.SepetList" D:\ Belgelerim \ Desktop \ WindowsFormsApplication2 \ WindowsFormsApplication2 \ Form1.cs


Turned error message is: Error 2 Argument ''3'': cannot convert from ''string[*,*]'' to ''WindowsFormsApplication2.exportSelling.SepetList'' D:\Belgelerim\Desktop\WindowsFormsApplication2\WindowsFormsApplication2\Form1.cs

推荐答案

错误2参数"3":无法从"string [*,*]"转换到''WindowsFormsApplication2.exportSelling.SepetList
错误说明了一切.您在网络服务中的第三个参数是您定义的 SepetList 类型.但是,在上面的代码行中,您尝试将字符串[*,*]作为参数传递.因此,错误.

要么将您的数据转换为''WindowsFormsApplication2.exportSelling.SepetList'',然后将其传递.

更改Web服务中的实现.将参数替换为string [*,*]
类型 或
使用新方法重载Web服务以允许您进行呼叫.
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.


这篇关于从C#将ArrayList发送到PHP WebService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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