- Timestamp:
- Sep 12, 2008 5:28:33 PM (16 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 291423b
- Parents:
- 27b6aea
- Location:
- fedd
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_bindings.wsdl
r27b6aea rc52c48d 101 101 </fault> 102 102 </operation> 103 <operation name="Info"> 104 <documentation> 105 The bindings of this operation are straightforward SOAP RPC 1.1. 106 </documentation> 107 <soap:operation soapAction="Info"/> 108 <input> 109 <soap:body use="encoded" parts="tns:InfoRequestBody" 110 namespace="http://www.isi.edu/faber/fedd.wsdl" 111 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 112 </input> 113 <output> 114 <soap:body use="encoded" parts="tns:InfoResponseBody" 115 namespace="http://www.isi.edu/faber/fedd.wsdl" 116 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 117 </output> 118 <fault> 119 <soap:fault use="encoded" name="tns:FeddFault" 120 namespace="http://www.isi.edu/faber/fedd.wsdl" 121 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 122 </fault> 123 </operation> 103 124 </binding> 104 125 -
fedd/fedd_client.py
r27b6aea rc52c48d 346 346 self.key="vis" 347 347 self.xml='vis' 348 elif op == 'Info': pass 348 349 else: 349 350 raise TypeError("Bad op: %s" % op) … … 415 416 sys.exit("Error processing RPC: %s" % e) 416 417 417 try: 418 if resp_dict.has_key(self.key): 419 self.print_xml(resp_dict[self.key]) 420 except RuntimeError, e: 421 sys.exit("Bad response. %s" % e.message) 418 if getattr(self, 'key', None): 419 try: 420 if resp_dict.has_key(self.key): 421 self.print_xml(resp_dict[self.key]) 422 except RuntimeError, e: 423 sys.exit("Bad response. %s" % e.message) 424 else: 425 print resp_dict 422 426 423 427 class create(fedd_rpc): … … 632 636 'vtopo': exp_data('Vtopo'),\ 633 637 'vis': exp_data('Vis'),\ 638 'info': exp_data('Info'),\ 634 639 } 635 640 -
fedd/fedd_create_experiment.py
r27b6aea rc52c48d 1278 1278 for tb in tbparams.keys() \ 1279 1279 if tbparams[tb].has_key('federant') ],\ 1280 'experiment': vtopo,\ 1280 'vtopo': vtopo,\ 1281 'vis' : vis, 1282 'experimentID' : [\ 1283 { 'fedid': copy.copy(expid) }, \ 1284 { 'localname': eid },\ 1285 ],\ 1286 'experimentAccess': { 'X509' : expcert },\ 1287 } 1288 1289 self.state[expid] = { 'federant' : [ tbparams[tb]['federant'] \ 1290 for tb in tbparams.keys() \ 1291 if tbparams[tb].has_key('federant') ],\ 1292 'vtopo': vtopo,\ 1281 1293 'vis' : vis, 1282 1294 'experimentID' : [\ 1283 1295 { 'fedid': expid }, { 'localname': eid },\ 1284 1296 ],\ 1285 'experimentAccess': { 'X509' : expcert },\1286 1297 } 1287 1288 self.state[expid] = {\1289 'fedid': expid,1290 'localname': eid,1291 'federant': [ tbparams[tb]['federant'] \1292 for tb in tbparams.keys() \1293 if tbparams[tb].has_key('federant') ],\1294 'vis': vis,\1295 'vtopo': vtopo,\1296 }1297 1298 self.state[eid] = self.state[expid] 1298 1299 return resp … … 1350 1351 raise service_error(service_error.req, "No such experiment") 1351 1352 1353 def get_info(self, req, fid): 1354 1355 req = req.get('InfoRequestBody', None) 1356 if not req: 1357 raise service_error(service_error.req, 1358 "Bad request format (no VisRequestBody)") 1359 exp = req.get('experiment', None) 1360 if exp: 1361 if exp.has_key('fedid'): 1362 key = fedid(bits=exp['fedid']) 1363 keytype = "fedid" 1364 elif exp.has_key('localname'): 1365 key = exp['localname'] 1366 keytype = "localname" 1367 else: 1368 raise service_error(service_error.req, "Unknown lookup type") 1369 else: 1370 raise service_error(service_error.req, "No request?") 1371 1372 # The state may be massaged by the service function that called 1373 # get_info (e.g., encoded for XMLRPC transport) so send a copy of the 1374 # state. 1375 if self.state.has_key(key): 1376 return copy.deepcopy(self.state[key]) 1377 else: 1378 raise service_error(service_error.req, "No such experiment") 1352 1379 1353 1380 if __name__ == '__main__': -
fedd/fedd_messages.wsdl
r27b6aea rc52c48d 39 39 </message> 40 40 41 <message name="InfoRequestMessage"> 42 <part name="InfoRequestBody" type="xsd1:infoRequestType"/> 43 </message> 44 45 <message name="InfoResponseMessage"> 46 <part name="InfoResponseBody" type="xsd1:infoResponseType"/> 47 </message> 48 41 49 <message name="FaultMessage"> 42 50 <part name="FaultBody" type="xsd1:faultType"/> … … 76 84 <fault name="FeddFault" message="tns:FaultMessage"/> 77 85 </operation> 86 <operation name="Info"> 87 <documentation> 88 Fill this in 89 </documentation> 90 <input message="tns:InfoRequestMessage"/> 91 <output message="tns:InfoResponseMessage"/> 92 <fault name="FeddFault" message="tns:FaultMessage"/> 93 </operation> 78 94 </portType> 79 95 </definitions> -
fedd/fedd_proj.py
r27b6aea rc52c48d 50 50 'Vtopo' : 'soap_Vtopo',\ 51 51 'Vis' : 'soap_Vis',\ 52 'Info' : 'soap_Info',\ 52 53 } 53 54 xmlrpc_methods = { \ … … 56 57 'Vtopo' : 'xmlrpc_Vtopo',\ 57 58 'Vis' : 'xmlrpc_Vis',\ 59 'Info' : 'xmlrpc_Info',\ 58 60 } 59 61 … … 600 602 return resp 601 603 604 def soap_Info(self, ps, fid): 605 req = ps.Parse(InfoRequestMessage.typecode) 606 607 msg = self.create_experiment.get_info(unpack_soap(req), fedid) 608 609 resp = InfoResponseMessage() 610 resp.set_element_InfoResponseBody( 611 pack_soap(resp, "InfoResponseBody", msg)) 612 613 return resp 614 602 615 def xmlrpc_RequestAccess(self, params, fid): 603 616 msg = self.RequestAccess(params[0], fedid) … … 618 631 else: 619 632 raise service_error(service_error.internal, 620 "No response generated?!") ;633 "No response generated?!") 621 634 622 635 def xmlrpc_Vtopo(self, params, fid): … … 629 642 else: 630 643 raise service_error(service_error.internal, 631 "No response generated?!") ;644 "No response generated?!") 632 645 633 646 def xmlrpc_Vis(self, params, fid): … … 640 653 else: 641 654 raise service_error(service_error.internal, 642 "No response generated?!"); 655 "No response generated?!") 656 657 def xmlrpc_Info(self, params, fid): 658 p = decapsulate_binaries(params[0], ('fedid',)) 659 msg = self.create_experiment.get_info(p, fedid) 660 if msg != None: 661 return encapsulate_binaries({ "InfoResponseBody" : msg }, 662 ('fedid',)) 663 else: 664 raise service_error(service_error.internal, 665 "No response generated?!") 643 666 644 667 def read_trust(self, trust): -
fedd/fedd_types.xsd
r27b6aea rc52c48d 333 333 <xsd:element name="federant" type="tns:federatedExperimentType" 334 334 minOccurs="1" maxOccurs="unbounded"/> 335 <xsd:element name=" experiment" type="tns:vtopoType" minOccurs="0"335 <xsd:element name="vtopo" type="tns:vtopoType" minOccurs="0" 336 336 maxOccurs="1"/> 337 337 <xsd:element name="vis" type="tns:visType" minOccurs="0" … … 388 388 <xsd:element name="experiment" type="tns:IDType"/> 389 389 <xsd:element name="vis" type="tns:visType"/> 390 </xsd:sequence> 391 </xsd:complexType> 392 393 <xsd:complexType name="infoRequestType"> 394 <xsd:annotation> 395 <xsd:documentation> 396 Request for an existing experiment's topology 397 </xsd:documentation> 398 </xsd:annotation> 399 <xsd:sequence> 400 <xsd:element name="experiment" type="tns:IDType"/> 401 </xsd:sequence> 402 </xsd:complexType> 403 404 <xsd:complexType name="infoResponseType"> 405 <xsd:annotation> 406 <xsd:documentation> 407 Information on an instantiated experiment. The createResponse without 408 the secret information 409 </xsd:documentation> 410 </xsd:annotation> 411 <xsd:sequence> 412 <xsd:element name="federant" type="tns:federatedExperimentType" 413 minOccurs="1" maxOccurs="unbounded"/> 414 <xsd:element name="vtopo" type="tns:vtopoType" minOccurs="0" 415 maxOccurs="1"/> 416 <xsd:element name="vis" type="tns:visType" minOccurs="0" 417 maxOccurs="1"/> 418 <xsd:element name="experimentID" type="tns:IDType" minOccurs="1" 419 maxOccurs="unbounded"/> 390 420 </xsd:sequence> 391 421 </xsd:complexType>
Note: See TracChangeset
for help on using the changeset viewer.