source: TI03-DataExtractor/branches/old_stuff/abstractPWSS/doc/WSInterface_SOAPpy.html @ 793

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

Put all the old code in the old_stuff branch.

Line 
1
2<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module WSInterface_SOAPpy</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>WSInterface_SOAPpy</strong></big></big></font></td
10><td align=right valign=bottom
11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/as56/abstractWebService/abstractPWSS/WSInterface_SOAPpy.py">/home/as56/abstractWebService/abstractPWSS/WSInterface_SOAPpy.py</a></font></td></tr></table>
12    <p><tt>WSInterface.py<br>
13================================<br>
14&nbsp;<br>
15A&nbsp;web&nbsp;service&nbsp;wrapper&nbsp;around&nbsp;the&nbsp;entire&nbsp;package.<br>
16&nbsp;<br>
17Wraps&nbsp;the&nbsp;package&nbsp;functionality&nbsp;into&nbsp;the&nbsp;following&nbsp;Web&nbsp;Service&nbsp;methods:<br>
18&nbsp;<br>
19-&nbsp;<a href="#-callControllerDirectly">callControllerDirectly</a>(args)<br>
20&nbsp;<br>
21-&nbsp;<a href="#-startSession">startSession</a>(username=None,&nbsp;password=None,&nbsp;secureToken=None)<br>
22&nbsp;<br>
23-&nbsp;<a href="#-getOptions">getOptions</a>(sessionID,&nbsp;secureToken=None)<br>
24&nbsp;<br>
25-&nbsp;<a href="#-selectOptions">selectOptions</a>(sessionID,&nbsp;opt_1,&nbsp;opt_2,&nbsp;...,opt_n,&nbsp;secureToken=None)<br>
26&nbsp;<br>
27-&nbsp;<a href="#-isComplete">isComplete</a>(sessionID,&nbsp;secureToken=None)<br>
28&nbsp;<br>
29-&nbsp;<a href="#-createOutput">createOutput</a>(sessionID,&nbsp;secureToken=None)<br>
30&nbsp;<br>
31-&nbsp;<a href="#-newSession">newSession</a>(sessionID,&nbsp;secureToken=None)<br>
32&nbsp;<br>
33&nbsp;<br>
34Notes&nbsp;about&nbsp;the&nbsp;sessionID&nbsp;and&nbsp;secureToken&nbsp;object<br>
35------------------------------------------------<br>
36&nbsp;<br>
37The&nbsp;sessionID&nbsp;carries&nbsp;information&nbsp;about&nbsp;the&nbsp;current&nbsp;session&nbsp;but&nbsp;has&nbsp;no&nbsp;security<br>
38implications.&nbsp;It&nbsp;is&nbsp;simply&nbsp;a&nbsp;way&nbsp;for&nbsp;the&nbsp;server&nbsp;to&nbsp;keep&nbsp;track&nbsp;of&nbsp;the&nbsp;request&nbsp;<br>
39between&nbsp;calls.<br>
40&nbsp;<br>
41The&nbsp;secureToken&nbsp;is&nbsp;a&nbsp;security&nbsp;object&nbsp;(which&nbsp;should&nbsp;be&nbsp;encoded)&nbsp;that&nbsp;is&nbsp;time&nbsp;limited&nbsp;and&nbsp;provides<br>
42information&nbsp;on&nbsp;what&nbsp;the&nbsp;user&nbsp;is&nbsp;allowed&nbsp;to&nbsp;access&nbsp;on&nbsp;the&nbsp;server.&nbsp;Some&nbsp;servers<br>
43do&nbsp;not&nbsp;run&nbsp;security&nbsp;and&nbsp;so&nbsp;just&nbsp;send&nbsp;around&nbsp;a&nbsp;None&nbsp;type&nbsp;as&nbsp;the&nbsp;secureToken.&nbsp;Those<br>
44implementing&nbsp;security&nbsp;will&nbsp;require&nbsp;that&nbsp;the&nbsp;secureToken&nbsp;(held&nbsp;in&nbsp;a&nbsp;string)&nbsp;is&nbsp;sent<br>
45with&nbsp;each&nbsp;method&nbsp;call.&nbsp;During&nbsp;each&nbsp;call&nbsp;it&nbsp;will&nbsp;updated&nbsp;(to&nbsp;ensure&nbsp;it&nbsp;remains&nbsp;<br>
46time&nbsp;valid)&nbsp;and&nbsp;returned.</tt></p>
47<p>
48<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
49<tr bgcolor="#aa55cc">
50<td colspan=3 valign=bottom>&nbsp;<br>
51<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
52   
53<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
54<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
55<a href="random.html">random</a><br>
56<a href="re.html">re</a><br>
57</td><td width="25%" valign=top><a href="shelve.html">shelve</a><br>
58<a href="smtplib.html">smtplib</a><br>
59<a href="string.html">string</a><br>
60</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
61<a href="time.html">time</a><br>
62<a href="types.html">types</a><br>
63</td><td width="25%" valign=top><a href="urllib.html">urllib</a><br>
64</td></tr></table></td></tr></table><p>
65<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
66<tr bgcolor="#eeaa77">
67<td colspan=3 valign=bottom>&nbsp;<br>
68<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
69   
70<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
71<td width="100%"><dl><dt><a name="-callControllerDirectly"><strong>callControllerDirectly</strong></a>(**args)</dt><dd><tt>Function&nbsp;wrapper&nbsp;to&nbsp;Control&nbsp;class.&nbsp;This&nbsp;can&nbsp;be&nbsp;called&nbsp;directly<br>
72to&nbsp;perform&nbsp;all&nbsp;operations&nbsp;or&nbsp;the&nbsp;other&nbsp;Web&nbsp;Service&nbsp;method&nbsp;can&nbsp;be&nbsp;called&nbsp;in<br>
73the&nbsp;appropriate&nbsp;order.</tt></dd></dl>
74 <dl><dt><a name="-createOutput"><strong>createOutput</strong></a>(sessionID, secureToken<font color="#909090">=None</font>)</dt><dd><tt>Creates&nbsp;the&nbsp;outputs&nbsp;specified&nbsp;by&nbsp;user&nbsp;selections.&nbsp;It&nbsp;writes&nbsp;these&nbsp;files<br>
75locally&nbsp;and&nbsp;returns&nbsp;a&nbsp;list&nbsp;of&nbsp;paths&nbsp;to&nbsp;the&nbsp;data&nbsp;as&nbsp;either&nbsp;FTP&nbsp;or&nbsp;HTTP&nbsp;<br>
76locations.&nbsp;<br>
77Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;paths&nbsp;and&nbsp;a&nbsp;security&nbsp;token.</tt></dd></dl>
78 <dl><dt><a name="-getOptions"><strong>getOptions</strong></a>(sessionID, secureToken<font color="#909090">=None</font>, optionCategoryRequested<font color="#909090">=None</font>)</dt><dd><tt>Returns&nbsp;a&nbsp;category&nbsp;description&nbsp;of&nbsp;the&nbsp;next&nbsp;set&nbsp;of&nbsp;options&nbsp;(or&nbsp;the&nbsp;option&nbsp;category&nbsp;<br>
79requested&nbsp;by&nbsp;the&nbsp;user),&nbsp;a&nbsp;list&nbsp;of&nbsp;options&nbsp;based&nbsp;on&nbsp;what&nbsp;the&nbsp;user&nbsp;has&nbsp;yet&nbsp;to&nbsp;request,&nbsp;<br>
80a&nbsp;string&nbsp;explaining&nbsp;some&nbsp;more&nbsp;about&nbsp;this&nbsp;and&nbsp;a&nbsp;security&nbsp;token.<br>
81&nbsp;<br>
82The&nbsp;options&nbsp;will&nbsp;be&nbsp;presented&nbsp;following&nbsp;the&nbsp;heirarchy:<br>
83&nbsp;<br>
84&nbsp;&nbsp;&nbsp;&nbsp;Option1<br>
85&nbsp;&nbsp;&nbsp;&nbsp;Option2</tt></dd></dl>
86 <dl><dt><a name="-isComplete"><strong>isComplete</strong></a>(sessionID, secureToken<font color="#909090">=None</font>)</dt><dd><tt>Returns&nbsp;1&nbsp;if&nbsp;the&nbsp;request&nbsp;is&nbsp;complete&nbsp;(i.e.&nbsp;ready&nbsp;to&nbsp;create&nbsp;output&nbsp;file(s))<br>
87and&nbsp;0&nbsp;if&nbsp;not.&nbsp;Also&nbsp;returns&nbsp;a&nbsp;security&nbsp;token.</tt></dd></dl>
88 <dl><dt><a name="-newSession"><strong>newSession</strong></a>(sessionID, secureToken<font color="#909090">=None</font>)</dt><dd><tt>Deletes&nbsp;content&nbsp;of&nbsp;current&nbsp;request.<br>
89Returns&nbsp;the&nbsp;sessionID&nbsp;and&nbsp;the&nbsp;security&nbsp;token..</tt></dd></dl>
90 <dl><dt><a name="-selectOptions"><strong>selectOptions</strong></a>(sessionID, **args)</dt><dd><tt>Makes&nbsp;a&nbsp;selection&nbsp;based&nbsp;on&nbsp;user&nbsp;requirements.&nbsp;This&nbsp;will&nbsp;typically&nbsp;follow&nbsp;a&nbsp;call<br>
91to&nbsp;<a href="#-getOptions">getOptions</a>()&nbsp;to&nbsp;find&nbsp;out&nbsp;what&nbsp;the&nbsp;options&nbsp;are.<br>
92Returns&nbsp;a&nbsp;call&nbsp;to&nbsp;<a href="#-getOptions">getOptions</a>()&nbsp;to&nbsp;grab&nbsp;the&nbsp;next&nbsp;set&nbsp;of&nbsp;options&nbsp;available&nbsp;to&nbsp;the&nbsp;<br>
93user.&nbsp;Alternatively,&nbsp;if&nbsp;it&nbsp;fails,&nbsp;an&nbsp;errorString&nbsp;is&nbsp;returned.</tt></dd></dl>
94 <dl><dt><a name="-serveAll"><strong>serveAll</strong></a>()</dt><dd><tt>Serves&nbsp;all&nbsp;functions&nbsp;via&nbsp;Web&nbsp;Services.</tt></dd></dl>
95 <dl><dt><a name="-startSession"><strong>startSession</strong></a>(username<font color="#909090">=None</font>, password<font color="#909090">=None</font>, secureToken<font color="#909090">=None</font>)</dt><dd><tt>Logs&nbsp;a&nbsp;user&nbsp;in&nbsp;and&nbsp;supplies&nbsp;them&nbsp;with&nbsp;a&nbsp;session&nbsp;ID&nbsp;as&nbsp;well<br>
96as&nbsp;an&nbsp;encoded&nbsp;security&nbsp;token.&nbsp;The&nbsp;session&nbsp;ID&nbsp;connects&nbsp;them&nbsp;to&nbsp;their<br>
97current&nbsp;request&nbsp;serverside&nbsp;whilst&nbsp;the&nbsp;security&nbsp;token&nbsp;is&nbsp;used&nbsp;to&nbsp;<br>
98authorise&nbsp;their&nbsp;access.</tt></dd></dl>
99</td></tr></table><p>
100<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
101<tr bgcolor="#55aa55">
102<td colspan=3 valign=bottom>&nbsp;<br>
103<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
104   
105<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
106<td width="100%"><strong>ADMIN_MAIL_ADDRESS</strong> = 'as56@localhost'<br>
107<strong>ADMIN_NOTIFICATION</strong> = 1<br>
108<strong>BASEDIR</strong> = '/home/as56/abstractWebService/abstractPWSS'<br>
109<strong>CREDIT_LIMIT</strong> = 2<br>
110<strong>LOCAL_MAIL_HOST</strong> = 'localhost'<br>
111<strong>LOCAL_RULES</strong> = 0<br>
112<strong>OUTPUT_DIR</strong> = '/srv/www/htdocs/output'<br>
113<strong>OUTPUT_DIR_PERMISSION</strong> = 493<br>
114<strong>OUTPUT_DIR_URL</strong> = 'http://localhost/output'<br>
115<strong>OUTPUT_FILE_GROUP</strong> = 'users'<br>
116<strong>OUTPUT_FILE_PERMISSION</strong> = 420<br>
117<strong>OUTPUT_FILE_USER</strong> = 'as56'<br>
118<strong>PACKAGE_NAME</strong> = 'Abstract Python Web Service Server'<br>
119<strong>RESTRICTED_DATA</strong> = 1<br>
120<strong>SESSION_OBJECT_DIR</strong> = '/home/as56/abstractWebService/abstractPWSS/sessionObjects'<br>
121<strong>SOAP_SERVER_PORT</strong> = 8443<br>
122<strong>TOKEN_VALID_LIFETIME</strong> = 28800<br>
123<strong>UNRESTRICTED_CREDIT</strong> = 1<br>
124<strong>sessionID</strong> = None</td></tr></table>
125</body></html>
Note: See TracBrowser for help on using the repository browser.