Upgrading WSE 1.0 to WSE 3.0
- From: "Duncan" <duncan@xxxxxxxxxxxxxxxxx>
- Date: Mon, 5 Dec 2005 11:20:16 -0000
Guys, I have the following code in an app using WSE 1.0 I would like to move
to WSE 3.0 and VS 2K5 as we are in the early stages of development of the
application and makes more sense to upgrade now rather than later. I'm
having difficulties understanding the new WSE 3.0 model and am finding it
difficult to see how to upgrade. The area that I would like some help with
is as follows:
Public Function GetProxy() As OnCoverWS.DataServ1Wse
Dim proxy As New OnCoverWS.DataServ1Wse
proxy.Url = ConnectionString
Dim reqCtx As SoapContext = proxy.RequestSoapContext
Dim tok As New UsernameToken(UserName, Password, PasswordOption.SendHashed)
reqCtx.Security.Tokens.Add(tok)
reqCtx.Security.Elements.Add(New Signature(tok))
Return proxy
End Function
This function takes a username and password and passes it to the webservice
where I implment IPassword and call the username & paswword from the
database to compare the two. In the above code I am unable to find the
RequestSoapContext or its new equivalent I also have problems with the
userTokenName section as well.
Dim requestContext As SoapContext = HttpSoapContext.RequestContext
Dim userToken As UsernameToken
Dim returnValue As String
'check the context of the soap meesage
If requestContext Is Nothing Then
Throw New SoapException("Non-Soap Message", SoapException.ClientFaultCode)
End If
'find user in header
For Each userToken In requestContext.Security.Tokens
If TypeOf userToken Is UsernameToken Then
If userToken.PasswordOption = PasswordOption.SendHashed Then
Return True
Exit For
Else
'throw any errors to the caller
Throw New SoapException("Password must be hashed",
SoapException.ClientFaultCode)
End If
End If
Next
This function is in the webservice and is called each time a function of the
webservice is called to ensure that the user is a valid user. I need to know
how I would go about changing this or should I be doing it different in
WSE3.0?
A little help would be appreicated thanks.
Duncan
.
- Follow-Ups:
- RE: Upgrading WSE 1.0 to WSE 3.0
- From: Steven Cheng[MSFT]
- RE: Upgrading WSE 1.0 to WSE 3.0
- Prev by Date: RE: NTLM Authentication and WSE Security
- Next by Date: Re: UserName and Kerberos tokens at the same time
- Previous by thread: WSE 3.0 - How to implement Kerberous
- Next by thread: RE: Upgrading WSE 1.0 to WSE 3.0
- Index(es):
Relevant Pages
|
|