Hello everyone!
So, I am supposed to receive a REST-request into my production, and I need to send it, exactly as I received it, to another server.
I am struggling to find any good info on this, and have a hard time coming up with a good approach.
What would be the easiest way to do this?
- I have so far thought about possibly doing it with an EnsLib.REST.GenericService and then sending it with an EnsLib.REST.GenericOperation.

1 4
0 104

Hi,

I am a beginner on intersystems technologies ! and i want implements Oauth2 for our projects ( Angular 2 + Caché REST Backend).

i read the article that the link is below :

https://community.intersystems.com/post/cach%C3%A9-open-authorization-framework-oauth-20-implementation-part-1

But : i need to create all servers ( Auth and Resource ) on Caché and dont' to use google server.

0 4
0 894

I am trying to create REST API following these instructions: https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GREST_apimgmnt

However it does not work.

I tried downloaded the v2.0 schema.json of the OpenAPI specification and pasted it on Postman with the parameters as speicifed, but I get this error message back:

0 4
0 363

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

I was trying to modify the REST.DocServer sample in the SAMPLE namespaces to use the new %Object and %Array system objects (Ensemble 2016.2 build 636) with the following changes:

/// This method returns a list of namespaces for this server

ClassMethod GetNamespaces() As %Status

{

#dim tSC As %Status = $$$OK

#dim tList,tNS,tFilteredList,tValue As %String

#; Get the list of namespaces

Do List^%SYS.NAMESPACE(.tList)

Set tNS="" For {

Set tNS=$Order(tList(tNS),1,tValue) If tNS="" Quit

0 4
0 535

The REST webservice works perfectly when run on SOAP UI. This end point server is an https site that uses basic authentication (uname and pwd). But when I run the request through an Enslib.Rest.Operation using a configured SSL and stored credentials, I get an "unauthorized" error, unless I explicitly hard code the password in the operation class. HS Version is 2014.1 .

I have 2 questions. Pardon me, they are both related!!

0 4
0 1K

I am trying to design a RESTful service that takes a string (with control characters). Does something with that in the logic on the server, then returns a string, which may also have control characters.

Basically the string is a pharmacy claim in a delimited format that uses control characters for those delimiters. The logic on the server will pull the entire claim apart and process it.

I was thinking that a GET method could be uses but I'm used to sending content in JSON format and wondered what other normal RESTful ways there were to do this.

0 4
0 766

Does developing a RESTful API in Caché remove the requirement to use the InterSystems.Data.CacheClient.dll and generate proxy classes using the Caché Object Binding Wizard for .NET web development? If anyone has links to sample applications using .NET with Caché and REST Services, I would be grateful if you could share them.

0 4
0 511
Question
· Oct 21, 2019
How to send a file via JSON

I have a text file that I pick up in a Business Service and need to send it to our vendor via JSON. I assumed (probably wrongly) that I could just create a RESTful Business Operation, plug in the server IP and URL as well as complete some of the other fields on the BO to send the file. When I do this, I get the following error:

0 4
0 724

Hi all

Does anyone have an easy way of reading the cdata in the xml response returned buy a Webservice?

At the moment I have a XML class and then I use read.Correlate() to read through that XML bit.

However, depending on the message I have different things in the CData and I don't want to create a class for each one of these.

The API returns the cddata as KeyValueOfstringstring.

0 4
0 444

Hello Guys,

Our cache application uses REST web services and handles single API request perfectly with response (response status and related data). But sometimes user sends multiple requests to the same API simultaneously ( ie, without waiting for the first to respond ), where one request will succeed (not necessarily the first) and the others will fail.

So, I need to handle the requests one by one after completing and sending the response for first request in the queue then process the next request and so on.

0 4
0 120

Recently i've been using Restforms2 to create a CRUD API for a project. But it lacks some advanced functionality that we need, so we have created a production with a REST WS which handles those advanced methods. That works great but there's a drawback, it does not have authentication.

I would want to use the same authentication method as Restforms2 which is a basic auth using IRIS users and passwords.

0 4
0 451

I'm trying to setup a REST server with CORS support. I have created a class that handles a specific part of the service (printer control). This class I have referenced in my main REST class by adding <Map Prefix="/print" Forward="myClass.PrintAPI" />

My main class does have its own <Route>s and handles CORS requests perfectly. But in my subclass OnHandleCorsRequest() is only run when requesting from same origin and never run when making a CORS request. I have set Parameter HandleCorsRequest = "true" in both my main REST class and the subclass.

0 4
1 317
Question
· Nov 5, 2021
ERROR #9406

I'm trying to send a POST request to my REST API and I'm getting this error and most likely due the lack of experience, I have no idea how to fix this issue:

"error": "ERROR #9406: Unexpected format for value of field, AlertText, using class base mapping",

"id": "JSONImportError",

"params": [

"AlertText",

"class base"

]

Am I missing something from my string definition?

Defined below as:

0 4
0 317
Question
· May 4, 2018
How to use MS Exchange wsdl

Hi

We are trying to create a new operation wich gets a XML message and send it's contents in an email.

We've used the SOAP Wizard to generate the Proxy Classes but now we are a bit lost...

What we are trying to achieve is to Create appointments in a Outlook Calendar and send emails.

0 3
0 336

I am writing an API that sends over a very large JSON object.

The code I'm using to get the data is actually used in our production system today for the use of writing a report.

However when I call the code using the API (using SoapUI) I am getting 'Error getting response; java.net.SocketTimeoutException: Read timed out'

The web applications settings have a session timeout setting at 15 minutes, but this is timing out within just a few minutes, so I know it's not hitting this mark.

0 3
0 284