Nezla · Jun 26, 2025 go to post

Hi Robert,

here is how my code looks like but when I comes to line code : Set WebSoc=##class(%Net.WebSocket.Client).%New(WebSocURL,cre,evl)

it just hangs and doesn't go any further!?

ClassMethod GetAdvData() As %String
{
    Token=##class(SX3.Task.TemperatureCollection).GetAuth()
        BleMac="DC:0D:30:00:07:25",GatewayMac="CC:1B:E0:E2:52:D4"  // this for testing
set cre=##class(SX3.Production.HTTP.AdvCredenials).%New()
set evl=##class(SX3.Production.HTTP.AdvListener).%New()
Set WebSocURL="https://ac1.mqtt.sx3ac.com/api/gap/nodes?filter_mac="_BleMac_"&filter_rssi=-75&mac="_GatewayMac_"&active=1&event=1&chip=1&access_token="_Token
Set WebSoc=##class(%Net.WebSocket.Client).%New(WebSocURL,cre,evl)

res=WebSoc.Next(30,1)
Quit WebSoc_"|"_WebSocURL
}

Class SX3.Production.HTTP.AdvCredenials Extends (%RegisteredObject, %Net.WebSocket.ICredentials)
{
Method GetUsername() As %String
{
quit "SuperUser"
}
/// Returns the password to use for authentication with the web socket
/// @API.Overrideable
Method GetPassword() As %String
{
quit "SYS"
}
Method GetSSLConfiguration() As %String
{
"RTLS"
}}
 

