Login to a web service: System.MissingMemberException
- From: "mancroft via DotNetMonster.com" <forum@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 05 Jun 2005 11:08:18 GMT
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:
[code]
System.MissingMemberException was unhandled
Message="Public member 'ReturnValue' on type 'LoginSoap' not found."
[/code]
and
[code]
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
[/code]
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...
[code]
Public oLogin As New LoginSoap
Public bfh As bfHeader = New bfHeader
Public SessionHdr = LoginSoap
[/code]
NOTE:
I tried
Public SessionHdr As LoginSoap
but got the error:
Value of type 'bfHeader' cannot be converted to 'LoginSoap'.
Later on:
[code]
'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
[/code]
The error is generated here:
[code]
' 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
[/code]
--
Thank you.
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/200506/1
.
- Prev by Date: Re: Memory can not Read
- Next by Date: Newbie Questions about Geting started.
- Previous by thread: Authentication mail in VB
- Next by thread: Newbie Questions about Geting started.
- Index(es):
Relevant Pages
|