Logger::Application
SYNOPSIS
CGIStub.new
DESCRIPTION
To be written...
# File lib/soap/rpc/cgistub.rb, line 106 106: def initialize(appname, default_namespace) 107: super(appname) 108: set_log(STDERR) 109: self.level = ERROR 110: @default_namespace = default_namespace 111: @remote_host = ENV['REMOTE_HOST'] || ENV['REMOTE_ADDR'] || 'unknown' 112: @router = ::SOAP::RPC::Router.new(self.class.name) 113: @soaplet = ::SOAP::RPC::SOAPlet.new(@router) 114: on_init 115: end
# File lib/soap/rpc/cgistub.rb, line 190 190: def add_document_operation(receiver, soapaction, name, param_def, opt = {}) 191: @router.add_document_operation(receiver, soapaction, name, param_def, opt) 192: end
# File lib/soap/rpc/cgistub.rb, line 152 152: def add_headerhandler(obj) 153: @router.add_headerhandler(obj) 154: end
method entry interface
# File lib/soap/rpc/cgistub.rb, line 163 163: def add_rpc_method(obj, name, *param) 164: add_rpc_method_with_namespace_as(@default_namespace, obj, name, name, *param) 165: end
# File lib/soap/rpc/cgistub.rb, line 168 168: def add_rpc_method_as(obj, name, name_as, *param) 169: add_rpc_method_with_namespace_as(@default_namespace, obj, name, name_as, *param) 170: end
# File lib/soap/rpc/cgistub.rb, line 173 173: def add_rpc_method_with_namespace(namespace, obj, name, *param) 174: add_rpc_method_with_namespace_as(namespace, obj, name, name, *param) 175: end
# File lib/soap/rpc/cgistub.rb, line 178 178: def add_rpc_method_with_namespace_as(namespace, obj, name, name_as, *param) 179: qname = XSD::QName.new(namespace, name_as) 180: soapaction = nil 181: param_def = SOAPMethod.derive_rpc_param_def(obj, name, *param) 182: @router.add_rpc_operation(obj, qname, soapaction, name, param_def) 183: end
# File lib/soap/rpc/cgistub.rb, line 186 186: def add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) 187: @router.add_rpc_operation(receiver, qname, soapaction, name, param_def, opt) 188: end
servant entry interface
# File lib/soap/rpc/cgistub.rb, line 147 147: def add_rpc_servant(obj, namespace = @default_namespace) 148: @router.add_rpc_servant(obj, namespace) 149: end
# File lib/soap/rpc/cgistub.rb, line 157 157: def filterchain 158: @router.filterchain 159: end
# File lib/soap/rpc/cgistub.rb, line 137 137: def generate_explicit_type 138: @router.generate_explicit_type 139: end
# File lib/soap/rpc/cgistub.rb, line 141 141: def generate_explicit_type=(generate_explicit_type) 142: @router.generate_explicit_type = generate_explicit_type 143: end
# File lib/soap/rpc/cgistub.rb, line 129 129: def literal_mapping_registry 130: @router.literal_mapping_registry 131: end
# File lib/soap/rpc/cgistub.rb, line 133 133: def literal_mapping_registry=(literal_mapping_registry) 134: @router.literal_mapping_registry = literal_mapping_registry 135: end
# File lib/soap/rpc/cgistub.rb, line 121 121: def mapping_registry 122: @router.mapping_registry 123: end
# File lib/soap/rpc/cgistub.rb, line 125 125: def mapping_registry=(mapping_registry) 126: @router.mapping_registry = mapping_registry 127: end
# File lib/soap/rpc/cgistub.rb, line 202 202: def run 203: res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion}) 204: begin 205: @log.info { "received a request from '#{ @remote_host }'" } 206: if @fcgi 207: req = SOAPFCGIRequest.new(@fcgi) 208: else 209: req = SOAPStdinRequest.new($stdin) 210: end 211: @soaplet.do_POST(req, res) 212: rescue HTTPStatus::EOFError, HTTPStatus::RequestTimeout => ex 213: res.set_error(ex) 214: rescue HTTPStatus::Error => ex 215: res.set_error(ex) 216: rescue HTTPStatus::Status => ex 217: res.status = ex.code 218: rescue StandardError, NameError => ex # for Ruby 1.6 219: res.set_error(ex, true) 220: ensure 221: if defined?(MOD_RUBY) 222: r = Apache.request 223: r.status = res.status 224: r.content_type = res.content_type 225: r.send_http_header 226: buf = res.body 227: else 228: buf = '' 229: res.send_response(buf) 230: buf.sub!(/^[^\r]+\r\n/, '') # Trim status line. 231: end 232: @log.debug { "SOAP CGI Response:\n#{ buf }" } 233: if @fcgi 234: @fcgi.out.print buf 235: @fcgi.finish 236: @fcgi = nil 237: else 238: print buf 239: end 240: end 241: 0 242: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.