diff options
| author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-30 04:33:02 +0000 |
|---|---|---|
| committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-30 04:33:02 +0000 |
| commit | 53ec59de18ddbf279650b0ce09e2791cf4200d57 (patch) | |
| tree | 4268267cc8e52a533e4c78490ce6c2009971f972 /test/wsdl/datetime/DatetimeService.rb | |
| parent | 34082bf4ed3bc43da29f38cd535e80814890b39f (diff) | |
| download | ruby-53ec59de18ddbf279650b0ce09e2791cf4200d57.tar.gz ruby-53ec59de18ddbf279650b0ce09e2791cf4200d57.tar.xz ruby-53ec59de18ddbf279650b0ce09e2791cf4200d57.zip | |
* lib/soap/encodingstyle/soapHandler.rb: refactoring - Simplifying
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: http://svn.ruby-lang.org/repos/ruby/trunk@5060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/wsdl/datetime/DatetimeService.rb')
| -rw-r--r-- | test/wsdl/datetime/DatetimeService.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/wsdl/datetime/DatetimeService.rb b/test/wsdl/datetime/DatetimeService.rb new file mode 100644 index 000000000..91c006005 --- /dev/null +++ b/test/wsdl/datetime/DatetimeService.rb @@ -0,0 +1,38 @@ +#!/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 |
