Creating the Kshare Web Service XML

We have talked about the various advanced features that you can include in the Kshare Web service. We will now discuss how to create the Web service.

The Kshare Web service exposes several Web methods that client applications can use. These Web methods are discussed in the following list:

  • AddQuery() method.This method adds a query to the Queries table. The parameters for the AddQuery() Web method are the query text, the username, and the category.
  • AddAnswer() method. This method adds an expert's answer to the Answers table. The parameters for the AddAnswer() method are the ID of the query, the answer text, and the user ID of the expert.
  • GetAllQueries() method. This method returns a list of all queries in the Queries table in the form of an array of strings.
  • GetMyQueries() method. This method returns a list of all queries that a specific user has posted.
  • GetAnswer() method. This method accepts the ID of a query and returns all corresponding answers.
  • DeleteQuery() method. This method deletes a query from the Queries table. In addition, all answers for the particular query are deleted.

The code for the Kshare Web service is as shown:

To access the classes in the EnterpriseServices namespace, you need to add a reference to the System.EnterpriseServices.dll file.

Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

XML Topics