It does, but %CSP.REST is a preferable way of handling REST Requests.
As you can easily call production from REST just do it whenever the need arises.
- Log in to post comments
It does, but %CSP.REST is a preferable way of handling REST Requests.
As you can easily call production from REST just do it whenever the need arises.
Here's how you can create a REST API and call production from it.
Inside your REST handler you can access request body via:
Here's a simple fileserver in ObjectScript.
In Docker it's as easy as
ENV GWDIR /jgw
ENV ISC_PACKAGE_INSTALLDIR /usr/irissys
ENV ISC_JARDIR $ISC_PACKAGE_INSTALLDIR/dev/java/lib/JDK18
COPY --from=store/intersystems/iris-community:2020.2.0.211.0 \
$ISC_JARDIR/intersystems-gateway-3.1.0.jar \
$ISC_JARDIR/intersystems-jdbc-3.1.0.jar \
$ISC_JARDIR/intersystems-utils-3.1.0.jar \
$ISC_PACKAGE_INSTALLDIR/dev/java/lib/gson/gson-2.8.5.jar \
$GWDIR/You can check this article for more details.
I think you need a proxy method in InterSystems IRIS to accept one argument - new path and return the status.
You need to call Modify method of Config.Journal class, but it has one argument which is a local and currently locals are not supported by Native API IIRC.
Calling @Bob Kuszewski
One new idea for contestants:
MLOperation. Currently, PythonGateway provides low-level PythonOperation aimed at expert users who write Python code themselves. The idea of MLOperation is to build a high-level Interoperability adapter targeted at a broader userbase. Essentially your adapter provides generalized Fit/Predict/Optimize methods and users need to provide the data, target model type, and hyper parameter values. This closes the gap between the hands-off approach of the IntegratedML and low-level approach of the PythonGateway. The work is described in this issue.
Some ideas for contestants:
Participants can also use PEX to develop adapters in Java and .Net right? Here's an example of PEX production.
Great to hear that this project is being used in the field!
Haven't tested. Which error are you getting?
Just tried on
Try this
Class test.SQL
{
ClassMethod GetMsg(length As %Integer) As %Stream.TmpCharacter [ SqlProc ]
{
Set stream = ##class(%Stream.TmpCharacter).%New()
Set chunkLength = 32000
Set chunk = $tr($j("", chunkLength)," ", "A")
If length>=chunkLength {
For i=1:chunkLength:length {
Do stream.Write(chunk)
}
}
Set tailLength = length#chunkLength
Do:tailLength>0 stream.Write($e(chunk, 1, tailLength))
Set sc = stream.%Save()
Quit stream //."%%OID" <- also works for persisted streams
}
}Worked for me with this SQL (in SMP):
SELECT test.SQL_GetMsg(10), test.SQL_GetMsg(1)
UNION
SELECT test.SQL_GetMsg(10), test.SQL_GetMsg(2) Here's how you can have a bidirectional XML<>JSON converter:
i.e. do not place propertynames under quote
Property Arrival Time has a whitespace in the name so it must be quoted.
Why?
Your solution seems to work
.png)
As it looks like a security issue I would recommend a slightly different approach.
1. If you do not have the class for your XML, create it from XSD or manually.
2. Convert your XML string into an object of class (1).
3A. If you want just to skip some properties (like RollNo) set availability of these projected properties to IN - this way property is used by import but is ignored on export. Alternatively disable projection of this property altogether.
3B. If you really want to return *** from your value (what's the use case?) add a new datatype test.PrivateString and use it to store RollNo value - during OBJ->XML projection it would be exported as ***.
Class test.PrivateString Extends %String
{
/// Declares the XSD type used when projecting XML Schemas.
Parameter XSDTYPE = "string";
/// Return "***"
ClassMethod LogicalToXSD(%val As %TimeStamp) As %String [ CodeMode = generator, ServerOnly = 1 ]
{
If ($$$getClassType(%class)=$$$cCLASSCLASSTYPEDATATYPE) || $$$comMemberKeyGet(%class,$$$cCLASSparameter,"XMLENABLED",$$$cPARAMdefault) {
Set %codemode=$$$cMETHCODEMODEEXPRESSION
Set %code="""***"""
} Else {
Set %code=0
}
Quit $$$OK
}
}Awesome!
Use custom queries or global mapping.
Check EnsLogViewer - InterSystems IRIS/Ensemble Log Viewer with namespace support.
I think you'll need 2 separate indices for that.
Path is how you access the value.
Contact your Account Manager at InterSystems.
Usually I do this:
set sc = ..method()
/// finalization
quit:$$$ISERR(sc) scI always use %Status and try to wrap calls in this macro:
#define qoe(%expr) $$$QuitOnError(%expr)For example:
$$$qoe(..computeDigest(canonicalized))$$$ERROR($$$SQLError, SQLCODE, %msg)You can use PythonGateway to call Python code from InterSystems IRIS directly.
Example:
set sc = ##class(isc.py.Main).SimpleString("x='HELLO'", "x", , .x)
write x
>HELLOYou can start with
set %gw = createJavaGateway()Where createJavaGateway is
ClassMethod createJavaGateway()
{
quit:$d(%gw) %gw
/// init connection
}And remove disconnect part. This way %gw variable would stay alive betwee the calls.
Is the response actually compressed?
I thought automatic decompression is happening a few layers down on the stack.
Use session id to track data between calls.
In general I would suggest moving to REST stateless architecture.