By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Login to a web service: System.MissingMemberException

P: n/a
Hello

I am using Visual Basic 2005 Express Edition Beta 2 (I am new to Visual
Basic) and am messing about with some code to login to a web service.

From the manual:
"The SOAP header for every request must contain the Web Service header. The
header will be returned with encrypted data (account information etc...).
You must attach this encrypted data to the header in all subsequent calls."

I keep getting an error messages:

Expand|Select|Wrap|Line Numbers
  1. System.MissingMemberException was unhandled
  2. Message="Public member 'ReturnValue' on type 'LoginSoap' not found."
  3.  
and

Expand|Select|Wrap|Line Numbers
  1. A first chance exception of type
  2. 'System.Web.Services.Protocols.SoapException' occurred in
  3. Microsoft.VisualBasic.dll
  4. A first chance exception of type 'System.MissingMemberException' occurred
  5. in Microsoft.VisualBasic.dll
  6.  
The question:
Armed with the following facts could you PLEASE make a suggestion as to
what the answer might be as this problem is driving me bonkers. I'm pretty
sure a variable isn't being set properly and have stepped through with the
debugger and watch window and still can't find it.

The declaration...
Expand|Select|Wrap|Line Numbers
  1. Public oLogin As New LoginSoap
  2. Public bfh As bfHeader = New bfHeader
  3. Public SessionHdr = LoginSoap
  4.  
NOTE:
I tried

Public SessionHdr As LoginSoap

but got the error:

Value of type 'bfHeader' cannot be converted to 'LoginSoap'.

Later on:
Expand|Select|Wrap|Line Numbers
  1. 'Set SOAP header
  2.  
  3. oLogin.bfHeaderValue = bfh
  4.  
  5. ' ServiceLogin is the calling procedure
  6.  
  7. oLogin.ServiceLogin()
  8.  
  9. ' UPON LOGIN SUCCESS...
  10. ' Keep the global header variable for this project up to date by using
  11. return from the login call
  12.  
  13. SessionHdr = oLogin.bfHeaderValue
  14.  
The error is generated here:
Expand|Select|Wrap|Line Numbers
  1. ' A procedure to display the return header
  2.  
  3. Private Sub loginTest()
  4.  
  5. If SessionHdr.ReturnValue = 0 Then
  6.  
  7. lblLoginResp.Text = "sessionHdr = " & SessionHdr.ToString() &
  8. ControlChars.NewLine & _
  9. "UserName = " & SessionHdr.username.ToString() & ControlChars.NewLine
  10.  
--
Thank you.
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200506/1
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.