def parse(self, inputstring, document): errors = [] epytext_tree = epytext.parse(inputstring) self.setup_parse(inputstring, document) for child in self._parse(epytext_tree): self.document.append(child) self.finish_parse()
def generate(self, method): """ Build an operation for the binding. We assume that all operations involve both an input and an output (ie, they all use the request-response transmission primitive). Returns the generated operation instance. """ parsed = epytext.parse(method.__doc__) doc = parsed.firstChild.firstChild.firstChild.data operation = self.binding.addOperation(method.__name__, doc) operation.addSoap({"soapAction" : ""}) # FIXME Should support different uses, not just "encoded" input = operation.setInput() input.addSoap({ "use" : "encoded", "encodingStyle" : "http://schemas.xmlsoap.org/soap/encoding/", }) output = operation.setOutput() output.addSoap({ "use" : "encoded", "encodingStyle" : "http://schemas.xmlsoap.org/soap/encoding/", }) # FIXME Need to generate faults return operation
def __init__(self, docString): docNode = epytext.parse(docString) self.docNode = docNode self.docString = docString