NetTalk Central

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Web Server - Ask For Help / Re: NetWebServiceMethod
« Last post by rupertvz on May 04, 2026, 08:20:40 AM »
Thanks for the suggestion Sean,

I did try to force JSON via ContentType, but I ran into compile issues ? it seems like setting ContentType directly (e.g. net.ContentType or p_web.ContentType) is not available in a NetWebServiceMethod.

From what I understand, NetTalk should handle the response format via template settings or request negotiation.

I also tested:
http://127.0.0.1:88/TestFileParameter?_json_=1

But the response still comes back as XML.

Is setting ContentType manually actually supported in this context, or should JSON output be controlled purely via the template and request?
12
Web Server - Ask For Help / Re: NetWebServiceMethod
« Last post by Jane on April 30, 2026, 09:17:53 PM »
Are you trying to send JSON to a web browser or to a client of some sort?

There's a NetTalk example WebServiceRequiresXFiles (77) that includes two apps - a client and a web server.

It's also often useful to use the netdemo example program as a web client to debug what you're doing.
13
Web Server - Ask For Help / Re: NetWebServiceMethod
« Last post by seanh on April 30, 2026, 06:24:55 PM »
have you set the content type?
net.ContentType = 'application/json'
14
Web Server - Ask For Help / NetWebServiceMethod
« Last post by rupertvz on April 30, 2026, 01:09:47 PM »
Hi Guys,

I'm working with NetTalk WebServer and using a NetWebServiceMethod procedure.

I can successfully call the endpoint and the procedure executes, but I'm struggling to get a JSON response to return in the browser. Currently, the request runs, but the response is blank when JSON is selected.

I have:

A queue defined for return (Q)
JSON enabled in the template
ServiceMethod populating the queue

However, it seems like the JSON branch in BuildResult / BuildResultFields is not being generated or executed.

My questions:

Is there a recommended example app or webinar showing a working NetWebServiceMethod returning JSON?
Should JSON responses for queues be handled purely via template, or is manual handling (e.g. AddJSONFromQueue) expected?
Is there a standard pattern for returning simple JSON (without queues)?

Any guidance or working example would be appreciated.
15
Web Server - Ask For Help / Re: API hangs on memo field
« Last post by Bruce on April 28, 2026, 08:48:54 PM »
sounds like a bug in Reflection. I'll take a look.
16
Web Server - Ask For Help / API hangs on memo field
« Last post by jlavera on April 28, 2026, 06:31:51 AM »
I have a rest server API. Recently upgraded to NT 14.37, and all the latest versions of ST, Reflection, jFiles, etc.
There is a complex topspeed file with lot of fields and some memo fields. The API receive just a few of them, ignoring the rest.
There is generated code that does this:
DocParm:App_Rosters.SetAttribute('table',DocParm:App_Rosters.TableFieldToColumn(App_Rosters,'AppRosters:CancelDescription'),'readonly')    DocParm:App_Rosters.SetAttribute('table',DocParm:App_Rosters.TableFieldToColumn(App_Rosters,'AppRosters:CancelDescription'),'private')
And it hangs on either one.
I debugged until I found that in Reflection.clw, there is a
ReflectClass.TableFieldToColumn              Procedure(FILE pTable,String pLabel)
where this call does a loop in the "record"... but it is not counting or processing the memo fields. It looks for the field name in the structure, but it is not there, as a memo, it is not part of the structure. The result is it never ends the loop and the server hangs.

Anyone sees this? Is this a bug, or I'm missing a setting (which I cannot find)?

Kind regards,
Jorge Lavera
17
Web Server - Ask For Help / Re: webserver example 79
« Last post by Bruce on April 22, 2026, 05:55:48 PM »
trying to create a self signed certificate
CreateSelfSignedCertificate.bat

That Bat file is not used anymore.
On the Certificates tab (in the running program)
Simply put the server address into the "domain" box, and click on "Certificates" button.
The address is typically just he machine name (like Daisy) or an Ip address (192.168.1.1)

see https://www.capesoft.com/docs/NetTalk14/NetWebRuntimeSettings.htm
19
Web Server - Ask For Help / Calling a javascript function
« Last post by rjolda on April 22, 2026, 07:38:59 AM »
Hi
C11.1 NT 14.37
I have a javascript function called move().

I have a button and i want to execute the move() function when the button is pressed.
I have tried multiple permutations and this is my current permutation for the button embed.  However, it is not correct as the function does not execute.
This is the current iteration:
p_web.script('$(''["move()"]'').call();')
Can someone help me with the correct syntax to call this function from a NT button?
THanks,
Ron
20
Web Server - Ask For Help / Re: Progress Bar woes...
« Last post by rjolda on April 21, 2026, 12:28:20 PM »
Hi All,
I was trying too much trickery... going to try to implement a javascript progress bar.  It will operate without server communication for the duration of 45 seconds.  I simply want to keep it contained within the client and not have to hit the server for progress bar updates...
I am sure that I will have questions on implementing the javascript progress bar.
Ron
Pages: 1 [2] 3 4 ... 10