Eduard Lebedyuk · Feb 6, 2019 go to post

Are you using EnsLib.FTP.InboundAdapter?

Deletion happens after file is processed.

What error are you getting?

File size absolutely should not affect deletion result.

Eduard Lebedyuk · Feb 6, 2019 go to post

Two ways to solve this error:

  • Change permissions for the OS user you use to connect to the FTP so the user can delete (write permission) files
  • Set service setting DeleteFromServer to 0
Eduard Lebedyuk · Feb 4, 2019 go to post

#) I know websocket server works from the browser client, just not from Cache client.

#2) I do not have control (or even dev access) to the websocket server. It's not Cache-based through.

Eduard Lebedyuk · Feb 4, 2019 go to post

Looks like there's a character stream somewhere. You should always use binary streams to upload binary data such as images, PDFs and so on.

First of all you need to understand where the problem is: on sending or on receiving.

To do that upload PDF using your BO and download it from AWS website manually (using your browser). If you can open downloaded file, then it means that your upload code is correct and the problem is with download code. If you can't open the file it means that you need to check upload code.

Eduard Lebedyuk · Feb 4, 2019 go to post

Redefine HTTP adapter like this:

Class Production.Adapter.HTTPOutboundAdapter Extends EnsLib.HTTP.OutboundAdapter
{

Method PostURL(pURL As%String, Output pHttpResponse As%Net.HttpResponse, pFormVarNames As%String, pData...) As%Status [ CodeMode = expression ]
{
..SendFormDataArray(.pHttpResponse, "POST", ..GetRequest(), .pFormVarNames, .pData, pURL)
}

ClassMethod GetRequest() As%Net.HttpRequest
{
    set request = ##class(%Net.HttpRequest).%New()
    set request.ContentType  =  "application/pdf"quit request
}

}

And use it instead of default adapter.

For better performance it would be better to reuse the request.

Alternatively, you can call SendFormDataArray adapter method directly and it accepts request object.

Eduard Lebedyuk · Feb 1, 2019 go to post

Please share the code from

%0AmBx1^%sqlcq.PRD.2249

To do that open %sqlcq.PRD.2249  routine (int routine, afaik mac routine wouldn't have this )

If you can't find routines check that system saves sources for cached queries. If it doesn't set the setting to save routines, purge this query and run it again. After that you should be able to see the source.

Also can you determine which part of SQL causes this error?

Eduard Lebedyuk · Jan 31, 2019 go to post

What status does this line return:

set sc=conn.Connect("Production","username","password") 

Can you execute a trivial statement such as:

SELECT 1

or (depenting on your target DBMS):

SELECT 1 FROM dual

or is it the same error?

Eduard Lebedyuk · Jan 24, 2019 go to post

Validation process is unable to process the message in 2 seconds. Probably because of the queue.

There are several ways to remedy that:

1. Increase timeout.

2. Make the call ASYNC.

3. Increase pool size for Validation process

4. Make validation process work faster.

Eduard Lebedyuk · Jan 24, 2019 go to post

File selection dialog sorts by file type (extension).

I agree that by Name would be better probably.

Eduard Lebedyuk · Jan 24, 2019 go to post

Nice feature to have.

One note about the code: if you have a BO that accepts only one type of messages, you can (I myself prefer to - as it immediately notifies the reader that this BO works with only one  type of messages, and not just a small BO in development) remove Message map altogether and define an OnRequest method, which would process these messages. Pull request.

Eduard Lebedyuk · Jan 22, 2019 go to post

You use 8bit Caché. Maybe you need to convert GraphQL.xml into your local encoding.

Or use Unicode Caché.

Eduard Lebedyuk · Jan 21, 2019 go to post

If you want, you can pass current IP as a header or inside the message body.

Do you want it for logging purposes, such as what actions were performed from which IP?

Eduard Lebedyuk · Jan 21, 2019 go to post

My go-to https redirect:

RewriteEngine on
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
Eduard Lebedyuk · Jan 21, 2019 go to post

Strange, as that should not be hit for AbstractREST at all.

Does you class looks the same as in repo?

Just compiled successfully on:

Cache for Windows (x86-64) 2017.2 (Build 744U) Fri Sep 29 2017 10:58:27 EDT
Eduard Lebedyuk · Jan 21, 2019 go to post

Looks like NAT. Cloud server only sees external address (214.17.17) as it should.

Why do you want to get internal address?