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.
- I have also thought about manually creating a rest-service and somehow using %request and sending it directly if that would be possible.
Hello everyone!
I need to transform a String, which is a numerical value, to an Integer.
The value gets returned in my Rest service as "testingID": "1234567", but I need it to be "testingID": 1234567
Thanks beforehand! Appreciate all the help I can get! :)
Hello everyone!
I am receiving a HTTP multipart/form-data request into my rest service.
How can I read the values for each Key in the form?
The key "Profile" is sent to my service as a String data type.
The code I have below does not seem to work, where I try to read the Key profile in the form..png)
I appreciate all the help I can get! :)
Hello everyone!
I am wondering how I can retrieve multipart form-data from a request that is coming into my REST-service.
I am supposed to retrieve a string and a file. The file is being retrieved without issues, but the "testprofile" string is not being retrieved at all.
It just logs a an empty entry.
The request that is sent to my REST-service has the Content-Type: multipart/form-data
Thanks beforehand for the help! :)
Down below is the code I use right now to retrieve the string and file from Form-data Rest HTTP-request to my service.
Hello everyone!
I have to build a REST service that receives a POST HTTP-request, collect a file from that request in the Form data and then send it in another HTTP Post request through Form Data. However I can't really seem to send the file, and I do not know where it has gone wrong. All I am getting told is that no file is being received from my HTTP Post request. I am reaching the REST Service I am supposed to send the request to, but nothing is being sent.
I would be really thankful if someone could give some insight why nothing is being sent in my request. Thanks beforehand! :)
Hello everyone!
Sorry for the vague title! But I wonder what would be the best way to easily import a large XML-file into a production, modifying it by deleting elements and nodes depending on what values are in those nodes/elements and later creating whole new XML-file from that?
I have gone through this: Using Caché XML Tools | Caché & Ensemble 2018.1.4 – 2018.1.8 (intersystems.com)
But I get the sense that there are a lot of ways of approaching this, but I do not know what is the most effective for my certain needs.
I appreciate the help! Thanks beforehand! :)
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>
Hello everyone!
I have manually created a REST-service that receives incoming HTTP-GET calls together with an URL-map. As shown below:
XData UrlMap [ XMLNamespace = "https://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/testGet" Method="GET" Call="Handler" />
</Routes>
}
ClassMethod Handler(req As %Stream.Object) As %Status
{
set Class = ##class(Ens.Request).%New()
set status = ##class(Ens.Director).CreateBusinessService("TestService", .instance)
set status = instance.OnProcessInput(Class, .response)
if $ISOBJECT(response)
{
write response.%ToJSON()
}Quit $$$OK
}
Hello everyone!I need to build something that will receive a REST request. As of now I have tried my luck with using an EnsLib.HTTP.InboundAdapter. But i am not so sure how I am supposed to configure it to be able to receive the REST request together with the JSON body.I have specified the OnProcessInput in the adapter so that it receives a GlobalCharacterStream. However, I have not had any good luck finding out to actually make the request to the EnsLib.HTTP.InboundAdapter. I would be really thankful if you could let me know if it is possible for an EnsLib.HTTP.InboundAdapter to actually