NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - jlavera

Pages: [1] 2
1
Hi, I have a rest server using nettalk -working- already in the Azure cloud. It works! But I need to do some testing locally... and this used to work, but lately I'm, totally unable to communicate to the server using 127.0.0.1 or localhost.
Using the latest Nettalk.
* I generated the crt and key certificates with the latest openssl - (both for localhost and 127.0.0.1).
* I tried from the browser, that was one of the latest things that worked, but not anymore.
* It is not locked by any antivirus or firewall. I made a small Clarion testing program, to send a GET to the server, and when I try locally (for example, to https://localhost:1741 or to https://127.0.0.1:1741) it says the error was -69 which means the SSL remote certificate failed verification.
* The server starts successfully, it says it loaded the certificates, 0 errors.
* The server shows there -was- a connection attempt. But it gives no error, nothing.
* If i started the server for localhost I tried calling localhost and used localhost named certificates, same for 127.0.0.1 - all matching)
* The problem seems to be in the side of the server... But I'm not sure what else to try.
** Do the openssl certificates are no longer valid for a local test??
** What I need to test is the server response under certain conditions and performance related LOCALLY, the connection over the web works perfect!!! What am I missing for testing the server locally?

Thank you for any help!
Kind regards,
Jorge Lavera

2
A rest server, using topspeed files.
Nettalk 12.62, jfiles 2.3, reflection 1.22, selfService 3.57, stringTheory 3.57, xfiles 4.23
Clarion 11.1 13815

Using NetWebServiceMethod procedures to supply Rest APIs.
I have a Rosters topspeed file with several fields, a blob, and several memos. The blob is defined as binary, although stores a base 64 encoded string. The Android/ios App supplies the content, the content is saved to the blob, and the signature is shown in the Windows system. So far, perfect.
Now, I have an API for the App to -read- the roster information, and in that response, I DON'T want the signature to be sent to the app... and no matter what I do, it is always there.

A typical response is like this:
{"Response":{"Rosters":[{"clientcontribution":0,"clientid":30917,"clientnoteflag":0,"deliveryitems":0,"description":"Monday - Paid meal break","destination":"","enableconcurrentservices":0,"enablerosteropt":0,"endatdate":"2023-07-24","endattime":"07:00:00","endtrandoneflag":0,"enduserlatitude":0,"enduserlocation":"","enduserlongitude":0,"extentofservice":10,"fixedstarttime":"0:00:00","groupview":0,"kmsetting":"N","maxkm":0,"nextservicedate":"-  -","optimisedendtime":"0:00:00","optimisedtime":"0:00:00","optimizedetfrom":"0:00:00","optimizedetto":"0:00:00","optimizedrange":0,"optimizedstfrom":"0:00:00","optimizedstto":"0:00:00","originalendtime":"0:00:00","originaltime":"0:00:00","pickup":"","requirecost":0,"requiredondevice":0,"rosterid":2252957,"rosteropt":"","rosterstatus":"","rostershashmd5":"QD20230710112942","servicelocation":"15A Nicholl Street DAGLISH WA","servicetype":"Overnight - Active","servicetypeid":480,"signaturerequired":"N","startatdate":"2023-07-24","startattime":"21:00:00","startuserlatitude":0,"startuserlocation":"","startuserlongitude":0,"status":"AS","uomdescription":"Hours","uomid":1,"userid":1124,"workerid":21905,"signature":""}]}}
Except "signature" is nowhere included to be listed.
I come to remove ALL the fields but the id, and I got:
{"Response":{"Rosters":[{"rosterid":32342,"signature":""}]}}
I don't have the signature field in the list of fields. It is excluded.
"Blobs in View" is unmarked  (although, I tried both options).
I also tried an "overrides" list with, for example, only the Id. Still, I got the id and the signature.
I even created a new procedure from scratch! In case it was corrupted somehow. Still... signature is there.
What made me come here to ask for help, is I did a text search in the generated source, and the field signature is nowhere!!! Is not even part of the project.
At this point, I'm at level WTF? and give up.
I'm about to conclude the only thing I can do is to remove the field from the file... But sure that's not the solution, isn't it?

Any idea?
Help!

Thank you,
Jorge Lavera





3
Hi, all.

In version 12.41 and 12.46, I found that when I enter a NetWebServiceMethod, go to Actions, Returns tab, properties button, and "fields" list, there suppose to be the list of selected fields there, but now it is always empty.
Does this happens to you?
If I go to "options" and select the "view table" button to "select" the file again, THEN the list appears again (only if I actually select the file), with the file selection memorized. However, as soon as I "save" everything, the selection seems to be lost again. In fact, I'm getting a field in the API answer that is specifically unselected in the list.
What to do?

