From 54ec1c4fe81672ca66f327ef6ae170f458cd79e5 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 15 Aug 2007 20:57:30 +0000 Subject: sorry. I made wrong tags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_5_54@13009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby_1_8_5/test/wsdl/any/any.wsdl | 50 --- ruby_1_8_5/test/wsdl/any/expectedDriver.rb | 54 --- ruby_1_8_5/test/wsdl/any/expectedEcho.rb | 14 - ruby_1_8_5/test/wsdl/any/expectedService.rb | 52 --- ruby_1_8_5/test/wsdl/any/test_any.rb | 58 --- ruby_1_8_5/test/wsdl/axisArray/axisArray.wsdl | 60 --- ruby_1_8_5/test/wsdl/axisArray/itemList.rb | 27 -- ruby_1_8_5/test/wsdl/axisArray/test_axisarray.rb | 69 ---- ruby_1_8_5/test/wsdl/datetime/DatetimeService.rb | 44 -- ruby_1_8_5/test/wsdl/datetime/datetime.rb | 0 ruby_1_8_5/test/wsdl/datetime/datetime.wsdl | 45 -- ruby_1_8_5/test/wsdl/datetime/datetimeServant.rb | 21 - ruby_1_8_5/test/wsdl/datetime/test_datetime.rb | 82 ---- ruby_1_8_5/test/wsdl/document/document.wsdl | 74 ---- ruby_1_8_5/test/wsdl/document/echo.rb | 92 ----- ruby_1_8_5/test/wsdl/document/number.wsdl | 54 --- .../test/wsdl/document/ping_nosoapaction.wsdl | 66 --- ruby_1_8_5/test/wsdl/document/test_nosoapaction.rb | 109 ----- ruby_1_8_5/test/wsdl/document/test_number.rb | 99 ----- ruby_1_8_5/test/wsdl/document/test_rpc.rb | 177 -------- ruby_1_8_5/test/wsdl/emptycomplextype.wsdl | 31 -- ruby_1_8_5/test/wsdl/map/map.wsdl | 92 ----- ruby_1_8_5/test/wsdl/map/map.xml | 43 -- ruby_1_8_5/test/wsdl/map/test_map.rb | 99 ----- ruby_1_8_5/test/wsdl/marshal/person.wsdl | 21 - ruby_1_8_5/test/wsdl/marshal/person_org.rb | 22 - ruby_1_8_5/test/wsdl/marshal/test_wsdlmarshal.rb | 80 ---- ruby_1_8_5/test/wsdl/multiplefault.wsdl | 68 --- ruby_1_8_5/test/wsdl/qualified/lp.rb | 0 ruby_1_8_5/test/wsdl/qualified/lp.wsdl | 47 --- ruby_1_8_5/test/wsdl/qualified/lp.xsd | 26 -- ruby_1_8_5/test/wsdl/qualified/np.wsdl | 50 --- ruby_1_8_5/test/wsdl/qualified/test_qualified.rb | 154 ------- ruby_1_8_5/test/wsdl/qualified/test_unqualified.rb | 143 ------- ruby_1_8_5/test/wsdl/raa/RAA.rb | 243 ----------- ruby_1_8_5/test/wsdl/raa/RAAServant.rb | 99 ----- ruby_1_8_5/test/wsdl/raa/RAAService.rb | 100 ----- ruby_1_8_5/test/wsdl/raa/README.txt | 8 - ruby_1_8_5/test/wsdl/raa/raa.wsdl | 264 ------------ ruby_1_8_5/test/wsdl/raa/server.rb | 103 ----- ruby_1_8_5/test/wsdl/raa/test_raa.rb | 71 ---- ruby_1_8_5/test/wsdl/ref/expectedProduct.rb | 90 ---- ruby_1_8_5/test/wsdl/ref/product.wsdl | 86 ---- ruby_1_8_5/test/wsdl/ref/test_ref.rb | 54 --- ruby_1_8_5/test/wsdl/rpc/echoDriver.rb | 55 --- ruby_1_8_5/test/wsdl/rpc/echo_serviceClient.rb | 23 -- ruby_1_8_5/test/wsdl/rpc/rpc.wsdl | 75 ---- ruby_1_8_5/test/wsdl/rpc/test-rpc-lit.wsdl | 364 ----------------- ruby_1_8_5/test/wsdl/rpc/test-rpc-lit12.wsdl | 455 --------------------- ruby_1_8_5/test/wsdl/rpc/test_rpc.rb | 118 ------ ruby_1_8_5/test/wsdl/rpc/test_rpc_lit.rb | 399 ------------------ .../test/wsdl/simpletype/rpc/expectedClient.rb | 34 -- .../test/wsdl/simpletype/rpc/expectedDriver.rb | 62 --- .../wsdl/simpletype/rpc/expectedEchoVersion.rb | 23 -- .../test/wsdl/simpletype/rpc/expectedServant.rb | 32 -- .../test/wsdl/simpletype/rpc/expectedService.rb | 60 --- ruby_1_8_5/test/wsdl/simpletype/rpc/rpc.wsdl | 80 ---- ruby_1_8_5/test/wsdl/simpletype/rpc/test_rpc.rb | 62 --- ruby_1_8_5/test/wsdl/simpletype/simpletype.wsdl | 95 ----- ruby_1_8_5/test/wsdl/simpletype/test_simpletype.rb | 99 ----- ruby_1_8_5/test/wsdl/soap/soapbodyparts.wsdl | 103 ----- ruby_1_8_5/test/wsdl/soap/test_soapbodyparts.rb | 79 ---- ruby_1_8_5/test/wsdl/test_emptycomplextype.rb | 21 - ruby_1_8_5/test/wsdl/test_fault.rb | 51 --- ruby_1_8_5/test/wsdl/test_multiplefault.rb | 39 -- 65 files changed, 5570 deletions(-) delete mode 100644 ruby_1_8_5/test/wsdl/any/any.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/any/expectedDriver.rb delete mode 100644 ruby_1_8_5/test/wsdl/any/expectedEcho.rb delete mode 100644 ruby_1_8_5/test/wsdl/any/expectedService.rb delete mode 100644 ruby_1_8_5/test/wsdl/any/test_any.rb delete mode 100644 ruby_1_8_5/test/wsdl/axisArray/axisArray.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/axisArray/itemList.rb delete mode 100644 ruby_1_8_5/test/wsdl/axisArray/test_axisarray.rb delete mode 100644 ruby_1_8_5/test/wsdl/datetime/DatetimeService.rb delete mode 100644 ruby_1_8_5/test/wsdl/datetime/datetime.rb delete mode 100644 ruby_1_8_5/test/wsdl/datetime/datetime.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/datetime/datetimeServant.rb delete mode 100644 ruby_1_8_5/test/wsdl/datetime/test_datetime.rb delete mode 100644 ruby_1_8_5/test/wsdl/document/document.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/document/echo.rb delete mode 100644 ruby_1_8_5/test/wsdl/document/number.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/document/ping_nosoapaction.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/document/test_nosoapaction.rb delete mode 100644 ruby_1_8_5/test/wsdl/document/test_number.rb delete mode 100644 ruby_1_8_5/test/wsdl/document/test_rpc.rb delete mode 100644 ruby_1_8_5/test/wsdl/emptycomplextype.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/map/map.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/map/map.xml delete mode 100644 ruby_1_8_5/test/wsdl/map/test_map.rb delete mode 100644 ruby_1_8_5/test/wsdl/marshal/person.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/marshal/person_org.rb delete mode 100644 ruby_1_8_5/test/wsdl/marshal/test_wsdlmarshal.rb delete mode 100644 ruby_1_8_5/test/wsdl/multiplefault.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/qualified/lp.rb delete mode 100644 ruby_1_8_5/test/wsdl/qualified/lp.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/qualified/lp.xsd delete mode 100644 ruby_1_8_5/test/wsdl/qualified/np.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/qualified/test_qualified.rb delete mode 100644 ruby_1_8_5/test/wsdl/qualified/test_unqualified.rb delete mode 100644 ruby_1_8_5/test/wsdl/raa/RAA.rb delete mode 100644 ruby_1_8_5/test/wsdl/raa/RAAServant.rb delete mode 100644 ruby_1_8_5/test/wsdl/raa/RAAService.rb delete mode 100644 ruby_1_8_5/test/wsdl/raa/README.txt delete mode 100644 ruby_1_8_5/test/wsdl/raa/raa.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/raa/server.rb delete mode 100644 ruby_1_8_5/test/wsdl/raa/test_raa.rb delete mode 100644 ruby_1_8_5/test/wsdl/ref/expectedProduct.rb delete mode 100644 ruby_1_8_5/test/wsdl/ref/product.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/ref/test_ref.rb delete mode 100644 ruby_1_8_5/test/wsdl/rpc/echoDriver.rb delete mode 100644 ruby_1_8_5/test/wsdl/rpc/echo_serviceClient.rb delete mode 100644 ruby_1_8_5/test/wsdl/rpc/rpc.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/rpc/test-rpc-lit.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/rpc/test-rpc-lit12.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/rpc/test_rpc.rb delete mode 100644 ruby_1_8_5/test/wsdl/rpc/test_rpc_lit.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/expectedClient.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/expectedDriver.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/expectedEchoVersion.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/expectedServant.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/expectedService.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/rpc.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/rpc/test_rpc.rb delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/simpletype.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/simpletype/test_simpletype.rb delete mode 100644 ruby_1_8_5/test/wsdl/soap/soapbodyparts.wsdl delete mode 100644 ruby_1_8_5/test/wsdl/soap/test_soapbodyparts.rb delete mode 100644 ruby_1_8_5/test/wsdl/test_emptycomplextype.rb delete mode 100644 ruby_1_8_5/test/wsdl/test_fault.rb delete mode 100644 ruby_1_8_5/test/wsdl/test_multiplefault.rb (limited to 'ruby_1_8_5/test/wsdl') diff --git a/ruby_1_8_5/test/wsdl/any/any.wsdl b/ruby_1_8_5/test/wsdl/any/any.wsdl deleted file mode 100644 index 4d1f73a8cd..0000000000 --- a/ruby_1_8_5/test/wsdl/any/any.wsdl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/any/expectedDriver.rb b/ruby_1_8_5/test/wsdl/any/expectedDriver.rb deleted file mode 100644 index 6d1827fb94..0000000000 --- a/ruby_1_8_5/test/wsdl/any/expectedDriver.rb +++ /dev/null @@ -1,54 +0,0 @@ -require 'echo.rb' - -require 'soap/rpc/driver' - -class Echo_port_type < ::SOAP::RPC::Driver - DefaultEndpointUrl = "http://localhost:10080" - MappingRegistry = ::SOAP::Mapping::Registry.new - - MappingRegistry.set( - FooBar, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("urn:example.com:echo-type", "foo.bar") } - ) - - Methods = [ - [ XSD::QName.new("urn:example.com:echo", "echo"), - "urn:example.com:echo", - "echo", - [ ["in", "echoitem", ["FooBar", "urn:example.com:echo-type", "foo.bar"]], - ["retval", "echoitem", ["FooBar", "urn:example.com:echo-type", "foo.bar"]] ], - { :request_style => :rpc, :request_use => :encoded, - :response_style => :rpc, :response_use => :encoded } - ] - ] - - def initialize(endpoint_url = nil) - endpoint_url ||= DefaultEndpointUrl - super(endpoint_url, nil) - self.mapping_registry = MappingRegistry - init_methods - end - -private - - def init_methods - Methods.each do |definitions| - opt = definitions.last - if opt[:request_style] == :document - add_document_operation(*definitions) - else - add_rpc_operation(*definitions) - qname = definitions[0] - name = definitions[2] - if qname.name != name and qname.name.capitalize == name.capitalize - ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| - __send__(name, *arg) - end - end - end - end - end -end - diff --git a/ruby_1_8_5/test/wsdl/any/expectedEcho.rb b/ruby_1_8_5/test/wsdl/any/expectedEcho.rb deleted file mode 100644 index 456950dfef..0000000000 --- a/ruby_1_8_5/test/wsdl/any/expectedEcho.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'xsd/qname' - -# {urn:example.com:echo-type}foo.bar -class FooBar - @@schema_type = "foo.bar" - @@schema_ns = "urn:example.com:echo-type" - @@schema_element = [["any", [nil, XSD::QName.new(nil, "any")]]] - - attr_accessor :any - - def initialize(any = nil) - @any = any - end -end diff --git a/ruby_1_8_5/test/wsdl/any/expectedService.rb b/ruby_1_8_5/test/wsdl/any/expectedService.rb deleted file mode 100644 index e3885e7c6c..0000000000 --- a/ruby_1_8_5/test/wsdl/any/expectedService.rb +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env ruby -require 'echoServant.rb' - -require 'soap/rpc/standaloneServer' -require 'soap/mapping/registry' - -class Echo_port_type - MappingRegistry = ::SOAP::Mapping::Registry.new - - MappingRegistry.set( - FooBar, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("urn:example.com:echo-type", "foo.bar") } - ) - - Methods = [ - [ XSD::QName.new("urn:example.com:echo", "echo"), - "urn:example.com:echo", - "echo", - [ ["in", "echoitem", ["FooBar", "urn:example.com:echo-type", "foo.bar"]], - ["retval", "echoitem", ["FooBar", "urn:example.com:echo-type", "foo.bar"]] ], - { :request_style => :rpc, :request_use => :encoded, - :response_style => :rpc, :response_use => :encoded } - ] - ] -end - -class Echo_port_typeApp < ::SOAP::RPC::StandaloneServer - def initialize(*arg) - super(*arg) - servant = Echo_port_type.new - Echo_port_type::Methods.each do |definitions| - opt = definitions.last - if opt[:request_style] == :document - @router.add_document_operation(servant, *definitions) - else - @router.add_rpc_operation(servant, *definitions) - end - end - self.mapping_registry = Echo_port_type::MappingRegistry - end -end - -if $0 == __FILE__ - # Change listen port. - server = Echo_port_typeApp.new('app', nil, '0.0.0.0', 10080) - trap(:INT) do - server.shutdown - end - server.start -end diff --git a/ruby_1_8_5/test/wsdl/any/test_any.rb b/ruby_1_8_5/test/wsdl/any/test_any.rb deleted file mode 100644 index aab5eb631f..0000000000 --- a/ruby_1_8_5/test/wsdl/any/test_any.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/wsdl2ruby' -module WSDL; module Any - - -class TestAny < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - def pathname(filename) - File.join(DIR, filename) - end - - def test_any - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("any.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['driver'] = nil - gen.opt['client_skelton'] = nil - gen.opt['servant_skelton'] = nil - gen.opt['standalone_server_stub'] = nil - gen.opt['force'] = true - suppress_warning do - gen.run - end - compare("expectedDriver.rb", "echoDriver.rb") - compare("expectedEcho.rb", "echo.rb") - compare("expectedService.rb", "echo_service.rb") - - File.unlink(pathname("echo_service.rb")) - File.unlink(pathname("echo.rb")) - File.unlink(pathname("echo_serviceClient.rb")) - File.unlink(pathname("echoDriver.rb")) - File.unlink(pathname("echoServant.rb")) - end - - def compare(expected, actual) - assert_equal(loadfile(expected), loadfile(actual), actual) - end - - def loadfile(file) - File.open(pathname(file)) { |f| f.read } - end - - def suppress_warning - back = $VERBOSE - $VERBOSE = nil - begin - yield - ensure - $VERBOSE = back - end - end -end - - -end; end diff --git a/ruby_1_8_5/test/wsdl/axisArray/axisArray.wsdl b/ruby_1_8_5/test/wsdl/axisArray/axisArray.wsdl deleted file mode 100644 index 3602edb748..0000000000 --- a/ruby_1_8_5/test/wsdl/axisArray/axisArray.wsdl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/axisArray/itemList.rb b/ruby_1_8_5/test/wsdl/axisArray/itemList.rb deleted file mode 100644 index b81297ed37..0000000000 --- a/ruby_1_8_5/test/wsdl/axisArray/itemList.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Generated by wsdl2ruby.rb with axisArray.wsdl. - -# urn:jp.gr.jin.rrr.example.itemListType -class Item - @@schema_type = "Item" - @@schema_ns = "urn:jp.gr.jin.rrr.example.itemListType" - - def name - @name - end - - def name=(value) - @name = value - end - - def initialize(name = nil) - @name = name - end -end - -# urn:jp.gr.jin.rrr.example.itemListType -class ItemList < Array - # Contents type should be dumped here... - @@schema_type = "ItemList" - @@schema_ns = "urn:jp.gr.jin.rrr.example.itemListType" -end - diff --git a/ruby_1_8_5/test/wsdl/axisArray/test_axisarray.rb b/ruby_1_8_5/test/wsdl/axisArray/test_axisarray.rb deleted file mode 100644 index 9f220bb48a..0000000000 --- a/ruby_1_8_5/test/wsdl/axisArray/test_axisarray.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'test/unit' -require 'soap/processor' -require 'soap/mapping' -require 'soap/rpc/element' -require 'wsdl/importer' -require 'itemList.rb' - - -module WSDL - - -class TestAxisArray < Test::Unit::TestCase - def setup - @xml =<<__EOX__ - - - - - - - - - - - - - name3 - - - name1 - - - name2 - - - -__EOX__ - end - - def test_by_stub - header, body = ::SOAP::Processor.unmarshal(@xml) - ary = ::SOAP::Mapping.soap2obj(body.response) - assert_equal(3, ary.size) - assert_equal("name1", ary[0].name) - assert_equal("name2", ary[1].name) - assert_equal("name3", ary[2].name) - end - - def test_by_wsdl - wsdlfile = File.join(File.dirname(File.expand_path(__FILE__)), 'axisArray.wsdl') - wsdl = WSDL::Importer.import(wsdlfile) - service = wsdl.services[0] - port = service.ports[0] - wsdl_types = wsdl.collect_complextypes - rpc_decode_typemap = wsdl_types + wsdl.soap_rpc_complextypes(port.find_binding) - opt = {} - opt[:default_encodingstyle] = ::SOAP::EncodingNamespace - opt[:decode_typemap] = rpc_decode_typemap - header, body = ::SOAP::Processor.unmarshal(@xml, opt) - ary = ::SOAP::Mapping.soap2obj(body.response) - assert_equal(3, ary.size) - assert_equal("name1", ary[0].name) - assert_equal("name2", ary[1].name) - assert_equal("name3", ary[2].name) - end -end - - -end diff --git a/ruby_1_8_5/test/wsdl/datetime/DatetimeService.rb b/ruby_1_8_5/test/wsdl/datetime/DatetimeService.rb deleted file mode 100644 index 800e06d66f..0000000000 --- a/ruby_1_8_5/test/wsdl/datetime/DatetimeService.rb +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env ruby -require 'datetimeServant.rb' - -require 'soap/rpc/standaloneServer' -require 'soap/mapping/registry' - -class DatetimePortType - MappingRegistry = ::SOAP::Mapping::Registry.new - - Methods = [ - ["now", "now", - [ - ["in", "now", [::SOAP::SOAPDateTime]], - ["retval", "now", [::SOAP::SOAPDateTime]] - ], - "", "urn:jp.gr.jin.rrr.example.datetime", :rpc - ] - ] -end - -class DatetimePortTypeApp < ::SOAP::RPC::StandaloneServer - def initialize(*arg) - super(*arg) - servant = DatetimePortType.new - DatetimePortType::Methods.each do |name_as, name, param_def, soapaction, namespace, style| - if style == :document - @router.add_document_operation(servant, soapaction, name, param_def) - else - qname = XSD::QName.new(namespace, name_as) - @router.add_rpc_operation(servant, qname, soapaction, name, param_def) - end - end - self.mapping_registry = DatetimePortType::MappingRegistry - end -end - -if $0 == __FILE__ - # Change listen port. - server = DatetimePortTypeApp.new('app', nil, '0.0.0.0', 10080) - trap(:INT) do - server.shutdown - end - server.start -end diff --git a/ruby_1_8_5/test/wsdl/datetime/datetime.rb b/ruby_1_8_5/test/wsdl/datetime/datetime.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ruby_1_8_5/test/wsdl/datetime/datetime.wsdl b/ruby_1_8_5/test/wsdl/datetime/datetime.wsdl deleted file mode 100644 index 4998dc48d6..0000000000 --- a/ruby_1_8_5/test/wsdl/datetime/datetime.wsdl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/datetime/datetimeServant.rb b/ruby_1_8_5/test/wsdl/datetime/datetimeServant.rb deleted file mode 100644 index 14145c42e5..0000000000 --- a/ruby_1_8_5/test/wsdl/datetime/datetimeServant.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'datetime.rb' - -class DatetimePortType - # SYNOPSIS - # now(now) - # - # ARGS - # now - {http://www.w3.org/2001/XMLSchema}dateTime - # - # RETURNS - # now - {http://www.w3.org/2001/XMLSchema}dateTime - # - # RAISES - # (undefined) - # - def now(now) - #raise NotImplementedError.new - now + 1 - end -end - diff --git a/ruby_1_8_5/test/wsdl/datetime/test_datetime.rb b/ruby_1_8_5/test/wsdl/datetime/test_datetime.rb deleted file mode 100644 index 7652318205..0000000000 --- a/ruby_1_8_5/test/wsdl/datetime/test_datetime.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'test/unit' -require 'soap/wsdlDriver' -require 'DatetimeService.rb' - - -module WSDL -module Datetime - - -class TestDatetime < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_client - end - - def setup_server - @server = DatetimePortTypeApp.new('Datetime server', nil, '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @t = Thread.new { - Thread.current.abort_on_exception = true - @server.start - } - end - - def setup_client - wsdl = File.join(DIR, 'datetime.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.generate_explicit_type = true - @client.wiredump_dev = STDOUT if $DEBUG - end - - def teardown - teardown_server - teardown_client - end - - def teardown_server - @server.shutdown - @t.kill - @t.join - end - - def teardown_client - @client.reset_stream - end - - def test_datetime - d = DateTime.now - d1 = d + 1 - d2 = @client.now(d) - assert_equal(d1.year, d2.year) - assert_equal(d1.month, d2.month) - assert_equal(d1.day, d2.day) - assert_equal(d1.hour, d2.hour) - assert_equal(d1.min, d2.min) - assert_equal(d1.sec, d2.sec) - assert_equal(d1.sec, d2.sec) - end - - def test_time - d = DateTime.now - t = Time.gm(d.year, d.month, d.day, d.hour, d.min, d.sec) - d1 = d + 1 - d2 = @client.now(t) - assert_equal(d1.year, d2.year) - assert_equal(d1.month, d2.month) - assert_equal(d1.day, d2.day) - assert_equal(d1.hour, d2.hour) - assert_equal(d1.min, d2.min) - assert_equal(d1.sec, d2.sec) - assert_equal(d1.sec, d2.sec) - end -end - - -end -end diff --git a/ruby_1_8_5/test/wsdl/document/document.wsdl b/ruby_1_8_5/test/wsdl/document/document.wsdl deleted file mode 100644 index fbf03fae8b..0000000000 --- a/ruby_1_8_5/test/wsdl/document/document.wsdl +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/document/echo.rb b/ruby_1_8_5/test/wsdl/document/echo.rb deleted file mode 100644 index c6df75aca0..0000000000 --- a/ruby_1_8_5/test/wsdl/document/echo.rb +++ /dev/null @@ -1,92 +0,0 @@ -require 'xsd/qname' - -# {urn:docrpc}echoele -class Echoele - @@schema_type = "echoele" - @@schema_ns = "urn:docrpc" - @@schema_attribute = {XSD::QName.new(nil, "attr_string") => "SOAP::SOAPString", XSD::QName.new(nil, "attr-int") => "SOAP::SOAPInt"} - @@schema_element = [["struct1", ["Echo_struct", XSD::QName.new(nil, "struct1")]], ["struct_2", ["Echo_struct", XSD::QName.new(nil, "struct-2")]]] - - attr_accessor :struct1 - attr_accessor :struct_2 - - def xmlattr_attr_string - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr_string")] - end - - def xmlattr_attr_string=(value) - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr_string")] = value - end - - def xmlattr_attr_int - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr-int")] - end - - def xmlattr_attr_int=(value) - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr-int")] = value - end - - def initialize(struct1 = nil, struct_2 = nil) - @struct1 = struct1 - @struct_2 = struct_2 - @__xmlattr = {} - end -end - -# {urn:docrpc}echo_response -class Echo_response - @@schema_type = "echo_response" - @@schema_ns = "urn:docrpc" - @@schema_attribute = {XSD::QName.new(nil, "attr_string") => "SOAP::SOAPString", XSD::QName.new(nil, "attr-int") => "SOAP::SOAPInt"} - @@schema_element = [["struct1", ["Echo_struct", XSD::QName.new(nil, "struct1")]], ["struct_2", ["Echo_struct", XSD::QName.new(nil, "struct-2")]]] - - attr_accessor :struct1 - attr_accessor :struct_2 - - def xmlattr_attr_string - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr_string")] - end - - def xmlattr_attr_string=(value) - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr_string")] = value - end - - def xmlattr_attr_int - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr-int")] - end - - def xmlattr_attr_int=(value) - (@__xmlattr ||= {})[XSD::QName.new(nil, "attr-int")] = value - end - - def initialize(struct1 = nil, struct_2 = nil) - @struct1 = struct1 - @struct_2 = struct_2 - @__xmlattr = {} - end -end - -# {urn:docrpc}echo_struct -class Echo_struct - @@schema_type = "echo_struct" - @@schema_ns = "urn:docrpc" - @@schema_attribute = {XSD::QName.new(nil, "m_attr") => "SOAP::SOAPString"} - @@schema_element = [["m_string", ["SOAP::SOAPString", XSD::QName.new(nil, "m_string")]], ["m_datetime", ["SOAP::SOAPDateTime", XSD::QName.new(nil, "m_datetime")]]] - - attr_accessor :m_string - attr_accessor :m_datetime - - def xmlattr_m_attr - (@__xmlattr ||= {})[XSD::QName.new(nil, "m_attr")] - end - - def xmlattr_m_attr=(value) - (@__xmlattr ||= {})[XSD::QName.new(nil, "m_attr")] = value - end - - def initialize(m_string = nil, m_datetime = nil) - @m_string = m_string - @m_datetime = m_datetime - @__xmlattr = {} - end -end diff --git a/ruby_1_8_5/test/wsdl/document/number.wsdl b/ruby_1_8_5/test/wsdl/document/number.wsdl deleted file mode 100644 index cc3dd8e9f0..0000000000 --- a/ruby_1_8_5/test/wsdl/document/number.wsdl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/document/ping_nosoapaction.wsdl b/ruby_1_8_5/test/wsdl/document/ping_nosoapaction.wsdl deleted file mode 100644 index ab9529e456..0000000000 --- a/ruby_1_8_5/test/wsdl/document/ping_nosoapaction.wsdl +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/document/test_nosoapaction.rb b/ruby_1_8_5/test/wsdl/document/test_nosoapaction.rb deleted file mode 100644 index 77f642fe1b..0000000000 --- a/ruby_1_8_5/test/wsdl/document/test_nosoapaction.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' -require 'soap/rpc/driver' - - -module WSDL; module Document - - -class TestNoSOAPAction < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - Namespace = 'http://xmlsoap.org/Ping' - - def on_init - add_document_method( - self, - Namespace + '/ping', - 'ping_with_soapaction', - XSD::QName.new(Namespace, 'Ping'), - XSD::QName.new(Namespace, 'PingResponse') - ) - - add_document_method( - self, - nil, - 'ping', - XSD::QName.new(Namespace, 'Ping'), - XSD::QName.new(Namespace, 'PingResponse') - ) - - # When no SOAPAction given, latter method(ping) is called. - end - - def ping(arg) - arg.text = 'ping' - arg - end - - def ping_with_soapaction(arg) - arg.text = 'ping_with_soapaction' - arg - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - @client = nil - end - - def teardown - teardown_server - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', Server::Namespace, '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def test_with_soapaction - wsdl = File.join(DIR, 'ping_nosoapaction.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = STDOUT if $DEBUG - rv = @client.ping(:scenario => 'scenario', :origin => 'origin', - :text => 'text') - assert_equal('scenario', rv.scenario) - assert_equal('origin', rv.origin) - assert_equal('ping', rv.text) - end - - def test_without_soapaction - @client = ::SOAP::RPC::Driver.new("http://localhost:#{Port}/", - Server::Namespace) - @client.add_document_method('ping', Server::Namespace + '/ping', - XSD::QName.new(Server::Namespace, 'Ping'), - XSD::QName.new(Server::Namespace, 'PingResponse')) - @client.wiredump_dev = STDOUT if $DEBUG - rv = @client.ping(:scenario => 'scenario', :origin => 'origin', - :text => 'text') - assert_equal('scenario', rv.scenario) - assert_equal('origin', rv.origin) - assert_equal('ping_with_soapaction', rv.text) - end -end - - -end; end diff --git a/ruby_1_8_5/test/wsdl/document/test_number.rb b/ruby_1_8_5/test/wsdl/document/test_number.rb deleted file mode 100644 index a640ef2a25..0000000000 --- a/ruby_1_8_5/test/wsdl/document/test_number.rb +++ /dev/null @@ -1,99 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - - -module WSDL; module Document - - -class TestNumber < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - Namespace = 'urn:foo' - - def on_init - add_document_method( - self, - Namespace + ':get_foo', - 'get_foo', - XSD::QName.new(Namespace, 'get_foo'), - XSD::QName.new(Namespace, 'get_foo_response') - ) - end - - def get_foo(arg) - arg.number - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - Port = 17171 - - def setup - setup_server - setup_classdef - @client = nil - end - - def teardown - teardown_server - File.unlink(pathname('foo.rb')) - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', "urn:rpc", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_classdef - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("number.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['force'] = true - gen.run - require pathname('foo') - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def pathname(filename) - File.join(DIR, filename) - end - - def test_wsdl - wsdl = File.join(DIR, 'number.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = STDOUT if $DEBUG - - # with the Struct defined in foo.rb, which is generated from WSDL - assert_equal("12345", @client.get_foo(Get_foo.new("12345"))) - - # with Hash - assert_equal("12345", @client.get_foo({:number => "12345"})) - - # with Original struct - get_foo_struct = Struct.new(:number) - assert_equal("12345", @client.get_foo(get_foo_struct.new("12345"))) - end -end - - -end; end diff --git a/ruby_1_8_5/test/wsdl/document/test_rpc.rb b/ruby_1_8_5/test/wsdl/document/test_rpc.rb deleted file mode 100644 index 56cd0677ad..0000000000 --- a/ruby_1_8_5/test/wsdl/document/test_rpc.rb +++ /dev/null @@ -1,177 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - - -module WSDL; module Document - - -class TestRPC < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - Namespace = 'urn:docrpc' - - def on_init - add_document_method( - self, - Namespace + ':echo', - 'echo', - XSD::QName.new(Namespace, 'echo'), - XSD::QName.new(Namespace, 'echo_response') - ) - end - - def echo(arg) - if arg.is_a?(Echoele) - # swap args - tmp = arg.struct1 - arg.struct1 = arg.struct_2 - arg.struct_2 = tmp - arg - else - # swap args - tmp = arg["struct1"] - arg["struct1"] = arg["struct-2"] - arg["struct-2"] = tmp - arg - end - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_classdef - @client = nil - end - - def teardown - teardown_server - #File.unlink(pathname('echo.rb')) - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', "urn:rpc", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_classdef - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("document.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['force'] = true - gen.run - require pathname('echo') - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def pathname(filename) - File.join(DIR, filename) - end - - def test_wsdl - wsdl = File.join(DIR, 'document.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = STDOUT if $DEBUG - - struct1 = Echo_struct.new("mystring1", now1 = Time.now) - struct1.xmlattr_m_attr = 'myattr1' - struct2 = Echo_struct.new("mystring2", now2 = Time.now) - struct2.xmlattr_m_attr = 'myattr2' - echo = Echoele.new(struct1, struct2) - echo.xmlattr_attr_string = 'attr_string' - echo.xmlattr_attr_int = 5 - ret = @client.echo(echo) - - # struct#m_datetime in a response is a DateTime even though - # struct#m_datetime in a request is a Time. - timeformat = "%Y-%m-%dT%H:%M:%S" - assert_equal("mystring2", ret.struct1.m_string) - assert_equal(now2.strftime(timeformat), - date2time(ret.struct1.m_datetime).strftime(timeformat)) - assert_equal("mystring1", ret.struct_2.m_string) - assert_equal(now1.strftime(timeformat), - date2time(ret.struct_2.m_datetime).strftime(timeformat)) - assert_equal("attr_string", ret.xmlattr_attr_string) - assert_equal(5, ret.xmlattr_attr_int) - end - - def date2time(date) - if date.respond_to?(:to_time) - date.to_time - else - d = date.new_offset(0) - d.instance_eval { - Time.utc(year, mon, mday, hour, min, sec, - (sec_fraction * 86400000000).to_i) - }.getlocal - end - end - - include ::SOAP - def test_naive - @client = ::SOAP::RPC::Driver.new("http://localhost:#{Port}/") - @client.add_document_method('echo', 'urn:docrpc:echo', - XSD::QName.new('urn:docrpc', 'echoele'), - XSD::QName.new('urn:docrpc', 'echo_response')) - @client.wiredump_dev = STDOUT if $DEBUG - - echo = SOAPElement.new('foo') - echo.extraattr['attr_string'] = 'attr_string' - echo.extraattr['attr-int'] = 5 - echo.add(struct1 = SOAPElement.new('struct1')) - struct1.add(SOAPElement.new('m_string', 'mystring1')) - struct1.add(SOAPElement.new('m_datetime', '2005-03-17T19:47:31+01:00')) - struct1.extraattr['m_attr'] = 'myattr1' - echo.add(struct2 = SOAPElement.new('struct-2')) - struct2.add(SOAPElement.new('m_string', 'mystring2')) - struct2.add(SOAPElement.new('m_datetime', '2005-03-17T19:47:32+02:00')) - struct2.extraattr['m_attr'] = 'myattr2' - ret = @client.echo(echo) - timeformat = "%Y-%m-%dT%H:%M:%S" - assert_equal('mystring2', ret.struct1.m_string) - assert_equal('2005-03-17T19:47:32', - ret.struct1.m_datetime.strftime(timeformat)) - assert_equal("mystring1", ret.struct_2.m_string) - assert_equal('2005-03-17T19:47:31', - ret.struct_2.m_datetime.strftime(timeformat)) - assert_equal('attr_string', ret.xmlattr_attr_string) - assert_equal(5, ret.xmlattr_attr_int) - - echo = {'struct1' => {'m_string' => 'mystring1', 'm_datetime' => '2005-03-17T19:47:31+01:00'}, - 'struct-2' => {'m_string' => 'mystring2', 'm_datetime' => '2005-03-17T19:47:32+02:00'}} - ret = @client.echo(echo) - timeformat = "%Y-%m-%dT%H:%M:%S" - assert_equal('mystring2', ret.struct1.m_string) - assert_equal('2005-03-17T19:47:32', - ret.struct1.m_datetime.strftime(timeformat)) - assert_equal("mystring1", ret.struct_2.m_string) - assert_equal('2005-03-17T19:47:31', - ret.struct_2.m_datetime.strftime(timeformat)) - end -end - - -end; end diff --git a/ruby_1_8_5/test/wsdl/emptycomplextype.wsdl b/ruby_1_8_5/test/wsdl/emptycomplextype.wsdl deleted file mode 100644 index 4f8dc4849c..0000000000 --- a/ruby_1_8_5/test/wsdl/emptycomplextype.wsdl +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/map/map.wsdl b/ruby_1_8_5/test/wsdl/map/map.wsdl deleted file mode 100644 index e418a4cbbd..0000000000 --- a/ruby_1_8_5/test/wsdl/map/map.wsdl +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/map/map.xml b/ruby_1_8_5/test/wsdl/map/map.xml deleted file mode 100644 index 7106735ffc..0000000000 --- a/ruby_1_8_5/test/wsdl/map/map.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - a - - - a1 - - a1 - - - - a2 - - a2 - - - - - - b - - - b1 - - b1 - - - - b2 - - b2 - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/map/test_map.rb b/ruby_1_8_5/test/wsdl/map/test_map.rb deleted file mode 100644 index 68f7d76e05..0000000000 --- a/ruby_1_8_5/test/wsdl/map/test_map.rb +++ /dev/null @@ -1,99 +0,0 @@ -require 'test/unit' -require 'soap/rpc/httpserver' -require 'soap/wsdlDriver' - - -module WSDL - - -class TestMap < Test::Unit::TestCase - Port = 17171 - DIR = File.dirname(File.expand_path(__FILE__)) - - class Server < ::SOAP::RPC::HTTPServer - def on_init - add_method(self, 'map') - add_method(self, 'map2', 'arg') - end - - def map - {1 => "a", 2 => "b"} - end - - def map2(arg) - arg - end - end - - def setup - setup_server - setup_client - end - - def setup_server - @server = Server.new( - :BindAddress => "0.0.0.0", - :Port => Port, - :AccessLog => [], - :SOAPDefaultNamespace => "urn:map" - ) - @server.level = Logger::Severity::ERROR - @t = Thread.new { - Thread.current.abort_on_exception = true - @server.start - } - end - - def setup_client - wsdl = File.join(DIR, 'map.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.generate_explicit_type = true - @client.wiredump_dev = STDOUT if $DEBUG - end - - def teardown - teardown_server - teardown_client - end - - def teardown_server - @server.shutdown - @t.kill - @t.join - end - - def teardown_client - @client.reset_stream - end - - def test_by_wsdl - dir = File.dirname(File.expand_path(__FILE__)) - wsdlfile = File.join(dir, 'map.wsdl') - xml = File.open(File.join(dir, 'map.xml')) { |f| f.read } - wsdl = WSDL::Importer.import(wsdlfile) - service = wsdl.services[0] - port = service.ports[0] - wsdl_types = wsdl.collect_complextypes - rpc_decode_typemap = wsdl_types + wsdl.soap_rpc_complextypes(port.find_binding) - opt = {} - opt[:default_encodingstyle] = ::SOAP::EncodingNamespace - opt[:decode_typemap] = rpc_decode_typemap - header, body = ::SOAP::Processor.unmarshal(xml, opt) - map = ::SOAP::Mapping.soap2obj(body.response) - assert_equal(["a1"], map["a"]["a1"]) - assert_equal(["a2"], map["a"]["a2"]) - assert_equal(["b1"], map["b"]["b1"]) - assert_equal(["b2"], map["b"]["b2"]) - end - - def test_wsdldriver - assert_equal({1 => "a", 2 => "b"}, @client.map) - assert_equal({1 => 2}, @client.map2({1 => 2})) - assert_equal({1 => {2 => 3}}, @client.map2({1 => {2 => 3}})) - assert_equal({["a", 2] => {2 => 3}}, @client.map2({["a", 2] => {2 => 3}})) - end -end - - -end diff --git a/ruby_1_8_5/test/wsdl/marshal/person.wsdl b/ruby_1_8_5/test/wsdl/marshal/person.wsdl deleted file mode 100644 index 6ea8a04825..0000000000 --- a/ruby_1_8_5/test/wsdl/marshal/person.wsdl +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/marshal/person_org.rb b/ruby_1_8_5/test/wsdl/marshal/person_org.rb deleted file mode 100644 index f8c0e0db76..0000000000 --- a/ruby_1_8_5/test/wsdl/marshal/person_org.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'xsd/qname' - -# {http://www.jin.gr.jp/~nahi/xmlns/sample/Person}Person -class Person - @@schema_type = "Person" - @@schema_ns = "http://www.jin.gr.jp/~nahi/xmlns/sample/Person" - @@schema_element = [["familyname", ["SOAP::SOAPString", XSD::QName.new(nil, "familyname")]], ["givenname", ["SOAP::SOAPString", XSD::QName.new(nil, "givenname")]], ["var1", ["SOAP::SOAPInt", XSD::QName.new(nil, "var1")]], ["var2", ["SOAP::SOAPDouble", XSD::QName.new(nil, "var2")]], ["var3", ["SOAP::SOAPString", XSD::QName.new(nil, "var3")]]] - - attr_accessor :familyname - attr_accessor :givenname - attr_accessor :var1 - attr_accessor :var2 - attr_accessor :var3 - - def initialize(familyname = nil, givenname = nil, var1 = nil, var2 = nil, var3 = nil) - @familyname = familyname - @givenname = givenname - @var1 = var1 - @var2 = var2 - @var3 = var3 - end -end diff --git a/ruby_1_8_5/test/wsdl/marshal/test_wsdlmarshal.rb b/ruby_1_8_5/test/wsdl/marshal/test_wsdlmarshal.rb deleted file mode 100644 index cd2bdb198a..0000000000 --- a/ruby_1_8_5/test/wsdl/marshal/test_wsdlmarshal.rb +++ /dev/null @@ -1,80 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'soap/mapping/wsdlencodedregistry' -require 'soap/marshal' -require 'wsdl/soap/wsdl2ruby' - -class WSDLMarshaller - include SOAP - - def initialize(wsdlfile) - wsdl = WSDL::Parser.new.parse(File.open(wsdlfile) { |f| f.read }) - types = wsdl.collect_complextypes - @opt = { - :decode_typemap => types, - :generate_explicit_type => false, - :pretty => true - } - @mapping_registry = Mapping::WSDLEncodedRegistry.new(types) - end - - def dump(obj, io = nil) - type = Mapping.class2element(obj.class) - ele = Mapping.obj2soap(obj, @mapping_registry, type) - ele.elename = ele.type - Processor.marshal(SOAPEnvelope.new(nil, SOAPBody.new(ele)), @opt, io) - end - - def load(io) - header, body = Processor.unmarshal(io, @opt) - Mapping.soap2obj(body.root_node) - end -end - - -require File.join(File.dirname(__FILE__), 'person_org') - -class Person - def ==(rhs) - @familyname == rhs.familyname and @givenname == rhs.givenname and - @var1 == rhs.var1 and @var2 == rhs.var2 and @var3 == rhs.var3 - end -end - - -class TestWSDLMarshal < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - - def test_marshal - marshaller = WSDLMarshaller.new(pathname('person.wsdl')) - obj = Person.new("NAKAMURA", "Hiroshi", 1, 1.0, "1") - str = marshaller.dump(obj) - obj2 = marshaller.load(str) - assert_equal(obj, obj2) - assert_equal(str, marshaller.dump(obj2)) - end - - def test_classdef - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("person.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['force'] = true - gen.run - compare("person_org.rb", "Person.rb") - File.unlink(pathname('Person.rb')) - end - - def compare(expected, actual) - assert_equal(loadfile(expected), loadfile(actual), actual) - end - - def loadfile(file) - File.open(pathname(file)) { |f| f.read } - end - - def pathname(filename) - File.join(DIR, filename) - end -end diff --git a/ruby_1_8_5/test/wsdl/multiplefault.wsdl b/ruby_1_8_5/test/wsdl/multiplefault.wsdl deleted file mode 100644 index 2d928b60b0..0000000000 --- a/ruby_1_8_5/test/wsdl/multiplefault.wsdl +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/qualified/lp.rb b/ruby_1_8_5/test/wsdl/qualified/lp.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ruby_1_8_5/test/wsdl/qualified/lp.wsdl b/ruby_1_8_5/test/wsdl/qualified/lp.wsdl deleted file mode 100644 index b107b7b392..0000000000 --- a/ruby_1_8_5/test/wsdl/qualified/lp.wsdl +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/qualified/lp.xsd b/ruby_1_8_5/test/wsdl/qualified/lp.xsd deleted file mode 100644 index 12bcbd8cef..0000000000 --- a/ruby_1_8_5/test/wsdl/qualified/lp.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/qualified/np.wsdl b/ruby_1_8_5/test/wsdl/qualified/np.wsdl deleted file mode 100644 index e2b7253d0e..0000000000 --- a/ruby_1_8_5/test/wsdl/qualified/np.wsdl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ruby_1_8_5/test/wsdl/qualified/test_qualified.rb b/ruby_1_8_5/test/wsdl/qualified/test_qualified.rb deleted file mode 100644 index d6c1159a87..0000000000 --- a/ruby_1_8_5/test/wsdl/qualified/test_qualified.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'test/unit' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - -if defined?(HTTPAccess2) - -module WSDL - - -class TestQualified < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - Namespace = 'http://www50.brinkster.com/vbfacileinpt/np' - - def on_init - add_document_method( - self, - Namespace + '/GetPrimeNumbers', - 'GetPrimeNumbers', - XSD::QName.new(Namespace, 'GetPrimeNumbers'), - XSD::QName.new(Namespace, 'GetPrimeNumbersResponse') - ) - end - - def GetPrimeNumbers(arg) - nil - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - Port = 17171 - - def setup - setup_server - setup_clientdef - @client = nil - end - - def teardown - teardown_server - unless $DEBUG - File.unlink(pathname('default.rb')) - File.unlink(pathname('defaultDriver.rb')) - end - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', "urn:lp", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_clientdef - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("np.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['driver'] = nil - gen.opt['force'] = true - gen.run - require pathname('default.rb') - ensure - Dir.chdir(backupdir) - end - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def pathname(filename) - File.join(DIR, filename) - end - - LOGIN_REQUEST_QUALIFIED_NS = -%q[ - - - - 10 - - -] - - LOGIN_REQUEST_QUALIFIED = -%q[ - - - - 10 - - -] - - def test_wsdl - wsdl = File.join(DIR, 'np.wsdl') - @client = nil - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - ensure - Dir.chdir(backupdir) - end - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = str = '' - @client.GetPrimeNumbers(:Max => 10) - assert_equal(LOGIN_REQUEST_QUALIFIED_NS, parse_requestxml(str)) - end - - include ::SOAP - def test_naive - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - require pathname('defaultDriver') - ensure - Dir.chdir(backupdir) - end - @client = PnumSoap.new("http://localhost:#{Port}/") - - @client.wiredump_dev = str = '' - @client.getPrimeNumbers(GetPrimeNumbers.new(10)) - assert_equal(LOGIN_REQUEST_QUALIFIED, parse_requestxml(str)) - end - - def parse_requestxml(str) - str.split(/\r?\n\r?\n/)[3] - end -end - - -end - -end diff --git a/ruby_1_8_5/test/wsdl/qualified/test_unqualified.rb b/ruby_1_8_5/test/wsdl/qualified/test_unqualified.rb deleted file mode 100644 index bcfed73e58..0000000000 --- a/ruby_1_8_5/test/wsdl/qualified/test_unqualified.rb +++ /dev/null @@ -1,143 +0,0 @@ -require 'test/unit' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - -if defined?(HTTPAccess2) - -module WSDL - - -class TestUnqualified < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - Namespace = 'urn:lp' - - def on_init - add_document_method( - self, - Namespace + ':login', - 'login', - XSD::QName.new(Namespace, 'login'), - XSD::QName.new(Namespace, 'loginResponse') - ) - end - - def login(arg) - nil - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - Port = 17171 - - def setup - setup_server - setup_clientdef - @client = nil - end - - def teardown - teardown_server - File.unlink(pathname('lp.rb')) - File.unlink(pathname('lpDriver.rb')) - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', "urn:lp", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_clientdef - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("lp.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['driver'] = nil - gen.opt['force'] = true - gen.run - require pathname('lp') - ensure - Dir.chdir(backupdir) - end - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def pathname(filename) - File.join(DIR, filename) - end - - LOGIN_REQUEST_QUALIFIED = -%q[ - - - - NaHi - passwd - JST - - -] - - def test_wsdl - wsdl = File.join(DIR, 'lp.wsdl') - @client = nil - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - ensure - Dir.chdir(backupdir) - end - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = str = '' - @client.login(:timezone => 'JST', :password => 'passwd', - :username => 'NaHi') - assert_equal(LOGIN_REQUEST_QUALIFIED, parse_requestxml(str)) - end - - include ::SOAP - def test_naive - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - require pathname('lpDriver') - ensure - Dir.chdir(backupdir) - end - @client = Lp_porttype.new("http://localhost:#{Port}/") - - @client.wiredump_dev = str = '' - @client.login(Login.new('NaHi', 'passwd', 'JST')) - assert_equal(LOGIN_REQUEST_QUALIFIED, parse_requestxml(str)) - end - - def parse_requestxml(str) - str.split(/\r?\n\r?\n/)[3] - end -end - - -end - -end diff --git a/ruby_1_8_5/test/wsdl/raa/RAA.rb b/ruby_1_8_5/test/wsdl/raa/RAA.rb deleted file mode 100644 index aff0525480..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/RAA.rb +++ /dev/null @@ -1,243 +0,0 @@ -# http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/ -class Category - @@schema_type = "Category" - @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" - - def major - @major - end - - def major=(value) - @major = value - end - - def minor - @minor - end - - def minor=(value) - @minor = value - end - - def initialize(major = nil, - minor = nil) - @major = major - @minor = minor - end -end - -# http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/ -class Product - @@schema_type = "Product" - @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" - - def id - @id - end - - def id=(value) - @id = value - end - - def name - @name - end - - def name=(value) - @name = value - end - - def short_description - @short_description - end - - def short_description=(value) - @short_description = value - end - - def version - @version - end - - def version=(value) - @version = value - end - - def status - @status - end - - def status=(value) - @status = value - end - - def homepage - @homepage - end - - def homepage=(value) - @homepage = value - end - - def download - @download - end - - def download=(value) - @download = value - end - - def license - @license - end - - def license=(value) - @license = value - end - - def description - @description - end - - def description=(value) - @description = value - end - - def initialize(id = nil, - name = nil, - short_description = nil, - version = nil, - status = nil, - homepage = nil, - download = nil, - license = nil, - description = nil) - @id = id - @name = name - @short_description = short_description - @version = version - @status = status - @homepage = homepage - @download = download - @license = license - @description = description - end -end - -# http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/ -class Owner - @@schema_type = "Owner" - @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" - - def id - @id - end - - def id=(value) - @id = value - end - - def email - @email - end - - def email=(value) - @email = value - end - - def name - @name - end - - def name=(value) - @name = value - end - - def initialize(id = nil, - email = nil, - name = nil) - @id = id - @email = email - @name = name - end -end - -# http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/ -class Info - @@schema_type = "Info" - @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" - - def category - @category - end - - def category=(value) - @category = value - end - - def product - @product - end - - def product=(value) - @product = value - end - - def owner - @owner - end - - def owner=(value) - @owner = value - end - - def created - @created - end - - def created=(value) - @created = value - end - - def updated - @updated - end - - def updated=(value) - @updated = value - end - - def initialize(category = nil, - product = nil, - owner = nil, - created = nil, - updated = nil) - @category = category - @product = product - @owner = owner - @created = created - @updated = updated - end -end - -# http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/ -class InfoArray < Array - # Contents type should be dumped here... - @@schema_type = "InfoArray" - @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" -end - -# http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/ -class StringArray < Array - # Contents type should be dumped here... - @@schema_type = "StringArray" - @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" -end - -# http://xml.apache.org/xml-soap -class Map < Array - # Contents type should be dumped here... - @@schema_type = "Map" - @@schema_ns = "http://xml.apache.org/xml-soap" -end - diff --git a/ruby_1_8_5/test/wsdl/raa/RAAServant.rb b/ruby_1_8_5/test/wsdl/raa/RAAServant.rb deleted file mode 100644 index 68380f8e48..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/RAAServant.rb +++ /dev/null @@ -1,99 +0,0 @@ -class RAABaseServicePortType - # SYNOPSIS - # getAllListings - # - # ARGS - # N/A - # - # RETURNS - # return StringArray - {http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/}StringArray - # - # RAISES - # (undefined) - # - def getAllListings - #raise NotImplementedError.new - ["ruby", "soap4r"] - end - - # SYNOPSIS - # getProductTree - # - # ARGS - # N/A - # - # RETURNS - # return Map - {http://xml.apache.org/xml-soap}Map - # - # RAISES - # (undefined) - # - def getProductTree - raise NotImplementedError.new - end - - # SYNOPSIS - # getInfoFromCategory(category) - # - # ARGS - # category Category - {http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/}Category - # - # RETURNS - # return InfoArray - {http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/}InfoArray - # - # RAISES - # (undefined) - # - def getInfoFromCategory(category) - raise NotImplementedError.new - end - - # SYNOPSIS - # getModifiedInfoSince(timeInstant) - # - # ARGS - # timeInstant - {http://www.w3.org/2001/XMLSchema}dateTime - # - # RETURNS - # return InfoArray - {http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/}InfoArray - # - # RAISES - # (undefined) - # - def getModifiedInfoSince(timeInstant) - raise NotImplementedError.new - end - - # SYNOPSIS - # getInfoFromName(productName) - # - # ARGS - # productName - {http://www.w3.org/2001/XMLSchema}string - # - # RETURNS - # return Info - {http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/}Info - # - # RAISES - # (undefined) - # - def getInfoFromName(productName) - raise NotImplementedError.new - end - - # SYNOPSIS - # getInfoFromOwnerId(ownerId) - # - # ARGS - # ownerId - {http://www.w3.org/2001/XMLSchema}int - # - # RETURNS - # return InfoArray - {http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/}InfoArray - # - # RAISES - # (undefined) - # - def getInfoFromOwnerId(ownerId) - raise NotImplementedError.new - end -end - diff --git a/ruby_1_8_5/test/wsdl/raa/RAAService.rb b/ruby_1_8_5/test/wsdl/raa/RAAService.rb deleted file mode 100644 index 9d0813304c..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/RAAService.rb +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env ruby -require 'RAAServant.rb' - -require 'soap/rpc/standaloneServer' - -class RAABaseServicePortType - MappingRegistry = SOAP::Mapping::Registry.new - - MappingRegistry.set( - StringArray, - ::SOAP::SOAPArray, - ::SOAP::Mapping::Registry::TypedArrayFactory, - { :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "string") } - ) - MappingRegistry.set( - Map, - ::SOAP::SOAPArray, - ::SOAP::Mapping::Registry::TypedArrayFactory, - { :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType") } - ) - MappingRegistry.set( - Category, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Category") } - ) - MappingRegistry.set( - InfoArray, - ::SOAP::SOAPArray, - ::SOAP::Mapping::Registry::TypedArrayFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info") } - ) - MappingRegistry.set( - Info, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info") } - ) - MappingRegistry.set( - Product, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Product") } - ) - MappingRegistry.set( - Owner, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Owner") } - ) - - - Methods = [ - ["getAllListings", "getAllListings", [ - ["retval", "return", - [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]], "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getProductTree", "getProductTree", [ - ["retval", "return", - [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "anyType"]]], "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getInfoFromCategory", "getInfoFromCategory", [ - ["in", "category", - [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Category"]], - ["retval", "return", - [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getModifiedInfoSince", "getModifiedInfoSince", [ - ["in", "timeInstant", - [SOAP::SOAPDateTime]], - ["retval", "return", - [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getInfoFromName", "getInfoFromName", [ - ["in", "productName", - [SOAP::SOAPString]], - ["retval", "return", - [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getInfoFromOwnerId", "getInfoFromOwnerId", [ - ["in", "ownerId", - [SOAP::SOAPInt]], - ["retval", "return", - [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"] - ] -end - -class App < SOAP::RPC::StandaloneServer - def initialize(*arg) - super - - servant = RAABaseServicePortType.new - RAABaseServicePortType::Methods.each do |name_as, name, params, soapaction, namespace| - qname = XSD::QName.new(namespace, name_as) - @router.add_method(servant, qname, soapaction, name, params) - end - - self.mapping_registry = RAABaseServicePortType::MappingRegistry - end -end - -# Change listen port. -if $0 == __FILE__ - App.new('app', nil, '0.0.0.0', 10080).start -end diff --git a/ruby_1_8_5/test/wsdl/raa/README.txt b/ruby_1_8_5/test/wsdl/raa/README.txt deleted file mode 100644 index efbaf9d87c..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -RAAServant.rb: based on the file which is generated with the following command; - bin/wsdl2ruby.rb --wsdl raa.wsdl --servant_skelton --force - -RAAService.rb: generated with the following command; - bin/wsdl2ruby.rb --wsdl raa.wsdl --standalone_server_stub --force - -RAA.rb: generated with the following command; - bin/wsdl2ruby.rb --wsdl raa.wsdl --classdef --force diff --git a/ruby_1_8_5/test/wsdl/raa/raa.wsdl b/ruby_1_8_5/test/wsdl/raa/raa.wsdl deleted file mode 100644 index 78376893dd..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/raa.wsdl +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/raa/server.rb b/ruby_1_8_5/test/wsdl/raa/server.rb deleted file mode 100644 index 87bbc6f569..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/server.rb +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env ruby -require 'soap/rpc/standaloneServer' -require 'RAA.rb' - -class RAABaseServicePortType - MappingRegistry = SOAP::Mapping::Registry.new - - MappingRegistry.set( - StringArray, - ::SOAP::SOAPArray, - ::SOAP::Mapping::Registry::TypedArrayFactory, - { :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "string") } - ) - MappingRegistry.set( - Map, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://xml.apache.org/xml-soap", "Map") } - ) - MappingRegistry.set( - Category, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Category") } - ) - MappingRegistry.set( - InfoArray, - ::SOAP::SOAPArray, - ::SOAP::Mapping::Registry::TypedArrayFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info") } - ) - MappingRegistry.set( - Info, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info") } - ) - MappingRegistry.set( - Product, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Product") } - ) - MappingRegistry.set( - Owner, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Owner") } - ) - - Methods = [ - ["getAllListings", "getAllListings", [ - ["retval", "return", - [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]], - "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getProductTree", "getProductTree", [ - ["retval", "return", - [::SOAP::SOAPStruct, "http://xml.apache.org/xml-soap", "Map"]]], - "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getInfoFromCategory", "getInfoFromCategory", [ - ["in", "category", - [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Category"]], - ["retval", "return", - [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], - "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getModifiedInfoSince", "getModifiedInfoSince", [ - ["in", "timeInstant", - [SOAP::SOAPDateTime]], - ["retval", "return", - [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], - "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getInfoFromName", "getInfoFromName", [ - ["in", "productName", - [SOAP::SOAPString]], - ["retval", "return", - [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], - "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"], - ["getInfoFromOwnerId", "getInfoFromOwnerId", [ - ["in", "ownerId", - [SOAP::SOAPInt]], - ["retval", "return", - [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]]], - "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/"] - ] - - def getAllListings - ["ruby", "soap4r"] - end -end - -class RAABaseServiceServer < SOAP::RPC::StandaloneServer - def initialize(*arg) - super - - servant = RAABaseServicePortType.new - RAABaseServicePortType::Methods.each do |name_as, name, params, soapaction, namespace| - qname = XSD::QName.new(namespace, name_as) - @router.add_method(servant, qname, soapaction, name, params) - end - - self.mapping_registry = RAABaseServicePortType::MappingRegistry - end -end diff --git a/ruby_1_8_5/test/wsdl/raa/test_raa.rb b/ruby_1_8_5/test/wsdl/raa/test_raa.rb deleted file mode 100644 index 0b00042ffb..0000000000 --- a/ruby_1_8_5/test/wsdl/raa/test_raa.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'test/unit' -require 'soap/wsdlDriver' -require 'RAA.rb' -require 'RAAServant.rb' -require 'RAAService.rb' - - -module WSDL -module RAA - - -class TestRAA < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_client - end - - def setup_server - @server = App.new('RAA server', nil, '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @t = Thread.new { - Thread.current.abort_on_exception = true - @server.start - } - end - - def setup_client - wsdl = File.join(DIR, 'raa.wsdl') - @raa = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @raa.endpoint_url = "http://localhost:#{Port}/" - end - - def teardown - teardown_server - teardown_client - end - - def teardown_server - @server.shutdown - @t.kill - @t.join - end - - def teardown_client - @raa.reset_stream - end - - def test_raa - assert_equal(["ruby", "soap4r"], @raa.getAllListings) - end - - def foo - p @raa.getProductTree() - p @raa.getInfoFromCategory(Category.new("Library", "XML")) - t = Time.at(Time.now.to_i - 24 * 3600) - p @raa.getModifiedInfoSince(t) - p @raa.getModifiedInfoSince(DateTime.new(t.year, t.mon, t.mday, t.hour, t.min, t.sec)) - o = @raa.getInfoFromName("SOAP4R") - p o.type - p o.owner.name - p o - end -end - - -end -end diff --git a/ruby_1_8_5/test/wsdl/ref/expectedProduct.rb b/ruby_1_8_5/test/wsdl/ref/expectedProduct.rb deleted file mode 100644 index 91c6e4c566..0000000000 --- a/ruby_1_8_5/test/wsdl/ref/expectedProduct.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'xsd/qname' - -# {urn:product}Rating -module Rating - C_0 = "0" - C_1 = "+1" - C_1_2 = "-1" -end - -# {urn:product}Product-Bag -class ProductBag - @@schema_type = "Product-Bag" - @@schema_ns = "urn:product" - @@schema_attribute = {XSD::QName.new("urn:product", "version") => "SOAP::SOAPString", XSD::QName.new("urn:product", "yesno") => "SOAP::SOAPString"} - @@schema_element = [["bag", ["Product[]", XSD::QName.new(nil, "bag")]], ["rating", ["SOAP::SOAPString[]", XSD::QName.new("urn:product", "Rating")]], ["product_Bag", [nil, XSD::QName.new("urn:product", "Product-Bag")]], ["comment_1", [nil, XSD::QName.new(nil, "comment_1")]], ["comment_2", ["Comment[]", XSD::QName.new(nil, "comment-2")]]] - - attr_accessor :bag - attr_accessor :product_Bag - attr_accessor :comment_1 - attr_accessor :comment_2 - - def Rating - @rating - end - - def Rating=(value) - @rating = value - end - - def xmlattr_version - (@__xmlattr ||= {})[XSD::QName.new("urn:product", "version")] - end - - def xmlattr_version=(value) - (@__xmlattr ||= {})[XSD::QName.new("urn:product", "version")] = value - end - - def xmlattr_yesno - (@__xmlattr ||= {})[XSD::QName.new("urn:product", "yesno")] - end - - def xmlattr_yesno=(value) - (@__xmlattr ||= {})[XSD::QName.new("urn:product", "yesno")] = value - end - - def initialize(bag = [], rating = [], product_Bag = nil, comment_1 = [], comment_2 = []) - @bag = bag - @rating = rating - @product_Bag = product_Bag - @comment_1 = comment_1 - @comment_2 = comment_2 - @__xmlattr = {} - end -end - -# {urn:product}Creator -class Creator - @@schema_type = "Creator" - @@schema_ns = "urn:product" - @@schema_element = [] - - def initialize - end -end - -# {urn:product}Product -class Product - @@schema_type = "Product" - @@schema_ns = "urn:product" - @@schema_element = [["name", ["SOAP::SOAPString", XSD::QName.new(nil, "name")]], ["rating", ["SOAP::SOAPString", XSD::QName.new("urn:product", "Rating")]]] - - attr_accessor :name - - def Rating - @rating - end - - def Rating=(value) - @rating = value - end - - def initialize(name = nil, rating = nil) - @name = name - @rating = rating - end -end - -# {urn:product}Comment -class Comment < String -end diff --git a/ruby_1_8_5/test/wsdl/ref/product.wsdl b/ruby_1_8_5/test/wsdl/ref/product.wsdl deleted file mode 100644 index 993fe217aa..0000000000 --- a/ruby_1_8_5/test/wsdl/ref/product.wsdl +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/ref/test_ref.rb b/ruby_1_8_5/test/wsdl/ref/test_ref.rb deleted file mode 100644 index 9e29fa31e0..0000000000 --- a/ruby_1_8_5/test/wsdl/ref/test_ref.rb +++ /dev/null @@ -1,54 +0,0 @@ -require 'test/unit' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' -require 'wsdl/soap/wsdl2ruby' - - -module WSDL -module Ref - - -class TestRef < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - Port = 17171 - - def test_classdef - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("product.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['force'] = true - suppress_warning do - gen.run - end - compare("expectedProduct.rb", "product.rb") - File.unlink(pathname('product.rb')) - end - - def compare(expected, actual) - assert_equal(loadfile(expected), loadfile(actual), actual) - end - - def loadfile(file) - File.open(pathname(file)) { |f| f.read } - end - - def pathname(filename) - File.join(DIR, filename) - end - - def suppress_warning - back = $VERBOSE - $VERBOSE = nil - begin - yield - ensure - $VERBOSE = back - end - end -end - - -end -end diff --git a/ruby_1_8_5/test/wsdl/rpc/echoDriver.rb b/ruby_1_8_5/test/wsdl/rpc/echoDriver.rb deleted file mode 100644 index 51e82076e7..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/echoDriver.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'echo.rb' - -require 'soap/rpc/driver' - -class Echo_port_type < ::SOAP::RPC::Driver - DefaultEndpointUrl = "http://localhost:10080" - MappingRegistry = ::SOAP::Mapping::Registry.new - - MappingRegistry.set( - Person, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("urn:rpc-type", "person") } - ) - - Methods = [ - ["echo", "echo", - [ - ["in", "arg1", [::SOAP::SOAPStruct, "urn:rpc-type", "person"]], - ["in", "arg2", [::SOAP::SOAPStruct, "urn:rpc-type", "person"]], - ["retval", "return", [::SOAP::SOAPStruct, "urn:rpc-type", "person"]] - ], - "", "urn:rpc", :rpc - ] - ] - - def initialize(endpoint_url = nil) - endpoint_url ||= DefaultEndpointUrl - super(endpoint_url, nil) - self.mapping_registry = MappingRegistry - init_methods - end - -private - - def init_methods - Methods.each do |name_as, name, params, soapaction, namespace, style| - qname = XSD::QName.new(namespace, name_as) - if style == :document - @proxy.add_document_method(soapaction, name, params) - add_document_method_interface(name, params) - else - @proxy.add_rpc_method(qname, soapaction, name, params) - add_rpc_method_interface(name, params) - end - if name_as != name and name_as.capitalize == name.capitalize - sclass = class << self; self; end - sclass.__send__(:define_method, name_as, proc { |*arg| - __send__(name, *arg) - }) - end - end - end -end - diff --git a/ruby_1_8_5/test/wsdl/rpc/echo_serviceClient.rb b/ruby_1_8_5/test/wsdl/rpc/echo_serviceClient.rb deleted file mode 100644 index 40264834e9..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/echo_serviceClient.rb +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env ruby -require 'echoDriver.rb' - -endpoint_url = ARGV.shift -obj = Echo_port_type.new(endpoint_url) - -# Uncomment the below line to see SOAP wiredumps. -# obj.wiredump_dev = STDERR - -# SYNOPSIS -# echo(arg1, arg2) -# -# ARGS -# arg1 Person - {urn:rpc-type}person -# arg2 Person - {urn:rpc-type}person -# -# RETURNS -# v_return Person - {urn:rpc-type}person -# -arg1 = arg2 = nil -puts obj.echo(arg1, arg2) - - diff --git a/ruby_1_8_5/test/wsdl/rpc/rpc.wsdl b/ruby_1_8_5/test/wsdl/rpc/rpc.wsdl deleted file mode 100644 index b0ee5c5e56..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/rpc.wsdl +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/rpc/test-rpc-lit.wsdl b/ruby_1_8_5/test/wsdl/rpc/test-rpc-lit.wsdl deleted file mode 100644 index 72de747e36..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/test-rpc-lit.wsdl +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/rpc/test-rpc-lit12.wsdl b/ruby_1_8_5/test/wsdl/rpc/test-rpc-lit12.wsdl deleted file mode 100644 index 901cde6f9c..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/test-rpc-lit12.wsdl +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/rpc/test_rpc.rb b/ruby_1_8_5/test/wsdl/rpc/test_rpc.rb deleted file mode 100644 index 7c4c3a7ad6..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/test_rpc.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - - -module WSDL; module RPC - - -class TestRPC < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - def on_init - self.generate_explicit_type = false - add_rpc_method(self, 'echo', 'arg1', 'arg2') - add_rpc_method(self, 'echo_err', 'arg1', 'arg2') - end - - DummyPerson = Struct.new("family-name".intern, :given_name) - def echo(arg1, arg2) - case arg1.family_name - when 'normal' - arg1.family_name = arg2.family_name - arg1.given_name = arg2.given_name - arg1.age = arg2.age - arg1 - when 'dummy' - DummyPerson.new("family-name", "given_name") - else - raise - end - end - - ErrPerson = Struct.new(:given_name, :no_such_element) - def echo_err(arg1, arg2) - ErrPerson.new(58, Time.now) - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_classdef - @client = nil - end - - def teardown - teardown_server - File.unlink(pathname('echo.rb')) - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', "urn:rpc", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_classdef - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("rpc.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['force'] = true - gen.run - require pathname('echo') - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def pathname(filename) - File.join(DIR, filename) - end - - def test_wsdl - wsdl = File.join(DIR, 'rpc.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = STDOUT if $DEBUG - - ret = @client.echo(Person.new("normal", "", 12), Person.new("Hi", "Na", 21)) - assert_equal(Person, ret.class) - assert_equal("Hi", ret.family_name) - assert_equal("Na", ret.given_name) - assert_equal(21, ret.age) - - ret = @client.echo(Person.new("dummy", "", 12), Person.new("Hi", "Na", 21)) - assert_equal(Person, ret.class) - assert_equal("family-name", ret.family_name) - assert_equal("given_name", ret.given_name) - assert_equal(nil, ret.age) - - ret = @client.echo_err(Person.new("Na", "Hi"), Person.new("Hi", "Na")) - assert_equal(Person, ret.class) - assert_equal("58", ret.given_name) - assert_equal(nil, ret.family_name) - assert_equal(nil, ret.age) - end -end - - -end; end diff --git a/ruby_1_8_5/test/wsdl/rpc/test_rpc_lit.rb b/ruby_1_8_5/test/wsdl/rpc/test_rpc_lit.rb deleted file mode 100644 index 080dbb82cf..0000000000 --- a/ruby_1_8_5/test/wsdl/rpc/test_rpc_lit.rb +++ /dev/null @@ -1,399 +0,0 @@ -require 'test/unit' -require 'wsdl/soap/wsdl2ruby' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - -if defined?(HTTPAccess2) and defined?(OpenSSL) - -module WSDL; module RPC - - -class TestRPCLIT < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - Namespace = "http://soapbuilders.org/rpc-lit-test" - - def on_init - self.generate_explicit_type = false - add_rpc_operation(self, - XSD::QName.new(Namespace, 'echoStringArray'), - nil, - 'echoStringArray', [ - ['in', 'inputStringArray', nil], - ['retval', 'return', nil] - ], - { - :request_style => :rpc, - :request_use => :literal, - :response_style => :rpc, - :response_use => :literal - } - ) - add_rpc_operation(self, - XSD::QName.new(Namespace, 'echoStringArrayInline'), - nil, - 'echoStringArrayInline', [ - ['in', 'inputStringArray', nil], - ['retval', 'return', nil] - ], - { - :request_style => :rpc, - :request_use => :literal, - :response_style => :rpc, - :response_use => :literal - } - ) - add_rpc_operation(self, - XSD::QName.new(Namespace, 'echoNestedStruct'), - nil, - 'echoNestedStruct', [ - ['in', 'inputNestedStruct', nil], - ['retval', 'return', nil] - ], - { - :request_style => :rpc, - :request_use => :literal, - :response_style => :rpc, - :response_use => :literal - } - ) - add_rpc_operation(self, - XSD::QName.new(Namespace, 'echoStructArray'), - nil, - 'echoStructArray', [ - ['in', 'inputStructArray', nil], - ['retval', 'return', nil] - ], - { - :request_style => :rpc, - :request_use => :literal, - :response_style => :rpc, - :response_use => :literal - } - ) - end - - def echoStringArray(strings) - # strings.stringItem => Array - ArrayOfstring[*strings.stringItem] - end - - def echoStringArrayInline(strings) - ArrayOfstringInline[*strings.stringItem] - end - - def echoNestedStruct(struct) - struct - end - - def echoStructArray(ary) - ary - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_classdef - @client = nil - end - - def teardown - teardown_server - unless $DEBUG - File.unlink(pathname('RPC-Literal-TestDefinitions.rb')) - File.unlink(pathname('RPC-Literal-TestDefinitionsDriver.rb')) - end - @client.reset_stream if @client - end - - def setup_server - @server = Server.new('Test', Server::Namespace, '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_classdef - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("test-rpc-lit.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['driver'] = nil - gen.opt['force'] = true - gen.run - backupdir = Dir.pwd - begin - Dir.chdir(DIR) - require pathname('RPC-Literal-TestDefinitions.rb') - require pathname('RPC-Literal-TestDefinitionsDriver.rb') - ensure - Dir.chdir(backupdir) - end - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def pathname(filename) - File.join(DIR, filename) - end - - def test_wsdl_echoStringArray - wsdl = pathname('test-rpc-lit.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = STDOUT if $DEBUG - # response contains only 1 part. - result = @client.echoStringArray(ArrayOfstring["a", "b", "c"])[0] - assert_equal(["a", "b", "c"], result.stringItem) - end - - ECHO_STRING_ARRAY_REQUEST = -%q[ - - - - - a - b - c - - - -] - - ECHO_STRING_ARRAY_RESPONSE = -%q[ - - - - - a - b - c - - - -] - - def test_stub_echoStringArray - drv = SoapTestPortTypeRpc.new("http://localhost:#{Port}/") - drv.wiredump_dev = str = '' - # response contains only 1 part. - result = drv.echoStringArray(ArrayOfstring["a", "b", "c"])[0] - assert_equal(["a", "b", "c"], result.stringItem) - assert_equal(ECHO_STRING_ARRAY_REQUEST, parse_requestxml(str)) - assert_equal(ECHO_STRING_ARRAY_RESPONSE, parse_responsexml(str)) - end - - ECHO_STRING_ARRAY_INLINE_REQUEST = -%q[ - - - - - a - b - c - - - -] - - ECHO_STRING_ARRAY_INLINE_RESPONSE = -%q[ - - - - - a - b - c - - - -] - - def test_stub_echoStringArrayInline - drv = SoapTestPortTypeRpc.new("http://localhost:#{Port}/") - drv.wiredump_dev = str = '' - # response contains only 1 part. - result = drv.echoStringArrayInline(ArrayOfstringInline["a", "b", "c"])[0] - assert_equal(["a", "b", "c"], result.stringItem) - assert_equal(ECHO_STRING_ARRAY_INLINE_REQUEST, parse_requestxml(str)) - assert_equal(ECHO_STRING_ARRAY_INLINE_RESPONSE, parse_responsexml(str)) - end - - ECHO_NESTED_STRUCT_REQUEST = -%q[ - - - - - str - 1 - +1 - - str - 1 - +1 - - - - -] - - ECHO_NESTED_STRUCT_RESPONSE = -%q[ - - - - - str - 1 - +1 - - str - 1 - +1 - - - - -] - - def test_wsdl_echoNestedStruct - wsdl = pathname('test-rpc-lit.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = str = '' - # response contains only 1 part. - result = @client.echoNestedStruct(SOAPStructStruct.new("str", 1, 1.0, SOAPStruct.new("str", 1, 1.0)))[0] - assert_equal('str', result.varString) - assert_equal('1', result.varInt) - assert_equal('+1', result.varFloat) - assert_equal('str', result.structItem.varString) - assert_equal('1', result.structItem.varInt) - assert_equal('+1', result.structItem.varFloat) - assert_equal(ECHO_NESTED_STRUCT_REQUEST, parse_requestxml(str)) - assert_equal(ECHO_NESTED_STRUCT_RESPONSE, parse_responsexml(str)) - end - - def test_stub_echoNestedStruct - drv = SoapTestPortTypeRpc.new("http://localhost:#{Port}/") - drv.wiredump_dev = str = '' - # response contains only 1 part. - result = drv.echoNestedStruct(SOAPStructStruct.new("str", 1, 1.0, SOAPStruct.new("str", 1, 1.0)))[0] - assert_equal('str', result.varString) - assert_equal('1', result.varInt) - assert_equal('+1', result.varFloat) - assert_equal('str', result.structItem.varString) - assert_equal('1', result.structItem.varInt) - assert_equal('+1', result.structItem.varFloat) - assert_equal(ECHO_NESTED_STRUCT_REQUEST, parse_requestxml(str)) - assert_equal(ECHO_NESTED_STRUCT_RESPONSE, parse_responsexml(str)) - end - - ECHO_STRUCT_ARRAY_REQUEST = -%q[ - - - - - - str - 2 - +2.1 - - - str - 2 - +2.1 - - - - -] - - ECHO_STRUCT_ARRAY_RESPONSE = -%q[ - - - - - - str - 2 - +2.1 - - - str - 2 - +2.1 - - - - -] - - def test_wsdl_echoStructArray - wsdl = pathname('test-rpc-lit.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = str = '' - # response contains only 1 part. - e = SOAPStruct.new("str", 2, 2.1) - result = @client.echoStructArray(ArrayOfSOAPStruct[e, e]) - assert_equal(ECHO_STRUCT_ARRAY_REQUEST, parse_requestxml(str)) - assert_equal(ECHO_STRUCT_ARRAY_RESPONSE, parse_responsexml(str)) - end - - def test_stub_echoStructArray - drv = SoapTestPortTypeRpc.new("http://localhost:#{Port}/") - drv.wiredump_dev = str = '' - # response contains only 1 part. - e = SOAPStruct.new("str", 2, 2.1) - result = drv.echoStructArray(ArrayOfSOAPStruct[e, e]) - assert_equal(ECHO_STRUCT_ARRAY_REQUEST, parse_requestxml(str)) - assert_equal(ECHO_STRUCT_ARRAY_RESPONSE, parse_responsexml(str)) - end - - def parse_requestxml(str) - str.split(/\r?\n\r?\n/)[3] - end - - def parse_responsexml(str) - str.split(/\r?\n\r?\n/)[6] - end -end - - -end; end - -end diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedClient.rb b/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedClient.rb deleted file mode 100644 index 55eb58c3dd..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedClient.rb +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env ruby -require 'echo_versionDriver.rb' - -endpoint_url = ARGV.shift -obj = Echo_version_port_type.new(endpoint_url) - -# run ruby with -d to see SOAP wiredumps. -obj.wiredump_dev = STDERR if $DEBUG - -# SYNOPSIS -# echo_version(version) -# -# ARGS -# version Version - {urn:example.com:simpletype-rpc-type}version -# -# RETURNS -# version_struct Version_struct - {urn:example.com:simpletype-rpc-type}version_struct -# -version = nil -puts obj.echo_version(version) - -# SYNOPSIS -# echo_version_r(version_struct) -# -# ARGS -# version_struct Version_struct - {urn:example.com:simpletype-rpc-type}version_struct -# -# RETURNS -# version Version - {urn:example.com:simpletype-rpc-type}version -# -version_struct = nil -puts obj.echo_version_r(version_struct) - - diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedDriver.rb b/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedDriver.rb deleted file mode 100644 index 81c72d1acf..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedDriver.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'echo_version.rb' - -require 'soap/rpc/driver' - -class Echo_version_port_type < ::SOAP::RPC::Driver - DefaultEndpointUrl = "http://localhost:10080" - MappingRegistry = ::SOAP::Mapping::Registry.new - - MappingRegistry.set( - Version_struct, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("urn:example.com:simpletype-rpc-type", "version_struct") } - ) - - Methods = [ - [ XSD::QName.new("urn:example.com:simpletype-rpc", "echo_version"), - "urn:example.com:simpletype-rpc", - "echo_version", - [ ["in", "version", ["::SOAP::SOAPString"]], - ["retval", "version_struct", ["Version_struct", "urn:example.com:simpletype-rpc-type", "version_struct"]] ], - { :request_style => :rpc, :request_use => :encoded, - :response_style => :rpc, :response_use => :encoded } - ], - [ XSD::QName.new("urn:example.com:simpletype-rpc", "echo_version_r"), - "urn:example.com:simpletype-rpc", - "echo_version_r", - [ ["in", "version_struct", ["Version_struct", "urn:example.com:simpletype-rpc-type", "version_struct"]], - ["retval", "version", ["::SOAP::SOAPString"]] ], - { :request_style => :rpc, :request_use => :encoded, - :response_style => :rpc, :response_use => :encoded } - ] - ] - - def initialize(endpoint_url = nil) - endpoint_url ||= DefaultEndpointUrl - super(endpoint_url, nil) - self.mapping_registry = MappingRegistry - init_methods - end - -private - - def init_methods - Methods.each do |definitions| - opt = definitions.last - if opt[:request_style] == :document - add_document_operation(*definitions) - else - add_rpc_operation(*definitions) - qname = definitions[0] - name = definitions[2] - if qname.name != name and qname.name.capitalize == name.capitalize - ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| - __send__(name, *arg) - end - end - end - end - end -end - diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedEchoVersion.rb b/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedEchoVersion.rb deleted file mode 100644 index 806ece1626..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedEchoVersion.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'xsd/qname' - -# {urn:example.com:simpletype-rpc-type}version_struct -class Version_struct - @@schema_type = "version_struct" - @@schema_ns = "urn:example.com:simpletype-rpc-type" - @@schema_element = [["version", ["SOAP::SOAPString", XSD::QName.new(nil, "version")]], ["msg", ["SOAP::SOAPString", XSD::QName.new(nil, "msg")]]] - - attr_accessor :version - attr_accessor :msg - - def initialize(version = nil, msg = nil) - @version = version - @msg = msg - end -end - -# {urn:example.com:simpletype-rpc-type}version -module Version - C_16 = "1.6" - C_18 = "1.8" - C_19 = "1.9" -end diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedServant.rb b/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedServant.rb deleted file mode 100644 index 81cf50218e..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedServant.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'echo_version.rb' - -class Echo_version_port_type - # SYNOPSIS - # echo_version(version) - # - # ARGS - # version Version - {urn:example.com:simpletype-rpc-type}version - # - # RETURNS - # version_struct Version_struct - {urn:example.com:simpletype-rpc-type}version_struct - # - def echo_version(version) - p [version] - raise NotImplementedError.new - end - - # SYNOPSIS - # echo_version_r(version_struct) - # - # ARGS - # version_struct Version_struct - {urn:example.com:simpletype-rpc-type}version_struct - # - # RETURNS - # version Version - {urn:example.com:simpletype-rpc-type}version - # - def echo_version_r(version_struct) - p [version_struct] - raise NotImplementedError.new - end -end - diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedService.rb b/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedService.rb deleted file mode 100644 index be6f996562..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/expectedService.rb +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env ruby -require 'echo_versionServant.rb' - -require 'soap/rpc/standaloneServer' -require 'soap/mapping/registry' - -class Echo_version_port_type - MappingRegistry = ::SOAP::Mapping::Registry.new - - MappingRegistry.set( - Version_struct, - ::SOAP::SOAPStruct, - ::SOAP::Mapping::Registry::TypedStructFactory, - { :type => XSD::QName.new("urn:example.com:simpletype-rpc-type", "version_struct") } - ) - - Methods = [ - [ XSD::QName.new("urn:example.com:simpletype-rpc", "echo_version"), - "urn:example.com:simpletype-rpc", - "echo_version", - [ ["in", "version", ["::SOAP::SOAPString"]], - ["retval", "version_struct", ["Version_struct", "urn:example.com:simpletype-rpc-type", "version_struct"]] ], - { :request_style => :rpc, :request_use => :encoded, - :response_style => :rpc, :response_use => :encoded } - ], - [ XSD::QName.new("urn:example.com:simpletype-rpc", "echo_version_r"), - "urn:example.com:simpletype-rpc", - "echo_version_r", - [ ["in", "version_struct", ["Version_struct", "urn:example.com:simpletype-rpc-type", "version_struct"]], - ["retval", "version", ["::SOAP::SOAPString"]] ], - { :request_style => :rpc, :request_use => :encoded, - :response_style => :rpc, :response_use => :encoded } - ] - ] -end - -class Echo_version_port_typeApp < ::SOAP::RPC::StandaloneServer - def initialize(*arg) - super(*arg) - servant = Echo_version_port_type.new - Echo_version_port_type::Methods.each do |definitions| - opt = definitions.last - if opt[:request_style] == :document - @router.add_document_operation(servant, *definitions) - else - @router.add_rpc_operation(servant, *definitions) - end - end - self.mapping_registry = Echo_version_port_type::MappingRegistry - end -end - -if $0 == __FILE__ - # Change listen port. - server = Echo_version_port_typeApp.new('app', nil, '0.0.0.0', 10080) - trap(:INT) do - server.shutdown - end - server.start -end diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/rpc.wsdl b/ruby_1_8_5/test/wsdl/simpletype/rpc/rpc.wsdl deleted file mode 100644 index 91f71a8831..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/rpc.wsdl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/simpletype/rpc/test_rpc.rb b/ruby_1_8_5/test/wsdl/simpletype/rpc/test_rpc.rb deleted file mode 100644 index fdd55552d0..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/rpc/test_rpc.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/wsdl2ruby' - - -module WSDL; module SimpleType - - -class TestRPC < Test::Unit::TestCase - DIR = File.dirname(File.expand_path(__FILE__)) - def pathname(filename) - File.join(DIR, filename) - end - - def test_rpc - gen = WSDL::SOAP::WSDL2Ruby.new - gen.location = pathname("rpc.wsdl") - gen.basedir = DIR - gen.logger.level = Logger::FATAL - gen.opt['classdef'] = nil - gen.opt['driver'] = nil - gen.opt['client_skelton'] = nil - gen.opt['servant_skelton'] = nil - gen.opt['standalone_server_stub'] = nil - gen.opt['force'] = true - suppress_warning do - gen.run - end - compare("expectedEchoVersion.rb", "echo_version.rb") - compare("expectedDriver.rb", "echo_versionDriver.rb") - compare("expectedService.rb", "echo_version_service.rb") - compare("expectedClient.rb", "echo_version_serviceClient.rb") - compare("expectedServant.rb", "echo_versionServant.rb") - - File.unlink(pathname("echo_version.rb")) - File.unlink(pathname("echo_versionDriver.rb")) - File.unlink(pathname("echo_version_service.rb")) - File.unlink(pathname("echo_version_serviceClient.rb")) - File.unlink(pathname("echo_versionServant.rb")) - end - - def compare(expected, actual) - assert_equal(loadfile(expected), loadfile(actual), actual) - end - - def loadfile(file) - File.open(pathname(file)) { |f| f.read } - end - - def suppress_warning - back = $VERBOSE - $VERBOSE = nil - begin - yield - ensure - $VERBOSE = back - end - end -end - - -end; end diff --git a/ruby_1_8_5/test/wsdl/simpletype/simpletype.wsdl b/ruby_1_8_5/test/wsdl/simpletype/simpletype.wsdl deleted file mode 100644 index 623969c794..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/simpletype.wsdl +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/simpletype/test_simpletype.rb b/ruby_1_8_5/test/wsdl/simpletype/test_simpletype.rb deleted file mode 100644 index 7e644c3042..0000000000 --- a/ruby_1_8_5/test/wsdl/simpletype/test_simpletype.rb +++ /dev/null @@ -1,99 +0,0 @@ -require 'test/unit' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - - -module WSDL -module SimpleType - - -class TestSimpleType < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - def on_init - add_document_method(self, 'urn:example.com:simpletype:ping', 'ping', - XSD::QName.new('urn:example.com:simpletype', 'ruby'), - XSD::QName.new('http://www.w3.org/2001/XMLSchema', 'string')) - add_document_method(self, 'urn:example.com:simpletype:ping_id', 'ping_id', - XSD::QName.new('urn:example.com:simpletype', 'myid'), - XSD::QName.new('urn:example.com:simpletype', 'myid')) - end - - def ping(ruby) - version = ruby["myversion"] - date = ruby["date"] - "#{version} (#{date})" - end - - def ping_id(id) - id - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_client - end - - def setup_server - @server = Server.new('Test', "urn:example.com:simpletype", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @server_thread = start_server_thread(@server) - end - - def setup_client - wsdl = File.join(DIR, 'simpletype.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.generate_explicit_type = false - @client.wiredump_dev = STDOUT if $DEBUG - end - - def teardown - teardown_server - teardown_client - end - - def teardown_server - @server.shutdown - @server_thread.kill - @server_thread.join - end - - def teardown_client - @client.reset_stream - end - - def start_server_thread(server) - t = Thread.new { - Thread.current.abort_on_exception = true - server.start - } - t - end - - def test_ping - ret = @client.ping({:myversion => "1.9", :date => "2004-01-01T00:00:00Z"}) - assert_equal("1.9 (2004-01-01T00:00:00Z)", ret) - end - - def test_ping_id - ret = @client.ping_id("012345678901234567") - assert_equal("012345678901234567", ret) - # length - assert_raise(XSD::ValueSpaceError) do - @client.ping_id("0123456789012345678") - end - # pattern - assert_raise(XSD::ValueSpaceError) do - @client.ping_id("01234567890123456;") - end - end -end - - -end -end diff --git a/ruby_1_8_5/test/wsdl/soap/soapbodyparts.wsdl b/ruby_1_8_5/test/wsdl/soap/soapbodyparts.wsdl deleted file mode 100644 index 0e6da0ebee..0000000000 --- a/ruby_1_8_5/test/wsdl/soap/soapbodyparts.wsdl +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruby_1_8_5/test/wsdl/soap/test_soapbodyparts.rb b/ruby_1_8_5/test/wsdl/soap/test_soapbodyparts.rb deleted file mode 100644 index 291319aedf..0000000000 --- a/ruby_1_8_5/test/wsdl/soap/test_soapbodyparts.rb +++ /dev/null @@ -1,79 +0,0 @@ -require 'test/unit' -require 'soap/rpc/standaloneServer' -require 'soap/wsdlDriver' - - -module WSDL -module SOAP - - -class TestSOAPBodyParts < Test::Unit::TestCase - class Server < ::SOAP::RPC::StandaloneServer - def on_init - add_method(self, 'foo', 'p1', 'p2', 'p3') - add_method(self, 'bar', 'p1', 'p2', 'p3') - add_method(self, 'baz', 'p1', 'p2', 'p3') - end - - def foo(p1, p2, p3) - [p1, p2, p3] - end - - alias bar foo - - def baz(p1, p2, p3) - [p3, p2, p1] - end - end - - DIR = File.dirname(File.expand_path(__FILE__)) - - Port = 17171 - - def setup - setup_server - setup_client - end - - def setup_server - @server = Server.new('Test', "urn:www.example.com:soapbodyparts:v1", '0.0.0.0', Port) - @server.level = Logger::Severity::ERROR - @t = Thread.new { - Thread.current.abort_on_exception = true - @server.start - } - end - - def setup_client - wsdl = File.join(DIR, 'soapbodyparts.wsdl') - @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver - @client.endpoint_url = "http://localhost:#{Port}/" - @client.wiredump_dev = STDERR if $DEBUG - end - - def teardown - teardown_server - teardown_client - end - - def teardown_server - @server.shutdown - @t.kill - @t.join - end - - def teardown_client - @client.reset_stream - end - - def test_soapbodyparts - assert_equal(["1", "2", "3"], @client.foo("1", "2", "3")) - assert_equal(["3", "2", "1"], @client.foo("3", "2", "1")) - assert_equal(["1", "2", "3"], @client.bar("1", "2", "3")) - assert_equal(["3", "2", "1"], @client.baz("1", "2", "3")) - end -end - - -end -end diff --git a/ruby_1_8_5/test/wsdl/test_emptycomplextype.rb b/ruby_1_8_5/test/wsdl/test_emptycomplextype.rb deleted file mode 100644 index 71d1b8641d..0000000000 --- a/ruby_1_8_5/test/wsdl/test_emptycomplextype.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' - - -module WSDL - - -class TestWSDL < Test::Unit::TestCase - def setup - @file = File.join(File.dirname(File.expand_path(__FILE__)), 'emptycomplextype.wsdl') - end - - def test_wsdl - @wsdl = WSDL::Parser.new.parse(File.open(@file) { |f| f.read }) - assert(/\{urn:jp.gr.jin.rrr.example.emptycomplextype\}emptycomplextype/ =~ @wsdl.inspect) - end -end - - - -end diff --git a/ruby_1_8_5/test/wsdl/test_fault.rb b/ruby_1_8_5/test/wsdl/test_fault.rb deleted file mode 100644 index ec414528ee..0000000000 --- a/ruby_1_8_5/test/wsdl/test_fault.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'test/unit' -require 'soap/processor' -require 'soap/mapping' -require 'soap/rpc/element' -require 'wsdl/parser' - - -module WSDL - - -class TestFault < Test::Unit::TestCase - def setup - @xml =<<__EOX__ - - - - - Server - faultstring - faultactor - - type - - - - 5 - - -__EOX__ - end - - def test_by_wsdl - rpc_decode_typemap = WSDL::Definitions.soap_rpc_complextypes - opt = {} - opt[:default_encodingstyle] = ::SOAP::EncodingNamespace - opt[:decode_typemap] = rpc_decode_typemap - header, body = ::SOAP::Processor.unmarshal(@xml, opt) - fault = ::SOAP::Mapping.soap2obj(body.response) - assert_equal("Server", fault.faultcode) - assert_equal("faultstring", fault.faultstring) - assert_equal(URI.parse("faultactor"), fault.faultactor) - assert_equal(5, fault.detail.cause) - end -end - - -end diff --git a/ruby_1_8_5/test/wsdl/test_multiplefault.rb b/ruby_1_8_5/test/wsdl/test_multiplefault.rb deleted file mode 100644 index 7004297dc9..0000000000 --- a/ruby_1_8_5/test/wsdl/test_multiplefault.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'test/unit' -require 'wsdl/parser' -require 'wsdl/soap/classDefCreator' - - -module WSDL - - -class TestMultipleFault < Test::Unit::TestCase - def self.setup(filename) - @@filename = filename - end - - def test_multiplefault - @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read }) - classdefstr = WSDL::SOAP::ClassDefCreator.new(@wsdl).dump - yield_eval_binding(classdefstr) do |b| - assert_equal( - WSDL::TestMultipleFault::AuthenticationError, - eval("AuthenticationError", b) - ) - assert_equal( - WSDL::TestMultipleFault::AuthorizationError, - eval("AuthorizationError", b) - ) - end - end - - def yield_eval_binding(evaled) - b = binding - eval(evaled, b) - yield(b) - end -end - -TestMultipleFault.setup(File.join(File.dirname(__FILE__), 'multiplefault.wsdl')) - - -end -- cgit v1.2.3