Changeset 2d5c8b6


Ignore:
Timestamp:
Aug 28, 2008 3:03:25 PM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
fca8740
Parents:
b234bb9
Message:

generic fault support (they're not all named RequestAccessFault? any more)

Location:
fedd
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd.py

    rb234bb9 r2d5c8b6  
    123123                            fedid(cert=self.request.get_peer_cert()))
    124124                data = xmlrpclib.dumps((resp,), methodresponse=True)
    125             #except Fault, f:
    126         #       xf = xmlrpclib.Fault(f.code, f.string)
    127         #       data = xmlrpclib.dumps(xf, methodresponse=True)
    128         #       resp = None
    129125            except xmlrpclib.Fault, f:
    130126                data = xmlrpclib.dumps(f, methodresponse=True)
  • fedd/fedd_bindings.wsdl

    rb234bb9 r2d5c8b6  
    3232        </output>
    3333        <fault>
    34           <soap:fault use="encoded"  name="tns:RequestAccessFault"
     34          <soap:fault use="encoded"  name="tns:FeddFault"
    3535            namespace="http://www.isi.edu/faber/fedd.wsdl"
    3636            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
     
    5353        </output>
    5454        <fault>
    55           <soap:fault use="encoded"  name="tns:CreateFault"
     55          <soap:fault use="encoded"  name="tns:FeddFault"
    5656            namespace="http://www.isi.edu/faber/fedd.wsdl"
    5757            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  • fedd/fedd_client.py

    rb234bb9 r2d5c8b6  
    150150    """ Print an error message and exit.
    151151
    152     The dictionary contains the RequestAccessFaultBody elements."""
     152    The dictionary contains the FeddFaultBody elements."""
    153153    codestr = ""
    154154
     
    328328                except RuntimeError, e:
    329329                    sys.exit("Bad response. %s" % e.message)
    330         elif 'get_element_RequestAccessFaultBody' in dir(resp):
    331             resp_body = resp.get_element_RequestAccessFaultBody()
     330        elif 'get_element_FeddFaultBody' in dir(resp):
     331            resp_body = resp.get_element_FeddFaultBody()
    332332            if resp_body != None:
    333333                exit_with_fault(unpack_soap(resp_body))
     
    346346        resp, method = loads(resp)
    347347    except Error, e:
    348         resp = { 'RequestAccessFaultBody': \
     348        resp = { 'FeddFaultBody': \
    349349                { 'errstr' : e.faultCode, 'desc' : e.faultString } }
    350350
     
    358358            except RuntimeError, e:
    359359                sys.exit("Bad response. %s" % e.messgae)
    360         elif resp.has_key('RequestAccessFaultBody'):
    361             exit_with_fault(resp['RequestAccessFaultBody'])
     360        elif resp.has_key('FeddFaultBody'):
     361            exit_with_fault(resp['FeddFaultBody'])
    362362        else: sys.exit("No body in response!?")
    363363
  • fedd/fedd_create_experiment.py

    rb234bb9 r2d5c8b6  
    10911091        req = req.get('CreateRequestBody', None)
    10921092        if not req:
    1093             raise service_error(service_error.request,
     1093            raise service_error(service_error.req,
    10941094                    "Bad request format (no CreateRequestBody)")
    10951095        # The tcl parser needs to read a file so put the content into that file
  • fedd/fedd_messages.wsdl

    rb234bb9 r2d5c8b6  
    3434      <input message="tns:RequestAccessRequestMessage"/>
    3535      <output message="tns:RequestAccessResponseMessage"/>
    36       <fault name="RequestAccessFault"
    37         message="tns:FaultMessage"/>
     36      <fault name="FeddFault" message="tns:FaultMessage"/>
    3837    </operation>
    3938    <operation name="Create">
     
    4342      <input message="tns:CreateRequestMessage"/>
    4443      <output message="tns:CreateResponseMessage"/>
    45       <fault name="CreateFault" message="tns:FaultMessage"/>
     44      <fault name="FeddFault" message="tns:FaultMessage"/>
    4645    </operation>
    4746  </portType>
  • fedd/fedd_proj.py

    rb234bb9 r2d5c8b6  
    527527            else:
    528528                # Build the fault
    529                 body = p_fault.get_element_RequestAccessFaultBody()
     529                body = p_fault.get_element_FeddFaultBody()
    530530                if body != None:
    531531                    raise service_error(body.get_element_code(),
     
    753753                de = ns0.faultType_Def(
    754754                        (ns0.faultType_Def.schema,
    755                             "RequestAccessFaultBody")).pyclass()
     755                            "FeddFaultBody")).pyclass()
    756756                de._code=e.code
    757757                de._errstr=e.code_string()
  • fedd/parse_detail.py

    rb234bb9 r2d5c8b6  
    1717class detail_faultType:
    1818    def __init__(self):
    19         self.RequestAccessFaultBody = None
     19        self.FeddFaultBody = None
    2020        self.any = self
    21     def get_element_RequestAccessFaultBody(self):
    22         return self.RequestAccessFaultBody
     21    def get_element_FeddFaultBody(self):
     22        return self.FeddFaultBody
    2323
    2424# Override ZSI.fault.FaultType.typecode - give a parser that speaks our
     
    3030    URI(pname=(SOAP.ENV,'faultactor'), minOccurs=0),
    3131    Struct(pname='detail', aname='detail',
    32         ofwhat=[ns0.faultType_Def((ns0.faultType_Def.schema,
    33             "RequestAccessFaultBody"))],
     32        ofwhat=[ns0.faultType_Def((ns0.faultType_Def.schema, "FeddFaultBody"))],
    3433        pyclass=detail_faultType, minOccurs=0),
    3534    ], 
Note: See TracChangeset for help on using the changeset viewer.