Can't access methods

W

wrecker

Hi all,

I'm fairly new to webservices so bear with me while I try to explain
my problem. I've created a class for users that I'm using in my
webservice (sorry, its all in VB)

public class User
private _Name as string
private _Type ' bitwise flag

' public properties

public function IsAdministrator() as boolean
' bitwise manipulation to determine if user is admin
' if success return true else return false
end function
end class

I'm referencing this class in my web service and have no problems
accessing the properties or the methods.

The problem is on the client side. Because I'm pulling the User class
into my web service and I've added a web reference for the service,
any user object I create is derived from that

dim myUser as myWebservice.User

When I use the myUser object I can access all the properties but I
can't access any of the methods

dim userName as string
userName = myUser.Name 'OK

dim flag as boolean
flag = myUser.IsAdministrator() 'Error

The above gives the error "IsAdminstrator is not a member of User"

Why can I access all the properties and not the methods? Is this
because I'm deriving through the web service and only the properties
are being passed in the xml?

I hope that explaination was understandable :)

Thanks

Ren
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top