Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Registering a custom function to be invoked by webservice
#3
The $params is an array with all the parameters defined in the webservice method:

https://github.com/tsolucio/coreBOSwsDevelopment/blob/master/testcode/470_convertLead.php#L23

that is the call to this method:

https://github.com/tsolucio/corebos/blob/master/include/Webservices/ConvertLead.php#L15

one parameter which is the one value in the array in the call. You ALWAYS have to define the $user when you define the method, not when you register it, only when you code it. The user calling the method is always passed in as the last parameter.

There is no obligation to define the method function and the exported webervice name the same, in fact they are usually different:

https://github.com/tsolucio/corebos/blob/master/build/wsChanges/CPaddTicketFAQComment.php

The easiest way to register the method is using the registerWSAPI() method

https://github.com/tsolucio/corebos/blob/master/include/Webservices/Utils.php#L383
Joe
TSolucio
Reply


Messages In This Thread
RE: Registering a custom function to be invoked by webservice - joebordes - 12-14-2016, 03:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)