mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
d268bf305e
Conditional Expressions. * lib/wsdl/soap/definitions.rb: refactoring - Move Method. * test/xsd/{test_noencoding.rb,noencoding.xml}: new files. test for encoding unspecified XML file parsing. * test/wsdl/{test_fault.rb,map,datetime}: new files. test of SOAPFault, dateTime and Apache's Map. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
38 lines
910 B
Ruby
38 lines
910 B
Ruby
#!/usr/bin/env ruby
|
|
require 'datetimeServant.rb'
|
|
|
|
require 'soap/rpc/standaloneServer'
|
|
|
|
class DatetimePortType
|
|
MappingRegistry = SOAP::Mapping::Registry.new
|
|
|
|
# No mapping definition
|
|
|
|
Methods = [
|
|
["now", "now", [
|
|
["in", "now",
|
|
[SOAP::SOAPDateTime]],
|
|
["retval", "now",
|
|
[SOAP::SOAPDateTime]]], "", "urn:jp.gr.jin.rrr.example.datetime"]
|
|
]
|
|
end
|
|
|
|
class DatetimePortTypeApp < SOAP::RPC::StandaloneServer
|
|
def initialize(*arg)
|
|
super
|
|
|
|
servant = DatetimePortType.new
|
|
DatetimePortType::Methods.each do |name_as, name, params, soapaction, namespace|
|
|
qname = XSD::QName.new(namespace, name_as)
|
|
@soaplet.app_scope_router.add_method(servant, qname, soapaction,
|
|
name, params)
|
|
end
|
|
|
|
self.mapping_registry = DatetimePortType::MappingRegistry
|
|
end
|
|
end
|
|
|
|
# Change listen port.
|
|
if $0 == __FILE__
|
|
DatetimePortTypeApp.new('app', nil, '0.0.0.0', 10080).start
|
|
end
|