Kind regards,
Jorge Lavera


4
Hi, all

I'm having a repetitive GPF as this:

??? 1303F10Ah    Line=1774    Proc=SSL_OUR_SERVERSWITCHTOSSL@F  Src=netdl020.clw     Module=J:\RestServer\CLAnet.dll 11.53.0.0

Any idea what this can be?

Jorge Lavera

5
Web Server - Ask For Help / NetWebServiceMethod returning queue
« on: May 07, 2021, 08:58:34 PM »
Hi,

I'm trying to use a NetWebServiceMethod to return a local queue, because I have to take fields from different files and make some calculations. I use the QUEUE return type option, which has two tabs, Options and Fields. My problem is it seems to not be taking the Fields tab at all, it doesn't matter if I select a different order for the fields, or try to omit some of the fields. This is not working. It is returning the queue's fields as they are defined in the local data.
I'm using NT 11.43, but I don't see any history comment related with this in any later version, and I don't find this in the docs.
So, what is the Fields tab for? Is it really being ignored, or I'm missing something?

Kind regards,
Jorge Lavera

6
Web Server - Ask For Help / HTTP/2.0
« on: March 27, 2021, 12:48:29 AM »
Hi,

I have an app developer saying he is sending HTTP/2.0 requests to my rest server. The logs says HTTP/1.1.
How is HTTP versioning handling? I cannot find it mentioned in the docs, is it 1.1 the highest supported by the server? Do I have to change something to support 2.0?

Kind regards,
Jorge Lavera

7
Web Server - Ask For Help / Sessions, sockets, connections, timeout
« on: March 18, 2021, 06:10:35 PM »
Hi,

I have a rest server, an app connects to it sending a request and obtaining an answer, and that's it. Each request includes the "login" information, more like a validation of the request.
I have the "Allow WebSockets" checkbox disabled, so I assume no sockets.
No cookies as well.
Also "Delete session on Logout" checked, although not sure what would be a "logout' or if there is one in this situation.
Session timeout is set to 1 second, but I'm not sure if I have "sessions" in this situation. Now here is my question; when the app connects and send the request, I guess it is opening a connection. The "duration" of this connection lasts until what? Until the app gets the answer? Until the Session timeout is done, or is it not related? Is there any reason why the connection would not close?

Kind regards,
Jorge Lavera

8
Hi

My rest webserver is receiving lots of "nothing" packets, sometimes so many that jams the service. If I see the content of the packet from within Nettalk, is 0 length. Is there any way to obtain more information about the packet from the rest server program, perhaps the tcpip header? Somehow it is being routed there.

Kind regards,
Jorge Lavera

9
The Rest - Ask For Help / How to send data service to program
« on: June 08, 2020, 07:58:29 AM »
Hi, looking for orientation.
I need a sample of pure CODE only (no controls, no windows objects) that can send a small packet of data, between a service and an exe program, both in the same machine, both Clarion 10, latest netTalk. The service is controlled by SelfService. Both the service and the exe are NOT webservers, they are just regular simple source programs using nettalk and selfservice general extensions.
There are so many options that I don't where to start looking. I'd need it simple if possible... no internet or port access needed, both program and service always runs on the same machine.

Thanks,
Jorge Lavera

10
Web Server - Ask For Help / Thread pool limit ignored?
« on: April 13, 2020, 03:14:06 PM »
Hi, I have a web rest server (latest version, 11.35), I specify in the settings a limit of 500 pools, and I see it is assigned in the code;

  If 500 > 0
    s_web.SetPoolSize(500)
  End

However, when I run the program with the statistics window opened, although I have over 140 threads and 150 sessions, the pool number always goes up just to 100 (which happens to be the default).

Is the thread pool manual limit really working, in that case what I might be missing?

Kind regards,
Jorge Lavera

11
Web Server - Ask For Help / Computed field in NetWebServiceMethod
« on: October 08, 2019, 01:30:24 AM »
I have a NetWebServiceMethod that delivers json packets.  In the "Return" tab, i have a View that includes several fields of a file. I need for one of those fields to have a calculated value, in the form "IF thisfield = '' THEN  thisfield = thisOtherfield.".
I cannot find where to put the calculation! No matter where I do this, the final value delivered is not changed.
I tried changing the queue value, for example
        IF q:App_CliDocs.CDoc_DocDescription = '' THEN
          q:App_CliDocs.CDoc_DocDescription = q:App_CliDocs.CDoc_DocOriginalName
        END
        PUT(q:App_CliDocs)
But it also doesn't work.
Is there a specific procedure, routine or embed where this SHOULD be like this, for it to work? Sounds like i'm missing something.

Kind regards,

