将参数发送到webService [英] Sending parameters to a webService

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

问题描述





我需要发送到网络服务这个信息:

用户为字符串,

密码为字符串,

令牌为字符串,

参数为对象(数组)。



我的代码是:

- ********************

Hi,

I need send to a webservice this information:
user as string,
password as string,
token as string,
parameters as object (array).

My code is:
-********************

Dim Param As Array = Array.CreateInstance(GetType(String), 5)
Dim ws As New MySite.Model_Webservice_Soap_WB4BService

Param(0) = "2000-12-12"
Param(1) = "2100-01-31" 
Param(2) = "APROVADO"

xmlResult = ws.invoices("John", "John2012","48102a1e96c36cbb5f416e2586f0bf15",Param)

My.Computer.FileSystem.WriteAllText("C:\XPERT\Invoices",xmlResult(0).ToString,False)



- *********************



但该网站收到Param为空白。



任何人都可以帮我解决如何正确发送阵列的问题吗?



提供商发给我:


-*********************

but the site receive Param as blank.

Can Anyone help me on how to send the array correctly?

The provider sent me:

<message name="pedidosIn"><part name="params" type="soap-enc:Array"/></message>





An d告诉我,我需要以soap-enc:array格式发送信息。



我找不到如何从vb.net发送信息程序。







提前致谢。



And told me I need send the information in a "soap-enc:array" format.

I can''t find how to send it from a vb.net program.



Thanks in advance.

推荐答案

这将发送一个字符串数组。问题是,您的Web服务代码是什么样的,它没有收到它们?如果这都是.NET,我会发送一个字符串列表,但数组应该可以正常工作。
This will send an array of strings. The question is, what does your web service code look like, that it does not receive them ? If this is all .NET, I''d send a List of string, but an array should work fine.


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

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