Class: MongrelSOAP::RPC::HTTPServer
- Inherits:
-
Logger::Application
- Object
- Logger::Application
- MongrelSOAP::RPC::HTTPServer
- Defined in:
- lib/mongrel-soap/rpc/httpserver.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#default_namespace ⇒ Object
Returns the value of attribute default_namespace.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
- #add_document_method(obj, soapaction, name, req_qnames, res_qnames) ⇒ Object
- #add_document_operation(receiver, soapaction, name, param_def, opt = {}) ⇒ Object
- #add_document_request_operation(factory, soapaction, name, param_def, opt = {}) ⇒ Object
- #add_headerhandler(obj) ⇒ Object (also: #add_rpc_headerhandler)
- #add_request_headerhandler(factory) ⇒ Object
-
#add_rpc_method(obj, name, *param) ⇒ Object
(also: #add_method)
method entry interface.
- #add_rpc_method_as(obj, name, name_as, *param) ⇒ Object (also: #add_method_as)
- #add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) ⇒ Object
- #add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt = {}) ⇒ Object
-
#add_rpc_request_servant(factory, namespace = @default_namespace) ⇒ Object
servant entry interface.
- #add_rpc_servant(obj, namespace = @default_namespace) ⇒ Object (also: #add_servant)
- #filterchain ⇒ Object
- #generate_explicit_type ⇒ Object
- #generate_explicit_type=(generate_explicit_type) ⇒ Object
-
#initialize(config) ⇒ HTTPServer
constructor
A new instance of HTTPServer.
- #literal_mapping_registry ⇒ Object
- #literal_mapping_registry=(literal_mapping_registry) ⇒ Object
- #mapping_registry ⇒ Object
- #mapping_registry=(mapping_registry) ⇒ Object
- #on_init ⇒ Object
- #shutdown ⇒ Object
Constructor Details
#initialize(config) ⇒ HTTPServer
Returns a new instance of HTTPServer.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 15 def initialize(config) actor = config[:SOAPHTTPServerApplicationName] || self.class.name super(actor) @default_namespace = config[:SOAPDefaultNamespace] @router = ::SOAP::RPC::Router.new(actor) on_init @server = Mongrel::HttpServer.new(config[:BindAddress], config[:Port]) @server.register("/", Mongrel::SOAP4RHandler.new(@router)) if wsdl_dir = config[:WSDLDocumentDirectory] @server.register('/wsdl', Mongrel::DirHandler.new(wsdl_dir)) end end |
Instance Attribute Details
#default_namespace ⇒ Object
Returns the value of attribute default_namespace.
13 14 15 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 13 def default_namespace @default_namespace end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
12 13 14 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 12 def server @server end |
Instance Method Details
#add_document_method(obj, soapaction, name, req_qnames, res_qnames) ⇒ Object
101 102 103 104 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 101 def add_document_method(obj, soapaction, name, req_qnames, res_qnames) param_def = SOAPMethod.create_doc_param_def(req_qnames, res_qnames) @router.add_document_operation(obj, soapaction, name, param_def) end |
#add_document_operation(receiver, soapaction, name, param_def, opt = {}) ⇒ Object
114 115 116 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 114 def add_document_operation(receiver, soapaction, name, param_def, opt = {}) @router.add_document_operation(receiver, soapaction, name, param_def, opt) end |
#add_document_request_operation(factory, soapaction, name, param_def, opt = {}) ⇒ Object
118 119 120 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 118 def add_document_request_operation(factory, soapaction, name, param_def, opt = {}) @router.add_document_request_operation(factory, soapaction, name, param_def, opt) end |
#add_headerhandler(obj) ⇒ Object Also known as: add_rpc_headerhandler
77 78 79 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 77 def add_headerhandler(obj) @router.add_headerhandler(obj) end |
#add_request_headerhandler(factory) ⇒ Object
73 74 75 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 73 def add_request_headerhandler(factory) @router.add_request_headerhandler(factory) end |
#add_rpc_method(obj, name, *param) ⇒ Object Also known as: add_method
method entry interface
88 89 90 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 88 def add_rpc_method(obj, name, *param) add_rpc_method_as(obj, name, name, *param) end |
#add_rpc_method_as(obj, name, name_as, *param) ⇒ Object Also known as: add_method_as
93 94 95 96 97 98 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 93 def add_rpc_method_as(obj, name, name_as, *param) qname = XSD::QName.new(@default_namespace, name_as) soapaction = nil param_def = ::SOAP::RPC::SOAPMethod.derive_rpc_param_def(obj, name, *param) @router.add_rpc_operation(obj, qname, soapaction, name, param_def) end |
#add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) ⇒ Object
106 107 108 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 106 def add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) @router.add_rpc_operation(receiver, qname, soapaction, name, param_def, opt) end |
#add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt = {}) ⇒ Object
110 111 112 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 110 def add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt = {}) @router.add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt) end |
#add_rpc_request_servant(factory, namespace = @default_namespace) ⇒ Object
servant entry interface
64 65 66 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 64 def add_rpc_request_servant(factory, namespace = @default_namespace) @router.add_rpc_request_servant(factory, namespace) end |
#add_rpc_servant(obj, namespace = @default_namespace) ⇒ Object Also known as: add_servant
68 69 70 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 68 def add_rpc_servant(obj, namespace = @default_namespace) @router.add_rpc_servant(obj, namespace) end |
#filterchain ⇒ Object
82 83 84 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 82 def filterchain @router.filterchain end |
#generate_explicit_type ⇒ Object
54 55 56 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 54 def generate_explicit_type @router.generate_explicit_type end |
#generate_explicit_type=(generate_explicit_type) ⇒ Object
58 59 60 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 58 def generate_explicit_type=(generate_explicit_type) @router.generate_explicit_type = generate_explicit_type end |
#literal_mapping_registry ⇒ Object
46 47 48 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 46 def literal_mapping_registry @router.literal_mapping_registry end |
#literal_mapping_registry=(literal_mapping_registry) ⇒ Object
50 51 52 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 50 def literal_mapping_registry=(literal_mapping_registry) @router.literal_mapping_registry = literal_mapping_registry end |
#mapping_registry ⇒ Object
38 39 40 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 38 def mapping_registry @router.mapping_registry end |
#mapping_registry=(mapping_registry) ⇒ Object
42 43 44 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 42 def mapping_registry=(mapping_registry) @router.mapping_registry = mapping_registry end |
#on_init ⇒ Object
31 32 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 31 def on_init end |
#shutdown ⇒ Object
34 35 36 |
# File 'lib/mongrel-soap/rpc/httpserver.rb', line 34 def shutdown @server.stop if @server end |