def __init__(self, url, app, name, out_header=None): self.url = url self.app = app initial_ctx = MethodContext(app) initial_ctx.method_request_string = name initial_ctx.out_header = out_header self.contexts = self.app.out_protocol.generate_method_contexts( initial_ctx)
def rootPage(self, *args, **kwargs): """Handle an incoming SOAP request or a non-SOAP WSDL query.""" self.response.content_type = 'text/xml' if not self.request._request.body: return self.service_description() if True: ctx = MethodContext() in_string = collapse_swa(self.request.content_type, self.request._request.body) in_obj = self.get_in_object(ctx, in_string, self.request._request.charset) out_obj = self.get_out_object(ctx, in_obj) out_string = self.get_out_string(ctx, out_obj) return out_string else: #except Exception, e: if getattr(self, 'debug_soap', False): raise self.response.status = '500 Internal Server Error' fault = Fault(faultstring=str(e)) resp = etree.tostring(fault, encoding=string_encoding) return resp