I was trying to connect to solace appliance installed in our organization from nodejs
. I took the same code as given in solace web messaging demo. As given in the example below are the session
properties:
my_web_server_url = "http://<ip:port>/smf";
my_client_username = "<username>";
my_vpn = "<vpnname>";
my_password = "<password>";
When I debug the code of a callback method solace.SessionEventCBInfo
of solace.SolclientFactory.createSession
, I found that below condition never meets:
if (event.sessionEventCode === solace.SessionEventCode.UP_NOTICE) {
console.log(":::Connected:::");
}
And the control goes to the connecting state for all 3 transport schemes (HTTP_BASIC, HTTP_BASE64 and HTTP_STREAMING) and finally goes to error condition.
else if (event.sessionEventCode === solace.SessionEventCode.CONNECTING) {
console.log(":::Connecting.....");
} else {
console.log(":::Error!:::");
}
Is there any configuration issue on solace appliance ? Should web messaging be enabled on solace appliance while configuring ? Or am I doing something wrong in the code ?
Update
Please find below the details of session
event:
Session event: sessionEventCode=CONNECTING, infoStr=Establishing connection (transport:HTTP_BINARY_STREAMING), responseCode=, errorSubCode=, correlationKey=, reason=()
(index):105 Connecting.....
(index):102 Session event: sessionEventCode=CONNECTING, infoStr=Establishing connection (transport:HTTP_BINARY), responseCode=, errorSubCode=, correlationKey=, reason=()
(index):105 Connecting.....
(index):102 Session event: sessionEventCode=CONNECTING, infoStr=Establishing connection (transport:HTTP_BASE64), responseCode=, errorSubCode=, correlationKey=, reason=()
(index):105 Connecting.....
(index):102 Session event: sessionEventCode=DISCONNECTED, infoStr=Session is destroyed, responseCode=, errorSubCode=, correlationKey=, reason=(Transport session event: sessionEventCode=2, infoStr=Session is destroyed, responseCode=, sid=)
(index):109 Error!!!!!