Solved

Vb.net Web Ref

Posted on 2011-03-24
2
282 Views
Last Modified: 2012-06-21
HI All

I'm trying to connect to a web services which requires you to get a token first.

Example code it gives:

Dim tokens = getToken(operatorId, soapUsername, soapHashedPassword, 60000)

Open in new window


The 3 variable need to be full first.

So I type them in as string "".

I get : "Reference to a non-shared member requires an object reference "

I've have now tried tons of different way to fill them, but the same error message!!

I've tried function

Function Token(ByVal operatorId, ByVal soapUsername, ByVal soapHashedPassword)
        Dim tokens = getToken(operatorId, soapUsername, soapHashedPassword, 60000)
    End Function

Open in new window


Anyone got any idea why this is happening? and what  Reference to a non-shared member requires an object reference mean?
0
Comment
Question by:Matb396
2 Comments
 
LVL 13

Accepted Solution

by:
gamarrojgq earned 500 total points
ID: 35210999
Hi,

Reference to a non-Shared member requieres an object reference means that you ar calling a METHOD from a class that IS NOT marked as shared, so you will need an instance of that class to call it, so if you have a class named ClassYouTryingToGet with a method named SomeMethod

'So this will work
Dim objClass as New ClassYouTryingToGet
ObjClass.SomeMethod()

'But this does not
ClassYouTryingToGet.SomeMethod

0
 

Author Closing Comment

by:Matb396
ID: 35211076
Thanks :)
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question