Article
· Oct 7, 2016 4m read
Forwarding Requests in a REST Service

One useful feature of our REST framework is the ability for a dispatch class to identify request prefixes and forward them to another dispatch class. This approach of modularizing your URL map will improve code readability, enable you to easily maintain separate versions of an interface, and provide a means to protect API calls that only certain users will be allowed to access.

7 1
0 3.6K

I have a class:

Class test.Person Extends (%Persistent, %XML.Adaptor)
{
Property Name;
}

I want to serialize it into this XML:

<Person>
    <Id>1</Id>
    <Name>Ed</Name>
</Person>

Is it possible?

It's for the Visual Trace so I can't use %XML.Writer.

0 2
0 275

I am using studio 2015 version which does not have dynamic objects and I need to read xml and convert that to a json I have managed to come close to json string but with little difficulties .I need to be able to identify the root element and specify where to put braces between objects anyone with any idea is welcome he is my code so far

1 12
0 1.4K

I'm looking for any codes that match my parameter that we have received since 1/01/2020 based on the FromTime, EnteredOn or Status (if both are empty).

(Problem[Problem/Code='%1' and FromTime>"2020-01-01"]) | (Problem[Problem/Code='%1' and (count(FromTime)=0 or FromTime="") and EnteredOn>"2020-01-01"])
| (Problem[Problem/Code='%1' and (count(FromTime)=0 or FromTime="") and (count(EnteredOn)=0 or EnteredOn="") and Status/Description="Active"])

This works like a charm with standard XPATH query tools but HS does not like it.

1 2
1 193

We have a data transformation where source is object collection (populated from a json file) and target is EnsLib.EDI.XML.Document.

If source file is large enough, transformation fails and we get <store> error and I quickly found this:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPLR_DTL_foreach which at the bottom in "Avoiding <STORE> Errors with Large Messages" section tells to:

1 1
0 375

In my Data Transformation, the Target class needs to create a new List of objects (ListOfObj), depending on some conditions of Source class (Source/Target are completely distinct/different classes).

I experimented with Lists of 'primitive' data types (ListOfDT), and I could add new %String items (as an example) to a List of %String property, with "append" action in DT.

Does anyone have an example, or guidance, how to create new Lists of Objects in data transformation?

For example, if I have a 'container' class like this, it works:

0 2
0 745

Hello.

I'm trying to export a XML stream containing some files that are supposed to have been written using UTF-8, but I'm facing some broken encoding issues.
You can see below that I'm indeed viewing a UTF-8 encoded and which is inside the CSP folder and encoded correctly (although displaying it on Studio would not display it correctly as the file is not using BOM and that's intentional).

0 7
0 712

Hello,

I am reading in an X12 document into my production that needs to be processed and returned as a CSV file. I have created a record map to support the fields I want to extract with a batch class to store headers. I have a DTL mapping the data to the appropriate fields in the record map and am sending the record map to a EnsLib.RecordMap.Operation.BatchFileOperation.

0 2
0 762