PopulateObjAcctSoapHeader()

Top  Previous  Next

The PopulateObjAcctSoapHeader() method is used to populate the LoginKey on the SOAP header of the web service prior to calling a web method.  The LoginKey must have already been obtained using GetLoginKey().

 

Example

 

' ----------------------------------------

' Use StdLib.PopulateObjAcctSoapHeader()

' and then call the web service.

' ----------------------------------------

 

Dim ws As New WebServices.ClassWebService()

 

StdLib.PopulateObjAcctSoapHeader(ws,Session("LoginKey")

 

Dim ds As New DataSet()

ds = ws.GetFirstEntity(ReturnType.Standard)

 

' Change the ID to something new.

ds.tables("Entity").rows(0).items("ID") = "Consulting"

 

' Save back to the webservice.

ws.SaveEntity(ds)

 

Remarks

 

The SetCredentials() method requires that the web service to perform a complete validation and generate a new LoginKey on each call.  As a result, it is not as efficient using GetLoginKey() and storing it in Session or ViewState.