Hello,\

You may find documentation on how to work with streams here: 
https://docs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_propstream

in BPL you can add a "code" element where you can create and populate your stream with data,. or you can add a "call" element to call a classmethod where you implement the code.

For example: to create a stream and write some data into it :
(if you need to have this stream data vailable for other components of the BPL it is best to use a %context property for it)

set stream  = ##class(%Stream.GlobalCharacter).%New()
do stream.Write("some text")
do stream.Write(%request.anyproperty)
do stream.Write(%context.anyproperty)

in your request / response messages to pass to BO you will have to add a stream property :

Property MyProp As %Stream.GlobalCharacter;

Hi.

Julius ConntQ function will give a wrong answer for ^Locations","Canada") since it will count also the "USA" nodes.

Here is a code that will do the trick :

ClassMethod Count(node)
{
    S QLen=$QL(node) QLen Keys=$QS(node,QLen)
    F Count=0:1 node=$Query(@node) Q:node="" || (QLen && ($QS(node,QLen)'=Keys))
    Quit Count
}

W ##class(Yaron.test).Count($name(^Locations))
5

w ##class(Yaron.test).Count($name(^Locations("USA")))
3

w ##class(Yaron.test).Count($name(^Locations("Canada")))
2

Hello,

If you mean to use "Internal" keyword, this will prevent the Class (Web) method from being displayed in the class documentation.
https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_method_internal

If this SOAP web service if for internal use, and should not be used elsewhere, I would go for an approach of secure this specific web service.
https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAPSEC

Hello,

If you need to save your class in more than 1 namespace, and you are using studio, you may do it automatically with studio hooks.

This is done in that way:
1. You create your own source control class which inherit from %Studio.SourceControlBase
2. you put your code in that class. For example you may use OnAfterSave method to run on all namespaces that your class need to be saved, loop on this list (except the current one of course) and save + compile your class (programmatically) in each namespace. 

https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GSTD_Intro#GSTD_intro_schooks

https://irisdocs.intersystems.com/iris20191/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Studio.SourceControl.Base

Hi.

You could do that with the following way

1. Define your own custom event class (inherit from %CSp.SessionEvents)  then you may interact with the session creation/deletion:
2. In OnStartSession() callback in the event class, you may store the sessionId in your own global/table.
3. In OnEndSession() callback in the event class you may delete/kill your own data.
4. Pass the SessionId from the parrent window to the child (if you do not have it there already)
5. Have a timeout JS code to call the server using #server or #call every x sec. with a check of your own global/table for this SessionId.
If not exist - preform a "windowsClose" or a in-window message...

Here is more documentation abourt it :

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCSP_sessions

Hello,

As I understand, you want to have Cache as a client, doing a post toward a secure web page.
For this you need to define an SSL "Client".

1. Go to "System Administration" --> "Security" --> "SSL/TLS configuration" --> "Create new configuration"

2. Give any name you want in "Configuration name" for example : SSL

3. Default values for "Type" = "client" and "Enabled"

4. Clisk "Test" button (before save) enter a web site (google.com) click "ok" then enter port = 443. You should get the following:

"SSL connection succeeded" 

5. Save the configuration.

Using that SSL with %Net.Httprequest - https://irisdocs.intersystems.com/iris20191/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Net.HttpRequest

The trick is to use the "SSLConfiguration" property of %Net.HttpRequest class to store the name of the SSL configuration you have devfined earlier.

Here is a sample code :

Req = ##class(%Net.HttpRequest).%New()
Req.Server = "www.server.com"
Req.SSLConfiguration = "SSL"
Req.InsertFormData("name","value")
Req.Post("/location/path")
Res Req.HttpResponse
$IsObject(Req) Res.OutputToDevice()

Hi,

To get information about a namespace, You may use this code :

(run it only in %sys" namespace) 

Properties variable is passed by ref (i.e. it has a point at the beginning)

%SYS>S Status=##Class(Config.Namespaces).Get("user", .Properties)

%SYS>zw Properties
Properties("Globals")="USER"
Properties("Library")="CACHELIB"
Properties("Routines")="USER"
Properties("SysGlobals")="CACHESYS"
Properties("SysRoutines")="CACHESYS"
Properties("TempGlobals")="CACHETEMP"