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.


Messages - urayoan

Pages: 1 ... 3 4 [5] 6 7 ... 15
61
Web Server - Ask For Help / Re: SessionValueSetFromBrowser?
« on: December 02, 2019, 05:20:20 AM »
there is a JavaScript function you can call in your JavaScript code;

SetSessionValue(name,value)

the SessionValueSetFromBrowser is for embedding code in the server if you want to when that happens.

cheers
Bruce

Bruce, it is possible to have an example or a more specific explanation how this method works or there is an existing example that we can look for?

Thanks

62
Edwin,
What is the xml you are sending and how the headers are configured?
Are you sending a get or post with postman?

After setting the SOAP Action in the headers and sending the post, i am receiving this

<?xml version="1.0"  encoding="utf-8"?>
<dbCentral_response xmlns="Database">
    <ServiceResults>
        <Result>
            <ResultAction>insert</ResultAction>
            <ResultTable>central</ResultTable>
            <ResultRecordId>CEN_REFNUM=335292</ResultRecordId>
            <ResultDescription>success</ResultDescription>
        </Result>
    </ServiceResults>
</dbCentral_response>

If i do a get i receive this
<?xml version="1.0"  encoding="utf-8"?>
<dbCentral_response xmlns="Database">
    <MainLeadID>0</MainLeadID>
</dbCentral_response>

63
Edwin, in Postman, check in the settings and turn of the SSL certificate validation (see attached image).

I think is ASP they need to to the same when the call is made or prepared.

64
Edwin, does the web server use certificates with SSL connections? Looks like you are having a problem with SSL protocols (deprecated ones).

65
I forgot to mention, the example was made using the latest and greatest NetTalk version 11.23 and Clarion 11

66
Hello RichCPT:
I don't know if i did understand you correctly, so if a make assumptions in my response, please clarify to further help you out with this. In my case, i have a table that like you i need to make search of different parameters for a API server. In my case (and for what i understand on your post), you need to get the data from one specific table.

First, y declare my view in local data like this (i did simplify the file structure for the example). The idea here is to apply a filter or multiple filters as needed.
Keep in mind, is not a good idea to send all the data without any filter because, if the file has much records is gonna take long time or connection timeout. Or even worse, slowdown your system

This should work with any database. Maybe there are ways to make this much simpler, but this is what works for me using Btrieve database (Actian - Formely known as Pervasive)

Please check the included example and hope it helps.

!Defined view
View:PersonView      ViewManager
PersonView              VIEW(Persons)
                            PROJECT(PER:id)
                            PROJECT(PER:PersonName)
                            PROJECT(PER:eMail)
                            PROJECT(PER:Telephone)
                            PROJECT(PER:Region)
                            PROJECT(PER:County)
                            PROJECT(PER:Ethnicity)
                            PROJECT(PER:Education)
                          END

!Then in the Service Method Embed point do the following

DO OpenFiles
CLEAR(PER:Record) !Reset the file for the sake of cleaness
FREE(Q:ClientsSearchResult) !this queue is the return Queue in the method
CLEAR(LocSortOrder) !CString variable

GlobalErrors.Init                                     !initialize GlobalErrors object

View:CustomersView.Init(CustomersView,Relate:Persons)  !initialize View:Customer object
LocSortOrder = View:CustomersView.AddSortOrder(PER:ByID)         !add sort ByKey or anything else
View:CustomersView.SetSort(LocSortOrder)

IF (LEN(Region) > 0) !API Parameter asuming is string
  View:CustomersView.SetFilter('LOWER(PER:Region) = <39>' & LOWER(Region) & '<39>','1')
END!IF

IF (LEN(County) > 0) !API Parameter asuming is string
  View:CustomersView.SetFilter('LOWER(PER:County) = <39>' & LOWER(County) & '<39>','2')
END!IF

IF (LEN(Ethnicity) > 0) !API Parameter asuming is string
  View:CustomersView.SetFilter('LOWER(PER:Ethnicity) = <39>' & LOWER(Ethnicity) & '<39>','3')
END!IF

IF (LEN(Education) > 0) !API Parameter asuming is string
  View:CustomersView.SetFilter('LOWER(PER:Education) = <39>' & LOWER(Education) & '<39>','4')
END!IF

!set the defined filters above
View:CustomersView.ApplyFilter()

View:CustomersView.Open()
View:CustomersView.Reset(1)

LOOP UNTIL View:CustomersView.Next()
  Q:ClientsSearchResult.AccountNumber       = PER:id
  !and so on with the other colums in the View
  ADD(Q:ClientsSearchResult)
