NetTalk Central

Author Topic: Net Service Method XML code problem.  (Read 3722 times)

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Net Service Method XML code problem.
« on: September 27, 2022, 04:32:33 PM »
I think some template is getting confused.

Fresh install of NT 12.46.
Example Web77.

With XFiles 4.03/Reflection 1.13 it WILL compile.

Run corresponding client app.
Date method rest(get) works for receive format xml and json.

dbCustomer method REST get works for json. Make same request for xml and the server throws an exception -
xfiles.clw:2603 - XFILESSTREAM.EXTRACTNAMESFORSAVE is second item down on the call stack.

dbCustomers method throws same exception.

Through web browser interface, going to documentation page (http://127.0.0.1:88/Database?dbCustomer) shows "Error in site JavaScript" in browser and same exception on server.

Update XFiles to 4.04.  Refresh classes.
Now web77 will NOT compile (complains about the removed DONTREPLACECOLONS property). The only way I was able to get it to compile was to remove XML as a return type for each service.  Is there something I need to update to make the example work?

Jane

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Service Method XML code problem.
« Reply #1 on: September 28, 2022, 04:40:17 PM »
Another XML issue.  A net web service method in one of my own apps.

The only hand-code is to build a queue.

Then the template code is set to return the queue. 

With XFiles 4.03 or 4.03, an additional <?xml version="1.0" encoding="utf-8"?> line is added somehow.

I've rolled back to 3.26 and all is good again.

This is the XML I get with version 4:

Code: [Select]
<?xml version="1.0"  encoding="utf-8"?>
<prtg xmlns="system">
<?xml version="1.0" encoding="utf-8"?>
  <result>
    <channel>sqlResponse</channel>
    <value>20220928</value>
    <channel>sessions</channel>
    <value>0</value>
    <channel>maxSessions</channel>
    <value>1</value>
    <channel>connections</channel>
    <value>2</value>
    <channel>maxConnections</channel>
    <value>6</value>
    <channel>threads</channel>
    <value>1</value>   
  </result>
</prtg>

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Service Method XML code problem.
« Reply #2 on: September 29, 2022, 05:15:30 PM »
Attached is a wizarded app that illustrates the problem shown in my prior post (works fine with xfiles 3 but has the extra xml version line with xfiles 4).

This does not illustrate the problem in my first post - which happens with the web77 example.

Jane

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Net Service Method XML code problem.
« Reply #3 on: October 01, 2022, 01:02:44 AM »
noted

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Net Service Method XML code problem.
« Reply #4 on: October 12, 2022, 12:08:02 AM »
Hi Jane,

There are a few moving parts in play here.
I've made an xFiles 3 build, 3.27, and an xFiles 4 build (4.05).
Coupled with this is NetTalk 12.47, which is happy with either.

Reflection is also updated to 1.14, so grab that as well.

Cheers
Bruce

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Net Service Method XML code problem.
« Reply #5 on: October 16, 2022, 07:12:09 PM »
Looks fixed with the new pieces.  Thanks, Bruce.

But... trickster are you!!  All popups in my existing apps suddenly start SLIDING open and closed.  Those defaults were blank before 12.47. 

I'm blanking them out on the WebServer extension.  But will they get put back to SLIDE with each future upgrade?

Cheers,

Jane

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Net Service Method XML code problem.
« Reply #6 on: October 16, 2022, 10:21:36 PM »
Set them to
''
instead of blank if you like.

but no, I don't think they are set to anything after you blank them. Wait and see I guess, and let us know.

Cheers
Bruce