Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
As I'm preparing for the development of my portal, I'm studying the MYC portal on github. I see it has a lot of useful library's I can use. The first question that comes to mind: What is the difference between vtigerservice.php file and webservice.php file? Do they serve the same purpose, but different techniques?
AlsoL I see in the WSClient file in the portal a "doInvoke" method, where you can invoke custom methods. Does this mean custom methods on a module level? So I could create a module that registers some webservice method, which I can invoke through this action?
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
Yes, I am looking at the coreBOS version on your Github account.
Good to know, I'll focus my attention on webservice. I'd very much like to see the SO webservice.
About you doInvoke example: that represents a file on the portal side right? You invoke the 'convertlead' method, but where would that be defined? In the general webservice file or in a module? And if so, how can you register webservice methods in the app from a module?
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
Wow,
That's a lot. I've taken a look. Basically I could create a file in a new module and register the webservice method using 'registerWSAPI'. What's the 'prelogin' part? Also, if I specify a certain type (e.g. "POST", will it fail when I try it through a GET request? Is it mandatory to set the 'queryParameters' type in the 'parameters' in the 'operationInfo'? Basically I could make a webservice method that returns records from my module in any form I like, in array form? The webservice file will automatically JSON encode?
Lot of info, lot's of questions. But cool techniques.
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
Thanks! Will keep this nearby as soon as I start. First to create a first alpha of my PackingSlip module...
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
Well, I've borrowed some code from the portal and installed Smarty 3 in my project. I've managed to login, retrieve contacts and display them with smarty in just over an hour so so far, so good!