Web Service Parameter

C

Charlie Dison

Hi there,
I'm new to web services. I'm writing a basic file maintenance
application in asp.net. For example I'll fill a grid with all the records
from a table, then allow the user to select a record (row) and I'll show the
individual fields of the row in the form. The user can update the fields
and then I'd like to send the fields back through a web service for
updating. I've tried to specify a custom class as the parameter. See the
example below. My problem is that when I specify the class as a paramenter
in the client application I get a compile time error "Value of type
"IdealClass.atyMaint' cannot be converted to
'Ideal.updAccountType.atymaint." Atymaint is the name of my class. I have
this class defined in a project that is separate from my web service project
and my client project. I then reference this class from both the web
service and client projects. See the excerpts below.

From IdealClass project in atyMaint.vb

Public Class atyMaint

Public AMTYP as string
Public AMDESC as string
Public AMPRICE as string

End Class

From client project

dim atymaint as new idealclass.atymaint

atymaint.amtyp = me.txttype.text
atymaint.amdesc = me.txtdesc.text
atymaint.amprice = me.txtprice.text

dimWebservice as new updAccountType.updAccountType
errMsgString = Webservice.updAccountType(atymaint)

From web service project

<WebMethod () > _
Pubic Function updAccountType(ByVal atymaint as IdealClass.atyMaint) as
string

... stuff

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top