Login and SessionID - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

The Login web method requires the user name and password. It also allows the user to specify a plant/project (desired configuration). The method performs the usual login and handles the licensing; it returns a SessionID as well as the config, roles and so on for that user. On the server, information persists about the user and session in the httpcontext cache. This persisted information expires after 12 hours.

All Web methods require the user to pass in the SessionID. This identifies who made the request and what the purpose of the request was. Any subsequent methods are executed in the context (config) as defined on the login. The assumption is that SessionID is an input to all methods.

Example of using the login web method:

Dim lobjUploadService As New UploadService.UploadSoapClient

Dim lnodSessionID As Xml.XmlNode = lobjUploadService.Login("superuser", "", "swi-ppo-spflap8", "", "", "", "", "")

If lnodSessionID IsNot Nothing Then

Dim lstrSessionID As String = lnodSessionID.SelectSingleNode("//SessionID").InnerText

End If