There are far more efficient ways to do that.

  1. Move tables you want shared into a separate Namespace with separate Code/Data databases.
  2. Map your data and code into original namespace.
  3. Verify that it all works as expected. So far it should work as before.
  4. Create a mirroring configuration.
  5. Add 2 created databases to the mirror configuration.
  6. Add second server as a DR mirror.
  7. Move databases to a DR mirror and mount them there.
  8. (Optional) Create a namespace with 2 mirrored databases.
  9. Add desired mappings on a second system.

Docs.

JVM is probably out of memory. Try this.

1. Define Excel server at SMP > System > Configuration > Zen Report Excel Servers > Zen Report Excel Server, let's say at port 44444

2. Start it. Copy OS command. Should be something like:

C:\InterSystems\Ensemble\lib\ExcelExporter\runserver.bat -port 44444 -numthreads 5 -loglevel 3 -maxlogfilesize 32000 -logrotationcount 100 -numpingthreads 5 -pingport 44445 2>&1

3. Stop Excel server

4. Execute the command from 2 in OS terminal, but set JVM heap size. See how.

5. In your ZEN report add:

Parameter EXCELSERVER = 44444;

to use your excel server.

6. Recompile report and try to run it again.

You need to add POST route:

Class Rest.UsuarioSvc Extends %CSP.REST
{

XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/Oi/:xpto" Method="GET" Call="Oi"/>
<Route Url="/Oi/:xpto" Method="POST" Call="Oi"/>
</Routes>
}

ClassMethod Oi(xpto As %String) As %Status
{
    Set tSC = $$$OK
    
    If 'tSC Quit tSC       
    Set tProxy = ##class(%ZEN.proxyObject).%New()
    Set tProxy.Oi = xpto _ "1234"
    
    Set %response.ContentType = "application/json"
    set %response.Status = 200
    Do tProxy.%ToJSON()
    
    Quit tSC
}

}

I'd try to avoid giving user an ability to enter arbitrary code.

1. Offer user a list of predefined operations ( >,<,=,<> or Equals,More, Not Equals,...)

2. Get input from user.

3. Check that input is actually one option on a list and not something else. 

4. Perform the check using IF, for example.

 ClassMethod main(a As %Integer, b As %Integer, operation As %String(VALUELIST="Equals,Not Equals") = "Equals") As %Boolean
{
  set operationList = $lb("Equals", "Not Equals")
  throw:'$lf(operationList, operation) ##class(%Exception.General).%New("<INVALID OPERATION>")
 
  if operation = "Equals" {
    set result = (a = b)
  } elseif operation = "Not Equals" {
    set result = (a '= b)
  } else {
    throw ##class(%Exception.General).%New("<INVALID OPERATION>")
  }
 
  quit result
}

To create one property call:

http://127.0.0.1:52773/api/docdb/v1/NamespaceName/db/DBName/propertyName?type=propertyType&path=propertyPath&unique=propertyUnique

You'll need one call per property.

For your property Ergebniszuf, url would be:

http://127.0.0.1:52773/api/docdb/v1/NamespaceName/db/DBName/Ergebniszuf?type=%String&path=Ergebniszuf&unique=0

Usually response does contain status information in StatusCode and StatusLine properties.

You need to change this line

Set httpResponse = httpRequest.Post("/sample/", 2)

to

#dim sc As %Status = $$$OK
Set sc = httpRequest.Post("/sample/", 2)
Write $System.Status.GetErrorText(sc)

As Post method returns status.

After debugging you can use

write $$$ISERR(sc)

macro to check if result of some operation is an error.

Redefine HTTP adapter like this:

Class Production.Adapter.HTTPOutboundAdapter Extends EnsLib.HTTP.OutboundAdapter
{

/// Send a POST to the configured Server, Port and URL, sending form data to the named form variables.
Method Post(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) As %Status
{

    quit ..SendFormDataArray(.pHttpResponse, "POST", ..GetRequest(), .pFormVarNames, .pData)
}

ClassMethod GetRequest() As %Net.HttpRequest
{
    set request = ##class(%Net.HttpRequest).%New()
    set request.ContentType = "application/json"
    quit request
}

}

And use it instead of default adapter.

There are several ways to do that. Let's say you have a persistent property

Property Problem As %String;

That you don't want anyone to see.

1. Make it private:

Property Problem As %String [ Private ];

It would not be displayed altogether

2. Add accessor methods:

Property Problem As %String;

Method ProblemGet() As %String [ ServerOnly = 1 ]
{
    Quit "****"
}

Method ProblemRealGet()
{
    Quit i%Problem2
}

Method ProblemSet(Arg As %String) As %Status [ ServerOnly = 1 ]
{
    Set i%Problem2 = Arg
    Quit $$$OK
}

This way default callers would get **** and only your app code can access the real value.

3. Do not project property to XML

Property Problem As %String(XMLPROJECTION = "none");

As ensemble message viewer is XML-based it would hide property from it.

4. Create a special datatype. For example MyApp.Datatype.Password datatype returns **** as Display and ODBC values:

Class MyApp.Datatype.Password Extends %String
{

ClassMethod LogicalToDisplay(%val As %String) As %String [ Internal ]
{
    q $case(%val,"":"",:"*****")
}

ClassMethod LogicalToOdbc(%val As %String) As %String [ Internal ]
{
    q $case(%val,"":"",:"*****")
}

}

To use it:

Property Problem As MyApp.Datatypes.Password;

5. Extract the property into a separate class and reference the object of that class.

These approaches could be combined.