Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Calling Server Function in WebService external Function.

$
0
0
by Engr. Nayab Bukhari, Syed.  

Dear Seniors

I developed a script for Bulk Course Creation via coursecreate() function. 

coursecreate0 get data from a webservice one the base of unique id. 

Each id has contents of whole course. 

createcourse() 

Now I am going to develop a webservice, So on call of that web service, coursecreate() should called and return course link to client via protocol as done in coursecreate() function(locally). 

Can any one tell me how I can call coursecreate() in webservice external function. 

I tried in different ways

1.  include whole page having coursecreate()   // lib file path error

2.  Add whole createcourse() in external function of web service // Error nothing showing Null

string(180) "<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>createcourse</methodName><params><param><value><int>17</int></value></param></params></methodCall>"

I think in am not passing params in proper way to createcourse();

 

$params = array('iid' => new external_value(PARAM_INT, 'RA id. By default it is "New Course ID,"', VALUE_DEFAULT, '17'))

 

public static function createcourse(int $iid){....

//also tried

public static function createcourse($iid){..

//Return params

return new external_value(PARAM_TEXT, 'The Course link');

 

Please help me So, It returns courselink as it is working on local server.

 

Waiting for seniors reply. 


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>