All time
InterSystems Developer Community is a community of 22,215 amazing developers
We're a place where InterSystems IRIS programmers learn and share, stay up-to-date, grow together and have fun!

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.7K

Two fairly common requests we receive from HL7 customers are (1) how to remove all trailing delimiters for fields and segments in HL7 messages and (2) how to "find and replace" for an entire HL7 message (as opposed to one segment/field at a time). The code sample below shows a custom function that solves for item 1 and by extension item 2 above. In other words the same approach can be used for finding/replacing any sequence of chars in an entire HL7 message, with some tweaks to the custom function.

7 6
0 3.6K

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.7K

Hi Developers!

Often when we develop some library, tool, package, whatever on InterSystems ObjectScript we have a question, how we deploy this package on the target machine?

Also, we often expect that some other libraries already installed, so our package depends on them, and often on some particular version of it.

When you code on javascript, python, etc the role of packages deployment with dependency management takes package manager.

So, I'm pleased to announce that InterSystems ObjectScript Package Manager available!

13 19
4 3.3K

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.7K

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.7K
Article
· Apr 17, 2017 4m read
Debugging Web

In this article I'll cover testing and debugging Caché web applications (mainly REST) with external tools. Second part covers Caché tools.

You wrote server-side code and want to test it from a client or already have a web application and it doesn't work. Here comes debugging. In this article I'll go from the easiest to use tools (browser) to the most comprehensive (packet analyzer), but first let's talk a little about most common errors and how they can be resolved.

16 2
5 3.6K

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.6K

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.6K
Article
· Jun 12, 2023 3m read
LangChain fixed the SQL for me

This article is a simple quick starter (what I did was) with SqlDatabaseChain.

Hope this ignites some interest.

Many thanks to:

sqlalchemy-iris author @Dmitry Maslennikov

Your project made this possible today.

The article script uses openai API so caution not to share table information and records externally, that you didn't intend to.

A local model could be plugged in , instead if needed.

10 7
3 3.5K

Hey Developers,

You asked - we did it! We're glad to announce the next competition for InterSystems Developers! Please welcome:

🏆 InterSystems Programming Contest: Developer Tools 🏆

Submit an application that helps to develop faster, contribute more qualitative code, helps in testing, deployment, support, or monitoring of your solution with InterSystems IRIS.

Duration: March 29 - April 25, 2021

Total prize: $8,500

11 16
1 3.3K

Hi Community!

We'd like to invite you to join our next contest to share your FHIR knowledge:

🏆 InterSystems IRIS for Health Contest: FHIR for Women's Health 🏆

Submit an application that uses InterSystems FHIR or InterSystems Healthcare Interoperability!

    Duration: November 14 - December 4, 2022

    Prizes: $13,500!

    >> Submit your application here <<

    7 7
    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?

    1 12
    1 3.5K

    Hy.

    I set up cache in container, which is working fine. But when accessing managment portal the default user was alway Unknown user and no username or password were required. So i disabled the Unknow user in the Security section, but now i keep getting an error access denid.

    0 9
    0 3.5K

    Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In the previous part, we created a basic front-end React application. In the second part of this article series I will show how to choose the right back-end technology for your application. You will see Caché allows you to use many different approaches to link your front-end to your Caché server, depending on your application's needs. In this part we will set up a back-end with Node.js/QEWD and CSP/REST. In the next part we will enhance our basic web app and connect it to Caché using these technologies.

    5 12
    1 3.2K

    Full-Stack JavaScript development allows you to create state-of-the-art applications with Caché. With any (web) app you build nowadays, one has to make a lot of architectural decisions and you want to make the right ones. With the Node.js connector available for Caché, you can create a very powerful server side application server, allowing you to use the latest JavaScript technology and frameworks client- and server-side.

    With all these new technologies, the most important is to integrate them in the most efficient way and to create a very productive development experience. This article willl get you started step-by-step with Node.js technology.

    9 13
    1 3.2K

    One of the great availability and scaling features of Caché is Enterprise Cache Protocol (ECP). With consideration during application development distributed processing using ECP allows a scale out architecture for Caché applications. Application processing can scale to very high rates from a single application server to the processing power of up to 255 application servers with no application changes.

    10 6
    2 3.3K
    Set httprequest=##class(%Net.HttpRequest).%New()
    	Set httprequest.Server="www.intersystems.com"
    	Do httprequest.Get("/")
    	Do httprequest.HttpResponse.OutputToDevice()
    	Do httprequest.Get("/cache/")
    	Do httprequest.HttpResponse.OutputToDevice()

    The above is the code which i found in this link http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...

    0 5
    0 3.4K

    Hi,

    My doubt is about the SQL Query in Caché:

    I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.

    So, how can I do this, without losing performance, there is any way?

    1 8
    1 3.4K

    In this article, I would like to talk about the spec-first approach to REST API development.

    While traditional code-first REST API development goes like this:

    • Writing code
    • REST-enabling it
    • Documenting it (as a REST API)

    Spec-first follows the same steps but reverse. We start with a spec, also doubling as documentation, generate a boilerplate REST app from that and finally write some business logic.

    This is advantageous because:

    • You always have relevant and useful documentation for external or frontend developers who want to use your REST API
    • Specification created in OAS (Swagger) can be imported into a variety of tools allowing editing, client generation, API Management, Unit Testing and automation or simplification of many other tasks
    • Improved API architecture. In code-first approach, API is developed method by method so a developer can easily lose track of the overall API architecture, however with the spec-first developer is forced to interact with an API from the position if API consumer which usually helps with designing cleaner API architecture
    • Faster development - as all boilerplate code is automatically generated you won't have to write it, all that's left is developing business logic.
    • Faster feedback loops - consumers can get a view of the API immediately and they can easier offer suggestions simply by modifying the spec

    Let's develop our API in a spec-first approach!

    13 6
    10 3.3K

    Hi,

    I'm doing a query in SQL and I need to sort my data by some non-repeated field.

    Unfortunately, my data is grouped in a way that I cannot guarantee that any column will not have repeated data, so one solution would be to take the row number.

    Also, the Cache is not accepting Row_Number () in my querry and I would like to know if there is another solution to return line numbers or some way to add this function to the Cache.

    Best regards.

    12 7
    0 3.4K