Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
-********************
VB
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)

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

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>


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.
Posted
Updated 9-Jan-13 6:54am
v3

1 solution

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.
 
Share this answer
 
Comments
Mfcapelo65 9-Jan-13 12:56pm    
I added new information:
The provider sent me:
Collapse | Copy Code
<message name="pedidosIn"><part name="params" type="soap-enc:Array"/>

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

Has you some ideia?
Christian Graus 9-Jan-13 14:01pm    
soap is how all your data is sent to a web service. It's expecting an array, is what that means. http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383522 He's told you nothing. The encoding is all done for you by .NET. What you need to know is, the type of the objects in the array

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