Login to a web service: System.MissingMemberException



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
.



Relevant Pages

  • Re: Secure redirection?
    ... in PHP is basically same as redirect using JS. ... I'm building a login system with AJAX/PHP/MySQL. ... The whole system works great without AJAX, but when I put AJAX in the story I ahve one problem: ... 1.When the user is successfully authenticated the login.php sends the header, but the AJAX XMLHttpRequest call is still in progress waiting for a PHP response. ...
    (php.general)
  • Re: Authenticate to a Web Service
    ... Short answer you don't have a security header in your request. ... I have to interact with a Web Service exposed by a partner organisation. ... and the 'HEI Course Web Service User' values into the optional third ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to call web service with authentication
    ... header, I need to implement the IHeaderHandler interface. ... PROCEDURE IHeaderHandler_WriteHeaders(par_ISoapSerializer AS VARIANT, ... IntelliSense for your XML Web service. ...
    (microsoft.public.fox.helpwanted)
  • Add custom HTTP Header to all Web Service responses
    ... We have a web server farm with several servers hosting web services and I'd ... like to add a custom HTTP header to every web service response so our client ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: SOAPAction Woes
    ... And the value of this Action element must be same as that of SOAPAction ... The XmlHttpRequest object is working fine and I'm using the following ... I've set the Web Service up on my local box, ... After applying this attribute WS should not require SOAPAction HTTP header ...
    (microsoft.public.dotnet.framework.aspnet.webservices)