Page 207 - DCAP312_WEB_TECHNOLOGIES_II
P. 207

Unit 10: Web Services



            The  nomenclature  for  these  methods  and  the  job  status  codes  depends  on  the  service  and   Notes
            additional methods may also be provided giving more control over the life cycle of the job.
            Dispatcher
            The Dispatcher based services at EMBL-EBI (e.g. WSFasta, WSInterProScan, WSNCBIBlast and
            WSWUBlast) provide four methods for interacting with a job:
               1.  A  “run  “  method  to  submit  the  job,  this  is  named  after  the  service  (e.g.  RunFasta  for
                 WSFasta)
               2.  Get the status of the job (check Status). Returns a status code indicating the status of the
                 job, possible values are:
                  •  RUNNING: The job is currently being processed.
                  •  PENDING: The job is in a queue waiting processing.
                  •  NOT_FOUND: The job cannot be found, commonly seen when the job is no longer
                    available.
                  •  ERROR: The job failed.

                  •  DONE: Job has finished, and the results can then be retrieved.
               3.  Discover the available result types for a finished job (get Results).
               4.  Get the result of the specified type for the job (poll).

            Soap Lab
            Soap lab services provide many methods for interacting with a job, to run a job asynchronously
            there are three relevant methods:
               1.  To submit the job (create AndRun for generic service or run for typed service)
               2.  Get the status of the job (get Status). Returns a status code indicating the status of the job,
                 possible values are:
                  •  CREATED: Job has been created but not yet executed.
                  •  RUNNING: Job is currently being processed.

                  •  COMPLETED: Job has finished, its results can be retrieved.
                  •  TERMINATED_BY_ERROR: Job was terminated due to an error.
                  •  TERMINATED_BY_REQUEST: Job was terminated either by user request or by the
                    Soap lab job manager.
               3.  Get the all the results of job (get Results)

            Example of Creating Web Service in .NET
            Here are samples codes which use to create and consume ASP.NET Web Service:
            Step 1:  Create the ASP.NET Web Service Source File

              Open Visual Studio 2010 and create a new web site.->Select .Net Framework 3.5. ->Select ASP.
            NET Web Service page -> Then, you have to give the name of your service. In this example
            it is given name “mywebservice “. Then Click the ok Button. A screen-shot of this activity is
            given below.







                                             LOVELY PROFESSIONAL UNIVERSITY                                   201
   202   203   204   205   206   207   208   209   210   211   212