Solved

Vb.net Web Ref

Posted on 2011-03-24
2
285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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