summaryrefslogtreecommitdiffstats
path: root/sample
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-03 15:38:36 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-03 15:38:36 +0000
commit6133b96d61c705c7aefdf6f577f0da5796bc522d (patch)
treece6b571d063d031d1b5cba3ba7671ca138405a3a /sample
parent70105b2706511a6358a32b805fb55f187e942698 (diff)
downloadruby-6133b96d61c705c7aefdf6f577f0da5796bc522d.tar.gz
ruby-6133b96d61c705c7aefdf6f577f0da5796bc522d.tar.xz
ruby-6133b96d61c705c7aefdf6f577f0da5796bc522d.zip
This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/soap/authheader/authmgr.rb41
-rw-r--r--sample/soap/authheader/client.rb40
-rw-r--r--sample/soap/authheader/client2.rb39
-rw-r--r--sample/soap/authheader/server.rb72
-rw-r--r--sample/soap/authheader/server2.rb77
-rw-r--r--sample/soap/raa2.4/raa.rb332
-rw-r--r--sample/soap/raa2.4/raaDriver.rb255
-rw-r--r--sample/soap/raa2.4/raaServiceClient.rb354
-rw-r--r--sample/soap/raa2.4/sample.rb115
-rw-r--r--sample/soap/ssl/files/README1
-rw-r--r--sample/soap/ssl/files/ca.cert23
-rw-r--r--sample/soap/ssl/files/client.cert19
-rw-r--r--sample/soap/ssl/files/client.key15
-rw-r--r--sample/soap/ssl/files/server.cert19
-rw-r--r--sample/soap/ssl/files/server.key15
-rw-r--r--sample/soap/ssl/files/sslclient.properties5
-rw-r--r--sample/soap/ssl/files/sslclient_require_noserverauth.properties2
-rw-r--r--sample/soap/ssl/files/sslclient_with_clientauth.properties9
-rw-r--r--sample/soap/ssl/files/subca.cert21
-rw-r--r--sample/soap/ssl/sslclient.rb12
-rw-r--r--sample/soap/ssl/sslclient_require_noserverauth.rb12
-rw-r--r--sample/soap/ssl/sslclient_with_clientauth.rb12
-rw-r--r--sample/soap/ssl/sslserver.rb49
-rw-r--r--sample/soap/ssl/sslserver_noauth.rb45
-rw-r--r--sample/soap/ssl/sslserver_require_clientauth.rb50
-rw-r--r--sample/soap/swa/client.rb13
-rw-r--r--sample/soap/swa/server.rb23
-rw-r--r--sample/soap/whois.rb14
-rw-r--r--sample/wsdl/raa2.4/raa.rb332
-rw-r--r--sample/wsdl/raa2.4/wsdlDriver.rb117
30 files changed, 2133 insertions, 0 deletions
diff --git a/sample/soap/authheader/authmgr.rb b/sample/soap/authheader/authmgr.rb
new file mode 100644
index 000000000..a4d3b66c0
--- /dev/null
+++ b/sample/soap/authheader/authmgr.rb
@@ -0,0 +1,41 @@
+class Authmgr
+ def initialize
+ @users = {
+ 'NaHi' => 'passwd',
+ 'HiNa' => 'wspass'
+ }
+ @sessions = {}
+ end
+
+ def login(userid, passwd)
+ userid and passwd and @users[userid] == passwd
+ end
+
+ # returns userid
+ def auth(sessionid)
+ @sessions[sessionid]
+ end
+
+ def create_session(userid)
+ while true
+ key = create_sessionkey
+ break unless @sessions[key]
+ end
+ @sessions[key] = userid
+ key
+ end
+
+ def get_session(userid)
+ @sessions.index(userid)
+ end
+
+ def destroy_session(sessionkey)
+ @sessions.delete(sessionkey)
+ end
+
+private
+
+ def create_sessionkey
+ Time.now.usec.to_s
+ end
+end
diff --git a/sample/soap/authheader/client.rb b/sample/soap/authheader/client.rb
new file mode 100644
index 000000000..4055fe63f
--- /dev/null
+++ b/sample/soap/authheader/client.rb
@@ -0,0 +1,40 @@
+require 'soap/rpc/driver'
+require 'soap/header/simplehandler'
+
+server = ARGV.shift || 'http://localhost:7000/'
+
+class ClientAuthHeaderHandler < SOAP::Header::SimpleHandler
+ MyHeaderName = XSD::QName.new("http://tempuri.org/authHeader", "auth")
+
+ def initialize(userid, passwd)
+ super(MyHeaderName)
+ @sessionid = nil
+ @userid = userid
+ @passwd = passwd
+ @mustunderstand = true
+ end
+
+ def on_simple_outbound
+ if @sessionid
+ { "sessionid" => @sessionid }
+ else
+ { "userid" => @userid, "passwd" => @passwd }
+ end
+ end
+
+ def on_simple_inbound(my_header, mustunderstand)
+ @sessionid = my_header["sessionid"]
+ end
+end
+
+ns = 'http://tempuri.org/authHeaderPort'
+serv = SOAP::RPC::Driver.new(server, ns)
+serv.add_method('deposit', 'amt')
+serv.add_method('withdrawal', 'amt')
+
+serv.headerhandler << ClientAuthHeaderHandler.new('NaHi', 'passwd')
+
+serv.wiredump_dev = STDOUT
+
+p serv.deposit(150)
+p serv.withdrawal(120)
diff --git a/sample/soap/authheader/client2.rb b/sample/soap/authheader/client2.rb
new file mode 100644
index 000000000..58a7da45a
--- /dev/null
+++ b/sample/soap/authheader/client2.rb
@@ -0,0 +1,39 @@
+require 'soap/rpc/driver'
+require 'soap/header/simplehandler'
+
+server = ARGV.shift || 'http://localhost:7000/'
+
+class ClientAuthHeaderHandler < SOAP::Header::SimpleHandler
+ MyHeaderName = XSD::QName.new("http://tempuri.org/authHeader", "auth")
+
+ def initialize(userid, passwd)
+ super(MyHeaderName)
+ @sessionid = nil
+ @userid = userid
+ @passwd = passwd
+ end
+
+ def on_simple_outbound
+ if @sessionid
+ { "sessionid" => @sessionid }
+ else
+ { "userid" => @userid, "passwd" => @passwd }
+ end
+ end
+
+ def on_simple_inbound(my_header, mustunderstand)
+ @sessionid = my_header["sessionid"]
+ end
+end
+
+ns = 'http://tempuri.org/authHeaderPort'
+serv = SOAP::RPC::Driver.new(server, ns)
+serv.add_method('deposit', 'amt')
+serv.add_method('withdrawal', 'amt')
+
+serv.headerhandler << ClientAuthHeaderHandler.new('NaHi', 'passwd')
+
+serv.wiredump_dev = STDOUT
+
+p serv.deposit(150)
+p serv.withdrawal(120)
diff --git a/sample/soap/authheader/server.rb b/sample/soap/authheader/server.rb
new file mode 100644
index 000000000..6b562d02f
--- /dev/null
+++ b/sample/soap/authheader/server.rb
@@ -0,0 +1,72 @@
+#!/usr/bin/env ruby
+
+require 'soap/rpc/standaloneServer'
+require 'soap/header/simplehandler'
+require 'authmgr'
+
+class AuthHeaderPortServer < SOAP::RPC::StandaloneServer
+ class AuthHeaderService
+ def self.create
+ new
+ end
+
+ def deposit(amt)
+ "deposit #{amt} OK"
+ end
+
+ def withdrawal(amt)
+ "withdrawal #{amt} OK"
+ end
+ end
+
+ Name = 'http://tempuri.org/authHeaderPort'
+ def initialize(*arg)
+ super
+ add_rpc_servant(AuthHeaderService.new, Name)
+ add_rpc_request_headerhandler(ServerAuthHeaderHandler)
+ end
+
+ class ServerAuthHeaderHandler < SOAP::Header::SimpleHandler
+ MyHeaderName = XSD::QName.new("http://tempuri.org/authHeader", "auth")
+
+ @authmgr = Authmgr.new
+ def self.create
+ new(@authmgr)
+ end
+
+ def initialize(authmgr)
+ super(MyHeaderName)
+ @authmgr = authmgr
+ @userid = @sessionid = nil
+ end
+
+ def on_simple_outbound
+ { "sessionid" => @sessionid }
+ end
+
+ def on_simple_inbound(my_header, mu)
+ auth = false
+ userid = my_header["userid"]
+ passwd = my_header["passwd"]
+ if @authmgr.login(userid, passwd)
+ auth = true
+ elsif sessionid = my_header["sessionid"]
+ if userid = @authmgr.auth(sessionid)
+ @authmgr.destroy_session(sessionid)
+ auth = true
+ end
+ end
+ raise RuntimeError.new("authentication failed") unless auth
+ @userid = userid
+ @sessionid = @authmgr.create_session(userid)
+ end
+ end
+end
+
+if $0 == __FILE__
+ svr = AuthHeaderPortServer.new('AuthHeaderPortServer', nil, '0.0.0.0', 7000)
+ trap(:INT) do
+ svr.shutdown
+ end
+ status = svr.start
+end
diff --git a/sample/soap/authheader/server2.rb b/sample/soap/authheader/server2.rb
new file mode 100644
index 000000000..b0065e314
--- /dev/null
+++ b/sample/soap/authheader/server2.rb
@@ -0,0 +1,77 @@
+#!/usr/bin/env ruby
+
+require 'soap/rpc/standaloneServer'
+require 'soap/header/simplehandler'
+require 'authmgr'
+
+class AuthHeaderPortServer < SOAP::RPC::StandaloneServer
+ class AuthHeaderService
+ def self.create
+ new
+ end
+
+ def initialize(authmgr)
+ @authmgr = authmgr
+ end
+
+ def login(userid, passwd)
+ if @authmgr.login(userid, passwd)
+ @authmgr.create_session(userid)
+ else
+ raise RuntimeError.new("authentication failed")
+ end
+ end
+
+ def deposit(amt)
+ "deposit #{amt} OK"
+ end
+
+ def withdrawal(amt)
+ "withdrawal #{amt} OK"
+ end
+ end
+
+ Name = 'http://tempuri.org/authHeaderPort'
+ def initialize(*arg)
+ super
+ add_rpc_servant(AuthHeaderService.new, Name)
+ ServerAuthHeaderHandler.init
+ add_rpc_request_headerhandler(ServerAuthHeaderHandler)
+ end
+
+ class ServerAuthHeaderHandler < SOAP::Header::SimpleHandler
+ MyHeaderName = XSD::QName.new("http://tempuri.org/authHeader", "auth")
+
+ def self.create
+ new(@authmgr)
+ end
+
+ def initialize(authmgr)
+ super(MyHeaderName)
+ @authmgr = authmgr
+ @sessionid = nil
+ end
+
+ def on_simple_outbound
+ if @sessionid
+ { "sessionid" => @sessionid }
+ end
+ end
+
+ def on_simple_inbound(my_header, mu)
+ auth = false
+ if sessionid = my_header["sessionid"]
+ if userid = @authmgr.auth(sessionid)
+ @authmgr.destroy_session(sessionid)
+ @session_id = @authmgr.create_session(userid)
+ auth = true
+ end
+ end
+ raise RuntimeError.new("authentication failed") unless auth
+ end
+ end
+end
+
+if $0 == __FILE__
+ status = AuthHeaderPortServer.new('AuthHeaderPortServer', nil, '0.0.0.0', 7000).start
+end
diff --git a/sample/soap/raa2.4/raa.rb b/sample/soap/raa2.4/raa.rb
new file mode 100644
index 000000000..9b4c4e41a
--- /dev/null
+++ b/sample/soap/raa2.4/raa.rb
@@ -0,0 +1,332 @@
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class Gem
+ @@schema_type = "Gem"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ def id
+ @id
+ end
+
+ def id=(value)
+ @id = value
+ end
+
+ def category
+ @category
+ end
+
+ def category=(value)
+ @category = value
+ end
+
+ def owner
+ @owner
+ end
+
+ def owner=(value)
+ @owner = value
+ end
+
+ def project
+ @project
+ end
+
+ def project=(value)
+ @project = value
+ end
+
+ def updated
+ @updated
+ end
+
+ def updated=(value)
+ @updated = value
+ end
+
+ def created
+ @created
+ end
+
+ def created=(value)
+ @created = value
+ end
+
+ def initialize(id = nil,
+ category = nil,
+ owner = nil,
+ project = nil,
+ updated = nil,
+ created = nil)
+ @id = id
+ @category = category
+ @owner = owner
+ @project = project
+ @updated = updated
+ @created = created
+ end
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class Category
+ @@schema_type = "Category"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ 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/type/RAA/0.0.3/
+class Owner
+ @@schema_type = "Owner"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ 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/type/RAA/0.0.3/
+class Project
+ @@schema_type = "Project"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ 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 url
+ @url
+ end
+
+ def url=(value)
+ @url = 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 updated
+ @updated
+ end
+
+ def updated=(value)
+ @updated = value
+ end
+
+ def history
+ @history
+ end
+
+ def history=(value)
+ @history = value
+ end
+
+ def dependency
+ @dependency
+ end
+
+ def dependency=(value)
+ @dependency = value
+ end
+
+ def initialize(name = nil,
+ short_description = nil,
+ version = nil,
+ status = nil,
+ url = nil,
+ download = nil,
+ license = nil,
+ description = nil,
+ updated = nil,
+ history = nil,
+ dependency = nil)
+ @name = name
+ @short_description = short_description
+ @version = version
+ @status = status
+ @url = url
+ @download = download
+ @license = license
+ @description = description
+ @updated = updated
+ @history = history
+ @dependency = dependency
+ end
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class ProjectDependency
+ @@schema_type = "ProjectDependency"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ def project
+ @project
+ end
+
+ def project=(value)
+ @project = value
+ end
+
+ def version
+ @version
+ end
+
+ def version=(value)
+ @version = value
+ end
+
+ def description
+ @description
+ end
+
+ def description=(value)
+ @description = value
+ end
+
+ def initialize(project = nil,
+ version = nil,
+ description = nil)
+ @project = project
+ @version = version
+ @description = description
+ end
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class GemArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "GemArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class OwnerArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "OwnerArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class ProjectArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "ProjectArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class ProjectDependencyArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "ProjectDependencyArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class StringArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "StringArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+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/sample/soap/raa2.4/raaDriver.rb b/sample/soap/raa2.4/raaDriver.rb
new file mode 100644
index 000000000..10d0ba257
--- /dev/null
+++ b/sample/soap/raa2.4/raaDriver.rb
@@ -0,0 +1,255 @@
+require 'raa.rb'
+
+require 'soap/rpc/driver'
+
+class RaaServicePortType < SOAP::RPC::Driver
+ TargetNamespace = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ MappingRegistry = ::SOAP::Mapping::Registry.new
+
+ MappingRegistry.set(
+ Gem,
+ ::SOAP::SOAPStruct,
+ ::SOAP::Mapping::Registry::TypedStructFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Gem") }
+ )
+ MappingRegistry.set(
+ Category,
+ ::SOAP::SOAPStruct,
+ ::SOAP::Mapping::Registry::TypedStructFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Category") }
+ )
+ MappingRegistry.set(
+ Owner,
+ ::SOAP::SOAPStruct,
+ ::SOAP::Mapping::Registry::TypedStructFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Owner") }
+ )
+ MappingRegistry.set(
+ Project,
+ ::SOAP::SOAPStruct,
+ ::SOAP::Mapping::Registry::TypedStructFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Project") }
+ )
+ MappingRegistry.set(
+ ProjectArray,
+ ::SOAP::SOAPArray,
+ ::SOAP::Mapping::Registry::TypedArrayFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Project") }
+ )
+ MappingRegistry.set(
+ ProjectDependencyArray,
+ ::SOAP::SOAPArray,
+ ::SOAP::Mapping::Registry::TypedArrayFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "ProjectDependency") }
+ )
+ 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(
+ OwnerArray,
+ ::SOAP::SOAPArray,
+ ::SOAP::Mapping::Registry::TypedArrayFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Owner") }
+ )
+ MappingRegistry.set(
+ ProjectDependency,
+ ::SOAP::SOAPStruct,
+ ::SOAP::Mapping::Registry::TypedStructFactory,
+ { :type => XSD::QName.new("http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "ProjectDependency") }
+ )
+ Methods = [
+ ["gem", "gem",
+ [
+ ["in", "name", [SOAP::SOAPString]],
+ ["retval", "return", [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Gem"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["dependents", "dependents",
+ [
+ ["in", "name", [SOAP::SOAPString]],
+ ["in", "version", [SOAP::SOAPString]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "ProjectDependency"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["names", "names",
+ [
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["size", "size",
+ [
+ ["retval", "return", [SOAP::SOAPInt]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_by_category", "list_by_category",
+ [
+ ["in", "major", [SOAP::SOAPString]],
+ ["in", "minor", [SOAP::SOAPString]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["tree_by_category", "tree_by_category",
+ [
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "anyType"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_recent_updated", "list_recent_updated",
+ [
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_recent_created", "list_recent_created",
+ [
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_updated_since", "list_updated_since",
+ [
+ ["in", "date", [SOAP::SOAPDateTime]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_created_since", "list_created_since",
+ [
+ ["in", "date", [SOAP::SOAPDateTime]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_by_owner", "list_by_owner",
+ [
+ ["in", "owner_id", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search_name", "search_name",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search_short_description", "search_short_description",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search_owner", "search_owner",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search_version", "search_version",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search_status", "search_status",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search_description", "search_description",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "string"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["search", "search",
+ [
+ ["in", "substring", [SOAP::SOAPString]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.w3.org/2001/XMLSchema", "anyType"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["owner", "owner",
+ [
+ ["in", "owner_id", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Owner"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["list_owner", "list_owner",
+ [
+ ["in", "idx", [SOAP::SOAPInt]],
+ ["retval", "return", [::SOAP::SOAPArray, "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Owner"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["update", "update",
+ [
+ ["in", "name", [SOAP::SOAPString]],
+ ["in", "pass", [SOAP::SOAPString]],
+ ["in", "gem", [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Gem"]],
+ ["retval", "return", [::SOAP::SOAPStruct, "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/", "Gem"]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ],
+ ["update_pass", "update_pass",
+ [
+ ["in", "name", [SOAP::SOAPString]],
+ ["in", "oldpass", [SOAP::SOAPString]],
+ ["in", "newpass", [SOAP::SOAPString]]
+ ],
+ "", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/"
+ ]
+ ]
+
+ DefaultEndpointUrl = "http://raa.ruby-lang.org/soapsrv"
+
+ 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|
+ qname = XSD::QName.new(namespace, name_as)
+ @proxy.add_method(qname, soapaction, name, params)
+ add_rpc_method_interface(name, params)
+ end
+ end
+end
+
diff --git a/sample/soap/raa2.4/raaServiceClient.rb b/sample/soap/raa2.4/raaServiceClient.rb
new file mode 100644
index 000000000..a59815ba7
--- /dev/null
+++ b/sample/soap/raa2.4/raaServiceClient.rb
@@ -0,0 +1,354 @@
+#!/usr/bin/env ruby
+require 'raaDriver.rb'
+
+endpoint_url = ARGV.shift
+obj = RaaServicePortType.new(endpoint_url)
+
+# Uncomment the below line to see SOAP wiredumps.
+# obj.wiredump_dev = STDERR
+
+# SYNOPSIS
+# gem(name)
+#
+# ARGS
+# name - {http://www.w3.org/2001/XMLSchema}string
+#
+# RETURNS
+# return Gem - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}Gem
+#
+# RAISES
+# (undefined)
+#
+name = nil
+puts obj.gem(name)
+
+# SYNOPSIS
+# dependents(name, version)
+#
+# ARGS
+# name - {http://www.w3.org/2001/XMLSchema}string
+# version - {http://www.w3.org/2001/XMLSchema}string
+#
+# RETURNS
+# return ProjectDependencyArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}ProjectDependencyArray
+#
+# RAISES
+# (undefined)
+#
+name = version = nil
+puts obj.dependents(name, version)
+
+# SYNOPSIS
+# names
+#
+# ARGS
+# N/A
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+
+puts obj.names
+
+# SYNOPSIS
+# size
+#
+# ARGS
+# N/A
+#
+# RETURNS
+# return - {http://www.w3.org/2001/XMLSchema}int
+#
+# RAISES
+# (undefined)
+#
+
+puts obj.size
+
+# SYNOPSIS
+# list_by_category(major, minor)
+#
+# ARGS
+# major - {http://www.w3.org/2001/XMLSchema}string
+# minor - {http://www.w3.org/2001/XMLSchema}string
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+major = minor = nil
+puts obj.list_by_category(major, minor)
+
+# SYNOPSIS
+# tree_by_category
+#
+# ARGS
+# N/A
+#
+# RETURNS
+# return Map - {http://xml.apache.org/xml-soap}Map
+#
+# RAISES
+# (undefined)
+#
+
+puts obj.tree_by_category
+
+# SYNOPSIS
+# list_recent_updated(idx)
+#
+# ARGS
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+idx = nil
+puts obj.list_recent_updated(idx)
+
+# SYNOPSIS
+# list_recent_created(idx)
+#
+# ARGS
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+idx = nil
+puts obj.list_recent_created(idx)
+
+# SYNOPSIS
+# list_updated_since(date, idx)
+#
+# ARGS
+# date - {http://www.w3.org/2001/XMLSchema}dateTime
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+date = idx = nil
+puts obj.list_updated_since(date, idx)
+
+# SYNOPSIS
+# list_created_since(date, idx)
+#
+# ARGS
+# date - {http://www.w3.org/2001/XMLSchema}dateTime
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+date = idx = nil
+puts obj.list_created_since(date, idx)
+
+# SYNOPSIS
+# list_by_owner(owner_id)
+#
+# ARGS
+# owner_id - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+owner_id = nil
+puts obj.list_by_owner(owner_id)
+
+# SYNOPSIS
+# search_name(substring, idx)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+substring = idx = nil
+puts obj.search_name(substring, idx)
+
+# SYNOPSIS
+# search_short_description(substring, idx)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+substring = idx = nil
+puts obj.search_short_description(substring, idx)
+
+# SYNOPSIS
+# search_owner(substring, idx)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+substring = idx = nil
+puts obj.search_owner(substring, idx)
+
+# SYNOPSIS
+# search_version(substring, idx)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+substring = idx = nil
+puts obj.search_version(substring, idx)
+
+# SYNOPSIS
+# search_status(substring, idx)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+substring = idx = nil
+puts obj.search_status(substring, idx)
+
+# SYNOPSIS
+# search_description(substring, idx)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return StringArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}StringArray
+#
+# RAISES
+# (undefined)
+#
+substring = idx = nil
+puts obj.search_description(substring, idx)
+
+# SYNOPSIS
+# search(substring)
+#
+# ARGS
+# substring - {http://www.w3.org/2001/XMLSchema}string
+#
+# RETURNS
+# return Map - {http://xml.apache.org/xml-soap}Map
+#
+# RAISES
+# (undefined)
+#
+substring = nil
+puts obj.search(substring)
+
+# SYNOPSIS
+# owner(owner_id)
+#
+# ARGS
+# owner_id - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return Owner - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}Owner
+#
+# RAISES
+# (undefined)
+#
+owner_id = nil
+puts obj.owner(owner_id)
+
+# SYNOPSIS
+# list_owner(idx)
+#
+# ARGS
+# idx - {http://www.w3.org/2001/XMLSchema}int
+#
+# RETURNS
+# return OwnerArray - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}OwnerArray
+#
+# RAISES
+# (undefined)
+#
+idx = nil
+puts obj.list_owner(idx)
+
+# SYNOPSIS
+# update(name, pass, gem)
+#
+# ARGS
+# name - {http://www.w3.org/2001/XMLSchema}string
+# pass - {http://www.w3.org/2001/XMLSchema}string
+# gem Gem - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}Gem
+#
+# RETURNS
+# return Gem - {http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/}Gem
+#
+# RAISES
+# (undefined)
+#
+name = pass = gem = nil
+puts obj.update(name, pass, gem)
+
+# SYNOPSIS
+# update_pass(name, oldpass, newpass)
+#
+# ARGS
+# name - {http://www.w3.org/2001/XMLSchema}string
+# oldpass - {http://www.w3.org/2001/XMLSchema}string
+# newpass - {http://www.w3.org/2001/XMLSchema}string
+#
+# RETURNS
+# N/A
+#
+# RAISES
+# (undefined)
+#
+name = oldpass = newpass = nil
+puts obj.update_pass(name, oldpass, newpass)
+
+
diff --git a/sample/soap/raa2.4/sample.rb b/sample/soap/raa2.4/sample.rb
new file mode 100644
index 000000000..e157f8361
--- /dev/null
+++ b/sample/soap/raa2.4/sample.rb
@@ -0,0 +1,115 @@
+#!/usr/bin/env ruby
+
+# This is a sample client based on raaServiceClient.rb.
+# You can generate raaServiceClient.rb and related files with
+# wsdl2ruby.rb --wsdl http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/ --type client
+
+require 'pp'
+require 'raaDriver.rb'
+
+raa = RaaServicePortType.new
+# raa.wiredump_dev = STDERR
+
+def sec(msg)
+ puts
+ puts "--------"
+ puts "-- " + msg
+ puts
+end
+
+def subsec(msg)
+ puts "-- " + msg
+end
+
+sec("retrieve a gem (RAA Information) which has specified name")
+name = 'soap4r'
+pp raa.gem(name)
+
+sec("retrieve dependents of the project")
+name = 'http-access2'; version = nil
+pp raa.dependents(name, version)
+
+sec("number of registered gems")
+puts raa.size
+
+sec("retrieve all registered gem names")
+p raa.names
+
+sec("retrieve gems of specified category")
+major = 'Library'; minor = 'XML'
+p raa.list_by_category(major, minor)
+
+sec("retrieve category tree")
+pp raa.tree_by_category
+
+sec("retrieve gems which is updated recently")
+idx = 0
+p raa.list_recent_updated(idx)
+subsec("next 10 gems")
+idx += 1
+p raa.list_recent_updated(idx)
+subsec("next 10 gems")
+idx += 1
+p raa.list_recent_updated(idx)
+
+sec("retrieve gems which is created recently")
+p raa.list_recent_created(idx)
+
+sec("retrieve gems which is updated in 7 days")
+date = Time.now - 7 * 24 * 60 * 60; idx = 0
+p raa.list_updated_since(date, idx)
+
+sec("retrieve gems which is created in 7 days")
+p raa.list_created_since(date, idx)
+
+sec("retrieve gems of specified owner")
+owner_id = 8 # NaHi
+p raa.list_by_owner(owner_id)
+
+sec("search gems with keyword")
+substring = 'soap'
+pp raa.search(substring)
+
+# There are several search interface to search a field explicitly.
+# puts raa.search_name(substring, idx)
+# puts raa.search_short_description(substring, idx)
+# puts raa.search_owner(substring, idx)
+# puts raa.search_version(substring, idx)
+# puts raa.search_status(substring, idx)
+# puts raa.search_description(substring, idx)
+
+sec("retrieve owner info")
+owner_id = 8
+pp raa.owner(owner_id)
+
+sec("retrieve owners")
+idx = 0
+p raa.list_owner(idx)
+
+sec("update 'sampleproject'")
+name = 'sampleproject'
+pass = 'sampleproject'
+gem = raa.gem(name)
+p gem.project.version
+gem.project.version.succ!
+gem.updated = Time.now
+raa.update(name, pass, gem)
+p raa.gem(name).project.version
+
+sec("update pass phrase")
+raa.update_pass(name, 'sampleproject', 'foo')
+subsec("update check")
+gem = raa.gem(name)
+gem.project.description = 'Current pass phrase is "foo"'
+gem.updated = Time.now
+raa.update(name, 'foo', gem)
+#
+subsec("recover pass phrase")
+raa.update_pass(name, 'foo', 'sampleproject')
+subsec("update check")
+gem = raa.gem(name)
+gem.project.description = 'Current pass phrase is "sampleproject"'
+gem.updated = Time.now
+raa.update(name, 'sampleproject', gem)
+
+sec("done")
diff --git a/sample/soap/ssl/files/README b/sample/soap/ssl/files/README
new file mode 100644
index 000000000..98ebcf7c2
--- /dev/null
+++ b/sample/soap/ssl/files/README
@@ -0,0 +1 @@
+* certificates and keys in this directory is copied from http-access2 test.
diff --git a/sample/soap/ssl/files/ca.cert b/sample/soap/ssl/files/ca.cert
new file mode 100644
index 000000000..bcabbee4a
--- /dev/null
+++ b/sample/soap/ssl/files/ca.cert
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID0DCCArigAwIBAgIBADANBgkqhkiG9w0BAQUFADA8MQswCQYDVQQGDAJKUDES
+MBAGA1UECgwJSklOLkdSLkpQMQwwCgYDVQQLDANSUlIxCzAJBgNVBAMMAkNBMB4X
+DTA0MDEzMDAwNDIzMloXDTM2MDEyMjAwNDIzMlowPDELMAkGA1UEBgwCSlAxEjAQ
+BgNVBAoMCUpJTi5HUi5KUDEMMAoGA1UECwwDUlJSMQswCQYDVQQDDAJDQTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANbv0x42BTKFEQOE+KJ2XmiSdZpR
+wjzQLAkPLRnLB98tlzs4xo+y4RyY/rd5TT9UzBJTIhP8CJi5GbS1oXEerQXB3P0d
+L5oSSMwGGyuIzgZe5+vZ1kgzQxMEKMMKlzA73rbMd4Jx3u5+jdbP0EDrPYfXSvLY
+bS04n2aX7zrN3x5KdDrNBfwBio2/qeaaj4+9OxnwRvYP3WOvqdW0h329eMfHw0pi
+JI0drIVdsEqClUV4pebT/F+CPUPkEh/weySgo9wANockkYu5ujw2GbLFcO5LXxxm
+dEfcVr3r6t6zOA4bJwL0W/e6LBcrwiG/qPDFErhwtgTLYf6Er67SzLyA66UCAwEA
+AaOB3DCB2TAPBgNVHRMBAf8EBTADAQH/MDEGCWCGSAGG+EIBDQQkFiJSdWJ5L09w
+ZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRJ7Xd380KzBV7f
+USKIQ+O/vKbhDzAOBgNVHQ8BAf8EBAMCAQYwZAYDVR0jBF0wW4AUSe13d/NCswVe
+31EiiEPjv7ym4Q+hQKQ+MDwxCzAJBgNVBAYMAkpQMRIwEAYDVQQKDAlKSU4uR1Iu
+SlAxDDAKBgNVBAsMA1JSUjELMAkGA1UEAwwCQ0GCAQAwDQYJKoZIhvcNAQEFBQAD
+ggEBAIu/mfiez5XN5tn2jScgShPgHEFJBR0BTJBZF6xCk0jyqNx/g9HMj2ELCuK+
+r/Y7KFW5c5M3AQ+xWW0ZSc4kvzyTcV7yTVIwj2jZ9ddYMN3nupZFgBK1GB4Y05GY
+MJJFRkSu6d/Ph5ypzBVw2YMT/nsOo5VwMUGLgS7YVjU+u/HNWz80J3oO17mNZllj
+PvORJcnjwlroDnS58KoJ7GDgejv3ESWADvX1OHLE4cRkiQGeLoEU4pxdCxXRqX0U
+PbwIkZN9mXVcrmPHq8MWi4eC/V7hnbZETMHuWhUoiNdOEfsAXr3iP4KjyyRdwc7a
+d/xgcK06UVQRL/HbEYGiQL056mc=
+-----END CERTIFICATE-----
diff --git a/sample/soap/ssl/files/client.cert b/sample/soap/ssl/files/client.cert
new file mode 100644
index 000000000..ad13c4b73
--- /dev/null
+++ b/sample/soap/ssl/files/client.cert
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDKDCCAhCgAwIBAgIBAjANBgkqhkiG9w0BAQUFADA8MQswCQYDVQQGDAJKUDES
+MBAGA1UECgwJSklOLkdSLkpQMQwwCgYDVQQLDANSUlIxCzAJBgNVBAMMAkNBMB4X
+DTA0MDEzMTAzMTQ1OFoXDTM1MDEyMzAzMTQ1OFowZTELMAkGA1UEBgwCSlAxEjAQ
+BgNVBAoMCUpJTi5HUi5KUDEMMAoGA1UECwwDUlJSMRAwDgYDVQQDDAdleGFtcGxl
+MSIwIAYJKoZIhvcNAQkBDBNleGFtcGxlQGV4YW1wbGUub3JnMIGfMA0GCSqGSIb3
+DQEBAQUAA4GNADCBiQKBgQDRWssrK8Gyr+500hpLjCGR3+AHL8/hEJM5zKi/MgLW
+jTkvsgOwbYwXOiNtAbR9y4/ucDq7EY+cMUMHES4uFaPTcOaAV0aZRmk8AgslN1tQ
+gNS6ew7/Luq3DcVeWkX8PYgR9VG0mD1MPfJ6+IFA5d3vKpdBkBgN4l46jjO0/2Xf
+ewIDAQABo4GPMIGMMAwGA1UdEwEB/wQCMAAwMQYJYIZIAYb4QgENBCQWIlJ1Ynkv
+T3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFOFvay0H7lr2
+xUx6waYEV2bVDYQhMAsGA1UdDwQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYI
+KwYBBQUHAwQwDQYJKoZIhvcNAQEFBQADggEBABd2dYWqbDIWf5sWFvslezxJv8gI
+w64KCJBuyJAiDuf+oazr3016kMzAlt97KecLZDusGNagPrq02UX7YMoQFsWJBans
+cDtHrkM0al5r6/WGexNMgtYbNTYzt/IwodISGBgZ6dsOuhznwms+IBsTNDAvWeLP
+lt2tOqD8kEmjwMgn0GDRuKjs4EoboA3kMULb1p9akDV9ZESU3eOtpS5/G5J5msLI
+9WXbYBjcjvkLuJH9VsJhb+R58Vl0ViemvAHhPilSl1SPWVunGhv6FcIkdBEi1k9F
+e8BNMmsEjFiANiIRvpdLRbiGBt0KrKTndVfsmoKCvY48oCOvnzxtahFxfs8=
+-----END CERTIFICATE-----
diff --git a/sample/soap/ssl/files/client.key b/sample/soap/ssl/files/client.key
new file mode 100644
index 000000000..37bc62f25
--- /dev/null
+++ b/sample/soap/ssl/files/client.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQDRWssrK8Gyr+500hpLjCGR3+AHL8/hEJM5zKi/MgLWjTkvsgOw
+bYwXOiNtAbR9y4/ucDq7EY+cMUMHES4uFaPTcOaAV0aZRmk8AgslN1tQgNS6ew7/
+Luq3DcVeWkX8PYgR9VG0mD1MPfJ6+IFA5d3vKpdBkBgN4l46jjO0/2XfewIDAQAB
+AoGAZcz8llWErtsV3QB9gNb3S/PNADGjqBFjReva8n3jG2k4sZSibpwWTwUaTNtT
+ZQgjSRKRvH1hk9XwffNAvXAQZNNkuj/16gO2oO45nyLj4dO365ujLptWnVIWDHOE
+uN0GeiZO+VzcCisT0WCq4tvtLeH8svrxzA8cbXIEyOK7NiECQQDwo2zPFyKAZ/Cu
+lDJ6zKT+RjfWwW7DgWzirAlTrt4ViMaW+IaDH29TmQpb4V4NuR3Xi+2Xl4oicu6S
+36TW9+/FAkEA3rgfOQJuLlWSnw1RTGwvnC816a/W7iYYY7B+0U4cDbfWl7IoXT4y
+M8nV/HESooviZLqBwzAYSoj3fFKYBKpGPwJAUO8GN5iWWA2dW3ooiDiv/X1sZmRk
+dojfMFWgRW747tEzya8Ivq0h6kH8w+5GjeMG8Gn1nRiwsulo6Ckj7dEx6QJACyui
+7UIQ8qP6GZ4aYMHgVW4Mvy7Bkeo5OO7GPYs0Xv/EdJFL8vlGnVBXOjUVoS9w6Gpu
+TbLg1QQvnX2rADjmEwJANxZO2GUkaWGsEif8aGW0x5g/IdaMGG27pTWk5zqix7P3
+1UDrdo/JOXhptovhRi06EppIxAxYmbh9vd9VN8Itlw==
+-----END RSA PRIVATE KEY-----
diff --git a/sample/soap/ssl/files/server.cert b/sample/soap/ssl/files/server.cert
new file mode 100644
index 000000000..998ccc589
--- /dev/null
+++ b/sample/soap/ssl/files/server.cert
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIC/zCCAeegAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQGDAJKUDES
+MBAGA1UECgwJSklOLkdSLkpQMQwwCgYDVQQLDANSUlIxDjAMBgNVBAMMBVN1YkNB
+MB4XDTA0MDEzMTAzMTMxNloXDTMzMDEyMzAzMTMxNlowQzELMAkGA1UEBgwCSlAx
+EjAQBgNVBAoMCUpJTi5HUi5KUDEMMAoGA1UECwwDUlJSMRIwEAYDVQQDDAlsb2Nh
+bGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANFJTxWqup3nV9dsJAku
+p+WaXnPNIzcpAA3qMGZDJTJsfa8Du7ZxTP0XJK5mETttBrn711cJxAuP3KjqnW9S
+vtZ9lY2sXJ6Zj62sN5LwG3VVe25dI28yR1EsbHjJ5Zjf9tmggMC6am52dxuHbt5/
+vHo4ngJuKE/U+eeGRivMn6gFAgMBAAGjgYUwgYIwDAYDVR0TAQH/BAIwADAxBglg
+hkgBhvhCAQ0EJBYiUnVieS9PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAd
+BgNVHQ4EFgQUpZIyygD9JxFYHHOTEuWOLbCKfckwCwYDVR0PBAQDAgWgMBMGA1Ud
+JQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4IBAQBwAIj5SaBHaA5X31IP
+CFCJiep96awfp7RANO0cuUj+ZpGoFn9d6FXY0g+Eg5wAkCNIzZU5NHN9xsdOpnUo
+zIBbyTfQEPrge1CMWMvL6uGaoEXytq84VTitF/xBTky4KtTn6+es4/e7jrrzeUXQ
+RC46gkHObmDT91RkOEGjHLyld2328jo3DIN/VTHIryDeVHDWjY5dENwpwdkhhm60
+DR9IrNBbXWEe9emtguNXeN0iu1ux0lG1Hc6pWGQxMlRKNvGh0yZB9u5EVe38tOV0
+jQaoNyL7qzcQoXD3Dmbi1p0iRmg/+HngISsz8K7k7MBNVsSclztwgCzTZOBiVtkM
+rRlQ
+-----END CERTIFICATE-----
diff --git a/sample/soap/ssl/files/server.key b/sample/soap/ssl/files/server.key
new file mode 100644
index 000000000..9ba2218a0
--- /dev/null
+++ b/sample/soap/ssl/files/server.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDRSU8Vqrqd51fXbCQJLqflml5zzSM3KQAN6jBmQyUybH2vA7u2
+cUz9FySuZhE7bQa5+9dXCcQLj9yo6p1vUr7WfZWNrFyemY+trDeS8Bt1VXtuXSNv
+MkdRLGx4yeWY3/bZoIDAumpudncbh27ef7x6OJ4CbihP1PnnhkYrzJ+oBQIDAQAB
+AoGBAIf4CstW2ltQO7+XYGoex7Hh8s9lTSW/G2vu5Hbr1LTHy3fzAvdq8MvVR12O
+rk9fa+lU9vhzPc0NMB0GIDZ9GcHuhW5hD1Wg9OSCbTOkZDoH3CAFqonjh4Qfwv5W
+IPAFn9KHukdqGXkwEMdErsUaPTy9A1V/aROVEaAY+HJgq/eZAkEA/BP1QMV04WEZ
+Oynzz7/lLizJGGxp2AOvEVtqMoycA/Qk+zdKP8ufE0wbmCE3Qd6GoynavsHb6aGK
+gQobb8zDZwJBANSK6MrXlrZTtEaeZuyOB4mAmRzGzOUVkUyULUjEx2GDT93ujAma
+qm/2d3E+wXAkNSeRpjUmlQXy/2oSqnGvYbMCQQDRM+cYyEcGPUVpWpnj0shrF/QU
+9vSot/X1G775EMTyaw6+BtbyNxVgOIu2J+rqGbn3c+b85XqTXOPL0A2RLYkFAkAm
+syhSDtE9X55aoWsCNZY/vi+i4rvaFoQ/WleogVQAeGVpdo7/DK9t9YWoFBIqth0L
+mGSYFu9ZhvZkvQNV8eYrAkBJ+rOIaLDsmbrgkeDruH+B/9yrm4McDtQ/rgnOGYnH
+LjLpLLOrgUxqpzLWe++EwSLwK2//dHO+SPsQJ4xsyQJy
+-----END RSA PRIVATE KEY-----
diff --git a/sample/soap/ssl/files/sslclient.properties b/sample/soap/ssl/files/sslclient.properties
new file mode 100644
index 000000000..547ac7b3f
--- /dev/null
+++ b/sample/soap/ssl/files/sslclient.properties
@@ -0,0 +1,5 @@
+# verify server's certificate
+protocol.http.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_PEER
+# certificates for verification
+protocol.http.ssl_config.ca_file = files/ca.cert
+protocol.http.ssl_config.ca_file = files/subca.cert
diff --git a/sample/soap/ssl/files/sslclient_require_noserverauth.properties b/sample/soap/ssl/files/sslclient_require_noserverauth.properties
new file mode 100644
index 000000000..5ce5337fb
--- /dev/null
+++ b/sample/soap/ssl/files/sslclient_require_noserverauth.properties
@@ -0,0 +1,2 @@
+# no verify server's certificate
+protocol.http.ssl_config.verify_mode =
diff --git a/sample/soap/ssl/files/sslclient_with_clientauth.properties b/sample/soap/ssl/files/sslclient_with_clientauth.properties
new file mode 100644
index 000000000..f1c81ebf4
--- /dev/null
+++ b/sample/soap/ssl/files/sslclient_with_clientauth.properties
@@ -0,0 +1,9 @@
+# verify server's certificate
+protocol.http.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_PEER
+# certificates for verification
+protocol.http.ssl_config.ca_file = files/ca.cert
+protocol.http.ssl_config.ca_file = files/subca.cert
+
+# key and certificate for client identity
+protocol.http.ssl_config.client_cert = files/client.cert
+protocol.http.ssl_config.client_key = files/client.key
diff --git a/sample/soap/ssl/files/subca.cert b/sample/soap/ssl/files/subca.cert
new file mode 100644
index 000000000..1e471851b
--- /dev/null
+++ b/sample/soap/ssl/files/subca.cert
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDaDCCAlCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MQswCQYDVQQGDAJKUDES
+MBAGA1UECgwJSklOLkdSLkpQMQwwCgYDVQQLDANSUlIxCzAJBgNVBAMMAkNBMB4X
+DTA0MDEzMDAwNDMyN1oXDTM1MDEyMjAwNDMyN1owPzELMAkGA1UEBgwCSlAxEjAQ
+BgNVBAoMCUpJTi5HUi5KUDEMMAoGA1UECwwDUlJSMQ4wDAYDVQQDDAVTdWJDQTCC
+ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ0Ou7AyRcRXnB/kVHv/6kwe
+ANzgg/DyJfsAUqW90m7Lu1nqyug8gK0RBd77yU0w5HOAMHTVSdpjZK0g2sgx4Mb1
+d/213eL9TTl5MRVEChTvQr8q5DVG/8fxPPE7fMI8eOAzd98/NOAChk+80r4Sx7fC
+kGVEE1bKwY1MrUsUNjOY2d6t3M4HHV3HX1V8ShuKfsHxgCmLzdI8U+5CnQedFgkm
+3e+8tr8IX5RR1wA1Ifw9VadF7OdI/bGMzog/Q8XCLf+WPFjnK7Gcx6JFtzF6Gi4x
+4dp1Xl45JYiVvi9zQ132wu8A1pDHhiNgQviyzbP+UjcB/tsOpzBQF8abYzgEkWEC
+AwEAAaNyMHAwDwYDVR0TAQH/BAUwAwEB/zAxBglghkgBhvhCAQ0EJBYiUnVieS9P
+cGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUlCjXWLsReYzH
+LzsxwVnCXmKoB/owCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCJ/OyN
+rT8Cq2Y+G2yA/L1EMRvvxwFBqxavqaqHl/6rwsIBFlB3zbqGA/0oec6MAVnYynq4
+c4AcHTjx3bQ/S4r2sNTZq0DH4SYbQzIobx/YW8PjQUJt8KQdKMcwwi7arHP7A/Ha
+LKu8eIC2nsUBnP4NhkYSGhbmpJK+PFD0FVtD0ZIRlY/wsnaZNjWWcnWF1/FNuQ4H
+ySjIblqVQkPuzebv3Ror6ZnVDukn96Mg7kP4u6zgxOeqlJGRe1M949SS9Vudjl8X
+SF4aZUUB9pQGhsqQJVqaz2OlhGOp9D0q54xko/rekjAIcuDjl1mdX4F2WRrzpUmZ
+uY/bPeOBYiVsOYVe
+-----END CERTIFICATE-----
diff --git a/sample/soap/ssl/sslclient.rb b/sample/soap/ssl/sslclient.rb
new file mode 100644
index 000000000..a055247a4
--- /dev/null
+++ b/sample/soap/ssl/sslclient.rb
@@ -0,0 +1,12 @@
+require 'http-access2'
+require 'soap/rpc/driver'
+
+# setup driver
+url = "https://localhost:17443/"
+client = SOAP::RPC::Driver.new(url, 'urn:sslhelloworld')
+client.add_method("hello_world", "from")
+# load SSL properties
+client.loadproperty('files/sslclient.properties')
+
+# SOAP over SSL
+p client.hello_world(__FILE__)
diff --git a/sample/soap/ssl/sslclient_require_noserverauth.rb b/sample/soap/ssl/sslclient_require_noserverauth.rb
new file mode 100644
index 000000000..af121e9a4
--- /dev/null
+++ b/sample/soap/ssl/sslclient_require_noserverauth.rb
@@ -0,0 +1,12 @@
+require 'http-access2'
+require 'soap/rpc/driver'
+
+# setup driver
+url = "https://localhost:17443/"
+client = SOAP::RPC::Driver.new(url, 'urn:sslhelloworld')
+client.add_method("hello_world", "from")
+# load SSL properties
+client.loadproperty('files/sslclient_require_noserverauth.properties')
+
+# SOAP over SSL
+p client.hello_world(__FILE__)
diff --git a/sample/soap/ssl/sslclient_with_clientauth.rb b/sample/soap/ssl/sslclient_with_clientauth.rb
new file mode 100644
index 000000000..7753d7b80
--- /dev/null
+++ b/sample/soap/ssl/sslclient_with_clientauth.rb
@@ -0,0 +1,12 @@
+require 'http-access2'
+require 'soap/rpc/driver'
+
+# setup driver
+url = "https://localhost:17443/"
+client = SOAP::RPC::Driver.new(url, 'urn:sslhelloworld')
+client.add_method("hello_world", "from")
+# load SSL properties
+client.loadproperty('files/sslclient_with_clientauth.properties')
+
+# SOAP over SSL
+p client.hello_world(__FILE__)
diff --git a/sample/soap/ssl/sslserver.rb b/sample/soap/ssl/sslserver.rb
new file mode 100644
index 000000000..e65cbacc7
--- /dev/null
+++ b/sample/soap/ssl/sslserver.rb
@@ -0,0 +1,49 @@
+require 'soap/rpc/httpserver'
+require 'webrick/https'
+require 'logger'
+
+class HelloWorldServer < SOAP::RPC::HTTPServer
+private
+
+ def on_init
+ @default_namespace = 'urn:sslhelloworld'
+ add_method(self, 'hello_world', 'from')
+ end
+
+ def hello_world(from)
+ "Hello World, from #{ from }"
+ end
+end
+
+
+if $0 == __FILE__
+ DIR = File.dirname(File.expand_path(__FILE__))
+
+ def cert(filename)
+ OpenSSL::X509::Certificate.new(File.open(File.join(DIR, filename)) { |f|
+ f.read
+ })
+ end
+
+ def key(filename)
+ OpenSSL::PKey::RSA.new(File.open(File.join(DIR, filename)) { |f|
+ f.read
+ })
+ end
+
+ $server = HelloWorldServer.new(
+ :BindAddress => "0.0.0.0",
+ :Port => 17443,
+ :AccessLog => [],
+ :SSLEnable => true,
+ :SSLCACertificateFile => File.join(DIR, 'files/ca.cert'),
+ :SSLCertificate => cert('files/server.cert'),
+ :SSLPrivateKey => key('files/server.key'),
+ :SSLVerifyClient => nil,
+ :SSLCertName => nil
+ )
+ trap(:INT) do
+ $server.shutdown
+ end
+ $server.start
+end
diff --git a/sample/soap/ssl/sslserver_noauth.rb b/sample/soap/ssl/sslserver_noauth.rb
new file mode 100644
index 000000000..48f5a68ad
--- /dev/null
+++ b/sample/soap/ssl/sslserver_noauth.rb
@@ -0,0 +1,45 @@
+require 'soap/rpc/httpserver'
+require 'webrick/https'
+require 'logger'
+
+class HelloWorldServer < SOAP::RPC::HTTPServer
+private
+
+ def on_init
+ @default_namespace = 'urn:sslhelloworld'
+ add_method(self, 'hello_world', 'from')
+ end
+
+ def hello_world(from)
+ "Hello World, from #{ from }"
+ end
+end
+
+
+if $0 == __FILE__
+ DIR = File.dirname(File.expand_path(__FILE__))
+
+ def cert(filename)
+ OpenSSL::X509::Certificate.new(File.open(File.join(DIR, filename)) { |f|
+ f.read
+ })
+ end
+
+ def key(filename)
+ OpenSSL::PKey::RSA.new(File.open(File.join(DIR, filename)) { |f|
+ f.read
+ })
+ end
+
+ $server = HelloWorldServer.new(
+ :BindAddress => "0.0.0.0",
+ :Port => 17443,
+ :AccessLog => [],
+ :SSLEnable => true,
+ :SSLCertName => [['OU', 'example'], ['CN', 'localhost']] # creates dummy certificate
+ )
+ trap(:INT) do
+ $server.shutdown
+ end
+ $server.start
+end
diff --git a/sample/soap/ssl/sslserver_require_clientauth.rb b/sample/soap/ssl/sslserver_require_clientauth.rb
new file mode 100644
index 000000000..63caf69ca
--- /dev/null
+++ b/sample/soap/ssl/sslserver_require_clientauth.rb
@@ -0,0 +1,50 @@
+require 'soap/rpc/httpserver'
+require 'webrick/https'
+require 'logger'
+
+class HelloWorldServer < SOAP::RPC::HTTPServer
+private
+
+ def on_init
+ @default_namespace = 'urn:sslhelloworld'
+ add_method(self, 'hello_world', 'from')
+ end
+
+ def hello_world(from)
+ "Hello World, from #{ from }"
+ end
+end
+
+
+if $0 == __FILE__
+ DIR = File.dirname(File.expand_path(__FILE__))
+
+ def cert(filename)
+ OpenSSL::X509::Certificate.new(File.open(File.join(DIR, filename)) { |f|
+ f.read
+ })
+ end
+
+ def key(filename)
+ OpenSSL::PKey::RSA.new(File.open(File.join(DIR, filename)) { |f|
+ f.read
+ })
+ end
+
+ $server = HelloWorldServer.new(
+ :BindAddress => "0.0.0.0",
+ :Port => 17443,
+ :AccessLog => [],
+ :SSLEnable => true,
+ :SSLCACertificateFile => File.join(DIR, 'files/ca.cert'),
+ :SSLCertificate => cert('files/server.cert'),
+ :SSLPrivateKey => key('files/server.key'),
+ :SSLVerifyClient =>
+ OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT|OpenSSL::SSL::VERIFY_PEER,
+ :SSLClientCA => cert('files/ca.cert')
+ )
+ trap(:INT) do
+ $server.shutdown
+ end
+ $server.start
+end
diff --git a/sample/soap/swa/client.rb b/sample/soap/swa/client.rb
new file mode 100644
index 000000000..01c59a384
--- /dev/null
+++ b/sample/soap/swa/client.rb
@@ -0,0 +1,13 @@
+require 'soap/rpc/driver'
+require 'soap/attachment'
+
+server = 'http://localhost:7000/'
+driver = SOAP::RPC::Driver.new(server, 'http://www.acmetron.com/soap')
+driver.wiredump_dev = STDERR
+driver.add_method('get_file')
+driver.add_method('put_file', 'name', 'file')
+
+p driver.get_file
+file = File.open($0)
+attach = SOAP::Attachment.new(file)
+p driver.put_file($0, attach)
diff --git a/sample/soap/swa/server.rb b/sample/soap/swa/server.rb
new file mode 100644
index 000000000..0a82fe58b
--- /dev/null
+++ b/sample/soap/swa/server.rb
@@ -0,0 +1,23 @@
+require 'soap/rpc/standaloneServer'
+require 'soap/attachment'
+
+class SwAService
+ def get_file
+ return {
+ 'name' => $0,
+ 'file' => SOAP::Attachment.new(File.open($0))
+ }
+ end
+
+ def put_file(name, file)
+ "File '#{name}' was received ok."
+ end
+end
+
+server = SOAP::RPC::StandaloneServer.new('SwAServer',
+ 'http://www.acmetron.com/soap', '0.0.0.0', 7000)
+server.add_servant(SwAService.new)
+trap(:INT) do
+ server.shutdown
+end
+server.start
diff --git a/sample/soap/whois.rb b/sample/soap/whois.rb
new file mode 100644
index 000000000..2737e8085
--- /dev/null
+++ b/sample/soap/whois.rb
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+key = ARGV.shift
+
+require 'soap/rpc/driver'
+
+server = 'http://www.SoapClient.com/xml/SQLDataSoap.WSDL'
+interface = 'http://www.SoapClient.com/xml/SQLDataSoap.xsd'
+
+whois = SOAP::RPC::Driver.new(server, interface)
+whois.wiredump_dev = STDERR
+whois.add_method('ProcessSRL', 'SRLFile', 'RequestName', 'key')
+
+p whois.ProcessSRL('WHOIS.SRI', 'whois', key)
diff --git a/sample/wsdl/raa2.4/raa.rb b/sample/wsdl/raa2.4/raa.rb
new file mode 100644
index 000000000..9b4c4e41a
--- /dev/null
+++ b/sample/wsdl/raa2.4/raa.rb
@@ -0,0 +1,332 @@
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class Gem
+ @@schema_type = "Gem"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ def id
+ @id
+ end
+
+ def id=(value)
+ @id = value
+ end
+
+ def category
+ @category
+ end
+
+ def category=(value)
+ @category = value
+ end
+
+ def owner
+ @owner
+ end
+
+ def owner=(value)
+ @owner = value
+ end
+
+ def project
+ @project
+ end
+
+ def project=(value)
+ @project = value
+ end
+
+ def updated
+ @updated
+ end
+
+ def updated=(value)
+ @updated = value
+ end
+
+ def created
+ @created
+ end
+
+ def created=(value)
+ @created = value
+ end
+
+ def initialize(id = nil,
+ category = nil,
+ owner = nil,
+ project = nil,
+ updated = nil,
+ created = nil)
+ @id = id
+ @category = category
+ @owner = owner
+ @project = project
+ @updated = updated
+ @created = created
+ end
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class Category
+ @@schema_type = "Category"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ 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/type/RAA/0.0.3/
+class Owner
+ @@schema_type = "Owner"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ 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/type/RAA/0.0.3/
+class Project
+ @@schema_type = "Project"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ 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 url
+ @url
+ end
+
+ def url=(value)
+ @url = 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 updated
+ @updated
+ end
+
+ def updated=(value)
+ @updated = value
+ end
+
+ def history
+ @history
+ end
+
+ def history=(value)
+ @history = value
+ end
+
+ def dependency
+ @dependency
+ end
+
+ def dependency=(value)
+ @dependency = value
+ end
+
+ def initialize(name = nil,
+ short_description = nil,
+ version = nil,
+ status = nil,
+ url = nil,
+ download = nil,
+ license = nil,
+ description = nil,
+ updated = nil,
+ history = nil,
+ dependency = nil)
+ @name = name
+ @short_description = short_description
+ @version = version
+ @status = status
+ @url = url
+ @download = download
+ @license = license
+ @description = description
+ @updated = updated
+ @history = history
+ @dependency = dependency
+ end
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class ProjectDependency
+ @@schema_type = "ProjectDependency"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+
+ def project
+ @project
+ end
+
+ def project=(value)
+ @project = value
+ end
+
+ def version
+ @version
+ end
+
+ def version=(value)
+ @version = value
+ end
+
+ def description
+ @description
+ end
+
+ def description=(value)
+ @description = value
+ end
+
+ def initialize(project = nil,
+ version = nil,
+ description = nil)
+ @project = project
+ @version = version
+ @description = description
+ end
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class GemArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "GemArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class OwnerArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "OwnerArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class ProjectArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "ProjectArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class ProjectDependencyArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "ProjectDependencyArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+end
+
+# http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/
+class StringArray < Array
+ # Contents type should be dumped here...
+ @@schema_type = "StringArray"
+ @@schema_ns = "http://www.ruby-lang.org/xmlns/soap/type/RAA/0.0.3/"
+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/sample/wsdl/raa2.4/wsdlDriver.rb b/sample/wsdl/raa2.4/wsdlDriver.rb
new file mode 100644
index 000000000..bc5fb1998
--- /dev/null
+++ b/sample/wsdl/raa2.4/wsdlDriver.rb
@@ -0,0 +1,117 @@
+#!/usr/bin/env ruby
+
+# You can generate raa.rb required here with the command;
+# wsdl2ruby.rb --wsdl http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/ --classdef
+require 'raa'
+require 'soap/wsdlDriver'
+require 'pp'
+
+RAA_WSDL = 'http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/'
+
+raa = SOAP::WSDLDriverFactory.new(RAA_WSDL).create_driver
+raa.generate_explicit_type = true
+# raa.wiredump_dev = STDERR
+
+def sec(msg)
+ puts
+ puts "--------"
+ puts "-- " + msg
+ puts
+end
+
+def subsec(msg)
+ puts "-- " + msg
+end
+
+sec("retrieve a gem (RAA Information) which has specified name")
+name = 'soap4r'
+pp raa.gem(name)
+
+sec("retrieve dependents of the project")
+name = 'http-access2'; version = nil
+pp raa.dependents(name, version)
+
+sec("number of registered gems")
+puts raa.size
+
+sec("retrieve all registered gem names")
+p raa.names
+
+sec("retrieve gems of specified category")
+major = 'Library'; minor = 'XML'
+p raa.list_by_category(major, minor)
+
+sec("retrieve category tree")
+pp raa.tree_by_category
+
+sec("retrieve gems which is updated recently")
+idx = 0
+p raa.list_recent_updated(idx)
+subsec("next 10 gems")
+idx += 1
+p raa.list_recent_updated(idx)
+subsec("next 10 gems")
+idx += 1
+p raa.list_recent_updated(idx)
+
+sec("retrieve gems which is created recently")
+p raa.list_recent_created(idx)
+
+sec("retrieve gems which is updated in 7 days")
+date = Time.now - 7 * 24 * 60 * 60; idx = 0
+p raa.list_updated_since(date, idx)
+
+sec("retrieve gems which is created in 7 days")
+p raa.list_created_since(date, idx)
+
+sec("retrieve gems of specified owner")
+owner_id = 8 # NaHi
+p raa.list_by_owner(owner_id)
+
+sec("search gems with keyword")
+substring = 'soap'
+pp raa.search(substring)
+
+# There are several search interface to search a field explicitly.
+# puts raa.search_name(substring, idx)
+# puts raa.search_short_description(substring, idx)
+# puts raa.search_owner(substring, idx)
+# puts raa.search_version(substring, idx)
+# puts raa.search_status(substring, idx)
+# puts raa.search_description(substring, idx)
+
+sec("retrieve owner info")
+owner_id = 8
+pp raa.owner(owner_id)
+
+sec("retrieve owners")
+idx = 0
+p raa.list_owner(idx)
+
+sec("update 'sampleproject'")
+name = 'sampleproject'
+pass = 'sampleproject'
+gem = raa.gem(name)
+p gem.project.version
+gem.project.version.succ!
+gem.updated = Time.now
+raa.update(name, pass, gem)
+p raa.gem(name).project.version
+
+sec("update pass phrase")
+raa.update_pass(name, 'sampleproject', 'foo')
+subsec("update check")
+gem = raa.gem(name)
+gem.project.description = 'Current pass phrase is "foo"'
+gem.updated = Time.now
+raa.update(name, 'foo', gem)
+#
+subsec("recover pass phrase")
+raa.update_pass(name, 'foo', 'sampleproject')
+subsec("update check")
+gem = raa.gem(name)
+gem.project.description = 'Current pass phrase is "sampleproject"'
+gem.updated = Time.now
+raa.update(name, 'sampleproject', gem)
+
+sec("done")