source: TI03-DataExtractor/branches/old_stuff/abstractPWSS/doc/WSInterface_module.txt @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/abstractPWSS/doc/WSInterface_module.txt@793
Revision 793, 3.6 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

Line 
1Help on module WSInterface:
2
3NAME
4    WSInterface
5
6FILE
7    /home/as56/abstractWebService/abstractPWSS/WSInterface.py
8
9DESCRIPTION
10    WSInterface.py
11    ================================
12   
13    A web service wrapper around the entire package.
14   
15    Wraps the package functionality into the following Web Service methods:
16   
17    - callControllerDirectly(args)
18   
19    - startSession(username=None, password=None, secureToken=None)
20   
21    - getOptions(sessionID, secureToken=None)
22   
23    - selectOptions(sessionID, opt_1, opt_2, ...,opt_n, secureToken=None)
24   
25    - isComplete(sessionID, secureToken=None)
26   
27    - createOutput(sessionID, secureToken=None)
28   
29    - newSession(sessionID, secureToken=None)
30   
31   
32    Notes about the sessionID and secureToken object
33    ------------------------------------------------
34   
35    The sessionID carries information about the current session but has no security
36    implications. It is simply a way for the server to keep track of the request
37    between calls.
38   
39    The secureToken is a security object (which should be encoded) that is time limited and provides
40    information on what the user is allowed to access on the server. Some servers
41    do not run security and so just send around a None type as the secureToken. Those
42    implementing security will require that the secureToken (held in a string) is sent
43    with each method call. During each call it will updated (to ensure it remains
44    time valid) and returned.
45   
46    All errors will be present in the instance object's self.error variable. Check for
47    this after each call to test success.
48
49FUNCTIONS
50    callControllerDirectly(**args)
51        Function wrapper to Control class. This can be called directly
52        to perform all operations or the other Web Service method can be called in
53        the appropriate order.
54   
55    createOutput(sessionID, secureToken=None)
56        Creates the outputs specified by user selections. It writes these files
57        locally and returns a list of paths to the data as either FTP or HTTP
58        locations.
59        Returns a list of paths and a security token.
60   
61    getOptions(sessionID, secureToken=None, optionCategoryRequested=None)
62        Returns a category description of the next set of options (or the option category
63        requested by the user), a list of options based on what the user has yet to request,
64        a string explaining some more about this and a security token.
65       
66        The options will be presented following the heirarchy:
67       
68            Option1
69            Option2
70   
71    isComplete(sessionID, secureToken=None)
72        Returns 1 if the request is complete (i.e. ready to create output file(s))
73        and 0 if not. Also returns a security token.
74   
75    newSession(sessionID, secureToken=None)
76        Deletes content of current request.
77        Returns the sessionID and the security token..
78   
79    selectOptions(sessionID, **args)
80        Makes a selection based on user requirements. This will typically follow a call
81        to getOptions() to find out what the options are.
82        Returns a call to getOptions() to grab the next set of options available to the
83        user. Alternatively, if it fails, an errorString is returned.
84   
85    serveAll()
86        Serves all functions via Web Services.
87   
88    startSession(username=None, password=None, secureToken=None)
89        Logs a user in and supplies them with a session ID as well
90        as an encoded security token. The session ID connects them to their
91        current request serverside whilst the security token is used to
92        authorise their access.
93
Note: See TracBrowser for help on using the repository browser.