User Answers

So a customer asked me a question about this and I decided to actually implement a mechanism to encode a global as JSON.  I haven't done the opposite which would be to take the encoded json and turn it back into a global, but the reverse is pretty simple


First, admittedly I'm not sure the cause to your error as I do not have access to your generated SOAP client classes, your SSL Configuration, etc.

That said, I was able to implement the UPS API for the Tracking API and was able to execute without issue.  To get it to work you will need to do the following.

1.   Create a SSL client configuration (test it against the UPS server) to be used for SSL encryption.  it does not appear that UPS provides a non encrypted connection for testing.

I would imagine that the same code you wrote to convert XML to JSON in studio could be used from an Ensemble production to do the conversion from within the context of a production.  You could implement this code as a business operation method and could pass a message containing the XML as the request message and then the response message would contain the json converted version.

Can you share your code that converts XML to JSON from Terminal?


Perhaps you are referring to the ContentType response header which is used by many applications to know what format the response is in.  In one of my RESTful services that returns a JSON response I use the following code in my REST handler.

    Set %response.ContentType="application/json"

You can find a list of all of the various MIME types that could be used as the %response.ContentType

Hi Kishan

I think it would help to have a little bit more information on your particular use case for FHIR.  


It seems to me that your real issue is that your database is taking up too much space on disk and you want to shrink it.  To do this you really don't need to create a whole new database and namespace.  Even on non VMS systems before we had the compact and truncate functions I used to compact databases using GBLOCKCOPY which is pretty simple.

1.   Create a new database to hold the compacted globals

Here's an example of how one might use the FileSet query in the %File class and the Delete class method in %File to purge backup files in a given directory before a given date.

Funny you should ask this as I was just looking at how to do this today.  

Most operating systems offer a way to search for files given a certain filter, such as being older than a certain date, and then piping that list to another command, such as delete.

Here is a class method I wrote to do this on a Windows 2012 R2 server running Cache