Hello!
I am trying access each "name" tag in the xml-file down below and want to display them through the trace in the production:

<?xml version="1.0"?>
<staff>
<doc type="consultant">
<name first="David" last="Marston">Mr. Marston</name>
<name first="David" last="Bertoni">Mr. Bertoni</name>
<name first="Donald" last="Leslie">Mr. Leslie</name>
<name first="Emily" last="Farmer">Ms. Farmer</name>
</doc>

</staff>

0 2
0 154
Question
· Nov 20, 2023
Working with Named Pipes

While creating my latest examples for the JavaContest I faced the need
to communicate with my code from a program in IRIS to my Java code.

Communication with |CPIPE| worked as READ or WRITE but not both?
In the Documentation Named PIPEs are explained rather shortly.
"Once open, a pipe acts like an ordinary device." Not so precise.
I failed to achieve my expected READ/WRITE as TCP would offer.

0 4
0 219
Article
· Nov 19, 2023 1m read
NativeAPI for Java from WebTerminal

Based on the successful solution for my 2nd contribution to the Contest
I used an adapted version for this package. And have some findings I'd like to share.

Multiple communication steps over CPIPE may take time.
You won't recognize it on a fast machine. But a slower box with
Windows + Docker Desktop + your browser (and more) is neither
"Speedy Gonzales" nor a "Road Runner". 🙂

1 1
0 144

Hi community members!

Recently a customer ask me about a problem that detected when they were trying to send a post call to an external HTTP service, this service has changed and now it redirects to another URL, so they have setted to true the FollowRedirect parameter (setted to false for POST calls by default), what is the problem? They are sending a custom header in the post call and after the redirection this value is deleted.

1 2
0 149

I was recently asked whether we have a function to convert LDAP date time stamps into $HOROLOG format or other formats and the answer is not at the moment, but there is a simple method to do the conversion.

Let us look at the facts and figures involved...

1) Active Directory's (AD) date 0 (zero) is 1601-01-01 00:00:00.000 or January 1st, 1601 at midnight (00:00:00)

2) AD timestamps are calculated as the number of 100 nanosecond intervals from date 0

3) 864000000000 is the number of 100 nanosecond intervals per day

6 1
0 1K

Hi everyone,

today I'm asking your help with an issue related to the response messages sent from my production to a client software, such as Postman or SoapUI.

Issue

In the last few days I've been unable to view the responses received from my production in Postman, even if I was able to do so earlier. I'm sending the request to a remote server reachable via a Putty tunnel.

Postman Test

I'm currently testing this simple POST message:

1 1
0 279

Here in %SYS, we have already examined users, resources, and roles. Now that we know how to set all of that up, we should give it a purpose. Next we will talk about applications! As you may expect, we will see various identical class methods defined here that we have seen in the previous classes. However, some of them will have some tiny yet significant differences.

5 1
2 288

This applies to embedded and dynamic SQL queries in Caché ObjectScript. If I attempt to terminate the process via Management Portal, nothing happens. Neither does Ctrl C nor closing the terminal window in which my program is running, nor setting a stop flag in a global which is read by the program on each loop iteration. The only way to stop the query appears to be restarting the Caché server (which is running locally on my PC).

0 6
0 326

I am making a POST request to an API. In the case of an error, I don't know what parameters the response JSON will contain (they will change depending on the error). I am converting the response stream to an object but then I need a way to loop through all the properties and access their values. The following code is making the POST request, reading the response, and trying to add all the error messages to an array. But I can't iterate over the properties of the tProxy.errors object because it is a %ZEN.proxyObject. Is there a better way to do this?

0 2
0 172

InterSystems FAQ rubric

ObjectScript allows you to pass any number of arguments using arrays. Do it by adding ... after the argument name.

An example is as follows. In the example statement, the argument information is set in a global variable (a variable stored in the database) so that it can be easily checked after the method is executed.

5 1
0 262
Question
· Sep 12, 2023
Scoping OID / OREF map

It's a feature of ObjectScript (perhaps widely known, perhaps not) that if you open the same object ID multiple times, you end up with the same OREF. For example:

USER>set obj1 = ##class(Sample.Person).%OpenId(1)
 
USER>set obj2 = ##class(Sample.Person).%OpenId(1)

USER>w obj1,!,obj2
1@Sample.Person
1@Sample.Person

Generally speaking, this is an important feature - you won't end up accidentally modifying the same record via multiple paths and losing some of the changes.

2 10
2 298

I am currently debugging a piece of code relying heavily on macros. I am using breaks in the method to then check the values of macros and object properties as I go. However, any time I invoke a macro within a break I get an error. To get around this I am converting the macro calls into the underlying code. Some of these macros have messy translations and this is somewhat time consuming. Is there an easier way to access macros from within a break?

0 5
0 152

InterSystems FAQ rubric

In the sample below, an image file is encoded into a Base64 string in a class property, saved, decoded again with Base64, and restored to another file.

【Usage class】

Class User.test Extends %Persistent
{
Property pics As %GlobalBinaryStream;
}


【When importing】

7 2
1 393