Hi all,

I have an incoming JSON message with a string field exceeding in length the 'caché long-string limit' of 3641144 characters.

Using {}.%FromJSON(instream) I am able to create %DynamicObject properly. However, I am unable to access the long property, as in every assignment, I get the <MAXSTRING> error.

Is there any way for me to obtain contents of the 'too long' string field as a stream?

Thanks

Jiri

0 3
0 11.2K
Question
· Jan 1, 2018
Send JSON Via HTTP request

Hi Guys,

Basically I'm looking for a sample what I can send data in aJSON format to a a webservice using an http request pls?

I've found some documentation on %Net.HttpRequest but a sample on how to connect to a Webservice and send data to it would be really helpful?

Our clients are running Cache & Ensemble 2014

Thanks

0 21
0 5.7K

Hi,

Is it possible to Save a base64 data string, representing a png, as a binary png file, In Cache?

When I search google , in general , not Cache specifically, I see such articles:

https://stackoverflow.com/questions/11511511/how-to-save-a-png-image-ser...

and this answer:

You need to extract the base64 image data from that string, decode it and then you can save it to disk, you don't need GD since it already is a png.

0 2
0 5K
Question
· Jan 5, 2018
UPS - SOAP WebServices Not Working

Hi all,

I have started using the UPS in my application for shipment and cancellation.

I have the WSDL from the UPS.

I have imported the WSDL via Studio->Tools->addins and finish the process to get the Package implemeted in my studio.

Now the SOAP method contains a URL which is for their live system so i manually changed the URL with their Testing URL.

They are also providing the sample shipment numbers which we can use to test the cancellation process.

I am trying that shipment number to void(cancel) the shipment by call the method.

0 3
0 4.4K

We have a new requirement being push down by our Data Security to no longer use Local SQL Accounts to access our Databases. So they asked me to create a Service Account that is on the Domain for our connections to each database.

I tried just changing my JDBC connection to using this Service Account and Password but I am not having any luck trying to connect to the database.

" Connection failed.
Login failed for user 'osumc\CPD.Intr.Service'. ClientConnectionId:ade97239-c1c8-4ed1-8230-d274edb2e731 "

1 4
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.2K
Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.7K
Question
· Dec 17, 2018
Adding fault to a wsdl

Hi,

The fault message definition is missing from my service WSDL. I would like to add these bold styled text to my WSDL. How can I do that? The aim is when I get the WSDL of MyService with ?wsdl URL the response contains the bold styled text.

For example:

0 3
0 2.5K
404 Not Found

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "notFound",
   "message": "Not Found"
  }
 ],
 "code": 404,
 "message": "Not Found"
 }
}

I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?

0 1
0 2.5K

Hi everyone,

I am still learning the platform for a student project and have to do some streaming and data analysis next. Since for my case I have no "live api" I wanted to just stream json files and output the data as it comes in from the files. (basically to emulate a incoming data scenario)

So thanks to the documentation and community posts I have figured how to create a stream and read data from a JSON but since I'm also new to JSON I have some parsing problems. I don't know how to access subarrays/sub-objects via objectscript.

0 2
0 2.4K
Question
· Feb 26, 2018
Copy Files

Hi Guys,

I'm looking to Remove file from a location to another similar to CUT & Past function, I'm using this :

 s file=##class(%File).%New()
 d file.CopyFile(File,ArchivePath)
 d file.Delete(File)

and the copying is happening but not the Deleting, and help pls?

Thanks

0 16
0 2.3K

On one HealthShare servers (RH Linux, 2017.1.1), I am not able to login to Studio for this server. When I select the server connection from the notification tray icon, choosing Remote System Access, Studio, then the server, the error I getting is:

Unable to log on to server {Server Name}

Communication link failure

I've tried using both DNS name and IP address, same result. Using Atelier, I am able to connect to the server using the same DNS name and Web Server Port that I'm trying in Studio.

0 16
0 2.3K

New to Cache/Studio. Just installed Client option for Cache (cube).

Attempting login to Management Portal for dev/tst/prd environments yields ERROR #822.

Any suggestions on where to begin to resolve would be appreciated.

Thanks!

0 4
0 2.2K
Question
· Jan 12, 2018
HTTP Response parsing error

Hello

I'm in the process of creating a TestClass which simulate a HTTP POST call to REST-based web
services and while I am having success, I'm struggling on how to parse out the results to a JSON
format

Here is down the code part which concerns parsing the HttpResponse.Data variable into JSON :

0 3
0 2.1K
Question
· May 4, 2018
Convert HL7 to PDF

Is there anything native in Ensemble that will support converting HL7 to PDF?

I see there are numerous examples in .Net and Java for this capability.

Dave

0 1
0 2.1K

We are go to set up an odbc connection using data direct odbc on a linux redhat install, x86_64 gnu

I have downloaded the ODBC-2017.2.2.865.0-lnxrhx86.tar.gz and now need to set up the entry in the odbc

Problem is, what .so do I use??

0 3
0 2.1K
Question
· Jun 18, 2018
CSP Error Log

I thought I should be able to go to the application error log or look at d ^%ER when I get the following error in the browser when troubleshooting a CSP page:

An error occurred with the CSP application and has been logged to system error log (^ERRORS)

However nothing is being generated in these logs. Where are these logs being made?

Thank you

2 9
1 2.1K

Hi,

We have a PAS that accepts HL7v2 QBP^Q21 requests, and returns patient details in an RSP^K21.

We have a clinical system that wants to sent an http GET request of the form http://server/getpatientbyid?pid=M1234567

So I think I need to convert the query url into a QBP^Q21 (HL7) message, then take the response in HL7v2, convert to SDA, convert to FHIR, and put that in the response to the original GET.

Does anyone have any experience doing this? is there an approach you would recomend?

0 7
0 2K