Web Service Implementation

Web Service Implementation

by RISHIKA SEN -
Number of replies: 1

Ok, now this is how web services are probably implemented in real world(correct me if i am wrong)-

  the user gives request to the website. using the attributes given in the website the discovery algorithm searches the UDDI registry for the appropriate services. The the list of services are then returned to whom? Who is invoking the services? The front end(website)?? I am in a huge confusing regarding the way in which it works, if you get any link that explains the flow of control then do let me know...

(the web services will be in different computer but can be accessed from other computers too 

)

Average of ratings: -
In reply to RISHIKA SEN

Re: Web Service Implementation

by Syed Nayab Bukhari -
Picture of Core developers

http://docs.moodle.org/dev/Web_services

How it works

This simple example will give you an idea of how our web services infrastructure works.

  1. The client sends a username and password to the web service login script.
  2. The script returns a token for that user account.
  3. The client calls a particular web service function on a protocol server including the token .
  4. The protocol server uses the token to check that the user can call the function.
  5. The protocol server call the matching external function, located in a externallib.php file inside the relevant module.
  6. The external function checks that the current user has_capability to do this operation.
  7. The external function calls the matching Moodle core function (in lib.php usually).
  8. The core function can return a result to the external function.
  9. The external function will return a result to the protocol server.
  10. The protocol server returns the result to the client.