Dim logonResult As LoginResult = s.Logon(Me.userName, Me.password)
If logonResult.IsSuccess = False
Then
Dim errorDetails As
ErrorDetails = logonResult.ErrorDetails
'' a human readable description of the problem
Dim errorMessage As
String = errorDetails.Description
'' a fixed error code
Dim errorCode As
ErrorCode = errorDetails.Code
'' the current error id, not always has a value
Dim incident As
String = errorDetails.LogId
Else
'' use the new service url
Dim serviceUrl As
String = logonResult.ServiceUrl
Dim sessionToken As
String = logonResult.SessionId
End If
Raw Xml:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<LogonResponse xmlns="http://www.inwise.com/webservices/v2">
<LogonResult>
<IsSuccess>true</IsSuccess>
<ErrorDetails>
<Code>Success</Code>
</ErrorDetails>
<SessionId>d93e413fff974291aed939d3e405bc91</SessionId>
<AccountId>0</AccountId>
<ServiceUrl>https://www.em-sender.com/InwiseService2.asmx</ServiceUrl>
<MinutesToLive>1200</MinutesToLive>
</LogonResult>
</LogonResponse>
</soap:Body>
</soap:Envelope>