Class SX3.Production.HTTP.AdvListener Extends (%RegisteredObject, %Net.WebSocket.IEventListener)
{Method OnMessage(pContent As %Stream.Object)
{
^data("message")="1" //pContent.Read()


}

Also changed the listener class to include you code and still the same, hangs

Class SX3.Production.HTTP.AdvListener Extends (%RegisteredObject, %Net.WebSocket.IEventListener)
{Method OnOpen()
{
if $increment(%ct("O")) set io=$io use 0 write "OPEN",! break:$get(%b) use io
}/// Called when an error occurs in the web socket connection.<br />
/// @API.Overrideable
Method OnError(pError As %Exception.AbstractException)
{
if $increment(%ct("E")) set io=$io use 0 write !
do $system.OBJ.DisplayError()
if pError.Code=28000 kill ws   use io quit     ;connection lost
zwrite pError write ! break:$get(%b) use io
}/// Called when the web socket connection is closed by either the client (%OnClose) or the server (by sending a close frame).<br />
/// @API.Overrideable
Method OnClose()
{
 if $increment(%ct("C")) set io=$io use 0 write "CLOSE",! BREAK:$get(%b) use io
}/// Called when the client receives a message from the server. <br />
/// <var>pContent</var> may be a binary or UTF8-decoded character stream. <br />
/// @API.Overrideable
Method OnMessage(pContent As %Stream.Object)
{
if $increment(%ct("M")) set io=$io use 0 write "MESSAGE:",pContent,!
if $isobject(pContent) write pContent.Read(),!
if $get(%b) zwrite pContent BREAK  
use io
}}
 

any clues?

Thanks

Nezla · Jun 25, 2025 go to post

Thanks but it looks like you are not using Credential class (CRE.cls)? 
I think in my case it should be simpler, only need to create an instance of the WebsocketClient, set the URL and implement Credentials & the EventLister, and I can where you used EventLister but don't know where to use the Credentials  class?

But I also noticed that in your Try method you're actually sending message, in my case I'm looking to get messages, but if you can let me know where to use Credentials, that would be a good start for me to try and get data?  
Thanks  

Nezla · Jun 24, 2025 go to post

I actually I've seen that one before posting the question, but couldn't find the actual code, do I have to run those docker commands, I'm not familiar with dockers and I don't want to mess up our Live Linux system, so not looking to try or test it if only can check a copy of the code that would be great?

Thanks Robert 

Nezla · Jun 23, 2025 go to post

So basically I have a URL call that connect to server and continuously populate data so if I run that URL in a browser you will that data coming thought the browser and stopping till you close the browser, and they problem is if I use the same call using HTTP request I can't get any response because I guess didn't finish and will never finish collecting data to a response, so the solution is either to find a way to end the collection of HTTP request so can get a response, or use EventSource like in Javascript, below is a javascript code that can do it

var es = new EventSource('Myurl')
    checkTime();
    var startTime = new Date().getTime()
    es.onmessage = function(e) {
    var endTime=new Date().getTime();
    console.log(e.data);
    if ((endTime-startTime)>20000){es.close();return;}};
    es.onerror = function(e) {console.log('ERROR!'+e.status);es.close();return; };
    function checkTime() {
    setTimeout(function() {
    es.close();
    return;
    }, 60000);}

Thanks          

Nezla · Jun 12, 2025 go to post

Thank you Vitaliy for your prompt assistance👌 

Nezla · Jun 11, 2025 go to post

Thanks Vitaliy, is there a property that makes the MultiSelectionSet Scrollable ?

Thanks Again

Nezla · Jun 11, 2025 go to post

Any ideas on how to tick on the previously saved selected items?

Thanks

Nezla · Jun 5, 2024 go to post

Its an html select component as mentioned above.
thanks

Nezla · Apr 29, 2024 go to post

You mean Handler mapping? Yes I did both at application and default website levels:

I get the first login page 

but the next pages fail

Thanks  

Nezla · Apr 29, 2024 go to post

Hmm, setup CSPSystem user as recommended but still the same error !?

Nezla · Apr 29, 2024 go to post

I can always install the Gateway as I have already just installed it but the reason why I'm asking is that because after installing the gateway from CSPGateway installer my application didn't work and was wondering if not having the gateway initially installed with ensemble could be the reason why the Zen application is not working, I've raised a separate case in this link: 

Page not found in Zen application | InterSystems Developer Community |
Thanks

Nezla · Apr 27, 2024 go to post

I go to Inetpub expecting that I see CSPGateway folder in there?

and also in IIS I thought there should be a CSPms DLL as well?

Nezla · Apr 27, 2024 go to post

Yes I just go with the first dialog and use the defaults, and its a fresh new install with not other Ensembles instances are installed and I'm surprised why I'm not getting the csp gateway installed in inetpub, I even formatted the whole machine, installed Win 10 Enterprise, enabled IIS then installed Ens 2018 and still CSPGateway not insllatted in inetbup!?    

Nezla · Apr 27, 2024 go to post

We are first converting from Ensemble 2014 to 2018 in order to be able to convert to IRIS.

I'm installing the latest ensemble-2018.1.9.805.0-win_x64 and expanding the Web server gateway option this is what I get:

is that means my installer doesn't have it?

Nezla · Apr 25, 2024 go to post

I've uninstalled Ensemble 2018 and CSPGateway and with IIS already enabled, I've re-installed Ensemble 2018 but it didn't install CSPGateway folder in intepub, I've then formated my machine, installed Win 10 enterprise, enabled IIS then installed Ensemble 2018 with Development option and still didn't install CSPGateway in intepub ?

Nezla · Apr 16, 2024 go to post

Thanks Robert renaming cache.data works and thanks John for the docs
Cheers guys

Nezla · Apr 3, 2024 go to post

Thanks Ben, and nope can't see the class there, if I re-install Ensemble on the top of the current one you reckon that would wipe out everything which means loosing what I've done in my namespace such as classes, Or would the install just update the current install?

Thanks  

Nezla · Apr 3, 2024 go to post

Spot on Ben & Enrico, I've mapped the package in my namespace and now looks good, the only problem is that before doing that, I tried creating Security.Common in my namespace by copying the content of it from my old system then went to my new system right click in Security Package--> new class and pasted the content then save & compile, but before mapping the package as mentioned, I deleted the class from my namespace and after the  mapping I can all classes except  Security.Common, my namespace now compiles fine with no errors but I'm wondering if that means I lost the Common class from my %Sys namespace as I can't see it there anymore?

Thanks 

Nezla · Apr 3, 2024 go to post

When I compile the class of the custom component it creates the .js & .css components in install\CSP\us-serenity where us-serenity is my namespace, so I manually copied those  components to install\CSP\broker and that fixed the error, so I'm wondering why when compiling it doesn't generate to broker folder or how can I make my install look for the generated components in  install\CSP\us-serenity instead of install\CSP\broker
?
   

Thanks Stephen

Nezla · Apr 3, 2024 go to post

To what I can see those classes seems to be some kind of system classes or system generated, so I'm wondering if there is a utility to include them or something ?

 

Nezla · Apr 3, 2024 go to post

Yes, as I mentioned I compiled MSDS.ZEN.Component.imageclickbuttom and also class in question MSDS.UI.HandHeld.RTLSLogin.ProductLine and both compiled successfully

I also ran d $System.OBJ.CompileAll("c-k-l") from the terminal and yes I got 24 Errors but none is related to classes in question (MSDS.ZEN.Component.imageclickbuttom or MSDS.UI.HandHeld.RTLSLogin.ProductLine)

Nezla · Mar 27, 2024 go to post

Yes and also tried from both Explorer & Chrome

Nezla · Mar 13, 2024 go to post

Thanks, our client didn't recommended a specific port and it worked fine from Postman without it, but now I've set the default port 443 and still the same error?
  

Nezla · Mar 13, 2024 go to post

when I try it from the Terminal I get the following error:

Nezla · Mar 13, 2024 go to post

when I try it from the Terminal I get the following error:

Nezla · Mar 12, 2024 go to post

Haven't used HTTP adapter before, any sample on how to use it ?

Nezla · Mar 12, 2024 go to post

Yep exactly, getting null means that my post might not even get there and I'm trying to find out the reason.
Yes RTLS is configured in SSL and I'm actually using it in other place for other clients and working fine but not with this client?
Thanks

Nezla · Mar 12, 2024 go to post

No errors, tSc returned as null, which I guessing that the post didn't go through because I'm doing something wrong in my code?