Hi Experts. I created the service reference from the wdsl site. The part that covers the username and password is as follows:
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1015"), _
Partial Public Class UsernameTokenType
Private usernameField As AttributedString
Private passwordField As AttributedString
Public Property Username() As AttributedString
Me.usernameField = value
When I try and assign the username and password values using
Dim Wsecurity As New Service1.SecurityType
Wsecurity.Username.Value = "fred"
The compiler accepts this but I get the error
Object reference not set to an instance of an object.
Please can someone help where I'm going wrong. Should I be assigning the username and password in the way or should I be referring to the submitted xml file where the username and password is also entered. I also don't see how to refer the service to the applicable xml file though.
Many thanks in advance