11/02/2017
Hello,
I get an error “BadSessionNotActivated” after sending ActivateSessionRequest. What I have understood from Part4 is that in order to activate the session, I need to send the session id and authentication token in ActivateSessionRequest received from CreateSessionResponse. Can any one tell me how can I pass the session id? Below is the message format of ActivateSessionRequest:
const RequestHeader session_reqHeader :=
{
authenticationToken := {
mask := 5,
namespaceUriBit := 0,
serverIndexBit := 0,
reservedBit1 := 0,
reservedBit2 := 0,
IdType := {
byteString := {
nameSpace := 0,
nodeValue := {
realByteString := {
lengthValue := 16,
byteStringValue := { 158, 90, 162, 148, 156, 246, 241, 148, 31, 193, 28, 209, 38, 236, 97, 192}
}
}
}
}
},
timestamp := 131556452505810000,
requestHandle := 5,
returnDiagnostics := 0,
auditEntryId := {
realString := {
stringLength := 0,
stringValue := “”
}
},
timeoutHint := 0,
additionalHeader := {
typeId := {
node := {
mask := 0,
namespaceUriBit := 0,
serverIndexBit := 0,
reservedBit1 := 0,
reservedBit2 := 0,
IdType := {
twoByte := {
nodeValue := 0
}
}
},
namespaceUri := omit,
serverIndex := omit
},
Value := 0
}
}requestHeader := session_reqHeader,
clientSignature := { algorithm := { nullString := { arrayLength := -2147483647 } }, Signature := { nullByteString := { arrayLength := -2147483647 } } },
clientSoftwareCertificates := { realArray := { arrayLength := 0, arrayValues := { } } },
localeIds := valueof(tr_ListOfLocaleId({})),
userIdentityToken := {
encodingByte := 1,
twoByteNodeValue := omit,
namespaceIndex := 0,
fourByteNodeValue := 321,
encoding := 1,
parameterLength := 13,
extensibleParameterBody := {
anonymousIdentityToken := {
policyId := valueof(tr_String( “anonymous”))
}
}
},userTokenSignature := {
algorithm := valueof(tr_StringNull),
Signature := valueof(tr_ByteStringNull)
}
}
Any feedback given will be helpful. Thank You in advance.
With Regards,
Avdoot Chalke
Moderators-Specifications
Moderators-Companion
Moderators-Implementation
Moderators-Certification
Moderators-COM
02/24/2014
Avdoot,
The OPC Foundation has a public GitHub that includes stacks, sample/examples, including multiple languages (https://github.com/opcfoundation). Also the forum on GitHub is a better place to ask implementation questions.
Most people use one of the existing Stacks, which handle constructing the wire messages. Also many developers use a SDK, which provides even more of the functionality required for the communications. The SDK allows a implementer to focus on the information model or actual application instead of the communication aspects.
Paul
Paul Hunkar - DSInteroperability
1 Guest(s)