The reason why I'm asking this is because I'm using the below code to connect & download files from AWS and it works fine but after using it say 100 times it stops and can not create the client, and if I stop & start Java Server it start working again not sure why !? set file="/Persistent/US-SERENITY/AWSCredentials" set endpoint="https://s3.amazonaws.com" s tStatus="" s output="" s res=##CLASS(%Net.Cloud.Storage.Client).CreateClient(,0,file,"us-east-1",.tStatus,endpoint) s list=res.ListBuckets() set list=res.ListBlobs("vibjson") if (res.BlobExists("vibjson",JobId_".json.gz")) { d res.DownloadBlobToFile("vibjson",JobId_".json.gz","/Persistent/S3DOWNLOADS/"_JobId_".json.gz") S output="/Persistent/S3DOWNLOADS/"_JobId_".json.gz" }
I agree - $system.external is the correct interface. You should be able to find out more about the $system.external interface by calling $system.external.Help().
Hi,
you can start it using
do ##class(%Net.Remote.Service).StartGateway("%Java_Server")
Sorry didn't work
Try "Starting and Stopping External Servers":
s st=$system.external.startServer("%Java Server")
Thanks you very much that one worked.
The reason why I'm asking this is because I'm using the below code to connect & download files from AWS and it works fine but after using it say 100 times it stops and can not create the client, and if I stop & start Java Server it start working again not sure why !?
set file="/Persistent/US-SERENITY/AWSCredentials"
set endpoint="https://s3.amazonaws.com"
s tStatus=""
s output=""
s res=##CLASS(%Net.Cloud.Storage.Client).CreateClient(,0,file,"us-east-1",.tStatus,endpoint)
s list=res.ListBuckets()
set list=res.ListBlobs("vibjson")
if (res.BlobExists("vibjson",JobId_".json.gz"))
{
d res.DownloadBlobToFile("vibjson",JobId_".json.gz","/Persistent/S3DOWNLOADS/"_JobId_".json.gz")
S output="/Persistent/S3DOWNLOADS/"_JobId_".json.gz"
}
D res.Close()
q output
I agree - $system.external is the correct interface. You should be able to find out more about the $system.external interface by calling $system.external.Help().