NetTalk Central

Author Topic: Sync NetWebServiceMethods referring to wrong ToDo procedure?  (Read 3474 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Hi,
I am attempting to write the sync-part of an application and so far so good
When I check the server-example, "under" the sync netwebservice, I see several syncXXX NetWebServiceMethods.
Each one, in its turn, has a recursive reference to sync netwebserver. As I can see in the source , the comment says: ! just redirect it back to parent service

In my case, I exported the syncCountries NetWebServiceMethod to txa, and replaced all the references from Countries to the file I want to sync, called Shop

I was surprised that there was no recursive reference to sync anymore but there was a reference to a procedure Shop(ToDo) of which I presume  is incorrect.

Therefore I deleted the "copied" syncShop and created the SyncShop by hand with the syncCountries as example but this had the same result.

In the Server example as well as in my syncXXX procedure there is a reference to a procedure with the comment as mentioned before.
One of them is correct and I have a gut-feeling that is is the one in the server example.

Am I right?

Cheers,
Rene Simons
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sync NetWebServiceMethods referring to wrong ToDo procedure?
« Reply #1 on: May 16, 2016, 12:12:48 AM »
Morning Rene,

ok, let's roll back a fraction and cover some background.

a) A WebService consists of a WebService procedure and one or more WebServiceMethod procedures.
b) A WebServiceMethod also (usually) refers back to the Service it belongs to.
c) The application tree has no way to refer to a "parent", so when the WebServiceMethod "links" to the Service, it appears in the app tree as a recursive call. (There is in fact no recursion at all - calling the service can lead to the method, calling the method can lead to the service.)

>> I was surprised that there was no recursive reference to sync anymore but there was a reference to a procedure Shop(ToDo) of which I presume  is incorrect.

NetWebServiceMethod, Actions, Settings, General Tab "Part of Service" setting.
Your "search and replace" replaced the setting there incorrectly.
Correct this setting back to "sync" and you should be fine.

cheers
Bruce


Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Sync NetWebServiceMethods referring to wrong ToDo procedure?
« Reply #2 on: May 17, 2016, 11:34:08 AM »
Hi Bruce,
As usual you were spot on.
Thank you.
Rene Simons
NT14.14