Question
· Jul 23, 2017
Check if class exists

There is method:

$System.OBJ.New( ClassName As %String = "" )

If class with name ClassName exists - everything is OK.

But, when class does not exist, there is error - <CLASS DOES NOT EXIST>

How can I check before calling $System.OBJ.New() if class witn name ClassName exists?

0 19
0 3.8K

I'm aware of two ways to get list of files in a dir:

set dir = "C:\temp\"
set rs = ##class(%File).FileSetFunc(dir, , , 1)
do rs.%Display()

and:

set dir = "C:\temp\"
set file=$ZSEARCH(dir_"*")
while file'="" {
   write !,file
   set file=$ZSEARCH("")
}

Yet they bot return only files and directories in a current directory, but not files in subdirectories.

I suppose I call one of these recursively, but maybe there's a better solution?

1 25
1 3.6K

Hi all,

I have a very weird error when I'm calling to a SOAP Webservice as client.

I've create all objects to invoke to this SOAP using the add-in "Assistant SOAP" in Eclipse, it has created all objects (Response, Request, Business operation WS class, etc...).

When I call to this service it retuns the following error message:

ERROR #6243: HTTP request to SOAP WebService returned unexpected CONTENT-TYPE response: text/html.

2 4
0 3.6K

Hoping someone can help.

I need to convert a timestamp from the following format (YYYYMMDDhhmmss e.g. 20160105125915) to UTC time in the same format.

I presume I need to convert it to the system format ( like $HOROLOG ) and then use something like ConvertTimeStampToHorolog or perhaps LocalWithZTIMEZONEtoUTC but not sure of the syntax.

Thanks,

Conor

0 8
0 3.6K

Currently, when we want to write data to a file that will be viewed in Excel, we parse the data in tab deliminated format to the file and name it with .xls at the end. That is sent to end users via email. They get a warning that the data is not formatted properly (it's not really an Excel file after all) but it does display somewhat correctly as the tabs are understood (this does not work if we deliminated with commas however).

3 28
3 3.6K

We have a new requirement being push down by our Data Security to no longer use Local SQL Accounts to access our Databases. So they asked me to create a Service Account that is on the Domain for our connections to each database.

I tried just changing my JDBC connection to using this Service Account and Password but I am not having any luck trying to connect to the database.

" Connection failed.
Login failed for user 'osumc\CPD.Intr.Service'. ClientConnectionId:ade97239-c1c8-4ed1-8230-d274edb2e731 "

1 4
0 3.6K

I'd like to access and view the soap log. Apparently there is a global for that (^ISCSOAP) (http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...), but insofar I have been unsuccessful finding the exact cache command for viewing the soap log or changing it so that it logs both incoming and outgoing traffic. Can anyone enlighten me?

I.e. I am trying stuff like:

set ^ISCSOAP("Log") = io

write ^ISCSOAP("Log)

0 5
1 3.5K

Hi-

Im curious if there is any specific configuration that has to be done on an IIS web server to serve up RESTful web services.

I have a server that has IIS installed, with the CSP gateway. a second server that has Cache installed on it.

I have configured a web application using the Cache System Management Portal for the web services that has a dispatch class pointing to my dispatch class.

I have created an application mapping in my CSP Gateway Management Portal on the web server such that url's with /webservices prefix are routed to my cache server.

0 1
0 3.5K
Question
· Aug 9, 2017
SSL_connect() error

I am trying to send an HTTP request and getting "SSL/TLS error return from SSL_connect()." error (Cache 2013). No modification in SSL/TLS Configuration helped. Could anyone point me in the right direction?

Thanks

0 16
1 3.5K

Hi dev community,

I am currently working on a project to send documents to a RESTful based API that supports bearer
Token Authorization.

When we try to fire a JSON request from our EnsLib.Rest.Operation towards the 3rd party API with a
valid Token we keep receiving Authorization Error codes HTTP 401 back.

If we use the same request and same Token from a test utility such as Postman the request is
successful and we are able to move past the authorization stage.

0 4
2 3.5K

Hi,

Can anyone point me to an example of a DTL & Class method that can pull a base64 encoded PDF out of a MDMT02 message?

This is really asking for two things;

- how to make a DTL that extracts a specific subfield of an HL7 2.3 message into a message of its own,

and

- how to transform an base64 encoded document into its original binary form for writing to a file.

I'd also love to see an example of an HL7 2.n MDM^T02 ==> HL73.ITK2 non-coded CDA

0 3
1 3.5K

Greetings,

Is it possible to save Cache code into a file and then run it via command line?

IE: csession [ini] -U [ini] /path/cacheCodeFile.?

What I need to do is run a Cache script from the Linux command line. The script will navigate data to produce a file and then it will exit back to the command line.

Thanks in advance for everyone's time.

1 2
0 3.4K

In .NET Core you have an option to extend a session using a "sliding expiration". This means that if over half the time has passed and the user actively uses their session then the expiry timer gets reset and the user remains logged in. This can lead to the curious situation where you have an active authenticated user with an expired access token being used in data-access requests.

0 1
0 3.4K

I cannot connect to Cache from node.js

I have installed in Windows 10 the following: CACHE 2016, node.js v 4.4.7 and express .

- where can I get cache.node? The link in the Intersystmes documentation http://globalsdb.org/downloads/ doesn't work. I found cache0100.node and cache0120.node in my Cache instance's \bin directory. But I am not sure if I can use them or not.

- how to install cache.node ? Where do I place it exactly?

Can anyone recommend any tutorial or code example with installation instructions?

1 12
1 3.4K

So this may sound trivial, but I'm seeing conflicting information on this topic and hoping to get clarification.

According to Enslib.HL7.Message class definition, the maxlength of RawContent is 10,000 characters. So when using encoding like UTF-8, that is 10KB. When using Unicode, that should then be 20KB.

But then also coming across some forums and documents where 32KB is maximum size before HL7 fields are truncated.

What is the sure way to determine and modify an interface's maximum supported message size?

0 6
0 3.4K

Hello,

When we need to create a utf-8 encoded XML file, we use the Charset property of %XML.Writer:

set writer=##class(%XML.Writer).%New()
set writer.Charset="UTF-8"

How can we create regular txt files with such encoding?

Our Cache Installations are 8 bit and not unicode.

Thanks,

Nael Naser eldeen

0 10
1 3.3K
Question
· Jun 6, 2019
ODBC connection error

Hello,

There is a problem connecting clients through ODBC.

"ERROR [08S01] [Cache ODBC][State : 08S01][Native Code 459]
Connection via cconnect failed:
TCP connect() failed - exception satisfied select().
Reason: (10061, 0x274d) No connection could be made because the target machine actively refused it."

Error sometimes occurs. In cconsole.log there are only messages about high CPU usage.

ODBC and Cache version Cache for Windows (x86-64) 2013.1.4 (Build 801).

Any suggestions?

0 3
0 3.3K

You have a global ^CODE("TNO","BIO",291,"AKI") that may or may not exist. On the data side of the global ref it can have a boolean value of 0 (false) or 1 (true) and this global is wrapped up in a Caché class accessible from myobject.AKI property. At the object level, how do you check whether the property is defined ie. is there a $DATA equivalent for Cache Object properties? Also, how would you kill /null the property as opposed to making the value 0 (false) or an empty string?

0 10
0 3.2K