12
A rest server with NT 11.15.
If the server receives a lot of requests at once, it becomes unresponsive. It keeps receiving the packets, but seems like it cannot deliver the answers any more. It is not hanged, it does not gpf, but I donĀ“t know what is it doing. There is no cpu usage. Al debug is active and no error is reported, but... it dies.
Server just have a bunch of methods to read records and deliver them with json. When I do that manually from a browser, all of them work perfect.
By the way, no memory files, no global queues, no semaphores, logout ot anything that can be causing a deadly embrace.
Any suggestion on what to change or look at?

13
Using NT 11.13, Clarion 10, all other templates the latest.
I have a (more or less) working rest server. I receive some fields if I do a GET, for example:
         "clientid" : 394,
         "startatdate" : "2019-05-21",
         "startattime" : "14:30:00",
         "kmstravelled" : 0,
AND, there are fields that are not going out, like for example "device".
I need the client app to specify a field; for example, "kmstravelled".
Now, I did a standard PUT NetWebServiceMethod, which updates the data, BUT
My problem is it is emptying the fields not specified, instead of ignoring them. For example, if the user send just
         "kmstravelled" : 25,
Then kmstravelled it's indeed updated to 25, but clientid, startatdate and startattime are put in zero; which I can solve if I send everything, but the REAL PROBLEM is that "device" is cleared as well, even if it is not in the json package!

This is a simplified example, the actual thing is complex (at least 20 fields), but that's what's happening. Fields that are not in the json package are being set to zero or blank, is that expected, or I'm doing something wrong (not there are much to do wrong, they is almost no code there, mostly all templates settings)?

Thanks,

14
Hi, all.
I'm doing a rest server, and I need an answer with the shortest possible header.
How do I remove cookies from the header? I don't need cookies at all, each connection is self contained.
Right now I'm getting something like this:

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, private,post-check=0, pre-check=0, max-age=0
Pragma: no-cache
Content-Length: 103
Content-Type: application/json; charset=utf-8
Expires: Tue, 05 Jun 2018 05:33:17 GMT
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Set-Cookie: AzureAppProxyUserSessionCookie_34383342-4432-3733-4238-304535464545_1.3=3|HkuSBjoJzg9BNggVJJ6wGNJzEWDPWMQGeTEFSjtuGlgC9ZQks46lDam3tpP194pgvM37OWnQSPIFi6vHXP1HZjICBiMkEiDXBt9ZKACDk8uhmmJ2qB+iha4dffHiyRYIsR7W30JJDfZgUppX6f9fTi1nbWPmvlj6czIF3cOO6Pm72N+xFVA9IE/u9775QsoEk8kF5ez4ESvL95sbQbbH+1JHdvck3CB3/Jv7wErL+ruFa5o1NHnjdr4NDr2mtW07q8Ok/Vm+crQqI/CxzA7fD7hH0xwC8fdlJ03U6kdBK0TfQciWam3q0Q7kzjjQUxxd9DvEnXI+baFmURlcVGUlui0axv6mePA1QyRwryiOO/vJppf6z4YRJkojuxJc9bNq; expires=Fri, 05 Jun 2020 05:33:17 GMT; path=/; domain=mydomain.com.au
Set-Cookie: AzureAppProxyAnalyticCookie_bc661b1b-8c1c-4247-ae52-4cde772e3061_1.3=3|jWJYDAfRjy956EZqZZx0JigRY8bZZ10JJalz358QlRmdVjlpV5nzuN3alKowOvZLKBu0VMXNlddyrVmsX86QhwJp1fHwgs50U7ODukdcG/wkHT9vQibcEP3ubw711AnI8QFZQEbcTTPjSGv2hg4bxg==; path=/
Date: Wed, 05 Jun 2019 05:33:17 GMT
Connection: close

Thanks!

15
I have several working methods; a new one is intended to return a "list" of values, from a simple 2 fields queue. I checked and in the "buildResult" routine, just before starting, the queue (is a LOCAL queue) has 380 records. However, the result is showing only one record, is like:
{
   "ListOfUpdates_response" : {
      "MySampleList" : [
         {
            "filename" : "CLIENT",
            "recordid" : 2
         }
      ]
   }
}
The settings are pretty straight forward, the nettalk window asks for the queue field, and the fields inside the queue; I see a code
        jsonResults.append(MySampleList,'MySampleList')
in the BuildResultFields routine.
I'm using the latest version of everything. (nettalk 11.08).
I'm expecting to obtain something like this, which is what I have in the queue:

         {
            "filename" : "CLIENT",
            "recordid" : 2
            "filename" : "CLIENT",
            "recordid" : 5
            "filename" : "PRODUCT",
            "recordid" : 3
         }

Am I missing something?
Kind regards,

Pages: [1] 2