summaryrefslogtreecommitdiff
path: root/test/wsdl
diff options
context:
space:
mode:
Diffstat (limited to 'test/wsdl')
-rw-r--r--test/wsdl/raa/RAA.rb15
-rw-r--r--test/wsdl/raa/RAAServant.rb99
-rw-r--r--test/wsdl/raa/RAAService.rb (renamed from test/wsdl/raa/server.rb)41
-rw-r--r--test/wsdl/raa/README.txt5
-rw-r--r--test/wsdl/raa/test_raa.rb6
5 files changed, 128 insertions, 38 deletions
diff --git a/test/wsdl/raa/RAA.rb b/test/wsdl/raa/RAA.rb
index 32b88bd26a..aff0525480 100644
--- a/test/wsdl/raa/RAA.rb
+++ b/test/wsdl/raa/RAA.rb
@@ -235,20 +235,9 @@ class StringArray < Array
end
# http://xml.apache.org/xml-soap
-class Map
+class Map < Array
+ # Contents type should be dumped here...
@@schema_type = "Map"
@@schema_ns = "http://xml.apache.org/xml-soap"
-
- def item
- @item
- end
-
- def item=(value)
- @item = value
- end
-
- def initialize(item = nil)
- @item = item
- end
end
diff --git a/test/wsdl/raa/RAAServant.rb b/test/wsdl/raa/RAAServant.rb
new file mode 100644
index 0000000000..68380f8e48
--- /dev/null
+++ b/test/wsdl/raa/RAAServant.rb
@@ -0,0 +1,99 @@
+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/test/wsdl/raa/server.rb b/test/wsdl/raa/RAAService.rb
index 95e63dcd31..42cdfaea47 100644
--- a/test/wsdl/raa/server.rb
+++ b/test/wsdl/raa/RAAService.rb
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
+require 'RAAServant.rb'
+
require 'soap/rpc/standaloneServer'
-require 'RAA.rb'
class RAABaseServicePortType
MappingRegistry = SOAP::Mapping::Registry.new
@@ -13,9 +14,9 @@ class RAABaseServicePortType
)
MappingRegistry.set(
Map,
- ::SOAP::SOAPStruct,
- ::SOAP::Mapping::Registry::TypedStructFactory,
- { :type => XSD::QName.new("http://xml.apache.org/xml-soap", "Map") }
+ ::SOAP::SOAPArray,
+ ::SOAP::Mapping::Registry::TypedArrayFactory,
+ { :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType") }
)
MappingRegistry.set(
Category,
@@ -47,48 +48,39 @@ class RAABaseServicePortType
::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/"],
+ [::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/"],
+ [::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/"],
+ [::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/"],
+ [::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/"],
+ [::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/"]
+ [::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
+class App < SOAP::RPC::StandaloneServer
def initialize(*arg)
super
@@ -102,3 +94,8 @@ class RAABaseServiceServer < SOAP::RPC::StandaloneServer
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/test/wsdl/raa/README.txt b/test/wsdl/raa/README.txt
index e884db9bb4..efbaf9d87c 100644
--- a/test/wsdl/raa/README.txt
+++ b/test/wsdl/raa/README.txt
@@ -1,4 +1,7 @@
-server.rb: based on RAAService.rb which is generated with the following command;
+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;
diff --git a/test/wsdl/raa/test_raa.rb b/test/wsdl/raa/test_raa.rb
index f90c6222f4..86452a0b40 100644
--- a/test/wsdl/raa/test_raa.rb
+++ b/test/wsdl/raa/test_raa.rb
@@ -18,9 +18,11 @@ class TestRAA < Test::Unit::TestCase
def setup_server
$:.push(DIR)
- require File.join(DIR, 'server.rb')
+ require File.join(DIR, 'RAA.rb')
+ require File.join(DIR, 'RAAServant.rb')
+ require File.join(DIR, 'RAAService.rb')
$:.delete(DIR)
- @server = RAABaseServiceServer.new('RAA server', nil, '0.0.0.0', Port)
+ @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