Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NETWebService
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 6:44am
Edited 9-Jan-13 6: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 at 9-Jan-13 12:56pm
   
I added new information: The provider sent me: Collapse | Copy Code <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 at 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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 695
1 OriginalGriff 518
2 Abhinav S 313
3 thatraja 245
4 CPallini 130
0 Sergey Alexandrovich Kryukov 8,372
1 OriginalGriff 4,830
2 Peter Leow 3,784
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


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