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
- System.MissingMemberException was unhandled
- Message="Public member 'ReturnValue' on type 'LoginSoap' not found."
Expand|Select|Wrap|Line Numbers
- A first chance exception of type
- 'System.Web.Services.Protocols.SoapException' occurred in
- Microsoft.VisualBasic.dll
- A first chance exception of type 'System.MissingMemberException' occurred
- in Microsoft.VisualBasic.dll
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
- Public oLogin As New LoginSoap
- Public bfh As bfHeader = New bfHeader
- Public SessionHdr = LoginSoap
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
- 'Set SOAP header
- oLogin.bfHeaderValue = bfh
- ' ServiceLogin is the calling procedure
- oLogin.ServiceLogin()
- ' UPON LOGIN SUCCESS...
- ' Keep the global header variable for this project up to date by using
- return from the login call
- SessionHdr = oLogin.bfHeaderValue
Expand|Select|Wrap|Line Numbers
- ' A procedure to display the return header
- Private Sub loginTest()
- If SessionHdr.ReturnValue = 0 Then
- lblLoginResp.Text = "sessionHdr = " & SessionHdr.ToString() &
- ControlChars.NewLine & _
- "UserName = " & SessionHdr.username.ToString() & ControlChars.NewLine
Thank you.
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200506/1