Thanks John for the response. I have tried everything and I am getting errors.
First, I define the class in the webservice "localhost.orderWS".
======================================
Public Class Order
Public OrderID As New ArrayList ' array list of integers
Public OrderXML As New ArrayList 'array list of string
Public LineNumber As New ArrayList 'array list of integer
Public Attachment As New ArrayList ' array list of byte
End Class
======================================
Second, I have the class as a parameter in the webmethod function:
======================================
<System.Web.Services.WebMethod()> _
Public Function getMessage(ByVal clsOrder As Order)
'code to verify the values are passed
MsgBox("Oder ID: " + clsOrder.orderID(0) )
......
......
======================================
Third, on the client side, I have the following:
======================================
dim ws as new localhost.orderWS
dim clsOrder as new localhost.order
clsOrder.orderid.insert(0,123)
clsOrder.orderid.insert(1,23455)
clsOrder.orderxml.insert(0,"<order><ordernumber>123</ordernumber></order>")
clsOrder.orderxml.insert(1,"<order><ordernumber>23455</ordernumber></order>")
.......
......
ws.getMessage(clsOrder)
========================================
I have looked at tons of books and online pages but I am not able to resolve
the error. It is complaining that "'Insert' is not a member of 'System.Array'.
Do I need to imports anything special. do I need to use xmlinclude or
soaprpc or soapinclude in the web service. This is crazy....
[quoted text, click to view] "John Saunders [MVP]" wrote:
> "TTK" <TTK@discussions.microsoft.com> wrote in message
> news:0C20A41F-C255-493D-A284-D96875C9034C@microsoft.com...
> > Hello, I have been researching this for a long time. I am trying to find
> > out
> > how I can pass an object to a web service. I need details on the code in
> > vb.net if possible. I would like to have the client to send an object
> > "Order" to a web service.
> >
> > Public Class Order
> > Public OrderID As New ArrayList ' array list of integers
> > Public OrderXML As New ArrayList 'array list of string
> > Public LineNumber As New ArrayList 'array list of integer
> > Public Attachment As New ArrayList ' array list of byte
> > End Class
> >
> > the client will populate the array lists and pass it to the web service. I
> > am getting error
> > <Error 1 Value of type 'ClassLibrary1.Module1.Order' cannot be converted
> > to
> > 'ClassLibrary1.Webservice.Order'.>
> >
> > the question is :
> > 1. where do I define this class. in the web service or the client.
>
> If you don't define it on the server, then how would the server know what to
> do with it? Define it on the server, and have the client use the proxy
> version of it.
> --
> --------------------------------------------------------------------------------
> John Saunders | MVP - Windows Server System - Connected System Developer
>
>