Click here to Skip to main content
12,700,838 members (30,949 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB VB.NET 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)

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

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 8-Jan-13 7:44am
Updated 9-Jan-13 7:54am
v3

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100