Got it! Now I'm struggling with adding a value to that array. Would it be correct?
set arr(arr + 1) = value
- Log in to post comments
Got it! Now I'm struggling with adding a value to that array. Would it be correct?
set arr(arr + 1) = value
Thanks Robert.
> args = number of params
Arrays in IRIS are counterintuitive 馃槬
Here it is:
Class MyHL7HTTPService Extends EnsLib.HL7.Service.HTTPService
{
Method OnAdapterHTTPResponse(
ByRef pStatus As %Status,
ByRef pHTTPResponseStatus As %String,
ByRef pBodyLen As %Integer,
ByRef pResponseBodyStream As %Stream.Object,
ByRef pMainResponseHeader As %String,
ByRef pHeaderExtra As %String)
{
set pHeaderExtra = pHeaderExtra _ "Access-Control-Allow-Origin: *"_ $char(13) _ $char(10)
_ "Access-Control-Allow-Headers: *" _ $char(13) _ $char(10)
_ "Access-Control-Allow-Methods: *" _ $char(13) _ $char(10)
}
}
Finally, I've implemented the following brute solution. I don't like the look of this at all, but it works
{
#dim request as %CSP.Request
set request = %request
#dim headerName as %String
set headerName = ""
set headerName = request.NextCgiEnv(headerName)
while (headerName '= "") {
if $find(headerName, "HTTP_") '= 0 {
set localHeaderName = $replace(headerName, "HTTP_", "")
set localHeaderName = $replace(localHeaderName, "_", "- ")
set localHeaderName = $zconvert(localHeaderName, "L")
set localHeaderName = $zconvert(localHeaderName, "W")
set localHeaderName = $replace(localHeaderName, "- ", "-")
write localHeaderName, ": ", request.GetCgiEnv(headerName), !
}
set headerName = request.NextCgiEnv(headerName)
}
return $$$OK
}
I need to find a reason of a performance bug in the source code of the original class :)
Great answer! And yes, I badly need that for testing!
Thanks, I caught your idea but no, IIS is not a cause, although the issue exists in Windows but not in Linux
I'm using Postman, the default Accept header value was */*, then according your advice I tried application/json, then application/fhir+json, both not working, IRIS still produces HTML
<div id="content">
<div class="content-container">
<fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset>
</div>
</div>
I have ended up with Hyper-V and Ubuntu but thanks ![]()
Thanks but I doubt it's a license issue. The IRIS installer creates another log in C:\Windows directory, and it also contains no useful information. At some point the installation process just hangs as well as the log file stops growing.
UPD1: launched the installation package via the "Run as administrator" menu item. Now the messages.log file contains the following diagnostics info:
- on Ryzen 3900 - the processor has too many cores which is not allowed by Community edition license
- on Athlon 3000G the error message is less informative: `11/06/22-01:06:28:788 ( 5200) 3 irisctl.dll (error during startup):(289) IRIS failed to start. IRIS Control Process terminated abnormally (exit code = 0).`
Great, thanks a lot, works perfectly!
I know about messages.log, but in my case it's pretty short (~2kb) and contains no useful trace info :( There are workarounds with Docker and VMs, both approaches work
Laptop - Windows 11
AMD workstations - Windows 10 Home (official OEM, with fresh updates)