END!LOOP

View:CustomersView.Close()
View:CustomersView.Kill()
DO CloseFiles

67
Web Server - Ask For Help / Re: CASE MESSAGE on NT
« on: October 10, 2019, 05:12:46 AM »
Hello Bruce,

I think osquiabro is looking for confirmation message, similar when in a browse the user is gonna delete a record. But in this case, alter or change the record.

68
Web Server - Share Knowledge / Re: OT Nettalk+Telegram
« on: September 04, 2019, 11:07:47 AM »
Amazing. Thanks for share!

69
Web Server - Share Knowledge / Re: OT Nettalk+Telegram
« on: September 03, 2019, 05:41:41 AM »
Nice job!

70
Web Server - Ask For Help / Re: How to take a pic and send it to a ws
« on: July 05, 2019, 06:51:48 AM »
Hi, having a Sqlite table in the phone, I need to take a picture for each record, save it on the phone and when connected, send the records and each picture to a web server.
Any idea of how to do it?

Hi Alberto:
  Want to send the picture to a web service (rest or soap?) or web server?

71
Web Server - Ask For Help / Re: x-www-form-urlencoded and queues
« on: April 25, 2019, 09:56:03 AM »
Ok Bruce, here we go. Lets see how it goes. Using Postman this is the JSON package that i send and insert data

{
  "QuoteID" : "1",
  "AccountNumber" : "1",
  "PatientNumber" : "0",
  "QuoteDate" : "04/25/2019",
  "QuoteTime" : "01:31PM",
  "RefDoctorNumber" : "109",
  "Procedures" : [
    {
      "LineNumber" : 1,
      "ProcNumber" : 6025,
      "QtyProcedures" : 1
    }
  ],
  "token" : "value"
}

For what i read and understood, the equivalent in form-urlencoded is this (bulk edit to make it fast)

QuoteID:1
AccountNumber:1
PatientNumber:0
QuoteDate:04/25/2019
QuoteTime:01:31PM
RefDoctorNumber:109
Procedures[0]LineNumber[0]:1
Procedures[0]ProcNumber[0]:6025
Procedures[0]QtyProcedures[0]:1
Procedures[1]LineNumber[1]:1
Procedures[1]ProcNumber[1]:6026
Procedures[1]QtyProcedures[1]:1
token:my_very_long_token

The reference was taken from here
https://medium.com/@darilldrems/how-to-send-arrays-with-get-or-post-request-in-postman-f87ca70b154e


72
Web Server - Ask For Help / x-www-form-urlencoded and queues
« on: April 22, 2019, 11:43:25 AM »
Hi Bruce:
  Got a question related to API services using queues. Today, a client try to consume a call that have a queue list for some procedures, and by error he was sending the request as x-www-form-urlencoded. The queue has the validation check mark always required, but when i check the logs, the queue is not parsed (check the constructed call bellow). I did try to make the same call using Postman, and it fails. Any suggestions?  The rest of the packet was inserted in the DB.

The client after all, change his request to app/json and all works fine, but what trouble me is, if the api can not receive nothing in the queue, it is supposed to send back an error, and wasn't happening. He was using TypeScript to make the calls.

Thank you in advance
@ Urayoan

AccountNumber:1470431
PatientNumber:0
QuoteDate:22/04/2019
QuoteTime:03:45PM
RefDoctorNumber:106
Procedures[0][LineNumber]:1
Procedures[0][ProcNumber]:3747
Procedures[0][QtyProcedures]:1
Procedures[0][InvoiceCodeINT]:0
Procedures[1][LineNumber]:2
Procedures[1][ProcNumber]:5550
Procedures[1][QtyProcedures]:1
Procedures[1][InvoiceCodeINT]:0
token:My_Very_long_Token

73
Web Server - Ask For Help / Re: PDF Tools Report
« on: April 15, 2019, 03:38:22 AM »
Thank you Bruce.

74
Web Server - Ask For Help / Re: PDF Tools Report
« on: April 11, 2019, 03:11:39 AM »
Thank you Bruce

75
Web Server - Ask For Help / PDF Tools Report
« on: April 10, 2019, 06:53:42 AM »
Hi:
  Bruce, i did notice when trying to print from example PDFReportRequiresPDFTools (14), procedure MailboxesBrowseControl (button inside Browse) that i did not receive a report at all (is happening in my solutions as well). The button after the "generated report" still pressed too and need to refresh.

Can you kindly check if i need to change something or if is a feature? :-D

Thanks @ Urayoan

Pages: 1 ... 3 4 [5] 6 7 ... 15