mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Replaced soap4r with Ruby 1.9-compat version
http://github.com/spox/soap4r-spox Fixes #994.
This commit is contained in:
parent
a2f8327da4
commit
b35b48f2bf
356 changed files with 1340 additions and 42219 deletions
137
vendor/gems/soap4r-1.5.8/bin/wsdl2ruby.rb
vendored
137
vendor/gems/soap4r-1.5.8/bin/wsdl2ruby.rb
vendored
|
|
@ -1,137 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'getoptlong'
|
||||
require 'logger'
|
||||
require 'wsdl/soap/wsdl2ruby'
|
||||
|
||||
|
||||
class WSDL2RubyApp < Logger::Application
|
||||
private
|
||||
|
||||
OptSet = [
|
||||
['--wsdl','-w', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--module_path','-m', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--type','-t', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--classdef','-e', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--mapping_registry','-r', GetoptLong::NO_ARGUMENT],
|
||||
['--client_skelton','-c', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--servant_skelton','-s', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--cgi_stub','-g', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--servlet_stub','-l', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--standalone_server_stub','-a', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--driver','-d', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--drivername_postfix','-n', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--force','-f', GetoptLong::NO_ARGUMENT],
|
||||
['--quiet','-q', GetoptLong::NO_ARGUMENT],
|
||||
]
|
||||
|
||||
def initialize
|
||||
super('app')
|
||||
STDERR.sync = true
|
||||
self.level = Logger::FATAL
|
||||
end
|
||||
|
||||
def run
|
||||
@worker = WSDL::SOAP::WSDL2Ruby.new
|
||||
@worker.logger = @log
|
||||
location, opt = parse_opt(GetoptLong.new(*OptSet))
|
||||
usage_exit unless location
|
||||
@worker.location = location
|
||||
if opt['quiet']
|
||||
self.level = Logger::FATAL
|
||||
else
|
||||
self.level = Logger::INFO
|
||||
end
|
||||
@worker.opt.update(opt)
|
||||
@worker.run
|
||||
0
|
||||
end
|
||||
|
||||
def usage_exit
|
||||
puts <<__EOU__
|
||||
Usage: #{ $0 } --wsdl wsdl_location [options]
|
||||
wsdl_location: filename or URL
|
||||
|
||||
Example:
|
||||
For server side:
|
||||
#{ $0 } --wsdl myapp.wsdl --type server
|
||||
For client side:
|
||||
#{ $0 } --wsdl myapp.wsdl --type client
|
||||
|
||||
Options:
|
||||
--wsdl wsdl_location
|
||||
--type server|client
|
||||
--type server implies;
|
||||
--classdef --mapping_registry --servant_skelton --standalone_server_stub
|
||||
--type client implies;
|
||||
--classdef --mapping_registry --client_skelton --driver
|
||||
--classdef [filenameprefix]
|
||||
--mapping_registry
|
||||
--client_skelton [servicename]
|
||||
--servant_skelton [porttypename]
|
||||
--cgi_stub [servicename]
|
||||
--servlet_stub [servicename]
|
||||
--standalone_server_stub [servicename]
|
||||
--driver [porttypename]
|
||||
--drivername_postfix driver_classname_postfix
|
||||
--module_path Module::Path::Name
|
||||
--force
|
||||
--quiet
|
||||
|
||||
Terminology:
|
||||
Client <-> Driver <-(SOAP)-> Stub <-> Servant
|
||||
|
||||
Driver and Stub: Automatically generated
|
||||
Client and Servant: Skelton generated (you should change)
|
||||
__EOU__
|
||||
exit 1
|
||||
end
|
||||
|
||||
def parse_opt(getoptlong)
|
||||
opt = {}
|
||||
wsdl = nil
|
||||
begin
|
||||
getoptlong.each do |name, arg|
|
||||
case name
|
||||
when "--wsdl"
|
||||
wsdl = arg
|
||||
when "--module_path"
|
||||
opt['module_path'] = arg
|
||||
when "--type"
|
||||
case arg
|
||||
when "server"
|
||||
opt['classdef'] ||= nil
|
||||
opt['mapping_registry'] ||= nil
|
||||
opt['servant_skelton'] ||= nil
|
||||
opt['standalone_server_stub'] ||= nil
|
||||
when "client"
|
||||
opt['classdef'] ||= nil
|
||||
opt['mapping_registry'] ||= nil
|
||||
opt['driver'] ||= nil
|
||||
opt['client_skelton'] ||= nil
|
||||
else
|
||||
raise ArgumentError.new("Unknown type #{ arg }")
|
||||
end
|
||||
when "--classdef", "--mapping_registry",
|
||||
"--client_skelton", "--servant_skelton",
|
||||
"--cgi_stub", "--servlet_stub", "--standalone_server_stub",
|
||||
"--driver"
|
||||
opt[name.sub(/^--/, '')] = arg.empty? ? nil : arg
|
||||
when "--drivername_postfix"
|
||||
opt['drivername_postfix'] = arg
|
||||
when "--force"
|
||||
opt['force'] = true
|
||||
when "--quiet"
|
||||
opt['quiet'] = true
|
||||
else
|
||||
raise ArgumentError.new("Unknown type #{ arg }")
|
||||
end
|
||||
end
|
||||
rescue
|
||||
usage_exit
|
||||
end
|
||||
return wsdl, opt
|
||||
end
|
||||
end
|
||||
|
||||
WSDL2RubyApp.new.start
|
||||
90
vendor/gems/soap4r-1.5.8/bin/xsd2ruby.rb
vendored
90
vendor/gems/soap4r-1.5.8/bin/xsd2ruby.rb
vendored
|
|
@ -1,90 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'getoptlong'
|
||||
require 'logger'
|
||||
require 'wsdl/xmlSchema/xsd2ruby'
|
||||
|
||||
|
||||
class XSD2RubyApp < Logger::Application
|
||||
private
|
||||
|
||||
OptSet = [
|
||||
['--xsd','-x', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--module_path','-m', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--classdef','-e', GetoptLong::OPTIONAL_ARGUMENT],
|
||||
['--mapping_registry','-r', GetoptLong::NO_ARGUMENT],
|
||||
['--mapper','-p', GetoptLong::NO_ARGUMENT],
|
||||
['--force','-f', GetoptLong::NO_ARGUMENT],
|
||||
['--quiet','-q', GetoptLong::NO_ARGUMENT],
|
||||
]
|
||||
|
||||
def initialize
|
||||
super('app')
|
||||
STDERR.sync = true
|
||||
self.level = Logger::FATAL
|
||||
end
|
||||
|
||||
def run
|
||||
@worker = WSDL::XMLSchema::XSD2Ruby.new
|
||||
@worker.logger = @log
|
||||
location, opt = parse_opt(GetoptLong.new(*OptSet))
|
||||
usage_exit unless location
|
||||
@worker.location = location
|
||||
if opt['quiet']
|
||||
self.level = Logger::FATAL
|
||||
else
|
||||
self.level = Logger::INFO
|
||||
end
|
||||
@worker.opt.update(opt)
|
||||
@worker.run
|
||||
0
|
||||
end
|
||||
|
||||
def usage_exit
|
||||
puts <<__EOU__
|
||||
Usage: #{ $0 } --xsd xsd_location [options]
|
||||
xsd_location: filename or URL
|
||||
|
||||
Example:
|
||||
#{ $0 } --xsd myapp.xsd --classdef foo
|
||||
|
||||
Options:
|
||||
--xsd xsd_location
|
||||
--classdef [filenameprefix]
|
||||
--mapping_registry
|
||||
--mapper
|
||||
--module_path [Module::Path::Name]
|
||||
--force
|
||||
--quiet
|
||||
__EOU__
|
||||
exit 1
|
||||
end
|
||||
|
||||
def parse_opt(getoptlong)
|
||||
opt = {}
|
||||
xsd = nil
|
||||
begin
|
||||
getoptlong.each do |name, arg|
|
||||
case name
|
||||
when "--xsd"
|
||||
xsd = arg
|
||||
when "--module_path"
|
||||
opt['module_path'] = arg
|
||||
when "--classdef", "--mapping_registry", "--mapper"
|
||||
opt[name.sub(/^--/, '')] = arg.empty? ? nil : arg
|
||||
when "--force"
|
||||
opt['force'] = true
|
||||
when "--quiet"
|
||||
opt['quiet'] = true
|
||||
else
|
||||
raise ArgumentError.new("Unknown type #{ arg }")
|
||||
end
|
||||
end
|
||||
rescue
|
||||
usage_exit
|
||||
end
|
||||
return xsd, opt
|
||||
end
|
||||
end
|
||||
|
||||
XSD2RubyApp.new.start
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# soap/XMLSchemaDatatypes.rb: SOAP4R - XML Schema Datatype implementation.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'xsd/datatypes'
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# soap/XMLSchemaDatatypes1999.rb: SOAP4R - XML Schema Datatype 1999 support
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'xsd/datatypes1999'
|
||||
load 'soap/mapping/typeMap.rb'
|
||||
34
vendor/gems/soap4r-1.5.8/lib/soap/attrproxy.rb
vendored
Normal file
34
vendor/gems/soap4r-1.5.8/lib/soap/attrproxy.rb
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# SOAP4R - attribute proxy interface.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
module SOAP
|
||||
|
||||
|
||||
module AttrProxy
|
||||
def self.included(klass)
|
||||
klass.extend(AttrProxyClassSupport)
|
||||
end
|
||||
|
||||
module AttrProxyClassSupport
|
||||
def attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
attrproxy.__send__(name)
|
||||
}
|
||||
if assignable
|
||||
aname = name + '='
|
||||
define_method(aname) { |rhs|
|
||||
attrproxy.__send__(aname, rhs)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -48,6 +48,7 @@ module SOAPType
|
|||
attr_accessor :position
|
||||
attr_reader :extraattr
|
||||
attr_accessor :definedtype
|
||||
attr_accessor :force_typed
|
||||
|
||||
def initialize(*arg)
|
||||
super
|
||||
|
|
@ -60,6 +61,7 @@ module SOAPType
|
|||
@position = nil
|
||||
@definedtype = nil
|
||||
@extraattr = {}
|
||||
@force_typed = false
|
||||
end
|
||||
|
||||
def inspect
|
||||
|
|
@ -1077,7 +1079,7 @@ private
|
|||
"#{typename}[" << ',' * (rank - 1) << ']'
|
||||
end
|
||||
|
||||
TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$', nil, 'NONE')
|
||||
TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$')
|
||||
|
||||
def self.parse_type(string)
|
||||
TypeParseRegexp =~ string
|
||||
|
|
|
|||
9
vendor/gems/soap4r-1.5.8/lib/soap/charset.rb
vendored
9
vendor/gems/soap4r-1.5.8/lib/soap/charset.rb
vendored
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - Charset encoding handler.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
182
vendor/gems/soap4r-1.5.8/lib/soap/compat.rb
vendored
182
vendor/gems/soap4r-1.5.8/lib/soap/compat.rb
vendored
|
|
@ -1,182 +0,0 @@
|
|||
# SOAP4R - Compatibility definitions.
|
||||
# Copyright (C) 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
STDERR.puts "Loading compatibility library..."
|
||||
|
||||
|
||||
require 'xsd/qname'
|
||||
require 'xsd/ns'
|
||||
require 'xsd/charset'
|
||||
require 'soap/mapping'
|
||||
require 'soap/rpc/rpc'
|
||||
require 'soap/rpc/element'
|
||||
require 'soap/rpc/driver'
|
||||
require 'soap/rpc/cgistub'
|
||||
require 'soap/rpc/router'
|
||||
require 'soap/rpc/standaloneServer'
|
||||
|
||||
|
||||
module SOAP
|
||||
|
||||
|
||||
module RPC
|
||||
RubyTypeNamespace = Mapping::RubyTypeNamespace
|
||||
RubyTypeInstanceNamespace = Mapping::RubyTypeInstanceNamespace
|
||||
RubyCustomTypeNamespace = Mapping::RubyCustomTypeNamespace
|
||||
ApacheSOAPTypeNamespace = Mapping::ApacheSOAPTypeNamespace
|
||||
|
||||
DefaultMappingRegistry = Mapping::DefaultRegistry
|
||||
|
||||
def self.obj2soap(*arg); Mapping.obj2soap(*arg); end
|
||||
def self.soap2obj(*arg); Mapping.soap2obj(*arg); end
|
||||
def self.ary2soap(*arg); Mapping.ary2soap(*arg); end
|
||||
def self.ary2md(*arg); Mapping.ary2md(*arg); end
|
||||
def self.fault2exception(*arg); Mapping.fault2exception(*arg); end
|
||||
|
||||
def self.defined_methods(obj)
|
||||
if obj.is_a?(Module)
|
||||
obj.methods - Module.methods
|
||||
else
|
||||
obj.methods - Kernel.instance_methods(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
NS = XSD::NS
|
||||
Charset = XSD::Charset
|
||||
RPCUtils = RPC
|
||||
RPCServerException = RPC::ServerException
|
||||
RPCRouter = RPC::Router
|
||||
|
||||
|
||||
class StandaloneServer < RPC::StandaloneServer
|
||||
def initialize(*arg)
|
||||
super
|
||||
@router = @soaplet.app_scope_router
|
||||
methodDef if respond_to?('methodDef')
|
||||
end
|
||||
|
||||
alias addServant add_servant
|
||||
alias addMethod add_method
|
||||
alias addMethodAs add_method_as
|
||||
end
|
||||
|
||||
|
||||
class CGIStub < RPC::CGIStub
|
||||
def initialize(*arg)
|
||||
super
|
||||
methodDef if respond_to?('methodDef')
|
||||
end
|
||||
|
||||
alias addServant add_servant
|
||||
|
||||
def addMethod(receiver, methodName, *paramArg)
|
||||
addMethodWithNSAs(@default_namespace, receiver, methodName, methodName, *paramArg)
|
||||
end
|
||||
|
||||
def addMethodAs(receiver, methodName, methodNameAs, *paramArg)
|
||||
addMethodWithNSAs(@default_namespace, receiver, methodName, methodNameAs, *paramArg)
|
||||
end
|
||||
|
||||
def addMethodWithNS(namespace, receiver, methodName, *paramArg)
|
||||
addMethodWithNSAs(namespace, receiver, methodName, methodName, *paramArg)
|
||||
end
|
||||
|
||||
def addMethodWithNSAs(namespace, receiver, methodName, methodNameAs, *paramArg)
|
||||
add_method_with_namespace_as(namespace, receiver, methodName, methodNameAs, *paramArg)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class Driver < RPC::Driver
|
||||
include Logger::Severity
|
||||
|
||||
attr_accessor :logdev
|
||||
alias logDev= logdev=
|
||||
alias logDev logdev
|
||||
alias setWireDumpDev wiredump_dev=
|
||||
alias setDefaultEncodingStyle default_encodingstyle=
|
||||
alias mappingRegistry= mapping_registry=
|
||||
alias mappingRegistry mapping_registry
|
||||
|
||||
def initialize(log, logid, namespace, endpoint_url, httpproxy = nil, soapaction = nil)
|
||||
super(endpoint_url, namespace, soapaction)
|
||||
@logdev = log
|
||||
@logid = logid
|
||||
@logid_prefix = "<#{ @logid }> "
|
||||
self.httpproxy = httpproxy if httpproxy
|
||||
log(INFO) { 'initialize: initializing SOAP driver...' }
|
||||
end
|
||||
|
||||
def invoke(headers, body)
|
||||
log(INFO) { "invoke: invoking message '#{ body.type }'." }
|
||||
super
|
||||
end
|
||||
|
||||
def call(name, *params)
|
||||
log(INFO) { "call: calling method '#{ name }'." }
|
||||
log(DEBUG) { "call: parameters '#{ params.inspect }'." }
|
||||
log(DEBUG) {
|
||||
params = Mapping.obj2soap(params, @mapping_registry).to_a
|
||||
"call: parameters '#{ params.inspect }'."
|
||||
}
|
||||
super
|
||||
end
|
||||
|
||||
def addMethod(name, *params)
|
||||
addMethodWithSOAPActionAs(name, name, nil, *params)
|
||||
end
|
||||
|
||||
def addMethodAs(name_as, name, *params)
|
||||
addMethodWithSOAPActionAs(name_as, name, nil, *params)
|
||||
end
|
||||
|
||||
def addMethodWithSOAPAction(name, soapaction, *params)
|
||||
addMethodWithSOAPActionAs(name, name, soapaction, *params)
|
||||
end
|
||||
|
||||
def addMethodWithSOAPActionAs(name_as, name, soapaction, *params)
|
||||
add_method_with_soapaction_as(name, name_as, soapaction, *params)
|
||||
end
|
||||
|
||||
def setLogDev(logdev)
|
||||
self.logdev = logdev
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def log(sev)
|
||||
@logdev.add(sev, nil, self.class) { @logid_prefix + yield } if @logdev
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module RPC
|
||||
class MappingRegistry < SOAP::Mapping::Registry
|
||||
def initialize(*arg)
|
||||
super
|
||||
end
|
||||
|
||||
def add(obj_class, soap_class, factory, info = nil)
|
||||
if (info.size > 1)
|
||||
raise RuntimeError.new("Parameter signature changed. [namespace, name] should be { :type => XSD::QName.new(namespace, name) } from 1.5.0.")
|
||||
end
|
||||
@map.add(obj_class, soap_class, factory, { :type => info[0] })
|
||||
end
|
||||
alias set add
|
||||
end
|
||||
|
||||
class Router
|
||||
alias mappingRegistry mapping_registry
|
||||
alias mappingRegistry= mapping_registry=
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
9
vendor/gems/soap4r-1.5.8/lib/soap/driver.rb
vendored
9
vendor/gems/soap4r-1.5.8/lib/soap/driver.rb
vendored
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - SOAP driver
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
|
|
@ -29,8 +29,11 @@ class LiteralHandler < Handler
|
|||
def encode_data(generator, ns, data, parent)
|
||||
attrs = {}
|
||||
name = generator.encode_name(ns, data, attrs)
|
||||
if data.type and data.type.name and
|
||||
(@generate_explicit_type or data.force_typed)
|
||||
data.extraattr[XSD::AttrTypeName] = data.type
|
||||
end
|
||||
data.extraattr.each do |key, value|
|
||||
next if !@generate_explicit_type and key == XSD::AttrTypeName
|
||||
keytag = key
|
||||
if key.is_a?(XSD::QName)
|
||||
keytag = encode_attr_key(attrs, ns, key)
|
||||
|
|
|
|||
|
|
@ -141,12 +141,9 @@ public
|
|||
@reftarget = nil
|
||||
else
|
||||
if obj.is_a?(SOAPEnvelope)
|
||||
# xsi:nil="true" can appear even if dumping without explicit type.
|
||||
Generator.assign_ns(attrs, ns, XSD::InstanceNamespace)
|
||||
if @generate_explicit_type
|
||||
Generator.assign_ns(attrs, ns, XSD::Namespace)
|
||||
end
|
||||
end
|
||||
obj.encode(self, ns, attrs) do |child|
|
||||
indent_backup, @indent = @indent, @indent + @indentstr
|
||||
encode_data(ns.clone_ns, child, obj)
|
||||
|
|
@ -273,7 +270,7 @@ private
|
|||
|
||||
def get_encode_char_regexp
|
||||
ENCODE_CHAR_REGEXP[XSD::Charset.encoding] ||=
|
||||
Regexp.new("[#{EncodeMap.keys.join}]", nil, XSD::Charset.encoding)
|
||||
Regexp.new("[#{EncodeMap.keys.join}]")
|
||||
end
|
||||
|
||||
def find_handler(encodingstyle)
|
||||
|
|
@ -298,7 +295,5 @@ private
|
|||
end
|
||||
end
|
||||
|
||||
SOAPGenerator = Generator # for backward compatibility
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ private
|
|||
cause = $!
|
||||
end
|
||||
end
|
||||
raise MappingError.new("Cannot map #{ node.type.name } to Ruby object.", cause)
|
||||
raise MappingError.new("Cannot map #{ node.type } to Ruby object.", cause)
|
||||
end
|
||||
|
||||
def addiv2obj(obj, attr)
|
||||
|
|
@ -402,23 +402,12 @@ private
|
|||
Mapping.set_attributes(obj, vars)
|
||||
end
|
||||
|
||||
if RUBY_VERSION >= '1.8.0'
|
||||
def addextend2obj(obj, attr)
|
||||
return unless attr
|
||||
attr.split(/ /).reverse_each do |mstr|
|
||||
obj.extend(Mapping.module_from_name(mstr))
|
||||
end
|
||||
end
|
||||
else
|
||||
# (class < false; self; end).ancestors includes "TrueClass" under 1.6...
|
||||
def addextend2obj(obj, attr)
|
||||
return unless attr
|
||||
attr.split(/ /).reverse_each do |mstr|
|
||||
m = Mapping.module_from_name(mstr)
|
||||
obj.extend(m)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def addextend2soap(node, obj)
|
||||
return if obj.is_a?(Symbol) or obj.is_a?(Fixnum)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class Factory
|
|||
else
|
||||
# should we sort instance_variables? how?
|
||||
obj.instance_variables.each do |var|
|
||||
name = var.sub(/^@/, '')
|
||||
name = var.to_s.sub(/^@/, '').to_sym
|
||||
elename = Mapping.name2elename(name)
|
||||
node.add(elename,
|
||||
Mapping._obj2soap(obj.instance_variable_get(var), map))
|
||||
|
|
|
|||
|
|
@ -136,9 +136,12 @@ private
|
|||
ele = SOAPElement.new(qname)
|
||||
end
|
||||
ele.qualified = definition.qualified
|
||||
if definition.type and (definition.basetype or Mapping.root_type_hint)
|
||||
if definition.type
|
||||
ele.type = definition.type
|
||||
if definition.basetype or Mapping.root_type_hint
|
||||
Mapping.reset_root_type_hint
|
||||
ele.extraattr[XSD::AttrTypeName] = definition.type
|
||||
ele.force_typed = true
|
||||
end
|
||||
end
|
||||
if qname.nil? and definition.elename
|
||||
ele.elename = definition.elename
|
||||
|
|
@ -243,7 +246,7 @@ private
|
|||
obj = nil
|
||||
if obj_class == ::String
|
||||
obj = node.text
|
||||
elsif obj_class < ::String
|
||||
elsif obj_class < ::String and node.respond_to?(:text)
|
||||
obj = obj_class.new(node.text)
|
||||
else
|
||||
obj = Mapping.create_empty_object(obj_class)
|
||||
|
|
|
|||
|
|
@ -91,10 +91,14 @@ module Mapping
|
|||
|
||||
def self.fault2exception(fault, registry = nil)
|
||||
registry ||= Mapping::DefaultRegistry
|
||||
detail = if fault.detail
|
||||
soap2obj(fault.detail, registry) || ""
|
||||
else
|
||||
""
|
||||
detail = ""
|
||||
if fault.detail
|
||||
begin
|
||||
fault.detail.type ||= XSD::QName::EMPTY
|
||||
detail = soap2obj(fault.detail, registry) || ""
|
||||
rescue MappingError
|
||||
detail = fault.detail
|
||||
end
|
||||
end
|
||||
if detail.is_a?(Mapping::SOAPException)
|
||||
begin
|
||||
|
|
@ -150,38 +154,9 @@ module Mapping
|
|||
return registry.soap2obj(node, klass)
|
||||
end
|
||||
|
||||
if Object.respond_to?(:allocate)
|
||||
# ruby/1.7 or later.
|
||||
def self.create_empty_object(klass)
|
||||
klass.allocate
|
||||
end
|
||||
else
|
||||
MARSHAL_TAG = {
|
||||
String => ['"', 1],
|
||||
Regexp => ['/', 2],
|
||||
Array => ['[', 1],
|
||||
Hash => ['{', 1]
|
||||
}
|
||||
def self.create_empty_object(klass)
|
||||
if klass <= Struct
|
||||
name = klass.name
|
||||
return ::Marshal.load(sprintf("\004\006S:%c%s\000", name.length + 5, name))
|
||||
end
|
||||
if MARSHAL_TAG.has_key?(klass)
|
||||
tag, terminate = MARSHAL_TAG[klass]
|
||||
return ::Marshal.load(sprintf("\004\006%s%s", tag, "\000" * terminate))
|
||||
end
|
||||
MARSHAL_TAG.each do |k, v|
|
||||
if klass < k
|
||||
name = klass.name
|
||||
tag, terminate = v
|
||||
return ::Marshal.load(sprintf("\004\006C:%c%s%s%s", name.length + 5, name, tag, "\000" * terminate))
|
||||
end
|
||||
end
|
||||
name = klass.name
|
||||
::Marshal.load(sprintf("\004\006o:%c%s\000", name.length + 5, name))
|
||||
end
|
||||
end
|
||||
|
||||
# Allow only (Letter | '_') (Letter | Digit | '-' | '_')* here.
|
||||
# Caution: '.' is not allowed here.
|
||||
|
|
@ -190,9 +165,10 @@ module Mapping
|
|||
# ex. a.b => a.2eb
|
||||
#
|
||||
def self.name2elename(name)
|
||||
name = name.to_s
|
||||
name.gsub(/([^a-zA-Z0-9:_\-]+)/n) {
|
||||
'.' << $1.unpack('H2' * $1.size).join('.')
|
||||
}.gsub(/::/n, '..')
|
||||
}.gsub(/::/n, '..').to_sym
|
||||
end
|
||||
|
||||
def self.elename2name(name)
|
||||
|
|
@ -469,12 +445,6 @@ module Mapping
|
|||
schema_type = definition[:schema_type]
|
||||
is_anonymous = definition[:is_anonymous]
|
||||
schema_basetype = definition[:schema_basetype]
|
||||
# wrap if needed for backward compatibility
|
||||
if schema_ns
|
||||
schema_name = Mapping.to_qname(schema_name, schema_ns) if schema_name
|
||||
schema_type = Mapping.to_qname(schema_type, schema_ns) if schema_type
|
||||
# no need for schema_basetype bacause it's introduced later
|
||||
end
|
||||
schema_qualified = definition[:schema_qualified]
|
||||
schema_element = definition[:schema_element]
|
||||
schema_attributes = definition[:schema_attribute]
|
||||
|
|
@ -497,7 +467,6 @@ module Mapping
|
|||
definition
|
||||
end
|
||||
|
||||
# for backward compatibility
|
||||
# returns SchemaComplexTypeDefinition
|
||||
def self.parse_schema_definition(schema_element, default_ns)
|
||||
definition = nil
|
||||
|
|
@ -526,7 +495,6 @@ module Mapping
|
|||
if occurrence
|
||||
minoccurs, maxoccurs = occurrence
|
||||
else
|
||||
# for backward compatibility
|
||||
minoccurs, maxoccurs = 1, 1
|
||||
end
|
||||
as_any = as_array = false
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
#require 'continuation'
|
||||
|
||||
module SOAP
|
||||
module Mapping
|
||||
|
|
@ -124,30 +125,7 @@ class RubytypeFactory < Factory
|
|||
param.extraattr[RubyTypeName] = obj.class.name
|
||||
end
|
||||
param.add('source', SOAPBase64.new(obj.source))
|
||||
if obj.respond_to?('options')
|
||||
# Regexp#options is from Ruby/1.7
|
||||
options = obj.options
|
||||
else
|
||||
options = 0
|
||||
obj.inspect.sub(/^.*\//, '').each_byte do |c|
|
||||
options += case c
|
||||
when ?i
|
||||
1
|
||||
when ?x
|
||||
2
|
||||
when ?m
|
||||
4
|
||||
when ?n
|
||||
16
|
||||
when ?e
|
||||
32
|
||||
when ?s
|
||||
48
|
||||
when ?u
|
||||
64
|
||||
end
|
||||
end
|
||||
end
|
||||
param.add('options', SOAPInt.new(options))
|
||||
addiv2soapattr(param, obj, map)
|
||||
when ::Range
|
||||
|
|
@ -216,8 +194,8 @@ class RubytypeFactory < Factory
|
|||
addiv2soapattr(param, obj, map)
|
||||
end
|
||||
when ::IO, ::Binding, ::Continuation, ::Data, ::Dir, ::File::Stat,
|
||||
::MatchData, Method, ::Proc, ::Thread, ::ThreadGroup
|
||||
# from 1.8: Process::Status, UnboundMethod
|
||||
::MatchData, Method, ::Proc, ::Process::Status, ::Thread,
|
||||
::ThreadGroup, ::UnboundMethod
|
||||
return nil
|
||||
when ::SOAP::Mapping::Object
|
||||
param = SOAPStruct.new(XSD::AnyTypeName)
|
||||
|
|
@ -266,7 +244,7 @@ private
|
|||
raise TypeError.new("can't dump anonymous class #{obj}")
|
||||
end
|
||||
singleton_class = class << obj; self; end
|
||||
if !singleton_methods_true(obj).empty? or
|
||||
if !obj.singleton_methods(true).empty? or
|
||||
!singleton_class.instance_variables.empty?
|
||||
raise TypeError.new("singleton can't be dumped #{obj}")
|
||||
end
|
||||
|
|
@ -282,16 +260,6 @@ private
|
|||
param
|
||||
end
|
||||
|
||||
if RUBY_VERSION >= '1.8.0'
|
||||
def singleton_methods_true(obj)
|
||||
obj.singleton_methods(true)
|
||||
end
|
||||
else
|
||||
def singleton_methods_true(obj)
|
||||
obj.singleton_methods
|
||||
end
|
||||
end
|
||||
|
||||
def rubytype2obj(node, info, map, rubytype)
|
||||
klass = rubytype ? Mapping.class_from_name(rubytype) : nil
|
||||
obj = nil
|
||||
|
|
|
|||
|
|
@ -102,5 +102,4 @@ TypeMap = {
|
|||
SOAP::SOAPPositiveInteger::SOAPENCType => SOAPPositiveInteger,
|
||||
}
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ private
|
|||
end
|
||||
|
||||
def simpleobj2soap(obj, type)
|
||||
return SOAPNil.new unless obj
|
||||
type.check_lexical_format(obj)
|
||||
return SOAPNil.new if obj.nil? # TODO: check nillable.
|
||||
if type.base
|
||||
ele = base2soap(obj, TypeMap[type.base])
|
||||
ele.type = type.name
|
||||
|
|
|
|||
|
|
@ -110,6 +110,11 @@ private
|
|||
else
|
||||
ele = complexobj2soap(obj, type)
|
||||
end
|
||||
ele.type = type.name
|
||||
if type.base or Mapping.root_type_hint
|
||||
Mapping.reset_root_type_hint
|
||||
ele.force_typed = true
|
||||
end
|
||||
add_definedattributes2soap(obj, ele, type)
|
||||
end
|
||||
ele
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - RPC utility -- Mapping registry.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
|
|
@ -120,7 +120,7 @@ class MIMEMessage
|
|||
end
|
||||
|
||||
def parse(str)
|
||||
headers, body = str.split(/\r\n\r\n/s, 2)
|
||||
headers, body = str.split(/\r\n\r\n/, 2)
|
||||
if headers != nil and body != nil
|
||||
@headers = Headers.parse(headers)
|
||||
@body = body.sub(/\r\n\z/, '')
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - Namespace library
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
|
|
@ -176,13 +176,13 @@ private
|
|||
http.open_timeout = @connect_timeout if @connect_timeout
|
||||
http.read_timeout = @receive_timeout if @receive_timeout
|
||||
case url
|
||||
when URI::HTTPS
|
||||
when URI::HTTPS then
|
||||
if SSLEnabled
|
||||
http.use_ssl = true
|
||||
else
|
||||
raise RuntimeError.new("Cannot connect to #{url} (OpenSSL is not installed.)")
|
||||
end
|
||||
when URI::HTTP
|
||||
when URI::HTTP then
|
||||
# OK
|
||||
else
|
||||
raise RuntimeError.new("Cannot connect to #{url} (Not HTTP.)")
|
||||
|
|
|
|||
10
vendor/gems/soap4r-1.5.8/lib/soap/property.rb
vendored
10
vendor/gems/soap4r-1.5.8/lib/soap/property.rb
vendored
|
|
@ -65,12 +65,12 @@ class Property
|
|||
|
||||
KEY_REGSRC = '([^=:\\\\]*(?:\\\\.[^=:\\\\]*)*)'
|
||||
DEF_REGSRC = '\\s*' + KEY_REGSRC + '\\s*[=:]\\s*(.*)'
|
||||
COMMENT_REGEXP = Regexp.new('^(?:#.*|)$', nil, 'u')
|
||||
CATDEF_REGEXP = Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$", nil, 'u')
|
||||
LINE_REGEXP = Regexp.new("^#{DEF_REGSRC}$", nil, 'u')
|
||||
COMMENT_REGEXP = Regexp.new("^(?:#.*|)$")
|
||||
CATDEF_REGEXP = Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$")
|
||||
LINE_REGEXP = Regexp.new("^#{DEF_REGSRC}$")
|
||||
def load(stream)
|
||||
key_prefix = ""
|
||||
stream.each_with_index do |line, lineno|
|
||||
stream.readlines.each_with_index do |line, lineno|
|
||||
line.sub!(/\r?\n\z/u, '')
|
||||
case line
|
||||
when COMMENT_REGEXP
|
||||
|
|
@ -320,7 +320,7 @@ end
|
|||
|
||||
|
||||
# for ruby/1.6.
|
||||
unless Enumerable.instance_methods.include?('inject')
|
||||
unless Enumerable.method_defined?(:inject)
|
||||
module Enumerable
|
||||
def inject(init)
|
||||
result = init
|
||||
|
|
|
|||
9
vendor/gems/soap4r-1.5.8/lib/soap/qname.rb
vendored
9
vendor/gems/soap4r-1.5.8/lib/soap/qname.rb
vendored
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - XML QName definition.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
64
vendor/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb
vendored
64
vendor/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb
vendored
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'soap/soap'
|
||||
require 'soap/attrproxy'
|
||||
require 'soap/mapping'
|
||||
require 'soap/rpc/rpc'
|
||||
require 'soap/rpc/proxy'
|
||||
|
|
@ -21,52 +22,21 @@ module RPC
|
|||
|
||||
|
||||
class Driver
|
||||
class << self
|
||||
if RUBY_VERSION >= "1.7.0"
|
||||
def __attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
@proxy.__send__(name)
|
||||
}
|
||||
if assignable
|
||||
aname = name + '='
|
||||
define_method(aname) { |rhs|
|
||||
@proxy.__send__(aname, rhs)
|
||||
}
|
||||
end
|
||||
end
|
||||
else
|
||||
def __attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@proxy.#{name}
|
||||
end
|
||||
EOS
|
||||
if assignable
|
||||
module_eval <<-EOS
|
||||
def #{name}=(value)
|
||||
@proxy.#{name} = value
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
include AttrProxy
|
||||
|
||||
__attr_proxy :endpoint_url, true
|
||||
__attr_proxy :mapping_registry, true
|
||||
__attr_proxy :literal_mapping_registry, true
|
||||
__attr_proxy :allow_unqualified_element, true
|
||||
__attr_proxy :default_encodingstyle, true
|
||||
__attr_proxy :generate_explicit_type, true
|
||||
__attr_proxy :use_default_namespace, true
|
||||
__attr_proxy :return_response_as_xml, true
|
||||
__attr_proxy :headerhandler
|
||||
__attr_proxy :filterchain
|
||||
__attr_proxy :streamhandler
|
||||
__attr_proxy :test_loopback_response
|
||||
__attr_proxy :reset_stream
|
||||
attr_proxy :endpoint_url, true
|
||||
attr_proxy :mapping_registry, true
|
||||
attr_proxy :literal_mapping_registry, true
|
||||
attr_proxy :allow_unqualified_element, true
|
||||
attr_proxy :default_encodingstyle, true
|
||||
attr_proxy :generate_explicit_type, true
|
||||
attr_proxy :use_default_namespace, true
|
||||
attr_proxy :return_response_as_xml, true
|
||||
attr_proxy :headerhandler
|
||||
attr_proxy :filterchain
|
||||
attr_proxy :streamhandler
|
||||
attr_proxy :test_loopback_response
|
||||
attr_proxy :reset_stream
|
||||
|
||||
attr_reader :proxy
|
||||
attr_reader :options
|
||||
|
|
@ -183,6 +153,10 @@ class Driver
|
|||
|
||||
private
|
||||
|
||||
def attrproxy
|
||||
@proxy
|
||||
end
|
||||
|
||||
def set_wiredump_file_base(name)
|
||||
if @wiredump_file_base
|
||||
@proxy.set_wiredump_file_base("#{@wiredump_file_base}_#{name}")
|
||||
|
|
|
|||
59
vendor/gems/soap4r-1.5.8/lib/soap/rpc/element.rb
vendored
59
vendor/gems/soap4r-1.5.8/lib/soap/rpc/element.rb
vendored
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'soap/baseData'
|
||||
require 'soap/rpc/methodDef'
|
||||
|
||||
|
||||
module SOAP
|
||||
|
|
@ -69,10 +70,10 @@ class MethodDefinitionError < RPCError; end
|
|||
class ParameterError < RPCError; end
|
||||
|
||||
class SOAPMethod < SOAPStruct
|
||||
RETVAL = 'retval'
|
||||
IN = 'in'
|
||||
OUT = 'out'
|
||||
INOUT = 'inout'
|
||||
RETVAL = :retval
|
||||
IN = :in
|
||||
OUT = :out
|
||||
INOUT = :inout
|
||||
|
||||
attr_reader :param_def
|
||||
attr_reader :inparam
|
||||
|
|
@ -97,7 +98,7 @@ class SOAPMethod < SOAPStruct
|
|||
@retval_name = nil
|
||||
@retval_class_name = nil
|
||||
|
||||
init_param(@param_def) if @param_def
|
||||
init_params(@param_def) if @param_def
|
||||
end
|
||||
|
||||
def have_member
|
||||
|
|
@ -151,8 +152,9 @@ class SOAPMethod < SOAPStruct
|
|||
|
||||
def SOAPMethod.param_count(param_def, *type)
|
||||
count = 0
|
||||
param_def.each do |io_type, name, param_type|
|
||||
if type.include?(io_type)
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
if type.include?(param.io_type.to_sym)
|
||||
count += 1
|
||||
end
|
||||
end
|
||||
|
|
@ -217,38 +219,41 @@ private
|
|||
names
|
||||
end
|
||||
|
||||
def init_param(param_def)
|
||||
param_def.each do |io_type, name, param_type|
|
||||
mapped_class, nsdef, namedef = SOAPMethod.parse_param_type(param_type)
|
||||
if nsdef && namedef
|
||||
type_qname = XSD::QName.new(nsdef, namedef)
|
||||
elsif mapped_class
|
||||
type_qname = TypeMap.index(mapped_class)
|
||||
def init_params(param_def)
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
init_param(param)
|
||||
end
|
||||
case io_type
|
||||
end
|
||||
|
||||
def init_param(param)
|
||||
mapped_class = SOAPMethod.parse_mapped_class(param.mapped_class)
|
||||
qname = param.qname
|
||||
if qname.nil? and mapped_class
|
||||
qname = TypeMap.key(mapped_class)
|
||||
end
|
||||
case param.io_type
|
||||
when IN
|
||||
@signature.push([IN, name, type_qname])
|
||||
@inparam_names.push(name)
|
||||
@signature.push([IN, param.name, qname])
|
||||
@inparam_names.push(param.name)
|
||||
when OUT
|
||||
@signature.push([OUT, name, type_qname])
|
||||
@outparam_names.push(name)
|
||||
@signature.push([OUT, param.name, qname])
|
||||
@outparam_names.push(param.name)
|
||||
when INOUT
|
||||
@signature.push([INOUT, name, type_qname])
|
||||
@inoutparam_names.push(name)
|
||||
@signature.push([INOUT, param.name, qname])
|
||||
@inoutparam_names.push(param.name)
|
||||
when RETVAL
|
||||
if @retval_name
|
||||
raise MethodDefinitionError.new('duplicated retval')
|
||||
end
|
||||
@retval_name = name
|
||||
@retval_name = param.name
|
||||
@retval_class_name = mapped_class
|
||||
else
|
||||
raise MethodDefinitionError.new("unknown type: #{io_type}")
|
||||
end
|
||||
raise MethodDefinitionError.new("unknown type: #{param.io_type}")
|
||||
end
|
||||
end
|
||||
|
||||
def self.parse_param_type(param_type)
|
||||
mapped_class, nsdef, namedef = param_type
|
||||
def self.parse_mapped_class(mapped_class)
|
||||
# the first element of typedef in param_def can be a String like
|
||||
# "::SOAP::SOAPStruct" or "CustomClass[]". turn this String to a class if
|
||||
# we can.
|
||||
|
|
@ -260,7 +265,7 @@ private
|
|||
mapped_class = Mapping.class_from_name(mapped_class)
|
||||
end
|
||||
end
|
||||
[mapped_class, nsdef, namedef]
|
||||
mapped_class
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
374
vendor/gems/soap4r-1.5.8/lib/soap/rpc/element.rb.orig
vendored
Normal file
374
vendor/gems/soap4r-1.5.8/lib/soap/rpc/element.rb.orig
vendored
Normal file
|
|
@ -0,0 +1,374 @@
|
|||
# SOAP4R - RPC element definition.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/baseData'
|
||||
require 'soap/rpc/methodDef'
|
||||
|
||||
|
||||
module SOAP
|
||||
|
||||
# Add method definitions for RPC to common definition in element.rb
|
||||
class SOAPBody < SOAPStruct
|
||||
public
|
||||
|
||||
def request
|
||||
root_node
|
||||
end
|
||||
|
||||
def response
|
||||
root = root_node
|
||||
if !@is_fault
|
||||
if root.nil?
|
||||
nil
|
||||
elsif root.is_a?(SOAPBasetype)
|
||||
root
|
||||
else
|
||||
# Initial element is [retval].
|
||||
root[0]
|
||||
end
|
||||
else
|
||||
root
|
||||
end
|
||||
end
|
||||
|
||||
def outparams
|
||||
root = root_node
|
||||
if !@is_fault and !root.nil? and !root.is_a?(SOAPBasetype)
|
||||
op = root[1..-1]
|
||||
op = nil if op && op.empty?
|
||||
op
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def fault
|
||||
if @is_fault
|
||||
self['fault']
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def fault=(fault)
|
||||
@is_fault = true
|
||||
add('fault', fault)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module RPC
|
||||
|
||||
|
||||
class RPCError < Error; end
|
||||
class MethodDefinitionError < RPCError; end
|
||||
class ParameterError < RPCError; end
|
||||
|
||||
class SOAPMethod < SOAPStruct
|
||||
RETVAL = :retval
|
||||
IN = :in
|
||||
OUT = :out
|
||||
INOUT = :inout
|
||||
|
||||
attr_reader :param_def
|
||||
attr_reader :inparam
|
||||
attr_reader :outparam
|
||||
attr_reader :retval_name
|
||||
attr_reader :retval_class_name
|
||||
|
||||
def initialize(qname, param_def = nil)
|
||||
super(nil)
|
||||
@elename = qname
|
||||
@encodingstyle = nil
|
||||
|
||||
@param_def = param_def
|
||||
|
||||
@signature = []
|
||||
@inparam_names = []
|
||||
@inoutparam_names = []
|
||||
@outparam_names = []
|
||||
|
||||
@inparam = {}
|
||||
@outparam = {}
|
||||
@retval_name = nil
|
||||
@retval_class_name = nil
|
||||
|
||||
init_params(@param_def) if @param_def
|
||||
end
|
||||
|
||||
def have_member
|
||||
true
|
||||
end
|
||||
|
||||
def have_outparam?
|
||||
@outparam_names.size > 0
|
||||
end
|
||||
|
||||
def input_params
|
||||
collect_params(IN, INOUT)
|
||||
end
|
||||
|
||||
def output_params
|
||||
collect_params(OUT, INOUT)
|
||||
end
|
||||
|
||||
def input_param_types
|
||||
collect_param_types(IN, INOUT)
|
||||
end
|
||||
|
||||
def output_param_types
|
||||
collect_param_types(OUT, INOUT)
|
||||
end
|
||||
|
||||
def set_param(params)
|
||||
params.each do |param, data|
|
||||
@inparam[param] = data
|
||||
data.elename = XSD::QName.new(data.elename.namespace, param)
|
||||
data.parent = self
|
||||
end
|
||||
end
|
||||
|
||||
def set_outparam(params)
|
||||
params.each do |param, data|
|
||||
@outparam[param] = data
|
||||
data.elename = XSD::QName.new(data.elename.namespace, param)
|
||||
end
|
||||
end
|
||||
|
||||
def get_paramtypes(names)
|
||||
types = []
|
||||
@signature.each do |io_type, name, type_qname|
|
||||
if type_qname && idx = names.index(name)
|
||||
types[idx] = type_qname
|
||||
end
|
||||
end
|
||||
types
|
||||
end
|
||||
|
||||
def SOAPMethod.param_count(param_def, *type)
|
||||
count = 0
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
if type.include?(param.io_type.to_sym)
|
||||
count += 1
|
||||
end
|
||||
end
|
||||
count
|
||||
end
|
||||
|
||||
def SOAPMethod.derive_rpc_param_def(obj, name, *param)
|
||||
if param.size == 1 and param[0].is_a?(Array)
|
||||
return param[0]
|
||||
end
|
||||
if param.empty?
|
||||
method = obj.method(name)
|
||||
param_names = (1..method.arity.abs).collect { |i| "p#{i}" }
|
||||
else
|
||||
param_names = param
|
||||
end
|
||||
create_rpc_param_def(param_names)
|
||||
end
|
||||
|
||||
def SOAPMethod.create_rpc_param_def(param_names)
|
||||
param_def = []
|
||||
param_names.each do |param_name|
|
||||
param_def.push([IN, param_name, nil])
|
||||
end
|
||||
param_def.push([RETVAL, 'return', nil])
|
||||
param_def
|
||||
end
|
||||
|
||||
def SOAPMethod.create_doc_param_def(req_qnames, res_qnames)
|
||||
req_qnames = [req_qnames] if req_qnames.is_a?(XSD::QName)
|
||||
res_qnames = [res_qnames] if res_qnames.is_a?(XSD::QName)
|
||||
param_def = []
|
||||
# req_qnames and res_qnames can be nil
|
||||
if req_qnames
|
||||
req_qnames.each do |qname|
|
||||
param_def << [IN, qname.name, [nil, qname.namespace, qname.name]]
|
||||
end
|
||||
end
|
||||
if res_qnames
|
||||
res_qnames.each do |qname|
|
||||
param_def << [OUT, qname.name, [nil, qname.namespace, qname.name]]
|
||||
end
|
||||
end
|
||||
param_def
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def collect_param_types(*type)
|
||||
names = []
|
||||
@signature.each do |io_type, name, type_qname|
|
||||
names << type_qname if type.include?(io_type)
|
||||
end
|
||||
names
|
||||
end
|
||||
|
||||
def collect_params(*type)
|
||||
names = []
|
||||
@signature.each do |io_type, name, type_qname|
|
||||
names << name if type.include?(io_type)
|
||||
end
|
||||
names
|
||||
end
|
||||
|
||||
def init_params(param_def)
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
init_param(param)
|
||||
end
|
||||
end
|
||||
|
||||
def init_param(param)
|
||||
mapped_class = SOAPMethod.parse_mapped_class(param.mapped_class)
|
||||
qname = param.qname
|
||||
if qname.nil? and mapped_class
|
||||
qname = TypeMap.index(mapped_class)
|
||||
end
|
||||
case param.io_type
|
||||
when IN
|
||||
@signature.push([IN, param.name, qname])
|
||||
@inparam_names.push(param.name)
|
||||
when OUT
|
||||
@signature.push([OUT, param.name, qname])
|
||||
@outparam_names.push(param.name)
|
||||
when INOUT
|
||||
@signature.push([INOUT, param.name, qname])
|
||||
@inoutparam_names.push(param.name)
|
||||
when RETVAL
|
||||
if @retval_name
|
||||
raise MethodDefinitionError.new('duplicated retval')
|
||||
end
|
||||
@retval_name = param.name
|
||||
@retval_class_name = mapped_class
|
||||
else
|
||||
raise MethodDefinitionError.new("unknown type: #{param.io_type}")
|
||||
end
|
||||
end
|
||||
|
||||
def self.parse_mapped_class(mapped_class)
|
||||
# the first element of typedef in param_def can be a String like
|
||||
# "::SOAP::SOAPStruct" or "CustomClass[]". turn this String to a class if
|
||||
# we can.
|
||||
if mapped_class.is_a?(String)
|
||||
if /\[\]\Z/ =~ mapped_class
|
||||
# when '[]' is added, ignore this.
|
||||
mapped_class = nil
|
||||
else
|
||||
mapped_class = Mapping.class_from_name(mapped_class)
|
||||
end
|
||||
end
|
||||
mapped_class
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class SOAPMethodRequest < SOAPMethod
|
||||
attr_accessor :soapaction
|
||||
|
||||
def SOAPMethodRequest.create_request(qname, *params)
|
||||
param_def = []
|
||||
param_value = []
|
||||
i = 0
|
||||
params.each do |param|
|
||||
param_name = "p#{i}"
|
||||
i += 1
|
||||
param_def << [IN, param_name, nil]
|
||||
param_value << [param_name, param]
|
||||
end
|
||||
param_def << [RETVAL, 'return', nil]
|
||||
o = new(qname, param_def)
|
||||
o.set_param(param_value)
|
||||
o
|
||||
end
|
||||
|
||||
def initialize(qname, param_def = nil, soapaction = nil)
|
||||
super(qname, param_def)
|
||||
@soapaction = soapaction
|
||||
end
|
||||
|
||||
def each
|
||||
input_params.each do |name|
|
||||
unless @inparam[name]
|
||||
raise ParameterError.new("parameter: #{name} was not given")
|
||||
end
|
||||
yield(name, @inparam[name])
|
||||
end
|
||||
end
|
||||
|
||||
def dup
|
||||
req = self.class.new(@elename.dup, @param_def, @soapaction)
|
||||
req.encodingstyle = @encodingstyle
|
||||
req
|
||||
end
|
||||
|
||||
def create_method_response(response_name = nil)
|
||||
response_name ||=
|
||||
XSD::QName.new(@elename.namespace, @elename.name + 'Response')
|
||||
SOAPMethodResponse.new(response_name, @param_def)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class SOAPMethodResponse < SOAPMethod
|
||||
|
||||
def initialize(qname, param_def = nil)
|
||||
super(qname, param_def)
|
||||
@retval = nil
|
||||
end
|
||||
|
||||
def retval
|
||||
@retval
|
||||
end
|
||||
|
||||
def retval=(retval)
|
||||
@retval = retval
|
||||
@retval.elename = @retval.elename.dup_name(@retval_name || 'return')
|
||||
retval.parent = self
|
||||
retval
|
||||
end
|
||||
|
||||
def each
|
||||
if @retval_name and !@retval.is_a?(SOAPVoid)
|
||||
yield(@retval_name, @retval)
|
||||
end
|
||||
|
||||
output_params.each do |name|
|
||||
unless @outparam[name]
|
||||
raise ParameterError.new("parameter: #{name} was not given")
|
||||
end
|
||||
yield(name, @outparam[name])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# To return(?) void explicitly.
|
||||
# def foo(input_var)
|
||||
# ...
|
||||
# return SOAP::RPC::SOAPVoid.new
|
||||
# end
|
||||
class SOAPVoid < XSD::XSDAnySimpleType
|
||||
include SOAPBasetype
|
||||
extend SOAPModuleUtils
|
||||
Name = XSD::QName.new(Mapping::RubyCustomTypeNamespace, nil)
|
||||
|
||||
public
|
||||
def initialize()
|
||||
@elename = Name
|
||||
@id = nil
|
||||
@precedents = []
|
||||
@parent = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'logger'
|
||||
require 'soap/attrproxy'
|
||||
require 'soap/rpc/soaplet'
|
||||
require 'soap/streamHandler'
|
||||
require 'webrick'
|
||||
|
|
@ -17,46 +18,15 @@ module RPC
|
|||
|
||||
|
||||
class HTTPServer < Logger::Application
|
||||
include AttrProxy
|
||||
|
||||
attr_reader :server
|
||||
attr_accessor :default_namespace
|
||||
|
||||
class << self
|
||||
if RUBY_VERSION >= "1.7.0"
|
||||
def __attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
@router.__send__(name)
|
||||
}
|
||||
if assignable
|
||||
aname = name + '='
|
||||
define_method(aname) { |rhs|
|
||||
@router.__send__(aname, rhs)
|
||||
}
|
||||
end
|
||||
end
|
||||
else
|
||||
def __attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@router.#{name}
|
||||
end
|
||||
EOS
|
||||
if assignable
|
||||
module_eval <<-EOS
|
||||
def #{name}=(value)
|
||||
@router.#{name} = value
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
__attr_proxy :mapping_registry, true
|
||||
__attr_proxy :literal_mapping_registry, true
|
||||
__attr_proxy :generate_explicit_type, true
|
||||
__attr_proxy :use_default_namespace, true
|
||||
attr_proxy :mapping_registry, true
|
||||
attr_proxy :literal_mapping_registry, true
|
||||
attr_proxy :generate_explicit_type, true
|
||||
attr_proxy :use_default_namespace, true
|
||||
|
||||
def initialize(config)
|
||||
actor = config[:SOAPHTTPServerApplicationName] || self.class.name
|
||||
|
|
@ -74,7 +44,6 @@ class HTTPServer < Logger::Application
|
|||
if wsdldir = config[:WSDLDocumentDirectory]
|
||||
@server.mount('/wsdl', WEBrick::HTTPServlet::FileHandler, wsdldir)
|
||||
end
|
||||
# for backward compatibility
|
||||
@server.mount('/', @soaplet)
|
||||
end
|
||||
|
||||
|
|
@ -159,6 +128,10 @@ class HTTPServer < Logger::Application
|
|||
|
||||
private
|
||||
|
||||
def attrproxy
|
||||
@router
|
||||
end
|
||||
|
||||
def run
|
||||
@server.start
|
||||
end
|
||||
|
|
|
|||
68
vendor/gems/soap4r-1.5.8/lib/soap/rpc/methodDef.rb
vendored
Normal file
68
vendor/gems/soap4r-1.5.8/lib/soap/rpc/methodDef.rb
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# SOAP4R - A method definition
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
module SOAP
|
||||
module RPC
|
||||
|
||||
|
||||
class MethodDef
|
||||
attr_reader :name
|
||||
attr_reader :soapaction
|
||||
attr_reader :qname
|
||||
attr_accessor :style
|
||||
attr_accessor :inputuse
|
||||
attr_accessor :outputuse
|
||||
attr_reader :parameters
|
||||
attr_reader :faults
|
||||
|
||||
def initialize(name, soapaction, qname)
|
||||
@name = name
|
||||
@soapaction = soapaction
|
||||
@qname = qname
|
||||
@style = @inputuse = @outputuse = nil
|
||||
@parameters = []
|
||||
@faults = {}
|
||||
end
|
||||
|
||||
def add_parameter(io_type, name, qname, mapped_class)
|
||||
@parameters << Parameter.new(io_type, name, qname, mapped_class)
|
||||
end
|
||||
|
||||
def self.to_param(param)
|
||||
if param.respond_to?(:io_type)
|
||||
param
|
||||
else
|
||||
io_type, name, param_type = param
|
||||
mapped_class_str, nsdef, namedef = param_type
|
||||
if nsdef && namedef
|
||||
qname = XSD::QName.new(nsdef, namedef)
|
||||
else
|
||||
qname = nil
|
||||
end
|
||||
MethodDef::Parameter.new(io_type.to_sym, name, qname, mapped_class_str)
|
||||
end
|
||||
end
|
||||
|
||||
class Parameter
|
||||
attr_reader :io_type
|
||||
attr_reader :name
|
||||
attr_reader :qname
|
||||
attr_reader :mapped_class
|
||||
|
||||
def initialize(io_type, name, qname, mapped_class)
|
||||
@io_type = io_type
|
||||
@name = name
|
||||
@qname = qname
|
||||
@mapped_class = mapped_class
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
34
vendor/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb
vendored
34
vendor/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb
vendored
|
|
@ -56,7 +56,7 @@ public
|
|||
# TODO: set to false by default or drop thie option in 1.6.0
|
||||
@allow_unqualified_element = true
|
||||
@default_encodingstyle = nil
|
||||
@generate_explicit_type = true
|
||||
@generate_explicit_type = nil
|
||||
@use_default_namespace = false
|
||||
@return_response_as_xml = false
|
||||
@headerhandler = Header::HandlerSet.new
|
||||
|
|
@ -140,6 +140,12 @@ public
|
|||
:default_encodingstyle =>
|
||||
@default_encodingstyle || op_info.response_default_encodingstyle
|
||||
)
|
||||
if reqopt[:generate_explicit_type].nil?
|
||||
reqopt[:generate_explicit_type] = (op_info.request_use == :encoded)
|
||||
end
|
||||
if resopt[:generate_explicit_type].nil?
|
||||
resopt[:generate_explicit_type] = (op_info.response_use == :encoded)
|
||||
end
|
||||
env = route(req_header, req_body, reqopt, resopt)
|
||||
if op_info.response_use.nil?
|
||||
return nil
|
||||
|
|
@ -176,8 +182,8 @@ public
|
|||
conn_data.send_string = mime.content_str
|
||||
conn_data.send_contenttype = mime.headers['content-type'].str
|
||||
end
|
||||
conn_data = @streamhandler.send(@endpoint_url, conn_data,
|
||||
reqopt[:soapaction])
|
||||
conn_data.soapaction = reqopt[:soapaction]
|
||||
conn_data = @streamhandler.send(@endpoint_url, conn_data)
|
||||
if conn_data.receive_string.empty?
|
||||
return nil
|
||||
end
|
||||
|
|
@ -377,25 +383,17 @@ private
|
|||
RPC::SOAPMethodRequest.new(@rpc_request_qname, param_def, @soapaction)
|
||||
else
|
||||
@doc_request_qnames = []
|
||||
@doc_request_qualified = []
|
||||
@doc_response_qnames = []
|
||||
@doc_response_qualified = []
|
||||
param_def.each do |inout, paramname, typeinfo, eleinfo|
|
||||
klass_not_used, nsdef, namedef = typeinfo
|
||||
qualified = eleinfo
|
||||
if namedef.nil?
|
||||
raise MethodDefinitionError.new("qname must be given")
|
||||
end
|
||||
case inout
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
case param.io_type
|
||||
when SOAPMethod::IN
|
||||
@doc_request_qnames << XSD::QName.new(nsdef, namedef)
|
||||
@doc_request_qualified << qualified
|
||||
@doc_request_qnames << param.qname
|
||||
when SOAPMethod::OUT
|
||||
@doc_response_qnames << XSD::QName.new(nsdef, namedef)
|
||||
@doc_response_qualified << qualified
|
||||
@doc_response_qnames << param.qname
|
||||
else
|
||||
raise MethodDefinitionError.new(
|
||||
"illegal inout definition for document style: #{inout}")
|
||||
"illegal inout definition for document style: #{param.io_type}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -503,7 +501,6 @@ private
|
|||
(0...values.size).collect { |idx|
|
||||
ele = Mapping.obj2soap(values[idx], mapping_registry, nil, opt)
|
||||
ele.elename = @doc_request_qnames[idx]
|
||||
ele.qualified = @doc_request_qualified[idx]
|
||||
ele
|
||||
}
|
||||
end
|
||||
|
|
@ -513,7 +510,6 @@ private
|
|||
ele = Mapping.obj2soap(values[idx], mapping_registry,
|
||||
@doc_request_qnames[idx], opt)
|
||||
ele.encodingstyle = LiteralNamespace
|
||||
ele.qualified = @doc_request_qualified[idx]
|
||||
ele
|
||||
}
|
||||
end
|
||||
|
|
|
|||
27
vendor/gems/soap4r-1.5.8/lib/soap/rpc/router.rb
vendored
27
vendor/gems/soap4r-1.5.8/lib/soap/rpc/router.rb
vendored
|
|
@ -217,10 +217,10 @@ class Router
|
|||
private
|
||||
|
||||
def first_input_part_qname(param_def)
|
||||
param_def.each do |inout, paramname, typeinfo|
|
||||
if inout == SOAPMethod::IN
|
||||
klass, nsdef, namedef = typeinfo
|
||||
return XSD::QName.new(nsdef, namedef)
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
if param.io_type == SOAPMethod::IN
|
||||
return param.qname
|
||||
end
|
||||
end
|
||||
nil
|
||||
|
|
@ -423,22 +423,17 @@ private
|
|||
@rpc_response_qname = opt[:response_qname]
|
||||
else
|
||||
@doc_request_qnames = []
|
||||
@doc_request_qualified = []
|
||||
@doc_response_qnames = []
|
||||
@doc_response_qualified = []
|
||||
param_def.each do |inout, paramname, typeinfo, eleinfo|
|
||||
klass, nsdef, namedef = typeinfo
|
||||
qualified = eleinfo
|
||||
case inout
|
||||
param_def.each do |param|
|
||||
param = MethodDef.to_param(param)
|
||||
case param.io_type
|
||||
when SOAPMethod::IN
|
||||
@doc_request_qnames << XSD::QName.new(nsdef, namedef)
|
||||
@doc_request_qualified << qualified
|
||||
@doc_request_qnames << param.qname
|
||||
when SOAPMethod::OUT
|
||||
@doc_response_qnames << XSD::QName.new(nsdef, namedef)
|
||||
@doc_response_qualified << qualified
|
||||
@doc_response_qnames << param.qname
|
||||
else
|
||||
raise ArgumentError.new(
|
||||
"illegal inout definition for document style: #{inout}")
|
||||
"illegal inout definition for document style: #{param.io_type}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -605,7 +600,6 @@ private
|
|||
(0...result.size).collect { |idx|
|
||||
ele = Mapping.obj2soap(result[idx], mapping_registry, nil, opt)
|
||||
ele.elename = @doc_response_qnames[idx]
|
||||
ele.qualified = @doc_response_qualified[idx]
|
||||
ele
|
||||
}
|
||||
end
|
||||
|
|
@ -615,7 +609,6 @@ private
|
|||
ele = Mapping.obj2soap(result[idx], mapping_registry,
|
||||
@doc_response_qnames[idx])
|
||||
ele.encodingstyle = LiteralNamespace
|
||||
ele.qualified = @doc_response_qualified[idx]
|
||||
ele
|
||||
}
|
||||
end
|
||||
|
|
|
|||
10
vendor/gems/soap4r-1.5.8/lib/soap/rpc/soaplet.rb
vendored
10
vendor/gems/soap4r-1.5.8/lib/soap/rpc/soaplet.rb
vendored
|
|
@ -50,16 +50,6 @@ public
|
|||
@config = {}
|
||||
end
|
||||
|
||||
# for backward compatibility
|
||||
def app_scope_router
|
||||
@router
|
||||
end
|
||||
|
||||
# for backward compatibility
|
||||
def add_servant(obj, namespace)
|
||||
@router.add_rpc_servant(obj, namespace)
|
||||
end
|
||||
|
||||
def allow_content_encoding_gzip=(allow)
|
||||
@options[:allow_content_encoding_gzip] = allow
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ module RPC
|
|||
|
||||
|
||||
class StandaloneServer < HTTPServer
|
||||
def initialize(appname, default_namespace, host = "0.0.0.0", port = 8080)
|
||||
def initialize(appname, default_namespace, host = "0.0.0.0", port = 8089)
|
||||
@appname = appname
|
||||
@default_namespace = default_namespace
|
||||
@host = host
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - RPC Routing library
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - RPC utility.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
# SOAP4R - CGI stub library
|
||||
# SOAP4R - Extensions for Ruby 1.8.X compatibility
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
unless RUBY_VERSION >= "1.9.0"
|
||||
class Hash
|
||||
def key(value)
|
||||
index(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
9
vendor/gems/soap4r-1.5.8/lib/soap/server.rb
vendored
9
vendor/gems/soap4r-1.5.8/lib/soap/server.rb
vendored
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - Server implementation
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
4
vendor/gems/soap4r-1.5.8/lib/soap/soap.rb
vendored
4
vendor/gems/soap4r-1.5.8/lib/soap/soap.rb
vendored
|
|
@ -5,7 +5,7 @@
|
|||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/ruby18ext'
|
||||
require 'xsd/qname'
|
||||
require 'xsd/charset'
|
||||
require 'soap/nestedexception'
|
||||
|
|
@ -14,7 +14,7 @@ require 'soap/nestedexception'
|
|||
module SOAP
|
||||
|
||||
|
||||
VERSION = Version = '1.5.8'
|
||||
VERSION = Version = '1.6.1-SNAPSHOT'
|
||||
PropertyName = 'soap/property'
|
||||
|
||||
EnvelopeNamespace = 'http://schemas.xmlsoap.org/soap/envelope/'
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
# SOAP4R - Standalone Server
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/compat'
|
||||
|
|
@ -167,8 +167,7 @@ public
|
|||
"#<#{self.class}>"
|
||||
end
|
||||
|
||||
def send(url, conn_data, soapaction = nil, charset = @charset)
|
||||
conn_data.soapaction ||= soapaction # for backward conpatibility
|
||||
def send(url, conn_data, charset = @charset)
|
||||
conn_data = send_post(url, conn_data, charset)
|
||||
@client.save_cookie_store if @cookie_store
|
||||
conn_data
|
||||
|
|
|
|||
535
vendor/gems/soap4r-1.5.8/lib/soap/wsdlDriver.rb
vendored
535
vendor/gems/soap4r-1.5.8/lib/soap/wsdlDriver.rb
vendored
|
|
@ -5,11 +5,12 @@
|
|||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'soap/ruby18ext'
|
||||
require 'wsdl/parser'
|
||||
require 'wsdl/importer'
|
||||
require 'xsd/qname'
|
||||
require 'xsd/codegen/gensupport'
|
||||
require 'soap/attrproxy'
|
||||
require 'soap/mapping/wsdlencodedregistry'
|
||||
require 'soap/mapping/wsdlliteralregistry'
|
||||
require 'soap/rpc/driver'
|
||||
|
|
@ -30,10 +31,6 @@ class WSDLDriverFactory
|
|||
|
||||
def initialize(wsdl)
|
||||
@wsdl = import(wsdl)
|
||||
name_creator = WSDL::SOAP::ClassNameCreator.new
|
||||
@modulepath = 'WSDLDriverFactory'
|
||||
@methoddefcreator =
|
||||
WSDL::SOAP::MethodDefCreator.new(@wsdl, name_creator, @modulepath, {})
|
||||
end
|
||||
|
||||
def inspect
|
||||
|
|
@ -43,21 +40,13 @@ class WSDLDriverFactory
|
|||
def create_rpc_driver(servicename = nil, portname = nil)
|
||||
port = find_port(servicename, portname)
|
||||
drv = SOAP::RPC::Driver.new(port.soap_address.location)
|
||||
init_driver(drv, port)
|
||||
add_operation(drv, port)
|
||||
if binding = port.find_binding
|
||||
init_driver(drv, binding)
|
||||
add_operation(drv, binding)
|
||||
end
|
||||
drv
|
||||
end
|
||||
|
||||
# deprecated old interface
|
||||
def create_driver(servicename = nil, portname = nil)
|
||||
warn("WSDLDriverFactory#create_driver is deprecated. Use create_rpc_driver instead.")
|
||||
port = find_port(servicename, portname)
|
||||
WSDLDriver.new(@wsdl, port, nil)
|
||||
end
|
||||
|
||||
# Backward compatibility.
|
||||
alias createDriver create_driver
|
||||
|
||||
def dump_method_signatures(servicename = nil, portname = nil)
|
||||
targetservice = XSD::QName.new(@wsdl.targetnamespace, servicename) if servicename
|
||||
targetport = XSD::QName.new(@wsdl.targetnamespace, portname) if portname
|
||||
|
|
@ -67,16 +56,33 @@ class WSDLDriverFactory
|
|||
next if targetservice and service.name != targetservice
|
||||
service.ports.each do |port|
|
||||
next if targetport and port.name != targetport
|
||||
sig << port.porttype.operations.collect { |operation|
|
||||
dump_method_signature(operation, element_definitions).gsub(/^#/, ' ')
|
||||
if porttype = port.porttype
|
||||
assigned_method = collect_assigned_method(porttype.name)
|
||||
if binding = port.porttype.find_binding
|
||||
sig << binding.operations.collect { |op_bind|
|
||||
operation = op_bind.find_operation
|
||||
name = assigned_method[op_bind.boundid] || op_bind.name
|
||||
str = "= #{safemethodname(name)}\n\n"
|
||||
str << dump_method_signature(name, operation, element_definitions)
|
||||
str.gsub(/^#/, " ")
|
||||
}.join("\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
sig.join("\n")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def collect_assigned_method(porttypename)
|
||||
name_creator = WSDL::SOAP::ClassNameCreator.new
|
||||
methoddefcreator =
|
||||
WSDL::SOAP::MethodDefCreator.new(@wsdl, name_creator, nil, {})
|
||||
methoddefcreator.dump(porttypename)
|
||||
methoddefcreator.assigned_method
|
||||
end
|
||||
|
||||
def find_port(servicename = nil, portname = nil)
|
||||
service = port = nil
|
||||
if servicename
|
||||
|
|
@ -105,35 +111,42 @@ private
|
|||
port
|
||||
end
|
||||
|
||||
def init_driver(drv, port)
|
||||
def init_driver(drv, binding)
|
||||
wsdl_elements = @wsdl.collect_elements
|
||||
wsdl_types = @wsdl.collect_complextypes + @wsdl.collect_simpletypes
|
||||
rpc_decode_typemap = wsdl_types +
|
||||
@wsdl.soap_rpc_complextypes(port.find_binding)
|
||||
@wsdl.soap_rpc_complextypes(binding)
|
||||
drv.proxy.mapping_registry =
|
||||
Mapping::WSDLEncodedRegistry.new(rpc_decode_typemap)
|
||||
drv.proxy.literal_mapping_registry =
|
||||
Mapping::WSDLLiteralRegistry.new(wsdl_types, wsdl_elements)
|
||||
end
|
||||
|
||||
def add_operation(drv, port)
|
||||
port.find_binding.operations.each do |op_bind|
|
||||
op_name = op_bind.soapoperation_name
|
||||
soapaction = op_bind.soapaction || ''
|
||||
orgname = op_name.name
|
||||
name = XSD::CodeGen::GenSupport.safemethodname(orgname)
|
||||
param_def = create_param_def(op_bind)
|
||||
opt = {
|
||||
:request_style => op_bind.soapoperation_style,
|
||||
:response_style => op_bind.soapoperation_style,
|
||||
:request_use => op_bind.soapbody_use_input,
|
||||
:response_use => op_bind.soapbody_use_output
|
||||
}
|
||||
if op_bind.soapoperation_style == :rpc
|
||||
drv.add_rpc_operation(op_name, soapaction, name, param_def, opt)
|
||||
else
|
||||
drv.add_document_operation(soapaction, name, param_def, opt)
|
||||
def add_operation(drv, binding)
|
||||
name_creator = WSDL::SOAP::ClassNameCreator.new
|
||||
modulepath = 'WSDLDriverFactory'
|
||||
methoddefcreator =
|
||||
WSDL::SOAP::MethodDefCreator.new(@wsdl, name_creator, modulepath, {})
|
||||
mdefs = methoddefcreator.create(binding.name)
|
||||
if mdefs.nil?
|
||||
raise FactoryError.new("no method definition found in WSDL")
|
||||
end
|
||||
mdefs.each do |mdef|
|
||||
opt = {
|
||||
:request_style => mdef.style,
|
||||
:response_style => mdef.style,
|
||||
:request_use => mdef.inputuse,
|
||||
:response_use => mdef.outputuse
|
||||
}
|
||||
qname = mdef.qname
|
||||
soapaction = mdef.soapaction
|
||||
name = mdef.name
|
||||
if mdef.style == :rpc
|
||||
drv.add_rpc_operation(qname, soapaction, name, mdef.parameters, opt)
|
||||
else
|
||||
drv.add_document_operation(soapaction, name, mdef.parameters, opt)
|
||||
end
|
||||
orgname = mdef.qname.name
|
||||
if orgname != name and orgname.capitalize == name.capitalize
|
||||
::SOAP::Mapping.define_singleton_method(drv, orgname) do |*arg|
|
||||
__send__(name, *arg)
|
||||
|
|
@ -145,452 +158,6 @@ private
|
|||
def import(location)
|
||||
WSDL::Importer.import(location)
|
||||
end
|
||||
|
||||
def create_param_def(op_bind)
|
||||
op = op_bind.find_operation
|
||||
if op_bind.soapoperation_style == :rpc
|
||||
param_def = @methoddefcreator.collect_rpcparameter(op)
|
||||
else
|
||||
param_def = @methoddefcreator.collect_documentparameter(op)
|
||||
end
|
||||
# the first element of typedef in param_def is a String like
|
||||
# "::SOAP::SOAPStruct". turn this String to a class.
|
||||
param_def.collect { |io_type, name, param_type|
|
||||
[io_type, name, ::SOAP::RPC::SOAPMethod.parse_param_type(param_type)]
|
||||
}
|
||||
end
|
||||
|
||||
def partqname(part)
|
||||
if part.type
|
||||
part.type
|
||||
else
|
||||
part.element
|
||||
end
|
||||
end
|
||||
|
||||
def param_def(type, name, klass, partqname)
|
||||
[type, name, [klass, partqname.namespace, partqname.name]]
|
||||
end
|
||||
|
||||
def filter_parts(partsdef, partssource)
|
||||
parts = partsdef.split(/\s+/)
|
||||
partssource.find_all { |part| parts.include?(part.name) }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class WSDLDriver
|
||||
class << self
|
||||
if RUBY_VERSION >= "1.7.0"
|
||||
def __attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
@servant.__send__(name)
|
||||
}
|
||||
if assignable
|
||||
aname = name + '='
|
||||
define_method(aname) { |rhs|
|
||||
@servant.__send__(aname, rhs)
|
||||
}
|
||||
end
|
||||
end
|
||||
else
|
||||
def __attr_proxy(symbol, assignable = false)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@servant.#{name}
|
||||
end
|
||||
EOS
|
||||
if assignable
|
||||
module_eval <<-EOS
|
||||
def #{name}=(value)
|
||||
@servant.#{name} = value
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
__attr_proxy :options
|
||||
__attr_proxy :headerhandler
|
||||
__attr_proxy :streamhandler
|
||||
__attr_proxy :test_loopback_response
|
||||
__attr_proxy :endpoint_url, true
|
||||
__attr_proxy :mapping_registry, true # for RPC unmarshal
|
||||
__attr_proxy :wsdl_mapping_registry, true # for RPC marshal
|
||||
__attr_proxy :default_encodingstyle, true
|
||||
__attr_proxy :generate_explicit_type, true
|
||||
__attr_proxy :allow_unqualified_element, true
|
||||
|
||||
def httpproxy
|
||||
@servant.options["protocol.http.proxy"]
|
||||
end
|
||||
|
||||
def httpproxy=(httpproxy)
|
||||
@servant.options["protocol.http.proxy"] = httpproxy
|
||||
end
|
||||
|
||||
def wiredump_dev
|
||||
@servant.options["protocol.http.wiredump_dev"]
|
||||
end
|
||||
|
||||
def wiredump_dev=(wiredump_dev)
|
||||
@servant.options["protocol.http.wiredump_dev"] = wiredump_dev
|
||||
end
|
||||
|
||||
def mandatorycharset
|
||||
@servant.options["protocol.mandatorycharset"]
|
||||
end
|
||||
|
||||
def mandatorycharset=(mandatorycharset)
|
||||
@servant.options["protocol.mandatorycharset"] = mandatorycharset
|
||||
end
|
||||
|
||||
def wiredump_file_base
|
||||
@servant.options["protocol.wiredump_file_base"]
|
||||
end
|
||||
|
||||
def wiredump_file_base=(wiredump_file_base)
|
||||
@servant.options["protocol.wiredump_file_base"] = wiredump_file_base
|
||||
end
|
||||
|
||||
def initialize(wsdl, port, logdev)
|
||||
@servant = Servant__.new(self, wsdl, port, logdev)
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}:#{@servant.port.name}>"
|
||||
end
|
||||
|
||||
def reset_stream
|
||||
@servant.reset_stream
|
||||
end
|
||||
|
||||
# Backward compatibility.
|
||||
alias generateEncodeType= generate_explicit_type=
|
||||
|
||||
class Servant__
|
||||
include SOAP
|
||||
|
||||
attr_reader :options
|
||||
attr_reader :port
|
||||
|
||||
attr_accessor :soapaction
|
||||
attr_accessor :default_encodingstyle
|
||||
attr_accessor :allow_unqualified_element
|
||||
attr_accessor :generate_explicit_type
|
||||
attr_accessor :mapping_registry
|
||||
attr_accessor :wsdl_mapping_registry
|
||||
|
||||
def initialize(host, wsdl, port, logdev)
|
||||
@host = host
|
||||
@wsdl = wsdl
|
||||
@port = port
|
||||
@logdev = logdev
|
||||
@soapaction = nil
|
||||
@options = setup_options
|
||||
@default_encodingstyle = nil
|
||||
@allow_unqualified_element = nil
|
||||
@generate_explicit_type = false
|
||||
@mapping_registry = nil # for rpc unmarshal
|
||||
@wsdl_mapping_registry = nil # for rpc marshal
|
||||
@wiredump_file_base = nil
|
||||
@mandatorycharset = nil
|
||||
@wsdl_elements = @wsdl.collect_elements
|
||||
@wsdl_types = @wsdl.collect_complextypes + @wsdl.collect_simpletypes
|
||||
@rpc_decode_typemap = @wsdl_types +
|
||||
@wsdl.soap_rpc_complextypes(port.find_binding)
|
||||
@wsdl_mapping_registry = Mapping::WSDLEncodedRegistry.new(
|
||||
@rpc_decode_typemap)
|
||||
@doc_mapper = Mapping::WSDLLiteralRegistry.new(
|
||||
@wsdl_types, @wsdl_elements)
|
||||
endpoint_url = @port.soap_address.location
|
||||
# Convert a map which key is QName, to a Hash which key is String.
|
||||
@operation = {}
|
||||
@port.inputoperation_map.each do |op_name, op_info|
|
||||
orgname = op_name.name
|
||||
name = XSD::CodeGen::GenSupport.safemethodname(orgname)
|
||||
@operation[name] = @operation[orgname] = op_info
|
||||
add_method_interface(op_info)
|
||||
end
|
||||
@proxy = ::SOAP::RPC::Proxy.new(endpoint_url, @soapaction, @options)
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class}:#{@proxy.inspect}>"
|
||||
end
|
||||
|
||||
def endpoint_url
|
||||
@proxy.endpoint_url
|
||||
end
|
||||
|
||||
def endpoint_url=(endpoint_url)
|
||||
@proxy.endpoint_url = endpoint_url
|
||||
end
|
||||
|
||||
def headerhandler
|
||||
@proxy.headerhandler
|
||||
end
|
||||
|
||||
def streamhandler
|
||||
@proxy.streamhandler
|
||||
end
|
||||
|
||||
def test_loopback_response
|
||||
@proxy.test_loopback_response
|
||||
end
|
||||
|
||||
def reset_stream
|
||||
@proxy.reset_stream
|
||||
end
|
||||
|
||||
def rpc_call(name, *values)
|
||||
set_wiredump_file_base(name)
|
||||
unless op_info = @operation[name]
|
||||
raise RuntimeError, "method: #{name} not defined"
|
||||
end
|
||||
req_header = create_request_header
|
||||
req_body = create_request_body(op_info, *values)
|
||||
reqopt = create_options({
|
||||
:soapaction => op_info.soapaction || @soapaction})
|
||||
resopt = create_options({
|
||||
:decode_typemap => @rpc_decode_typemap})
|
||||
env = @proxy.route(req_header, req_body, reqopt, resopt)
|
||||
raise EmptyResponseError unless env
|
||||
receive_headers(env.header)
|
||||
begin
|
||||
@proxy.check_fault(env.body)
|
||||
rescue ::SOAP::FaultError => e
|
||||
Mapping.fault2exception(e)
|
||||
end
|
||||
ret = env.body.response ?
|
||||
Mapping.soap2obj(env.body.response, @mapping_registry) : nil
|
||||
if env.body.outparams
|
||||
outparams = env.body.outparams.collect { |outparam|
|
||||
Mapping.soap2obj(outparam)
|
||||
}
|
||||
return [ret].concat(outparams)
|
||||
else
|
||||
return ret
|
||||
end
|
||||
end
|
||||
|
||||
# req_header: [[element, mustunderstand, encodingstyle(QName/String)], ...]
|
||||
# req_body: SOAPBasetype/SOAPCompoundtype
|
||||
def document_send(name, header_obj, body_obj)
|
||||
set_wiredump_file_base(name)
|
||||
unless op_info = @operation[name]
|
||||
raise RuntimeError, "method: #{name} not defined"
|
||||
end
|
||||
req_header = header_obj ? header_from_obj(header_obj, op_info) : nil
|
||||
req_body = body_from_obj(body_obj, op_info)
|
||||
opt = create_options({
|
||||
:soapaction => op_info.soapaction || @soapaction,
|
||||
:decode_typemap => @wsdl_types})
|
||||
env = @proxy.invoke(req_header, req_body, opt)
|
||||
raise EmptyResponseError unless env
|
||||
if env.body.fault
|
||||
raise ::SOAP::FaultError.new(env.body.fault)
|
||||
end
|
||||
res_body_obj = env.body.response ?
|
||||
Mapping.soap2obj(env.body.response, @mapping_registry) : nil
|
||||
return env.header, res_body_obj
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def create_options(hash = nil)
|
||||
opt = {}
|
||||
opt[:default_encodingstyle] = @default_encodingstyle
|
||||
opt[:allow_unqualified_element] = @allow_unqualified_element
|
||||
opt[:generate_explicit_type] = @generate_explicit_type
|
||||
opt.update(hash) if hash
|
||||
opt
|
||||
end
|
||||
|
||||
def set_wiredump_file_base(name)
|
||||
if @wiredump_file_base
|
||||
@proxy.set_wiredump_file_base(@wiredump_file_base + "_#{name}")
|
||||
end
|
||||
end
|
||||
|
||||
def create_request_header
|
||||
header = SOAPHeader.new
|
||||
items = @proxy.headerhandler.on_outbound(header)
|
||||
items.each do |item|
|
||||
header.add(item.elename.name, item)
|
||||
end
|
||||
header
|
||||
end
|
||||
|
||||
def receive_headers(header)
|
||||
@proxy.headerhandler.on_inbound(header) if header
|
||||
end
|
||||
|
||||
def create_request_body(op_info, *values)
|
||||
method = create_method_struct(op_info, *values)
|
||||
SOAPBody.new(method)
|
||||
end
|
||||
|
||||
def create_method_struct(op_info, *params)
|
||||
parts_names = op_info.bodyparts.collect { |part| part.name }
|
||||
obj = create_method_obj(parts_names, params)
|
||||
method = Mapping.obj2soap(obj, @wsdl_mapping_registry, op_info.op_name)
|
||||
if method.members.size != parts_names.size
|
||||
new_method = SOAPStruct.new
|
||||
method.each do |key, value|
|
||||
if parts_names.include?(key)
|
||||
new_method.add(key, value)
|
||||
end
|
||||
end
|
||||
method = new_method
|
||||
end
|
||||
method.elename = op_info.op_name
|
||||
method.type = XSD::QName.new # Request should not be typed.
|
||||
method
|
||||
end
|
||||
|
||||
def create_method_obj(names, params)
|
||||
o = Object.new
|
||||
idx = 0
|
||||
while idx < params.length
|
||||
o.instance_variable_set('@' + names[idx], params[idx])
|
||||
idx += 1
|
||||
end
|
||||
o
|
||||
end
|
||||
|
||||
def header_from_obj(obj, op_info)
|
||||
if obj.is_a?(SOAPHeader)
|
||||
obj
|
||||
elsif op_info.headerparts.empty?
|
||||
if obj.nil?
|
||||
nil
|
||||
else
|
||||
raise RuntimeError.new("no header definition in schema: #{obj}")
|
||||
end
|
||||
elsif op_info.headerparts.size == 1
|
||||
part = op_info.headerparts[0]
|
||||
header = SOAPHeader.new()
|
||||
header.add(headeritem_from_obj(obj, part.element || part.eletype))
|
||||
header
|
||||
else
|
||||
header = SOAPHeader.new()
|
||||
op_info.headerparts.each do |part|
|
||||
child = Mapping.get_attribute(obj, part.name)
|
||||
ele = headeritem_from_obj(child, part.element || part.eletype)
|
||||
header.add(part.name, ele)
|
||||
end
|
||||
header
|
||||
end
|
||||
end
|
||||
|
||||
def headeritem_from_obj(obj, name)
|
||||
if obj.nil?
|
||||
SOAPElement.new(name)
|
||||
elsif obj.is_a?(SOAPHeaderItem)
|
||||
obj
|
||||
else
|
||||
Mapping.obj2soap(obj, @doc_mapper, name)
|
||||
end
|
||||
end
|
||||
|
||||
def body_from_obj(obj, op_info)
|
||||
if obj.is_a?(SOAPBody)
|
||||
obj
|
||||
elsif op_info.bodyparts.empty?
|
||||
if obj.nil?
|
||||
nil
|
||||
else
|
||||
raise RuntimeError.new("no body found in schema")
|
||||
end
|
||||
elsif op_info.bodyparts.size == 1
|
||||
part = op_info.bodyparts[0]
|
||||
ele = bodyitem_from_obj(obj, part.element || part.type)
|
||||
SOAPBody.new(ele)
|
||||
else
|
||||
body = SOAPBody.new
|
||||
op_info.bodyparts.each do |part|
|
||||
child = Mapping.get_attribute(obj, part.name)
|
||||
ele = bodyitem_from_obj(child, part.element || part.type)
|
||||
body.add(ele.elename.name, ele)
|
||||
end
|
||||
body
|
||||
end
|
||||
end
|
||||
|
||||
def bodyitem_from_obj(obj, name)
|
||||
if obj.nil?
|
||||
SOAPElement.new(name)
|
||||
elsif obj.is_a?(SOAPElement)
|
||||
obj
|
||||
else
|
||||
Mapping.obj2soap(obj, @doc_mapper, name)
|
||||
end
|
||||
end
|
||||
|
||||
def add_method_interface(op_info)
|
||||
name = XSD::CodeGen::GenSupport.safemethodname(op_info.op_name.name)
|
||||
orgname = op_info.op_name.name
|
||||
parts_names = op_info.bodyparts.collect { |part| part.name }
|
||||
case op_info.style
|
||||
when :document
|
||||
if orgname != name and orgname.capitalize == name.capitalize
|
||||
add_document_method_interface(orgname, parts_names)
|
||||
end
|
||||
add_document_method_interface(name, parts_names)
|
||||
when :rpc
|
||||
if orgname != name and orgname.capitalize == name.capitalize
|
||||
add_rpc_method_interface(orgname, parts_names)
|
||||
end
|
||||
add_rpc_method_interface(name, parts_names)
|
||||
else
|
||||
raise RuntimeError.new("unknown style: #{op_info.style}")
|
||||
end
|
||||
end
|
||||
|
||||
def add_rpc_method_interface(name, parts_names)
|
||||
param_count = parts_names.size
|
||||
@host.instance_eval <<-EOS
|
||||
def #{name}(*arg)
|
||||
unless arg.size == #{param_count}
|
||||
raise ArgumentError.new(
|
||||
"wrong number of arguments (\#{arg.size} for #{param_count})")
|
||||
end
|
||||
@servant.rpc_call(#{name.dump}, *arg)
|
||||
end
|
||||
EOS
|
||||
@host.method(name)
|
||||
end
|
||||
|
||||
def add_document_method_interface(name, parts_names)
|
||||
@host.instance_eval <<-EOS
|
||||
def #{name}(h, b)
|
||||
@servant.document_send(#{name.dump}, h, b)
|
||||
end
|
||||
EOS
|
||||
@host.method(name)
|
||||
end
|
||||
|
||||
def setup_options
|
||||
if opt = Property.loadproperty(::SOAP::PropertyName)
|
||||
opt = opt["client"]
|
||||
end
|
||||
opt ||= Property.new
|
||||
opt.add_hook("protocol.mandatorycharset") do |key, value|
|
||||
@mandatorycharset = value
|
||||
end
|
||||
opt.add_hook("protocol.wiredump_file_base") do |key, value|
|
||||
@wiredump_file_base = value
|
||||
end
|
||||
opt["protocol.http.charset"] ||= XSD::Charset.xml_encoding_label
|
||||
opt["protocol.http.proxy"] ||= Env::HTTP_PROXY
|
||||
opt["protocol.http.no_proxy"] ||= Env::NO_PROXY
|
||||
opt
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
5690
vendor/gems/soap4r-1.5.8/lib/tags
vendored
5690
vendor/gems/soap4r-1.5.8/lib/tags
vendored
File diff suppressed because it is too large
Load diff
31
vendor/gems/soap4r-1.5.8/lib/wsdl/operation.rb
vendored
31
vendor/gems/soap4r-1.5.8/lib/wsdl/operation.rb
vendored
|
|
@ -13,17 +13,6 @@ module WSDL
|
|||
|
||||
|
||||
class Operation < Info
|
||||
class NameInfo
|
||||
attr_reader :op_name
|
||||
attr_reader :optype_name
|
||||
attr_reader :parts
|
||||
def initialize(op_name, optype_name, parts)
|
||||
@op_name = op_name
|
||||
@optype_name = optype_name
|
||||
@parts = parts
|
||||
end
|
||||
end
|
||||
|
||||
attr_reader :name # required
|
||||
attr_reader :parameter_order # optional
|
||||
attr_reader :input
|
||||
|
|
@ -49,25 +38,8 @@ class Operation < Info
|
|||
as_operationname(@name)
|
||||
end
|
||||
|
||||
def input_info
|
||||
if message = input_message
|
||||
typename = message.name
|
||||
else
|
||||
typename = nil
|
||||
end
|
||||
NameInfo.new(operationname, typename, inputparts)
|
||||
end
|
||||
|
||||
def output_info
|
||||
if message = output_message
|
||||
typename = message.name
|
||||
else
|
||||
typename = nil
|
||||
end
|
||||
NameInfo.new(operationname, typename, outputparts)
|
||||
end
|
||||
|
||||
EMPTY = [].freeze
|
||||
# TODO: remove once after OperationInfo created
|
||||
def inputparts
|
||||
if message = input_message
|
||||
sort_parts(message.parts)
|
||||
|
|
@ -84,6 +56,7 @@ class Operation < Info
|
|||
end
|
||||
end
|
||||
|
||||
# TODO: remove once after OperationInfo created
|
||||
def outputparts
|
||||
if message = output_message
|
||||
sort_parts(message.parts)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,62 @@ class OperationBinding < Info
|
|||
attr_reader :fault
|
||||
attr_reader :soapoperation
|
||||
|
||||
class OperationInfo
|
||||
attr_reader :boundid
|
||||
attr_reader :qname
|
||||
attr_reader :style
|
||||
attr_accessor :inputuse
|
||||
attr_accessor :outputuse
|
||||
attr_reader :parts
|
||||
attr_reader :faults
|
||||
|
||||
def initialize(boundid, qname, style, inputuse, outputuse)
|
||||
@boundid = boundid
|
||||
@qname = qname
|
||||
@style = style
|
||||
@inputuse = inputuse
|
||||
@outputuse = outputuse
|
||||
@parts = []
|
||||
@faults = {}
|
||||
end
|
||||
end
|
||||
|
||||
class Part
|
||||
attr_reader :io_type
|
||||
attr_reader :name
|
||||
attr_reader :type
|
||||
attr_reader :element
|
||||
|
||||
def initialize(io_type, name, type, element)
|
||||
@io_type = io_type
|
||||
@name = name
|
||||
@type = type
|
||||
@element = element
|
||||
end
|
||||
end
|
||||
|
||||
class BoundId
|
||||
attr_reader :name
|
||||
attr_reader :soapaction
|
||||
|
||||
def initialize(name, soapaction)
|
||||
@name = name
|
||||
@soapaction = soapaction
|
||||
end
|
||||
|
||||
def ==(rhs)
|
||||
!rhs.nil? and @name == rhs.name and @soapaction == rhs.soapaction
|
||||
end
|
||||
|
||||
def eql?(rhs)
|
||||
(self == rhs)
|
||||
end
|
||||
|
||||
def hash
|
||||
@name.hash ^ @soapaction.hash
|
||||
end
|
||||
end
|
||||
|
||||
def initialize
|
||||
super
|
||||
@name = nil
|
||||
|
|
@ -28,6 +84,32 @@ class OperationBinding < Info
|
|||
@soapoperation = nil
|
||||
end
|
||||
|
||||
def operation_info
|
||||
qname = soapoperation_name()
|
||||
style = soapoperation_style()
|
||||
use_input = soapbody_use(@input)
|
||||
use_output = soapbody_use(@output)
|
||||
info = OperationInfo.new(boundid, qname, style, use_input, use_output)
|
||||
op = find_operation()
|
||||
if style == :rpc
|
||||
info.parts.concat(collect_rpcparameter(op))
|
||||
else
|
||||
info.parts.concat(collect_documentparameter(op))
|
||||
end
|
||||
@fault.each do |fault|
|
||||
op_fault = {}
|
||||
soapfault = fault.soapfault
|
||||
next if soapfault.nil?
|
||||
op_fault[:ns] = fault.name.namespace
|
||||
op_fault[:name] = fault.name.name
|
||||
op_fault[:namespace] = soapfault.namespace
|
||||
op_fault[:use] = soapfault.use || "literal"
|
||||
op_fault[:encodingstyle] = soapfault.encodingstyle || "document"
|
||||
info.faults[fault.name] = op_fault
|
||||
end
|
||||
info
|
||||
end
|
||||
|
||||
def targetnamespace
|
||||
parent.targetnamespace
|
||||
end
|
||||
|
|
@ -36,6 +118,10 @@ class OperationBinding < Info
|
|||
root.porttype(parent.type)
|
||||
end
|
||||
|
||||
def boundid
|
||||
BoundId.new(name, soapaction)
|
||||
end
|
||||
|
||||
def find_operation
|
||||
porttype.operations.each do |op|
|
||||
next if op.name != @name
|
||||
|
|
@ -68,14 +154,6 @@ class OperationBinding < Info
|
|||
style || :document
|
||||
end
|
||||
|
||||
def soapbody_use_input
|
||||
soapbody_use(@input)
|
||||
end
|
||||
|
||||
def soapbody_use_output
|
||||
soapbody_use(@output)
|
||||
end
|
||||
|
||||
def soapaction
|
||||
if @soapoperation
|
||||
@soapoperation.soapaction
|
||||
|
|
@ -124,6 +202,38 @@ private
|
|||
def soapbody_use(param)
|
||||
param ? param.soapbody_use : nil
|
||||
end
|
||||
|
||||
def collect_rpcparameter(operation)
|
||||
result = operation.inputparts.collect { |part|
|
||||
Part.new(:in, part.name, part.type, part.element)
|
||||
}
|
||||
outparts = operation.outputparts
|
||||
if outparts.size > 0
|
||||
retval = outparts[0]
|
||||
result << Part.new(:retval, retval.name, retval.type, retval.element)
|
||||
cdr(outparts).each { |part|
|
||||
result << Part.new(:out, part.name, part.type, part.element)
|
||||
}
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
def collect_documentparameter(operation)
|
||||
param = []
|
||||
operation.inputparts.each do |input|
|
||||
param << Part.new(:in, input.name, input.type, input.element)
|
||||
end
|
||||
operation.outputparts.each do |output|
|
||||
param << Part.new(:out, output.name, output.type, output.element)
|
||||
end
|
||||
param
|
||||
end
|
||||
|
||||
def cdr(ary)
|
||||
result = ary.dup
|
||||
result.shift
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
2
vendor/gems/soap4r-1.5.8/lib/wsdl/parser.rb
vendored
2
vendor/gems/soap4r-1.5.8/lib/wsdl/parser.rb
vendored
|
|
@ -128,7 +128,7 @@ private
|
|||
end
|
||||
if o.nil?
|
||||
unless @ignored.key?(elename)
|
||||
warn("ignored element: #{elename}")
|
||||
warn("ignored element: #{elename} : #{parent.inspect}")
|
||||
@ignored[elename] = elename
|
||||
end
|
||||
o = Documentation.new # which accepts any element.
|
||||
|
|
|
|||
18
vendor/gems/soap4r-1.5.8/lib/wsdl/port.rb
vendored
18
vendor/gems/soap4r-1.5.8/lib/wsdl/port.rb
vendored
|
|
@ -36,24 +36,6 @@ class Port < Info
|
|||
root.binding(@binding) or raise RuntimeError.new("#{@binding} not found")
|
||||
end
|
||||
|
||||
def inputoperation_map
|
||||
result = {}
|
||||
find_binding.operations.each do |op_bind|
|
||||
op_info = op_bind.soapoperation.input_info
|
||||
result[op_info.op_name] = op_info
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
def outputoperation_map
|
||||
result = {}
|
||||
find_binding.operations.each do |op_bind|
|
||||
op_info = op_bind.soapoperation.output_info
|
||||
result[op_info.op_name] = op_info
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
def parse_element(element)
|
||||
case element
|
||||
when SOAPAddressName
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ private
|
|||
def dump_porttype(porttype)
|
||||
class_name = mapped_class_name(porttype.name, @modulepath)
|
||||
defined_const = {}
|
||||
result = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
|
||||
methoddef = result[:methoddef]
|
||||
methoddef = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
|
||||
wsdl_name = @definitions.name ? @definitions.name.name : 'default'
|
||||
mrname = safeconstname(wsdl_name + 'MappingRegistry')
|
||||
c1 = XSD::CodeGen::ClassDef.new(class_name)
|
||||
|
|
|
|||
|
|
@ -49,35 +49,31 @@ class ClassDefCreator
|
|||
result << modulepath_split(@modulepath).collect { |ele| "module #{ele}" }.join("; ")
|
||||
result << "\n\n"
|
||||
end
|
||||
if type
|
||||
result << dump_classdef(type.name, type)
|
||||
else
|
||||
str = dump_group
|
||||
str = dump_group(type)
|
||||
unless str.empty?
|
||||
result << "\n" unless result.empty?
|
||||
result << str
|
||||
end
|
||||
str = dump_complextype
|
||||
str = dump_complextype(type)
|
||||
unless str.empty?
|
||||
result << "\n" unless result.empty?
|
||||
result << str
|
||||
end
|
||||
str = dump_simpletype
|
||||
str = dump_simpletype(type)
|
||||
unless str.empty?
|
||||
result << "\n" unless result.empty?
|
||||
result << str
|
||||
end
|
||||
str = dump_element
|
||||
str = dump_element(type)
|
||||
unless str.empty?
|
||||
result << "\n" unless result.empty?
|
||||
result << str
|
||||
end
|
||||
str = dump_attribute
|
||||
str = dump_attribute(type)
|
||||
unless str.empty?
|
||||
result << "\n" unless result.empty?
|
||||
result << str
|
||||
end
|
||||
end
|
||||
if @modulepath
|
||||
result << "\n\n"
|
||||
result << modulepath_split(@modulepath).collect { |ele| "end" }.join("; ")
|
||||
|
|
@ -88,16 +84,18 @@ class ClassDefCreator
|
|||
|
||||
private
|
||||
|
||||
def dump_element
|
||||
def dump_element(target = nil)
|
||||
@elements.collect { |ele|
|
||||
next if @complextypes[ele.name]
|
||||
next if target and target != ele.name
|
||||
c = create_elementdef(@modulepath, ele)
|
||||
c ? c.dump : nil
|
||||
}.compact.join("\n")
|
||||
end
|
||||
|
||||
def dump_attribute
|
||||
def dump_attribute(target = nil)
|
||||
@attributes.collect { |attribute|
|
||||
next if target and target != attribute.name
|
||||
if attribute.local_simpletype
|
||||
c = create_simpletypedef(@modulepath, attribute.name, attribute.local_simpletype)
|
||||
end
|
||||
|
|
@ -105,21 +103,23 @@ private
|
|||
}.compact.join("\n")
|
||||
end
|
||||
|
||||
def dump_simpletype
|
||||
def dump_simpletype(target = nil)
|
||||
@simpletypes.collect { |type|
|
||||
next if target and target != type.name
|
||||
c = create_simpletypedef(@modulepath, type.name, type)
|
||||
c ? c.dump : nil
|
||||
}.compact.join("\n")
|
||||
end
|
||||
|
||||
def dump_complextype
|
||||
def dump_complextype(target = nil)
|
||||
definitions = sort_dependency(@complextypes).collect { |type|
|
||||
next if target and target != type.name
|
||||
c = create_complextypedef(@modulepath, type.name, type)
|
||||
c ? c.dump : nil
|
||||
}.compact.join("\n")
|
||||
end
|
||||
|
||||
def dump_group
|
||||
def dump_group(target = nil)
|
||||
definitions = @modelgroups.collect { |group|
|
||||
# TODO: not dumped for now but may be useful in the future
|
||||
}.compact.join("\n")
|
||||
|
|
@ -216,7 +216,7 @@ private
|
|||
if (const[constname] += 1) > 1
|
||||
constname += "_#{const[constname]}"
|
||||
end
|
||||
c.def_const(constname, "#{classname}.new(#{ndq(value)})")
|
||||
c.def_const(constname, "new(#{ndq(value)})")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -33,15 +33,15 @@ module ClassDefCreatorSupport
|
|||
::SOAP::TypeMap[name]
|
||||
end
|
||||
|
||||
def dump_method_signature(operation, element_definitions)
|
||||
name = operation.name
|
||||
def dump_method_signature(name, operation, element_definitions)
|
||||
methodname = safemethodname(name)
|
||||
input = operation.input
|
||||
output = operation.output
|
||||
fault = operation.fault
|
||||
signature = "#{ name }#{ dump_inputparam(input) }"
|
||||
signature = "#{methodname}#{dump_inputparam(input)}"
|
||||
str = <<__EOD__
|
||||
# SYNOPSIS
|
||||
# #{name}#{dump_inputparam(input)}
|
||||
# #{methodname}#{dump_inputparam(input)}
|
||||
#
|
||||
# ARGS
|
||||
#{dump_inout_type(input, element_definitions).chomp}
|
||||
|
|
@ -223,6 +223,16 @@ private
|
|||
return attribute.ref if attribute.ref
|
||||
raise RuntimeError.new("cannot define name of #{attribute}")
|
||||
end
|
||||
|
||||
# TODO: run MethodDefCreator just once in 1.6.X.
|
||||
# MethodDefCreator should return parsed struct, not a String.
|
||||
def collect_assigned_method(wsdl, porttypename, modulepath = nil)
|
||||
name_creator = WSDL::SOAP::ClassNameCreator.new
|
||||
methoddefcreator =
|
||||
WSDL::SOAP::MethodDefCreator.new(wsdl, name_creator, modulepath, {})
|
||||
methoddefcreator.dump(porttypename)
|
||||
methoddefcreator.assigned_method
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ class ClientSkeltonCreator
|
|||
private
|
||||
|
||||
def dump_porttype(porttype)
|
||||
assigned_method = collect_assigned_method(@definitions, porttype.name, @modulepath)
|
||||
drv_name = mapped_class_basename(porttype.name, @modulepath)
|
||||
|
||||
result = ""
|
||||
|
|
@ -63,16 +64,24 @@ obj.wiredump_dev = STDERR if $DEBUG
|
|||
|
||||
__EOD__
|
||||
element_definitions = @definitions.collect_elements
|
||||
porttype.operations.each do |operation|
|
||||
result << dump_method_signature(operation, element_definitions)
|
||||
binding = porttype.find_binding
|
||||
if binding
|
||||
binding.operations.each do |op_bind|
|
||||
operation = op_bind.find_operation
|
||||
if operation.nil?
|
||||
warn("operation not found for binding: #{op_bind}")
|
||||
next
|
||||
end
|
||||
name = assigned_method[op_bind.boundid] || operation.name
|
||||
result << dump_method_signature(name, operation, element_definitions)
|
||||
result << dump_input_init(operation.input) << "\n"
|
||||
result << dump_operation(operation) << "\n\n"
|
||||
result << dump_operation(name, operation) << "\n\n"
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
def dump_operation(operation)
|
||||
name = operation.name
|
||||
def dump_operation(name, operation)
|
||||
input = operation.input
|
||||
"puts obj.#{ safemethodname(name) }#{ dump_inputparam(input) }"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ class ComplexType < Info
|
|||
end
|
||||
end
|
||||
end
|
||||
nil
|
||||
end
|
||||
|
||||
def find_arytype
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@ private
|
|||
qname = XSD::QName.new(porttype.namespace, drivername)
|
||||
class_name = mapped_class_basename(qname, @modulepath)
|
||||
defined_const = {}
|
||||
result = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype)
|
||||
methoddef = result[:methoddef]
|
||||
mdcreator = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const)
|
||||
methoddef = mdcreator.dump(porttype)
|
||||
binding = @definitions.bindings.find { |item| item.type == porttype }
|
||||
if binding.nil? or binding.soapbinding.nil?
|
||||
# not bind or not a SOAP binding
|
||||
# not bound or not a SOAP binding
|
||||
return ''
|
||||
end
|
||||
address = @definitions.porttype(porttype).locations[0]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# WSDL4R - Creating driver code from WSDL.
|
||||
# WSDL4R - Creating method definition from WSDL
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
require 'wsdl/info'
|
||||
require 'wsdl/soap/classDefCreatorSupport'
|
||||
require 'soap/rpc/element'
|
||||
require 'soap/rpc/methodDef'
|
||||
|
||||
|
||||
module WSDL
|
||||
|
|
@ -19,6 +20,9 @@ class MethodDefCreator
|
|||
include ClassDefCreatorSupport
|
||||
|
||||
attr_reader :definitions
|
||||
# TODO: should not export this kind of stateful information.
|
||||
# will be rewwritten in 1.6.1
|
||||
attr_reader :assigned_method
|
||||
|
||||
def initialize(definitions, name_creator, modulepath, defined_const)
|
||||
@definitions = definitions
|
||||
|
|
@ -27,123 +31,82 @@ class MethodDefCreator
|
|||
@simpletypes = @definitions.collect_simpletypes
|
||||
@complextypes = @definitions.collect_complextypes
|
||||
@elements = @definitions.collect_elements
|
||||
@types = []
|
||||
@encoded = false
|
||||
@literal = false
|
||||
@defined_const = defined_const
|
||||
@assigned_method = {}
|
||||
end
|
||||
|
||||
def dump(name)
|
||||
@types.clear
|
||||
@encoded = false
|
||||
@literal = false
|
||||
methoddef = ""
|
||||
porttype = @definitions.porttype(name)
|
||||
binding = porttype.find_binding
|
||||
if binding
|
||||
binding.operations.each do |op_bind|
|
||||
next unless op_bind # no binding is defined
|
||||
next unless op_bind.soapoperation # not a SOAP operation binding
|
||||
op = op_bind.find_operation
|
||||
create(binding.name).each do |mdef|
|
||||
methoddef << ",\n" unless methoddef.empty?
|
||||
methoddef << dump_method(op, op_bind).chomp
|
||||
methoddef << dump_method(mdef).chomp
|
||||
end
|
||||
end
|
||||
result = {
|
||||
:methoddef => methoddef,
|
||||
:types => @types,
|
||||
:encoded => @encoded,
|
||||
:literal => @literal
|
||||
}
|
||||
result
|
||||
methoddef
|
||||
end
|
||||
|
||||
def collect_rpcparameter(operation)
|
||||
result = operation.inputparts.collect { |part|
|
||||
collect_type(part.type)
|
||||
param_set(::SOAP::RPC::SOAPMethod::IN, part.name, rpcdefinedtype(part))
|
||||
}
|
||||
outparts = operation.outputparts
|
||||
if outparts.size > 0
|
||||
retval = outparts[0]
|
||||
collect_type(retval.type)
|
||||
result << param_set(::SOAP::RPC::SOAPMethod::RETVAL, retval.name,
|
||||
rpcdefinedtype(retval))
|
||||
cdr(outparts).each { |part|
|
||||
collect_type(part.type)
|
||||
result << param_set(::SOAP::RPC::SOAPMethod::OUT, part.name,
|
||||
rpcdefinedtype(part))
|
||||
def create(bindingname)
|
||||
binding = @definitions.binding(bindingname)
|
||||
if binding
|
||||
return binding.operations.collect { |op_bind|
|
||||
next unless op_bind.soapoperation # not a SOAP operation binding
|
||||
create_methoddef(op_bind)
|
||||
}
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
def collect_documentparameter(operation)
|
||||
param = []
|
||||
operation.inputparts.each do |input|
|
||||
param << param_set(::SOAP::RPC::SOAPMethod::IN, input.name,
|
||||
documentdefinedtype(input))
|
||||
end
|
||||
operation.outputparts.each do |output|
|
||||
param << param_set(::SOAP::RPC::SOAPMethod::OUT, output.name,
|
||||
documentdefinedtype(output))
|
||||
end
|
||||
param
|
||||
nil
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def dump_method(operation, binding)
|
||||
op_faults = {}
|
||||
binding.fault.each do |fault|
|
||||
op_fault = {}
|
||||
soapfault = fault.soapfault
|
||||
next if soapfault.nil?
|
||||
faultclass = mapped_class_name(fault.name, @modulepath)
|
||||
op_fault[:ns] = fault.name.namespace
|
||||
op_fault[:name] = fault.name.name
|
||||
op_fault[:namespace] = soapfault.namespace
|
||||
op_fault[:use] = soapfault.use || "literal"
|
||||
op_fault[:encodingstyle] = soapfault.encodingstyle || "document"
|
||||
op_faults[faultclass] = op_fault
|
||||
end
|
||||
op_faults_str = op_faults.inspect
|
||||
|
||||
name = safemethodname(operation.name)
|
||||
name_as = operation.name
|
||||
style = binding.soapoperation_style
|
||||
inputuse = binding.soapbody_use_input
|
||||
outputuse = binding.soapbody_use_output
|
||||
if style == :rpc
|
||||
qname = binding.soapoperation_name
|
||||
paramstr = param2str(collect_rpcparameter(operation))
|
||||
def create_methoddef(op_bind)
|
||||
op_info = op_bind.operation_info
|
||||
name = assign_method_name(op_bind)
|
||||
soapaction = op_info.boundid.soapaction
|
||||
qname = op_bind.soapoperation_name
|
||||
mdef = ::SOAP::RPC::MethodDef.new(name, soapaction, qname)
|
||||
op_info.parts.each do |part|
|
||||
if op_info.style == :rpc
|
||||
mapped_class, qname = rpcdefinedtype(part)
|
||||
else
|
||||
qname = nil
|
||||
paramstr = param2str(collect_documentparameter(operation))
|
||||
mapped_class, qname = documentdefinedtype(part)
|
||||
end
|
||||
mdef.add_parameter(part.io_type, part.name, qname, mapped_class)
|
||||
end
|
||||
op_info.faults.each do |name, faultinfo|
|
||||
faultclass = mapped_class_name(name, @modulepath)
|
||||
mdef.faults[faultclass] = faultinfo
|
||||
end
|
||||
mdef.style = op_info.style
|
||||
mdef.inputuse = op_info.inputuse
|
||||
mdef.outputuse = op_info.outputuse
|
||||
mdef
|
||||
end
|
||||
|
||||
def dump_method(mdef)
|
||||
style = mdef.style
|
||||
inputuse = mdef.inputuse
|
||||
outputuse = mdef.outputuse
|
||||
paramstr = param2str(mdef.parameters)
|
||||
if paramstr.empty?
|
||||
paramstr = '[]'
|
||||
else
|
||||
paramstr = "[ " << paramstr.split(/\r?\n/).join("\n ") << " ]"
|
||||
end
|
||||
definitions = <<__EOD__
|
||||
#{ndq(binding.soapaction)},
|
||||
#{dq(name)},
|
||||
#{ndq(mdef.soapaction)},
|
||||
#{dq(mdef.name)},
|
||||
#{paramstr},
|
||||
{ :request_style => #{nsym(style)}, :request_use => #{nsym(inputuse)},
|
||||
:response_style => #{nsym(style)}, :response_use => #{nsym(outputuse)},
|
||||
:faults => #{op_faults_str} }
|
||||
:faults => #{mdef.faults.inspect} }
|
||||
__EOD__
|
||||
if inputuse == :encoded or outputuse == :encoded
|
||||
@encoded = true
|
||||
end
|
||||
if inputuse == :literal or outputuse == :literal
|
||||
@literal = true
|
||||
end
|
||||
if style == :rpc
|
||||
assign_const(qname.namespace, 'Ns')
|
||||
assign_const(mdef.qname.namespace, 'Ns')
|
||||
return <<__EOD__
|
||||
[ #{dqname(qname)},
|
||||
[ #{dqname(mdef.qname)},
|
||||
#{definitions}]
|
||||
__EOD__
|
||||
else
|
||||
|
|
@ -153,25 +116,36 @@ __EOD__
|
|||
end
|
||||
end
|
||||
|
||||
def assign_method_name(op_bind)
|
||||
method_name = safemethodname(op_bind.name)
|
||||
i = 1 # starts from _2
|
||||
while @assigned_method.value?(method_name)
|
||||
i += 1
|
||||
method_name = safemethodname("#{op_bind.name}_#{i}")
|
||||
end
|
||||
@assigned_method[op_bind.boundid] = method_name
|
||||
method_name
|
||||
end
|
||||
|
||||
def rpcdefinedtype(part)
|
||||
if mapped = basetype_mapped_class(part.type)
|
||||
['::' + mapped.name]
|
||||
return ['::' + mapped.name, nil]
|
||||
elsif definedtype = @simpletypes[part.type]
|
||||
[nil, definedtype.name.namespace, definedtype.name.name]
|
||||
return [nil, definedtype.name]
|
||||
elsif definedtype = @elements[part.element]
|
||||
[nil, part.element.namespace, part.element.name]
|
||||
return [nil, part.element]
|
||||
elsif definedtype = @complextypes[part.type]
|
||||
case definedtype.compoundtype
|
||||
when :TYPE_STRUCT, :TYPE_EMPTY, :TYPE_ARRAY, :TYPE_SIMPLE
|
||||
type = mapped_class_name(part.type, @modulepath)
|
||||
[type, part.type.namespace, part.type.name]
|
||||
return [type, part.type]
|
||||
when :TYPE_MAP
|
||||
[Hash.name, part.type.namespace, part.type.name]
|
||||
return [Hash.name, part.type]
|
||||
else
|
||||
raise NotImplementedError.new("must not reach here: #{definedtype.compoundtype}")
|
||||
end
|
||||
elsif part.type == XSD::AnyTypeName
|
||||
[nil]
|
||||
return [nil, nil]
|
||||
else
|
||||
raise RuntimeError.new("part: #{part.name} cannot be resolved")
|
||||
end
|
||||
|
|
@ -179,66 +153,34 @@ __EOD__
|
|||
|
||||
def documentdefinedtype(part)
|
||||
if mapped = basetype_mapped_class(part.type)
|
||||
['::' + mapped.name, nil, part.name]
|
||||
return ['::' + mapped.name, XSD::QName.new(nil, part.name)]
|
||||
elsif definedtype = @simpletypes[part.type]
|
||||
if definedtype.base
|
||||
['::' + basetype_mapped_class(definedtype.base).name, nil, part.name]
|
||||
return ['::' + basetype_mapped_class(definedtype.base).name, XSD::QName.new(nil, part.name)]
|
||||
else
|
||||
raise RuntimeError.new("unsupported simpleType: #{definedtype}")
|
||||
end
|
||||
elsif definedtype = @elements[part.element]
|
||||
['::SOAP::SOAPElement', part.element.namespace, part.element.name]
|
||||
return ['::SOAP::SOAPElement', part.element]
|
||||
elsif definedtype = @complextypes[part.type]
|
||||
['::SOAP::SOAPElement', part.type.namespace, part.type.name]
|
||||
return ['::SOAP::SOAPElement', part.type]
|
||||
else
|
||||
raise RuntimeError.new("part: #{part.name} cannot be resolved")
|
||||
end
|
||||
end
|
||||
|
||||
def param_set(io_type, name, type, ele = nil)
|
||||
[io_type, name, type, ele]
|
||||
end
|
||||
|
||||
def collect_type(type)
|
||||
# ignore inline type definition.
|
||||
return if type.nil?
|
||||
return if @types.include?(type)
|
||||
@types << type
|
||||
return unless @complextypes[type]
|
||||
collect_elements_type(@complextypes[type].elements)
|
||||
end
|
||||
|
||||
def collect_elements_type(elements)
|
||||
elements.each do |element|
|
||||
case element
|
||||
when WSDL::XMLSchema::Any
|
||||
# nothing to do
|
||||
when WSDL::XMLSchema::Element
|
||||
collect_type(element.type)
|
||||
when WSDL::XMLSchema::Sequence, WSDL::XMLSchema::Choice
|
||||
collect_elements_type(element.elements)
|
||||
else
|
||||
raise RuntimeError.new("unknown type: #{element}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def param2str(params)
|
||||
params.collect { |param|
|
||||
io, name, type, ele = param
|
||||
unless ele.nil?
|
||||
"[#{dq(io)}, #{dq(name)}, #{type2str(type)}, #{ele2str(ele)}]"
|
||||
else
|
||||
"[#{dq(io)}, #{dq(name)}, #{type2str(type)}]"
|
||||
end
|
||||
mappingstr = mapping_info2str(param.mapped_class, param.qname)
|
||||
"[:#{param.io_type.id2name}, #{dq(param.name)}, #{mappingstr}]"
|
||||
}.join(",\n")
|
||||
end
|
||||
|
||||
def type2str(type)
|
||||
if type.size == 1
|
||||
"[#{ndq(type[0])}]"
|
||||
def mapping_info2str(mapped_class, qname)
|
||||
if qname.nil?
|
||||
"[#{ndq(mapped_class)}]"
|
||||
else
|
||||
"[#{ndq(type[0])}, #{ndq(type[1])}, #{dq(type[2])}]"
|
||||
"[#{ndq(mapped_class)}, #{ndq(qname.namespace)}, #{dq(qname.name)}]"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -250,12 +192,6 @@ __EOD__
|
|||
"false"
|
||||
end
|
||||
end
|
||||
|
||||
def cdr(ary)
|
||||
result = ary.dup
|
||||
result.shift
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ module SOAP
|
|||
|
||||
|
||||
class Operation < Info
|
||||
class OperationInfo
|
||||
class ParamInfo
|
||||
attr_reader :style
|
||||
attr_reader :op_name
|
||||
attr_reader :optype_name
|
||||
|
|
@ -67,16 +67,6 @@ class Operation < Info
|
|||
end
|
||||
end
|
||||
|
||||
def input_info
|
||||
name_info = parent.find_operation.input_info
|
||||
param_info(name_info, parent.input)
|
||||
end
|
||||
|
||||
def output_info
|
||||
name_info = parent.find_operation.output_info
|
||||
param_info(name_info, parent.output)
|
||||
end
|
||||
|
||||
def operation_style
|
||||
return @style if @style
|
||||
if parent_binding.soapbinding
|
||||
|
|
@ -91,7 +81,7 @@ private
|
|||
parent.parent
|
||||
end
|
||||
|
||||
def param_info(name_info, param)
|
||||
def create_param_info(name_info, param)
|
||||
op_style = operation_style()
|
||||
op_use = param.soapbody_use
|
||||
op_encodingstyle = param.soapbody_encodingstyle
|
||||
|
|
@ -112,7 +102,7 @@ private
|
|||
bodyparts = name_info.parts
|
||||
end
|
||||
faultpart = nil
|
||||
OperationInfo.new(op_style, op_use, op_encodingstyle, op_name, optype_name,
|
||||
ParamInfo.new(op_style, op_use, op_encodingstyle, op_name, optype_name,
|
||||
headerparts, bodyparts, faultpart, parent.soapaction)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ class ServantSkeltonCreator
|
|||
result << "\n\n"
|
||||
end
|
||||
if porttype.nil?
|
||||
@definitions.porttypes.each do |type|
|
||||
result << dump_porttype(type.name)
|
||||
@definitions.porttypes.each do |porttype|
|
||||
result << dump_porttype(porttype)
|
||||
result << "\n"
|
||||
end
|
||||
else
|
||||
|
|
@ -52,25 +52,34 @@ class ServantSkeltonCreator
|
|||
|
||||
private
|
||||
|
||||
def dump_porttype(name)
|
||||
class_name = mapped_class_basename(name, @modulepath)
|
||||
def dump_porttype(porttype)
|
||||
assigned_method = collect_assigned_method(@definitions, porttype.name, @modulepath)
|
||||
class_name = mapped_class_basename(porttype.name, @modulepath)
|
||||
c = XSD::CodeGen::ClassDef.new(class_name)
|
||||
element_definitions = @definitions.collect_elements
|
||||
operations = @definitions.porttype(name).operations
|
||||
operations.each do |operation|
|
||||
name = safemethodname(operation.name)
|
||||
binding = porttype.find_binding
|
||||
if binding
|
||||
binding.operations.each do |op_bind|
|
||||
operation = op_bind.find_operation
|
||||
if operation.nil?
|
||||
warn("operation not found for binding: #{op_bind}")
|
||||
next
|
||||
end
|
||||
name = assigned_method[op_bind.boundid] || operation.name
|
||||
methodname = safemethodname(name)
|
||||
input = operation.input
|
||||
params = input.find_message.parts.collect { |part|
|
||||
safevarname(part.name)
|
||||
}
|
||||
m = XSD::CodeGen::MethodDef.new(name, params) do <<-EOD
|
||||
m = XSD::CodeGen::MethodDef.new(methodname, params) do <<-EOD
|
||||
p [#{params.join(", ")}]
|
||||
raise NotImplementedError.new
|
||||
EOD
|
||||
end
|
||||
m.comment = dump_method_signature(operation, element_definitions)
|
||||
m.comment = dump_method_signature(methodname, operation, element_definitions)
|
||||
c.add_method(m)
|
||||
end
|
||||
end
|
||||
c.dump
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -49,12 +49,9 @@ private
|
|||
def dump_porttype(porttype)
|
||||
class_name = mapped_class_name(porttype.name, @modulepath)
|
||||
defined_const = {}
|
||||
result = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
|
||||
methoddef = result[:methoddef]
|
||||
|
||||
methoddef = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
|
||||
wsdl_name = @definitions.name ? @definitions.name.name : 'default'
|
||||
mrname = safeconstname(wsdl_name + 'MappingRegistry')
|
||||
|
||||
c1 = XSD::CodeGen::ClassDef.new(class_name)
|
||||
c1.def_require("soap/rpc/soaplet")
|
||||
c1.def_code <<-EOD
|
||||
|
|
|
|||
|
|
@ -50,12 +50,9 @@ private
|
|||
def dump_porttype(porttype)
|
||||
class_name = mapped_class_name(porttype.name, @modulepath)
|
||||
defined_const = {}
|
||||
result = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
|
||||
methoddef = result[:methoddef]
|
||||
|
||||
methoddef = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
|
||||
wsdl_name = @definitions.name ? @definitions.name.name : 'default'
|
||||
mrname = safeconstname(wsdl_name + 'MappingRegistry')
|
||||
|
||||
c1 = XSD::CodeGen::ClassDef.new(class_name)
|
||||
c1.def_require("soap/rpc/standaloneServer")
|
||||
c1.def_code <<-EOD
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'wsdl/info'
|
||||
require 'wsdl/xmlSchema/ref'
|
||||
|
||||
|
||||
module WSDL
|
||||
|
|
@ -14,26 +15,7 @@ module XMLSchema
|
|||
|
||||
|
||||
class Attribute < Info
|
||||
class << self
|
||||
if RUBY_VERSION > "1.7.0"
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
instance_variable_get("@#{name}") ||
|
||||
(refelement ? refelement.__send__(name) : nil)
|
||||
}
|
||||
end
|
||||
else
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@#{name} || (refelement ? refelement.#{name} : nil)
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
include Ref
|
||||
|
||||
attr_writer :use
|
||||
attr_writer :form
|
||||
|
|
@ -51,7 +33,6 @@ class Attribute < Info
|
|||
attr_reader_ref :default
|
||||
attr_reader_ref :fixed
|
||||
|
||||
attr_accessor :ref
|
||||
attr_accessor :arytype
|
||||
|
||||
def initialize
|
||||
|
|
@ -68,10 +49,6 @@ class Attribute < Info
|
|||
@arytype = nil
|
||||
end
|
||||
|
||||
def refelement
|
||||
@refelement ||= root.collect_attributes[@ref]
|
||||
end
|
||||
|
||||
def targetnamespace
|
||||
parent.targetnamespace
|
||||
end
|
||||
|
|
@ -116,6 +93,10 @@ private
|
|||
def directelement?
|
||||
parent.is_a?(Schema)
|
||||
end
|
||||
|
||||
def refelement
|
||||
@refelement ||= root.collect_attributes[@ref]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'wsdl/info'
|
||||
require 'wsdl/xmlSchema/ref'
|
||||
|
||||
|
||||
module WSDL
|
||||
|
|
@ -14,26 +15,7 @@ module XMLSchema
|
|||
|
||||
|
||||
class AttributeGroup < Info
|
||||
class << self
|
||||
if RUBY_VERSION > "1.7.0"
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
instance_variable_get("@#{name}") ||
|
||||
(refelement ? refelement.__send__(name) : nil)
|
||||
}
|
||||
end
|
||||
else
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@#{name} || (refelement ? refelement.#{name} : nil)
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
include Ref
|
||||
|
||||
attr_writer :name # required
|
||||
attr_writer :attributes
|
||||
|
|
@ -41,8 +23,6 @@ class AttributeGroup < Info
|
|||
attr_reader_ref :name
|
||||
attr_reader_ref :attributes
|
||||
|
||||
attr_accessor :ref
|
||||
|
||||
def initialize
|
||||
super
|
||||
@name = nil
|
||||
|
|
@ -51,10 +31,6 @@ class AttributeGroup < Info
|
|||
@refelement = nil
|
||||
end
|
||||
|
||||
def refelement
|
||||
@refelement ||= root.collect_attributegroups[@ref]
|
||||
end
|
||||
|
||||
def targetnamespace
|
||||
parent.targetnamespace
|
||||
end
|
||||
|
|
@ -79,6 +55,12 @@ class AttributeGroup < Info
|
|||
nil
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def refelement
|
||||
@refelement ||= root.collect_attributegroups[@ref]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'wsdl/info'
|
||||
require 'wsdl/xmlSchema/ref'
|
||||
|
||||
|
||||
module WSDL
|
||||
|
|
@ -14,26 +15,7 @@ module XMLSchema
|
|||
|
||||
|
||||
class Element < Info
|
||||
class << self
|
||||
if RUBY_VERSION > "1.7.0"
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
instance_variable_get("@#{name}") ||
|
||||
(refelement ? refelement.__send__(name) : nil)
|
||||
}
|
||||
end
|
||||
else
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@#{name} || (refelement ? refelement.#{name} : nil)
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
include Ref
|
||||
|
||||
attr_writer :name # required
|
||||
attr_writer :form
|
||||
|
|
@ -55,8 +37,6 @@ class Element < Info
|
|||
attr_reader_ref :default
|
||||
attr_reader_ref :abstract
|
||||
|
||||
attr_accessor :ref
|
||||
|
||||
def initialize(name = nil, type = nil)
|
||||
super()
|
||||
@name = name
|
||||
|
|
@ -77,10 +57,6 @@ class Element < Info
|
|||
!(local_simpletype || local_complextype || constraint || type)
|
||||
end
|
||||
|
||||
def refelement
|
||||
@refelement ||= (@ref ? root.collect_elements[@ref] : nil)
|
||||
end
|
||||
|
||||
def targetnamespace
|
||||
parent.targetnamespace
|
||||
end
|
||||
|
|
@ -166,6 +142,10 @@ private
|
|||
def directelement?
|
||||
parent.is_a?(Schema)
|
||||
end
|
||||
|
||||
def refelement
|
||||
@refelement ||= (@ref ? root.collect_elements[@ref] : nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'wsdl/info'
|
||||
require 'wsdl/xmlSchema/ref'
|
||||
|
||||
|
||||
module WSDL
|
||||
|
|
@ -14,26 +15,7 @@ module XMLSchema
|
|||
|
||||
|
||||
class Group < Info
|
||||
class << self
|
||||
if RUBY_VERSION > "1.7.0"
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
instance_variable_get("@#{name}") ||
|
||||
(refelement ? refelement.__send__(name) : nil)
|
||||
}
|
||||
end
|
||||
else
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
module_eval <<-EOS
|
||||
def #{name}
|
||||
@#{name} || (refelement ? refelement.#{name} : nil)
|
||||
end
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
include Ref
|
||||
|
||||
attr_writer :name # required
|
||||
attr_accessor :maxoccurs
|
||||
|
|
@ -43,8 +25,6 @@ class Group < Info
|
|||
attr_reader_ref :name
|
||||
attr_reader_ref :content
|
||||
|
||||
attr_accessor :ref
|
||||
|
||||
def initialize(name = nil)
|
||||
super()
|
||||
@name = name
|
||||
|
|
@ -55,10 +35,6 @@ class Group < Info
|
|||
@refelement = nil
|
||||
end
|
||||
|
||||
def refelement
|
||||
@refelement ||= (@ref ? root.collect_modelgroups[@ref] : nil)
|
||||
end
|
||||
|
||||
def targetnamespace
|
||||
parent.targetnamespace
|
||||
end
|
||||
|
|
@ -111,6 +87,12 @@ class Group < Info
|
|||
nil
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def refelement
|
||||
@refelement ||= (@ref ? root.collect_modelgroups[@ref] : nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
33
vendor/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/ref.rb
vendored
Normal file
33
vendor/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/ref.rb
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# WSDL4R - XMLSchema ref support.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
module WSDL
|
||||
module XMLSchema
|
||||
|
||||
|
||||
module Ref
|
||||
def self.included(klass)
|
||||
klass.extend(RefClassSupport)
|
||||
end
|
||||
|
||||
module RefClassSupport
|
||||
def attr_reader_ref(symbol)
|
||||
name = symbol.to_s
|
||||
define_method(name) {
|
||||
instance_variable_get("@#{name}") ||
|
||||
(refelement ? refelement.__send__(name) : nil)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
attr_accessor :ref
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -23,8 +23,8 @@ class SimpleRestriction < Info
|
|||
attr_reader :enumeration
|
||||
attr_accessor :whitespace
|
||||
attr_accessor :maxinclusive
|
||||
attr_accessor :maxexlusive
|
||||
attr_accessor :minexlusive
|
||||
attr_accessor :maxexclusive
|
||||
attr_accessor :minexclusive
|
||||
attr_accessor :mininclusive
|
||||
attr_accessor :totaldigits
|
||||
attr_accessor :fractiondigits
|
||||
|
|
@ -73,9 +73,9 @@ class SimpleRestriction < Info
|
|||
when MaxInclusiveName
|
||||
MaxInclusive.new
|
||||
when MaxExclusiveName
|
||||
MaxExlusive.new
|
||||
MaxExclusive.new
|
||||
when MinExclusiveName
|
||||
MinExlusive.new
|
||||
MinExclusive.new
|
||||
when MinInclusiveName
|
||||
MinInclusive.new
|
||||
when TotalDigitsName
|
||||
|
|
|
|||
13
vendor/gems/soap4r-1.5.8/lib/xsd/charset.rb
vendored
13
vendor/gems/soap4r-1.5.8/lib/xsd/charset.rb
vendored
|
|
@ -10,7 +10,7 @@ module XSD
|
|||
|
||||
|
||||
module Charset
|
||||
@internal_encoding = $KCODE
|
||||
@internal_encoding = "UTF8" #$KCODE
|
||||
|
||||
class XSDError < StandardError; end
|
||||
class CharsetError < XSDError; end
|
||||
|
|
@ -129,18 +129,18 @@ public
|
|||
|
||||
# us_ascii = '[\x00-\x7F]'
|
||||
us_ascii = '[\x9\xa\xd\x20-\x7F]' # XML 1.0 restricted.
|
||||
USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z", nil, 'NONE')
|
||||
USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z")
|
||||
|
||||
twobytes_euc = '(?:[\x8E\xA1-\xFE][\xA1-\xFE])'
|
||||
threebytes_euc = '(?:\x8F[\xA1-\xFE][\xA1-\xFE])'
|
||||
character_euc = "(?:#{us_ascii}|#{twobytes_euc}|#{threebytes_euc})"
|
||||
EUCRegexp = Regexp.new("\\A#{character_euc}*\\z", nil, 'NONE')
|
||||
EUCRegexp = Regexp.new("\\A#{character_euc}*\\z", nil, 'n')
|
||||
|
||||
# onebyte_sjis = '[\x00-\x7F\xA1-\xDF]'
|
||||
onebyte_sjis = '[\x9\xa\xd\x20-\x7F\xA1-\xDF]' # XML 1.0 restricted.
|
||||
twobytes_sjis = '(?:[\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC])'
|
||||
character_sjis = "(?:#{onebyte_sjis}|#{twobytes_sjis})"
|
||||
SJISRegexp = Regexp.new("\\A#{character_sjis}*\\z", nil, 'NONE')
|
||||
SJISRegexp = Regexp.new("\\A#{character_sjis}*\\z", nil, 'n')
|
||||
|
||||
# 0xxxxxxx
|
||||
# 110yyyyy 10xxxxxx
|
||||
|
|
@ -149,9 +149,8 @@ public
|
|||
threebytes_utf8 = '(?:[\xE0-\xEF][\x80-\xBF][\x80-\xBF])'
|
||||
# 11110uuu 10uuuzzz 10yyyyyy 10xxxxxx
|
||||
fourbytes_utf8 = '(?:[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])'
|
||||
character_utf8 =
|
||||
"(?:#{us_ascii}|#{twobytes_utf8}|#{threebytes_utf8}|#{fourbytes_utf8})"
|
||||
UTF8Regexp = Regexp.new("\\A#{character_utf8}*\\z", nil, 'NONE')
|
||||
character_utf8 = "(?:#{us_ascii}|#{twobytes_utf8}|#{threebytes_utf8}|#{fourbytes_utf8})"
|
||||
UTF8Regexp = Regexp.new("\\A#{character_utf8}*\\z", nil, 'n')
|
||||
|
||||
def Charset.is_us_ascii(str)
|
||||
USASCIIRegexp =~ str
|
||||
|
|
|
|||
|
|
@ -236,22 +236,22 @@ module GenSupport
|
|||
private
|
||||
|
||||
def trim_eol(str)
|
||||
str.collect { |line|
|
||||
str.lines.collect { |line|
|
||||
line.sub(/\r?\n\z/, "") + "\n"
|
||||
}.join
|
||||
end
|
||||
|
||||
def trim_indent(str)
|
||||
indent = nil
|
||||
str = str.collect { |line| untab(line) }.join
|
||||
str.each do |line|
|
||||
str = str.lines.collect { |line| untab(line) }.join
|
||||
str.each_line do |line|
|
||||
head = line.index(/\S/)
|
||||
if !head.nil? and (indent.nil? or head < indent)
|
||||
indent = head
|
||||
end
|
||||
end
|
||||
return str unless indent
|
||||
str.collect { |line|
|
||||
str.lines.collect { |line|
|
||||
line.sub(/^ {0,#{indent}}/, "")
|
||||
}.join
|
||||
end
|
||||
|
|
|
|||
14
vendor/gems/soap4r-1.5.8/lib/xsd/datatypes.rb
vendored
14
vendor/gems/soap4r-1.5.8/lib/xsd/datatypes.rb
vendored
|
|
@ -10,7 +10,7 @@ require 'xsd/qname'
|
|||
require 'xsd/charset'
|
||||
require 'soap/nestedexception'
|
||||
require 'uri'
|
||||
|
||||
require 'date'
|
||||
|
||||
###
|
||||
## XMLSchamaDatatypes general definitions.
|
||||
|
|
@ -816,7 +816,7 @@ class XSDGMonthDay < XSDAnySimpleType
|
|||
private
|
||||
|
||||
def screen_data_str(t)
|
||||
/^(\d\d)-(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
|
||||
/^--(\d\d)-(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
|
||||
unless Regexp.last_match
|
||||
raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.")
|
||||
end
|
||||
|
|
@ -827,7 +827,7 @@ private
|
|||
end
|
||||
|
||||
def _to_s
|
||||
s = format('%02d-%02d', @data.mon, @data.mday)
|
||||
s = format('--%02d-%02d', @data.mon, @data.mday)
|
||||
add_tz(s)
|
||||
end
|
||||
end
|
||||
|
|
@ -843,7 +843,7 @@ class XSDGDay < XSDAnySimpleType
|
|||
private
|
||||
|
||||
def screen_data_str(t)
|
||||
/^(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
|
||||
/^---(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
|
||||
unless Regexp.last_match
|
||||
raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.")
|
||||
end
|
||||
|
|
@ -853,7 +853,7 @@ private
|
|||
end
|
||||
|
||||
def _to_s
|
||||
s = format('%02d', @data.mday)
|
||||
s = format('---%02d', @data.mday)
|
||||
add_tz(s)
|
||||
end
|
||||
end
|
||||
|
|
@ -869,7 +869,7 @@ class XSDGMonth < XSDAnySimpleType
|
|||
private
|
||||
|
||||
def screen_data_str(t)
|
||||
/^(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
|
||||
/^--(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
|
||||
unless Regexp.last_match
|
||||
raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.")
|
||||
end
|
||||
|
|
@ -879,7 +879,7 @@ private
|
|||
end
|
||||
|
||||
def _to_s
|
||||
s = format('%02d', @data.mon)
|
||||
s = format('--%02d', @data.mon)
|
||||
add_tz(s)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
1
vendor/gems/soap4r-1.5.8/lib/xsd/mapping.rb
vendored
1
vendor/gems/soap4r-1.5.8/lib/xsd/mapping.rb
vendored
|
|
@ -30,6 +30,7 @@ module Mapping
|
|||
class Mapper
|
||||
MAPPING_OPT = {
|
||||
:default_encodingstyle => SOAP::LiteralNamespace,
|
||||
:generate_explicit_type => false,
|
||||
:root_type_hint => true
|
||||
}.freeze
|
||||
|
||||
|
|
|
|||
2
vendor/gems/soap4r-1.5.8/lib/xsd/ns.rb
vendored
2
vendor/gems/soap4r-1.5.8/lib/xsd/ns.rb
vendored
|
|
@ -123,7 +123,7 @@ public
|
|||
end
|
||||
|
||||
# $1 and $2 are necessary.
|
||||
ParseRegexp = Regexp.new('\A([^:]+)(?::(.+))?\z', nil, 'NONE')
|
||||
ParseRegexp = Regexp.new('\A([^:]+)(?::(.+))?\z')
|
||||
|
||||
def parse(str, local = false)
|
||||
if ParseRegexp =~ str
|
||||
|
|
|
|||
25
vendor/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb
vendored
25
vendor/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb
vendored
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
require 'xsd/xmlparser/parser'
|
||||
require 'soap/property'
|
||||
|
||||
|
||||
module XSD
|
||||
|
|
@ -19,7 +20,7 @@ module XMLParser
|
|||
module_function :create_parser
|
||||
|
||||
# $1 is necessary.
|
||||
NSParseRegexp = Regexp.new('^xmlns:?(.*)$', nil, 'NONE')
|
||||
NSParseRegexp = Regexp.new("^xmlns:?(.*)$")
|
||||
|
||||
def filter_ns(ns, attrs)
|
||||
ns_updated = false
|
||||
|
|
@ -50,20 +51,25 @@ end
|
|||
end
|
||||
|
||||
|
||||
PARSER_LIBS = [
|
||||
'libxmlparser',
|
||||
'xmlparser',
|
||||
'xmlscanner',
|
||||
'rexmlparser'
|
||||
]
|
||||
# Get library prefs
|
||||
opt = ::SOAP::Property.loadproperty('soap/property')
|
||||
use_libxml = (opt and opt['parser'] and opt['parser']['use_libxml'] and opt['parser']['use_libxml'] == 'false') ? false : true
|
||||
# Try to load XML processor.
|
||||
loaded = false
|
||||
[
|
||||
'xsd/xmlparser/xmlparser',
|
||||
'xsd/xmlparser/xmlscanner',
|
||||
'xsd/xmlparser/rexmlparser',
|
||||
].each do |lib|
|
||||
PARSER_LIBS.each do |name|
|
||||
begin
|
||||
require lib
|
||||
lib = "xsd/xmlparser/#{name}"
|
||||
require lib unless !use_libxml && name == 'libxmlparser'
|
||||
# XXX: for a workaround of rubygems' require inconsistency
|
||||
# XXX: MUST BE REMOVED IN THE FUTURE
|
||||
name = lib.sub(/^.*\//, '')
|
||||
raise LoadError unless XSD::XMLParser.constants.find { |c|
|
||||
c.downcase == name
|
||||
c.to_s.downcase == name.downcase
|
||||
}
|
||||
loaded = true
|
||||
break
|
||||
|
|
@ -73,3 +79,4 @@ end
|
|||
unless loaded
|
||||
raise RuntimeError.new("XML processor module not found.")
|
||||
end
|
||||
|
||||
|
|
|
|||
76
vendor/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb.orig
vendored
Normal file
76
vendor/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb.orig
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# XSD4R - XML Instance parser library.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'xsd/xmlparser/parser'
|
||||
|
||||
|
||||
module XSD
|
||||
|
||||
|
||||
module XMLParser
|
||||
def create_parser(host, opt)
|
||||
XSD::XMLParser::Parser.create_parser(host, opt)
|
||||
end
|
||||
module_function :create_parser
|
||||
|
||||
# $1 is necessary.
|
||||
NSParseRegexp = Regexp.new('^xmlns:?(.*)$', nil, 'NONE')
|
||||
|
||||
def filter_ns(ns, attrs)
|
||||
ns_updated = false
|
||||
if attrs.nil? or attrs.empty?
|
||||
return [ns, attrs]
|
||||
end
|
||||
newattrs = {}
|
||||
attrs.each do |key, value|
|
||||
if NSParseRegexp =~ key
|
||||
unless ns_updated
|
||||
ns = ns.clone_ns
|
||||
ns_updated = true
|
||||
end
|
||||
# tag == '' means 'default namespace'
|
||||
# value == '' means 'no default namespace'
|
||||
tag = $1 || ''
|
||||
ns.assign(value, tag)
|
||||
else
|
||||
newattrs[key] = value
|
||||
end
|
||||
end
|
||||
return [ns, newattrs]
|
||||
end
|
||||
module_function :filter_ns
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
# Try to load XML processor.
|
||||
loaded = false
|
||||
[
|
||||
'xsd/xmlparser/libxmlparser',
|
||||
'xsd/xmlparser/xmlparser',
|
||||
'xsd/xmlparser/xmlscanner',
|
||||
'xsd/xmlparser/rexmlparser',
|
||||
].each do |lib|
|
||||
begin
|
||||
require lib
|
||||
# XXX: for a workaround of rubygems' require inconsistency
|
||||
# XXX: MUST BE REMOVED IN THE FUTURE
|
||||
name = lib.sub(/^.*\//, '')
|
||||
raise LoadError unless XSD::XMLParser.constants.find { |c|
|
||||
c.downcase == name
|
||||
}
|
||||
loaded = true
|
||||
break
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
unless loaded
|
||||
raise RuntimeError.new("XML processor module not found.")
|
||||
end
|
||||
119
vendor/gems/soap4r-1.5.8/lib/xsd/xmlparser/libxmlparser.rb
vendored
Normal file
119
vendor/gems/soap4r-1.5.8/lib/xsd/xmlparser/libxmlparser.rb
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
# XSD4R - XMLParser XML parser library.
|
||||
# Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
||||
|
||||
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
|
||||
# redistribute it and/or modify it under the same terms of Ruby's license;
|
||||
# either the dual license version in 2003, or any later version.
|
||||
|
||||
|
||||
require 'xsd/xmlparser'
|
||||
require 'xml/libxml'
|
||||
|
||||
|
||||
module XSD
|
||||
module XMLParser
|
||||
|
||||
|
||||
class LibXMLParser < XSD::XMLParser::Parser
|
||||
include XML::SaxParser::Callbacks
|
||||
|
||||
def do_parse(string_or_readable)
|
||||
if string_or_readable.respond_to?(:read)
|
||||
string = string_or_readable.read
|
||||
else
|
||||
string = string_or_readable
|
||||
end
|
||||
# XMLParser passes a String in utf-8.
|
||||
@charset = 'utf-8'
|
||||
@parser = XML::SaxParser.string(string)
|
||||
@parser.callbacks = self
|
||||
@parser.parse
|
||||
end
|
||||
|
||||
ENTITY_REF_MAP = {
|
||||
'lt' => '<',
|
||||
'gt' => '>',
|
||||
'amp' => '&',
|
||||
'quot' => '"',
|
||||
'apos' => '\''
|
||||
}
|
||||
|
||||
#def on_internal_subset(name, external_id, system_id)
|
||||
# nil
|
||||
#end
|
||||
|
||||
#def on_is_standalone()
|
||||
# nil
|
||||
#end
|
||||
|
||||
#def on_has_internal_subset()
|
||||
# nil
|
||||
#end
|
||||
|
||||
#def on_has_external_subset()
|
||||
# nil
|
||||
#end
|
||||
|
||||
#def on_start_document()
|
||||
# nil
|
||||
#end
|
||||
|
||||
#def on_end_document()
|
||||
# nil
|
||||
#end
|
||||
|
||||
def on_start_element_ns(name, attributes, prefix, uri, namespaces)
|
||||
name = "#{prefix}:#{name}" unless prefix.nil?
|
||||
namespaces.each do |key,value|
|
||||
nsprefix = key.nil? ? "xmlns" : "xmlns:#{key}"
|
||||
attributes[nsprefix] = value
|
||||
end
|
||||
start_element(name, attributes)
|
||||
end
|
||||
|
||||
def on_end_element(name)
|
||||
end_element(name)
|
||||
end
|
||||
|
||||
def on_reference(name)
|
||||
characters(ENTITY_REF_MAP[name])
|
||||
end
|
||||
|
||||
def on_characters(chars)
|
||||
characters(chars)
|
||||
end
|
||||
|
||||
#def on_processing_instruction(target, data)
|
||||
# nil
|
||||
#end
|
||||
|
||||
#def on_comment(msg)
|
||||
# nil
|
||||
#end
|
||||
|
||||
def on_parser_warning(msg)
|
||||
warn(msg)
|
||||
end
|
||||
|
||||
def on_parser_error(msg)
|
||||
raise ParseError.new(msg)
|
||||
end
|
||||
|
||||
def on_parser_fatal_error(msg)
|
||||
raise ParseError.new(msg)
|
||||
end
|
||||
|
||||
def on_cdata_block(cdata)
|
||||
characters(cdata)
|
||||
end
|
||||
|
||||
def on_external_subset(name, external_id, system_id)
|
||||
nil
|
||||
end
|
||||
|
||||
add_factory(self)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -51,7 +51,7 @@ class XMLScanner < XSD::XMLParser::Parser
|
|||
end
|
||||
|
||||
def warning(msg)
|
||||
p msg if $DEBUG
|
||||
warn(msg)
|
||||
end
|
||||
|
||||
# def on_xmldecl; end
|
||||
|
|
|
|||
68
vendor/gems/soap4r-1.5.8/test/16runner.rb
vendored
68
vendor/gems/soap4r-1.5.8/test/16runner.rb
vendored
|
|
@ -1,68 +0,0 @@
|
|||
require 'test/unit/testsuite'
|
||||
require 'test/unit/testcase'
|
||||
|
||||
$KCODE = 'UTF8'
|
||||
|
||||
rcsid = %w$Id: 16runner.rb 1541 2005-05-10 11:28:20Z nahi $
|
||||
Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze
|
||||
Release = rcsid[3].freeze
|
||||
|
||||
module Test
|
||||
module Unit
|
||||
module Assertions
|
||||
alias assert_raise assert_raises
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class BulkTestSuite < Test::Unit::TestSuite
|
||||
def self.suite
|
||||
suite = Test::Unit::TestSuite.new
|
||||
ObjectSpace.each_object(Class) do |klass|
|
||||
suite << klass.suite if (Test::Unit::TestCase > klass)
|
||||
end
|
||||
suite
|
||||
end
|
||||
end
|
||||
|
||||
runners_map = {
|
||||
'console' => proc do |suite|
|
||||
require 'test/unit/ui/console/testrunner'
|
||||
passed = Test::Unit::UI::Console::TestRunner.run(suite).passed?
|
||||
exit(passed ? 0 : 1)
|
||||
end,
|
||||
'gtk' => proc do |suite|
|
||||
require 'test/unit/ui/gtk/testrunner'
|
||||
Test::Unit::UI::GTK::TestRunner.run(suite)
|
||||
end,
|
||||
'fox' => proc do |suite|
|
||||
require 'test/unit/ui/fox/testrunner'
|
||||
Test::Unit::UI::Fox::TestRunner.run(suite)
|
||||
end,
|
||||
}
|
||||
|
||||
def test_require(list)
|
||||
list.each do |tc_name|
|
||||
if File.directory?(tc_name)
|
||||
newlist = Dir.glob(File.join(tc_name, "**", "test_*.rb")).sort
|
||||
test_require(newlist)
|
||||
else
|
||||
dir = File.expand_path(File.dirname(tc_name))
|
||||
backup = $:.dup
|
||||
$:.push(dir)
|
||||
require tc_name
|
||||
$:.replace(backup)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
argv = ARGV
|
||||
if argv.empty?
|
||||
argv = Dir.glob(File.join(File.dirname(__FILE__), "**", "test_*.rb")).sort
|
||||
end
|
||||
|
||||
test_require(argv)
|
||||
|
||||
runner = 'console'
|
||||
GC.start
|
||||
runners_map[runner].call(BulkTestSuite.suite)
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
require 'xsd/qname'
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOfstring
|
||||
class ArrayOfstring < ::Array
|
||||
@@schema_type = "string"
|
||||
@@schema_ns = "http://www.w3.org/2001/XMLSchema"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOfint
|
||||
class ArrayOfint < ::Array
|
||||
@@schema_type = "int"
|
||||
@@schema_ns = "http://www.w3.org/2001/XMLSchema"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOffloat
|
||||
class ArrayOffloat < ::Array
|
||||
@@schema_type = "float"
|
||||
@@schema_ns = "http://www.w3.org/2001/XMLSchema"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOfSOAPStruct
|
||||
class ArrayOfSOAPStruct < ::Array
|
||||
@@schema_type = "SOAPStruct"
|
||||
@@schema_ns = "http://soapinterop.org/xsd"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}SOAPStruct
|
||||
class SOAPStruct
|
||||
@@schema_type = "SOAPStruct"
|
||||
@@schema_ns = "http://soapinterop.org/xsd"
|
||||
@@schema_element = [["varString", "String"], ["varInt", "Int"], ["varFloat", "Float"]]
|
||||
|
||||
attr_accessor :varString
|
||||
attr_accessor :varInt
|
||||
attr_accessor :varFloat
|
||||
|
||||
def initialize(varString = nil, varInt = nil, varFloat = nil)
|
||||
@varString = varString
|
||||
@varInt = varInt
|
||||
@varFloat = varFloat
|
||||
end
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOfstring
|
||||
class ArrayOfstring < ::Array
|
||||
@@schema_type = "string"
|
||||
@@schema_ns = "http://www.w3.org/2001/XMLSchema"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOfint
|
||||
class ArrayOfint < ::Array
|
||||
@@schema_type = "int"
|
||||
@@schema_ns = "http://www.w3.org/2001/XMLSchema"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOffloat
|
||||
class ArrayOffloat < ::Array
|
||||
@@schema_type = "float"
|
||||
@@schema_ns = "http://www.w3.org/2001/XMLSchema"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}ArrayOfSOAPStruct
|
||||
class ArrayOfSOAPStruct < ::Array
|
||||
@@schema_type = "SOAPStruct"
|
||||
@@schema_ns = "http://soapinterop.org/xsd"
|
||||
end
|
||||
|
||||
# {http://soapinterop.org/xsd}SOAPStruct
|
||||
class SOAPStruct
|
||||
@@schema_type = "SOAPStruct"
|
||||
@@schema_ns = "http://soapinterop.org/xsd"
|
||||
@@schema_element = [["varString", "String"], ["varInt", "Int"], ["varFloat", "Float"]]
|
||||
|
||||
attr_accessor :varString
|
||||
attr_accessor :varInt
|
||||
attr_accessor :varFloat
|
||||
|
||||
def initialize(varString = nil, varInt = nil, varFloat = nil)
|
||||
@varString = varString
|
||||
@varInt = varInt
|
||||
@varFloat = varFloat
|
||||
end
|
||||
end
|
||||
|
|
@ -1,315 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="InteropTest" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://soapinterop.org/" xmlns:s="http://soapinterop.org/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
||||
<types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd">
|
||||
<import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<complexType name="ArrayOfstring">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfint">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOffloat">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfSOAPStruct">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="SOAPStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
</all>
|
||||
</complexType>
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<message name="echoStringRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringResponse">
|
||||
<part name="return" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringArrayRequest">
|
||||
<part name="inputStringArray" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoIntegerRequest">
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerResponse">
|
||||
<part name="return" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayRequest">
|
||||
<part name="inputIntegerArray" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayResponse">
|
||||
<part name="return" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoFloatRequest">
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatResponse">
|
||||
<part name="return" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayRequest">
|
||||
<part name="inputFloatArray" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayResponse">
|
||||
<part name="return" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayRequest">
|
||||
<part name="inputStructArray" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayResponse">
|
||||
<part name="return" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoVoidRequest"/>
|
||||
<message name="echoVoidResponse"/>
|
||||
<message name="echoBase64Request">
|
||||
<part name="inputBase64" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoBase64Response">
|
||||
<part name="return" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoDateRequest">
|
||||
<part name="inputDate" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoDateResponse">
|
||||
<part name="return" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryRequest">
|
||||
<part name="inputHexBinary" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryResponse">
|
||||
<part name="return" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoDecimalRequest">
|
||||
<part name="inputDecimal" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoDecimalResponse">
|
||||
<part name="return" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoBooleanRequest">
|
||||
<part name="inputBoolean" type="xsd:boolean"/>
|
||||
</message>
|
||||
<message name="echoBooleanResponse">
|
||||
<part name="return" type="xsd:boolean"/>
|
||||
</message>
|
||||
|
||||
<portType name="InteropTestPortType">
|
||||
<operation name="echoString" parameterOrder="inputString">
|
||||
<input message="tns:echoStringRequest"/>
|
||||
<output message="tns:echoStringResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStringArray" parameterOrder="inputStringArray">
|
||||
<input message="tns:echoStringArrayRequest"/>
|
||||
<output message="tns:echoStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoInteger" parameterOrder="inputInteger">
|
||||
<input message="tns:echoIntegerRequest"/>
|
||||
<output message="tns:echoIntegerResponse"/>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray" parameterOrder="inputIntegerArray">
|
||||
<input message="tns:echoIntegerArrayRequest"/>
|
||||
<output message="tns:echoIntegerArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloat" parameterOrder="inputFloat">
|
||||
<input message="tns:echoFloatRequest"/>
|
||||
<output message="tns:echoFloatResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloatArray" parameterOrder="inputFloatArray">
|
||||
<input message="tns:echoFloatArrayRequest"/>
|
||||
<output message="tns:echoFloatArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoStructRequest"/>
|
||||
<output message="tns:echoStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStructArray" parameterOrder="inputStructArray">
|
||||
<input message="tns:echoStructArrayRequest"/>
|
||||
<output message="tns:echoStructArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<input message="tns:echoVoidRequest"/>
|
||||
<output message="tns:echoVoidResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBase64" parameterOrder="inputBase64">
|
||||
<input message="tns:echoBase64Request"/>
|
||||
<output message="tns:echoBase64Response"/>
|
||||
</operation>
|
||||
<operation name="echoDate" parameterOrder="inputDate">
|
||||
<input message="tns:echoDateRequest"/>
|
||||
<output message="tns:echoDateResponse"/>
|
||||
</operation>
|
||||
<operation name="echoHexBinary" parameterOrder="inputHexBinary">
|
||||
<input message="tns:echoHexBinaryRequest"/>
|
||||
<output message="tns:echoHexBinaryResponse"/>
|
||||
</operation>
|
||||
<operation name="echoDecimal" parameterOrder="inputDecimal">
|
||||
<input message="tns:echoDecimalRequest"/>
|
||||
<output message="tns:echoDecimalResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBoolean" parameterOrder="inputBoolean">
|
||||
<input message="tns:echoBooleanRequest"/>
|
||||
<output message="tns:echoBooleanResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="InteropTestSoapBinding" type="tns:InteropTestPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoString">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
</definitions>
|
||||
|
|
@ -1,208 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="InteropTest" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://soapinterop.org/" xmlns:s="http://soapinterop.org/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
||||
<import location="InteropTest.wsdl" namespace="http://soapinterop.org/"/>
|
||||
<import location="InteropTest.wsdl" namespace="http://soapinterop.org/xsd"/>
|
||||
|
||||
<message name="echoHeaderString_Request">
|
||||
<part name="echoMeStringRequest" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoHeaderString_Response">
|
||||
<part name="echoMeStringResponse" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoHeaderStruct_Request">
|
||||
<part name="echoMeStructRequest" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoHeaderStruct_Response">
|
||||
<part name="echoMeStructResponse" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
|
||||
<binding name="InteropEchoHeaderBinding" type="tns:InteropTestPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
|
||||
<operation name="echoString">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
|
||||
</binding>
|
||||
|
||||
</definitions>
|
||||
|
|
@ -1,327 +0,0 @@
|
|||
require 'InteropTest.rb'
|
||||
|
||||
require 'soap/rpc/driver'
|
||||
|
||||
class InteropTestPortType < ::SOAP::RPC::Driver
|
||||
DefaultEndpointUrl = "http://dev.ctor.org/soapsrv"
|
||||
MappingRegistry = ::SOAP::Mapping::Registry.new
|
||||
|
||||
MappingRegistry.set(
|
||||
ArrayOfstring,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "string") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
ArrayOfint,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "int") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
ArrayOffloat,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "float") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
SOAPStruct,
|
||||
::SOAP::SOAPStruct,
|
||||
::SOAP::Mapping::Registry::TypedStructFactory,
|
||||
{ :type => XSD::QName.new("http://soapinterop.org/xsd", "SOAPStruct") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
ArrayOfSOAPStruct,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://soapinterop.org/xsd", "SOAPStruct") }
|
||||
)
|
||||
|
||||
Methods = [
|
||||
["echoString", "echoString",
|
||||
[
|
||||
["in", "inputString", ["::SOAP::SOAPString"]],
|
||||
["retval", "return", ["::SOAP::SOAPString"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoStringArray", "echoStringArray",
|
||||
[
|
||||
["in", "inputStringArray", ["String[]", "http://www.w3.org/2001/XMLSchema", "string"]],
|
||||
["retval", "return", ["String[]", "http://www.w3.org/2001/XMLSchema", "string"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoInteger", "echoInteger",
|
||||
[
|
||||
["in", "inputInteger", ["::SOAP::SOAPInt"]],
|
||||
["retval", "return", ["::SOAP::SOAPInt"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoIntegerArray", "echoIntegerArray",
|
||||
[
|
||||
["in", "inputIntegerArray", ["Integer[]", "http://www.w3.org/2001/XMLSchema", "int"]],
|
||||
["retval", "return", ["Integer[]", "http://www.w3.org/2001/XMLSchema", "int"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoFloat", "echoFloat",
|
||||
[
|
||||
["in", "inputFloat", ["::SOAP::SOAPFloat"]],
|
||||
["retval", "return", ["::SOAP::SOAPFloat"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoFloatArray", "echoFloatArray",
|
||||
[
|
||||
["in", "inputFloatArray", ["Float[]", "http://www.w3.org/2001/XMLSchema", "float"]],
|
||||
["retval", "return", ["Float[]", "http://www.w3.org/2001/XMLSchema", "float"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoStruct", "echoStruct",
|
||||
[
|
||||
["in", "inputStruct", ["SOAPStruct", "http://soapinterop.org/xsd", "SOAPStruct"]],
|
||||
["retval", "return", ["SOAPStruct", "http://soapinterop.org/xsd", "SOAPStruct"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoStructArray", "echoStructArray",
|
||||
[
|
||||
["in", "inputStructArray", ["SOAPStruct[]", "http://soapinterop.org/xsd", "SOAPStruct"]],
|
||||
["retval", "return", ["SOAPStruct[]", "http://soapinterop.org/xsd", "SOAPStruct"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoVoid", "echoVoid",
|
||||
[],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoBase64", "echoBase64",
|
||||
[
|
||||
["in", "inputBase64", ["::SOAP::SOAPBase64"]],
|
||||
["retval", "return", ["::SOAP::SOAPBase64"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoDate", "echoDate",
|
||||
[
|
||||
["in", "inputDate", ["::SOAP::SOAPDateTime"]],
|
||||
["retval", "return", ["::SOAP::SOAPDateTime"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoHexBinary", "echoHexBinary",
|
||||
[
|
||||
["in", "inputHexBinary", ["::SOAP::SOAPHexBinary"]],
|
||||
["retval", "return", ["::SOAP::SOAPHexBinary"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoDecimal", "echoDecimal",
|
||||
[
|
||||
["in", "inputDecimal", ["::SOAP::SOAPDecimal"]],
|
||||
["retval", "return", ["::SOAP::SOAPDecimal"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoBoolean", "echoBoolean",
|
||||
[
|
||||
["in", "inputBoolean", ["::SOAP::SOAPBoolean"]],
|
||||
["retval", "return", ["::SOAP::SOAPBoolean"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :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
|
||||
::SOAP::Mapping.define_singleton_method(self, name_as) do |*arg|
|
||||
__send__(name, *arg)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'soap/rpc/driver'
|
||||
|
||||
class InteropTestPortType < ::SOAP::RPC::Driver
|
||||
DefaultEndpointUrl = "http://dev.ctor.org/soapsrv"
|
||||
MappingRegistry = ::SOAP::Mapping::Registry.new
|
||||
|
||||
MappingRegistry.set(
|
||||
ArrayOfstring,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "string") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
ArrayOfint,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "int") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
ArrayOffloat,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "float") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
SOAPStruct,
|
||||
::SOAP::SOAPStruct,
|
||||
::SOAP::Mapping::Registry::TypedStructFactory,
|
||||
{ :type => XSD::QName.new("http://soapinterop.org/xsd", "SOAPStruct") }
|
||||
)
|
||||
MappingRegistry.set(
|
||||
ArrayOfSOAPStruct,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new("http://soapinterop.org/xsd", "SOAPStruct") }
|
||||
)
|
||||
|
||||
Methods = [
|
||||
["echoString", "echoString",
|
||||
[
|
||||
["in", "inputString", ["::SOAP::SOAPString"]],
|
||||
["retval", "return", ["::SOAP::SOAPString"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoStringArray", "echoStringArray",
|
||||
[
|
||||
["in", "inputStringArray", ["String[]", "http://www.w3.org/2001/XMLSchema", "string"]],
|
||||
["retval", "return", ["String[]", "http://www.w3.org/2001/XMLSchema", "string"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoInteger", "echoInteger",
|
||||
[
|
||||
["in", "inputInteger", ["::SOAP::SOAPInt"]],
|
||||
["retval", "return", ["::SOAP::SOAPInt"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoIntegerArray", "echoIntegerArray",
|
||||
[
|
||||
["in", "inputIntegerArray", ["Integer[]", "http://www.w3.org/2001/XMLSchema", "int"]],
|
||||
["retval", "return", ["Integer[]", "http://www.w3.org/2001/XMLSchema", "int"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoFloat", "echoFloat",
|
||||
[
|
||||
["in", "inputFloat", ["::SOAP::SOAPFloat"]],
|
||||
["retval", "return", ["::SOAP::SOAPFloat"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoFloatArray", "echoFloatArray",
|
||||
[
|
||||
["in", "inputFloatArray", ["Float[]", "http://www.w3.org/2001/XMLSchema", "float"]],
|
||||
["retval", "return", ["Float[]", "http://www.w3.org/2001/XMLSchema", "float"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoStruct", "echoStruct",
|
||||
[
|
||||
["in", "inputStruct", ["SOAPStruct", "http://soapinterop.org/xsd", "SOAPStruct"]],
|
||||
["retval", "return", ["SOAPStruct", "http://soapinterop.org/xsd", "SOAPStruct"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoStructArray", "echoStructArray",
|
||||
[
|
||||
["in", "inputStructArray", ["SOAPStruct[]", "http://soapinterop.org/xsd", "SOAPStruct"]],
|
||||
["retval", "return", ["SOAPStruct[]", "http://soapinterop.org/xsd", "SOAPStruct"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoVoid", "echoVoid",
|
||||
[],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoBase64", "echoBase64",
|
||||
[
|
||||
["in", "inputBase64", ["::SOAP::SOAPBase64"]],
|
||||
["retval", "return", ["::SOAP::SOAPBase64"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoDate", "echoDate",
|
||||
[
|
||||
["in", "inputDate", ["::SOAP::SOAPDateTime"]],
|
||||
["retval", "return", ["::SOAP::SOAPDateTime"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoHexBinary", "echoHexBinary",
|
||||
[
|
||||
["in", "inputHexBinary", ["::SOAP::SOAPHexBinary"]],
|
||||
["retval", "return", ["::SOAP::SOAPHexBinary"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoDecimal", "echoDecimal",
|
||||
[
|
||||
["in", "inputDecimal", ["::SOAP::SOAPDecimal"]],
|
||||
["retval", "return", ["::SOAP::SOAPDecimal"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :rpc
|
||||
],
|
||||
["echoBoolean", "echoBoolean",
|
||||
[
|
||||
["in", "inputBoolean", ["::SOAP::SOAPBoolean"]],
|
||||
["retval", "return", ["::SOAP::SOAPBoolean"]]
|
||||
],
|
||||
"http://soapinterop.org/", "http://soapinterop.org/", :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
|
||||
::SOAP::Mapping.define_singleton_method(self, name_as) do |*arg|
|
||||
__send__(name, *arg)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Clients/Server for SOAPBuilders Interoperability Lab "Round 2"
|
||||
http://www.whitemesa.com/interop.htm
|
||||
|
|
@ -1,461 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="SOAP4R_SOAPBuildersInteropTest_R2base"
|
||||
targetNamespace="http://soapinterop.org/"
|
||||
xmlns:tns="http://soapinterop.org/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:s="http://soapinterop.org/xsd"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
||||
<types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd">
|
||||
<import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<complexType name="ArrayOfstring">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfint">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOffloat">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfSOAPStruct">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="SOAPStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="SOAPStructStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
<element name="varStruct" type="s:SOAPStruct"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="SOAPArrayStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
<element name="varArray" type="s:ArrayOfstring"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfString2D">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[,]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<message name="echoStringRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringResponse">
|
||||
<part name="return" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringArrayRequest">
|
||||
<part name="inputStringArray" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoIntegerRequest">
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerResponse">
|
||||
<part name="return" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayRequest">
|
||||
<part name="inputIntegerArray" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayResponse">
|
||||
<part name="return" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoFloatRequest">
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatResponse">
|
||||
<part name="return" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayRequest">
|
||||
<part name="inputFloatArray" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayResponse">
|
||||
<part name="return" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayRequest">
|
||||
<part name="inputStructArray" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayResponse">
|
||||
<part name="return" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoVoidRequest"/>
|
||||
<message name="echoVoidResponse"/>
|
||||
<message name="echoBase64Request">
|
||||
<part name="inputBase64" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoBase64Response">
|
||||
<part name="return" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoDateRequest">
|
||||
<part name="inputDate" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoDateResponse">
|
||||
<part name="return" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryRequest">
|
||||
<part name="inputHexBinary" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryResponse">
|
||||
<part name="return" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoDecimalRequest">
|
||||
<part name="inputDecimal" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoDecimalResponse">
|
||||
<part name="return" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoBooleanRequest">
|
||||
<part name="inputBoolean" type="xsd:boolean"/>
|
||||
</message>
|
||||
<message name="echoBooleanResponse">
|
||||
<part name="return" type="xsd:boolean"/>
|
||||
</message>
|
||||
<message name="echoStructAsSimpleTypesRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructAsSimpleTypesResponse">
|
||||
<part name="outputString" type="xsd:string"/>
|
||||
<part name="outputInteger" type="xsd:int"/>
|
||||
<part name="outputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoSimpleTypesAsStructRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoSimpleTypesAsStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echo2DStringArrayRequest">
|
||||
<part name="input2DStringArray" type="s:ArrayOfString2D"/>
|
||||
</message>
|
||||
<message name="echo2DStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfString2D"/>
|
||||
</message>
|
||||
<message name="echoNestedStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStructStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedStructResponse">
|
||||
<part name="return" type="s:SOAPStructStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedArrayRequest">
|
||||
<part name="inputStruct" type="s:SOAPArrayStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedArrayResponse">
|
||||
<part name="return" type="s:SOAPArrayStruct"/>
|
||||
</message>
|
||||
|
||||
<portType name="InteropTestPortType">
|
||||
<operation name="echoString" parameterOrder="inputString">
|
||||
<input message="tns:echoStringRequest"/>
|
||||
<output message="tns:echoStringResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStringArray" parameterOrder="inputStringArray">
|
||||
<input message="tns:echoStringArrayRequest"/>
|
||||
<output message="tns:echoStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoInteger" parameterOrder="inputInteger">
|
||||
<input message="tns:echoIntegerRequest"/>
|
||||
<output message="tns:echoIntegerResponse"/>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray" parameterOrder="inputIntegerArray">
|
||||
<input message="tns:echoIntegerArrayRequest"/>
|
||||
<output message="tns:echoIntegerArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloat" parameterOrder="inputFloat">
|
||||
<input message="tns:echoFloatRequest"/>
|
||||
<output message="tns:echoFloatResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloatArray" parameterOrder="inputFloatArray">
|
||||
<input message="tns:echoFloatArrayRequest"/>
|
||||
<output message="tns:echoFloatArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoStructRequest"/>
|
||||
<output message="tns:echoStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStructArray" parameterOrder="inputStructArray">
|
||||
<input message="tns:echoStructArrayRequest"/>
|
||||
<output message="tns:echoStructArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<input message="tns:echoVoidRequest"/>
|
||||
<output message="tns:echoVoidResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBase64" parameterOrder="inputBase64">
|
||||
<input message="tns:echoBase64Request"/>
|
||||
<output message="tns:echoBase64Response"/>
|
||||
</operation>
|
||||
<operation name="echoDate" parameterOrder="inputDate">
|
||||
<input message="tns:echoDateRequest"/>
|
||||
<output message="tns:echoDateResponse"/>
|
||||
</operation>
|
||||
<operation name="echoHexBinary" parameterOrder="inputHexBinary">
|
||||
<input message="tns:echoHexBinaryRequest"/>
|
||||
<output message="tns:echoHexBinaryResponse"/>
|
||||
</operation>
|
||||
<operation name="echoDecimal" parameterOrder="inputDecimal">
|
||||
<input message="tns:echoDecimalRequest"/>
|
||||
<output message="tns:echoDecimalResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBoolean" parameterOrder="inputBoolean">
|
||||
<input message="tns:echoBooleanRequest"/>
|
||||
<output message="tns:echoBooleanResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<portType name="InteropTestPortTypeB">
|
||||
<operation name="echoStructAsSimpleTypes" parameterOrder="inputStruct outputString outputInteger outputFloat">
|
||||
<input message="tns:echoStructAsSimpleTypesRequest"/>
|
||||
<output message="tns:echoStructAsSimpleTypesResponse"/>
|
||||
</operation>
|
||||
<operation name="echoSimpleTypesAsStruct" parameterOrder="inputString inputInteger inputFloat">
|
||||
<input message="tns:echoSimpleTypesAsStructRequest"/>
|
||||
<output message="tns:echoSimpleTypesAsStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echo2DStringArray" parameterOrder="input2DStringArray">
|
||||
<input message="tns:echo2DStringArrayRequest"/>
|
||||
<output message="tns:echo2DStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoNestedStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoNestedStructRequest"/>
|
||||
<output message="tns:echoNestedStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoNestedArray" parameterOrder="inputStruct">
|
||||
<input message="tns:echoNestedArrayRequest"/>
|
||||
<output message="tns:echoNestedArrayResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="InteropTestSoapBinding" type="tns:InteropTestPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoString">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<binding name="InteropTestSoapBindingB" type="tns:InteropTestPortTypeB">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoStructAsSimpleTypes">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoSimpleTypesAsStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echo2DStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoNestedStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoNestedArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="SOAP4R_SOAPBuildersInteropTest_R2">
|
||||
<port name="InteropTestSoapPort" binding="tns:InteropTestSoapBinding">
|
||||
<soap:address location="http://localhost:10080"/>
|
||||
</port>
|
||||
<port name="InteropTestSoapPortB" binding="tns:InteropTestSoapBindingB">
|
||||
<soap:address location="http://localhost:10080"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="SOAP4R_SOAPBuildersInteropTest_R2GroupB"
|
||||
targetNamespace="http://soapinterop.org/"
|
||||
xmlns:tns="http://soapinterop.org/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
|
||||
<import
|
||||
namespace="http://soapinterop.org/"
|
||||
location="http://www.whitemesa.com/interop/InteropTestB.wsdl"/>
|
||||
|
||||
<service name="SOAP4R_SOAPBuildersInteropTest_R2GroupB">
|
||||
<port name="InteropTestSoapPort"
|
||||
binding="tns:InteropTestSoapBindingB">
|
||||
<soap:address
|
||||
location="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'InteropTestDriver.rb'
|
||||
|
||||
endpoint_url = ARGV.shift
|
||||
obj = InteropTestPortType.new(endpoint_url)
|
||||
|
||||
# Uncomment the below line to see SOAP wiredumps.
|
||||
# obj.wiredump_dev = STDERR
|
||||
|
||||
# SYNOPSIS
|
||||
# echoString(inputString)
|
||||
#
|
||||
# ARGS
|
||||
# inputString String - {http://www.w3.org/2001/XMLSchema}string
|
||||
#
|
||||
# RETURNS
|
||||
# v_return String - {http://www.w3.org/2001/XMLSchema}string
|
||||
#
|
||||
inputString = nil
|
||||
puts obj.echoString(inputString)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoStringArray(inputStringArray)
|
||||
#
|
||||
# ARGS
|
||||
# inputStringArray ArrayOfstring - {http://soapinterop.org/xsd}ArrayOfstring
|
||||
#
|
||||
# RETURNS
|
||||
# v_return ArrayOfstring - {http://soapinterop.org/xsd}ArrayOfstring
|
||||
#
|
||||
inputStringArray = nil
|
||||
puts obj.echoStringArray(inputStringArray)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoInteger(inputInteger)
|
||||
#
|
||||
# ARGS
|
||||
# inputInteger Int - {http://www.w3.org/2001/XMLSchema}int
|
||||
#
|
||||
# RETURNS
|
||||
# v_return Int - {http://www.w3.org/2001/XMLSchema}int
|
||||
#
|
||||
inputInteger = nil
|
||||
puts obj.echoInteger(inputInteger)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoIntegerArray(inputIntegerArray)
|
||||
#
|
||||
# ARGS
|
||||
# inputIntegerArray ArrayOfint - {http://soapinterop.org/xsd}ArrayOfint
|
||||
#
|
||||
# RETURNS
|
||||
# v_return ArrayOfint - {http://soapinterop.org/xsd}ArrayOfint
|
||||
#
|
||||
inputIntegerArray = nil
|
||||
puts obj.echoIntegerArray(inputIntegerArray)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoFloat(inputFloat)
|
||||
#
|
||||
# ARGS
|
||||
# inputFloat Float - {http://www.w3.org/2001/XMLSchema}float
|
||||
#
|
||||
# RETURNS
|
||||
# v_return Float - {http://www.w3.org/2001/XMLSchema}float
|
||||
#
|
||||
inputFloat = nil
|
||||
puts obj.echoFloat(inputFloat)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoFloatArray(inputFloatArray)
|
||||
#
|
||||
# ARGS
|
||||
# inputFloatArray ArrayOffloat - {http://soapinterop.org/xsd}ArrayOffloat
|
||||
#
|
||||
# RETURNS
|
||||
# v_return ArrayOffloat - {http://soapinterop.org/xsd}ArrayOffloat
|
||||
#
|
||||
inputFloatArray = nil
|
||||
puts obj.echoFloatArray(inputFloatArray)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoStruct(inputStruct)
|
||||
#
|
||||
# ARGS
|
||||
# inputStruct SOAPStruct - {http://soapinterop.org/xsd}SOAPStruct
|
||||
#
|
||||
# RETURNS
|
||||
# v_return SOAPStruct - {http://soapinterop.org/xsd}SOAPStruct
|
||||
#
|
||||
inputStruct = nil
|
||||
puts obj.echoStruct(inputStruct)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoStructArray(inputStructArray)
|
||||
#
|
||||
# ARGS
|
||||
# inputStructArray ArrayOfSOAPStruct - {http://soapinterop.org/xsd}ArrayOfSOAPStruct
|
||||
#
|
||||
# RETURNS
|
||||
# v_return ArrayOfSOAPStruct - {http://soapinterop.org/xsd}ArrayOfSOAPStruct
|
||||
#
|
||||
inputStructArray = nil
|
||||
puts obj.echoStructArray(inputStructArray)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoVoid
|
||||
#
|
||||
# ARGS
|
||||
# N/A
|
||||
#
|
||||
# RETURNS
|
||||
# N/A
|
||||
#
|
||||
|
||||
puts obj.echoVoid
|
||||
|
||||
# SYNOPSIS
|
||||
# echoBase64(inputBase64)
|
||||
#
|
||||
# ARGS
|
||||
# inputBase64 Base64Binary - {http://www.w3.org/2001/XMLSchema}base64Binary
|
||||
#
|
||||
# RETURNS
|
||||
# v_return Base64Binary - {http://www.w3.org/2001/XMLSchema}base64Binary
|
||||
#
|
||||
inputBase64 = nil
|
||||
puts obj.echoBase64(inputBase64)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoDate(inputDate)
|
||||
#
|
||||
# ARGS
|
||||
# inputDate DateTime - {http://www.w3.org/2001/XMLSchema}dateTime
|
||||
#
|
||||
# RETURNS
|
||||
# v_return DateTime - {http://www.w3.org/2001/XMLSchema}dateTime
|
||||
#
|
||||
inputDate = nil
|
||||
puts obj.echoDate(inputDate)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoHexBinary(inputHexBinary)
|
||||
#
|
||||
# ARGS
|
||||
# inputHexBinary HexBinary - {http://www.w3.org/2001/XMLSchema}hexBinary
|
||||
#
|
||||
# RETURNS
|
||||
# v_return HexBinary - {http://www.w3.org/2001/XMLSchema}hexBinary
|
||||
#
|
||||
inputHexBinary = nil
|
||||
puts obj.echoHexBinary(inputHexBinary)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoDecimal(inputDecimal)
|
||||
#
|
||||
# ARGS
|
||||
# inputDecimal Decimal - {http://www.w3.org/2001/XMLSchema}decimal
|
||||
#
|
||||
# RETURNS
|
||||
# v_return Decimal - {http://www.w3.org/2001/XMLSchema}decimal
|
||||
#
|
||||
inputDecimal = nil
|
||||
puts obj.echoDecimal(inputDecimal)
|
||||
|
||||
# SYNOPSIS
|
||||
# echoBoolean(inputBoolean)
|
||||
#
|
||||
# ARGS
|
||||
# inputBoolean Boolean - {http://www.w3.org/2001/XMLSchema}boolean
|
||||
#
|
||||
# RETURNS
|
||||
# v_return Boolean - {http://www.w3.org/2001/XMLSchema}boolean
|
||||
#
|
||||
inputBoolean = nil
|
||||
puts obj.echoBoolean(inputBoolean)
|
||||
|
|
@ -1,461 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="SOAP4R_SOAPBuildersInteropTest_R2base"
|
||||
targetNamespace="http://soapinterop.org/"
|
||||
xmlns:tns="http://soapinterop.org/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:s="http://soapinterop.org/xsd"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
||||
<types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd">
|
||||
<import namespace = "http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<complexType name="ArrayOfstring">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfint">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOffloat">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfSOAPStruct">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="SOAPStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="SOAPStructStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
<element name="varStruct" type="s:SOAPStruct"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="SOAPArrayStruct">
|
||||
<all>
|
||||
<element name="varString" type="string"/>
|
||||
<element name="varInt" type="int"/>
|
||||
<element name="varFloat" type="float"/>
|
||||
<element name="varArray" type="s:ArrayOfstring"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfString2D">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[,]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<message name="echoStringRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringResponse">
|
||||
<part name="return" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringArrayRequest">
|
||||
<part name="inputStringArray" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoIntegerRequest">
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerResponse">
|
||||
<part name="return" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayRequest">
|
||||
<part name="inputIntegerArray" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayResponse">
|
||||
<part name="return" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoFloatRequest">
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatResponse">
|
||||
<part name="return" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayRequest">
|
||||
<part name="inputFloatArray" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayResponse">
|
||||
<part name="return" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayRequest">
|
||||
<part name="inputStructArray" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayResponse">
|
||||
<part name="return" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoVoidRequest"/>
|
||||
<message name="echoVoidResponse"/>
|
||||
<message name="echoBase64Request">
|
||||
<part name="inputBase64" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoBase64Response">
|
||||
<part name="return" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoDateRequest">
|
||||
<part name="inputDate" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoDateResponse">
|
||||
<part name="return" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryRequest">
|
||||
<part name="inputHexBinary" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryResponse">
|
||||
<part name="return" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoDecimalRequest">
|
||||
<part name="inputDecimal" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoDecimalResponse">
|
||||
<part name="return" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoBooleanRequest">
|
||||
<part name="inputBoolean" type="xsd:boolean"/>
|
||||
</message>
|
||||
<message name="echoBooleanResponse">
|
||||
<part name="return" type="xsd:boolean"/>
|
||||
</message>
|
||||
<message name="echoStructAsSimpleTypesRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructAsSimpleTypesResponse">
|
||||
<part name="outputString" type="xsd:string"/>
|
||||
<part name="outputInteger" type="xsd:int"/>
|
||||
<part name="outputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoSimpleTypesAsStructRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoSimpleTypesAsStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echo2DStringArrayRequest">
|
||||
<part name="input2DStringArray" type="s:ArrayOfString2D"/>
|
||||
</message>
|
||||
<message name="echo2DStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfString2D"/>
|
||||
</message>
|
||||
<message name="echoNestedStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStructStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedStructResponse">
|
||||
<part name="return" type="s:SOAPStructStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedArrayRequest">
|
||||
<part name="inputStruct" type="s:SOAPArrayStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedArrayResponse">
|
||||
<part name="return" type="s:SOAPArrayStruct"/>
|
||||
</message>
|
||||
|
||||
<portType name="InteropTestPortType">
|
||||
<operation name="echoString" parameterOrder="inputString">
|
||||
<input message="tns:echoStringRequest"/>
|
||||
<output message="tns:echoStringResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStringArray" parameterOrder="inputStringArray">
|
||||
<input message="tns:echoStringArrayRequest"/>
|
||||
<output message="tns:echoStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoInteger" parameterOrder="inputInteger">
|
||||
<input message="tns:echoIntegerRequest"/>
|
||||
<output message="tns:echoIntegerResponse"/>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray" parameterOrder="inputIntegerArray">
|
||||
<input message="tns:echoIntegerArrayRequest"/>
|
||||
<output message="tns:echoIntegerArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloat" parameterOrder="inputFloat">
|
||||
<input message="tns:echoFloatRequest"/>
|
||||
<output message="tns:echoFloatResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloatArray" parameterOrder="inputFloatArray">
|
||||
<input message="tns:echoFloatArrayRequest"/>
|
||||
<output message="tns:echoFloatArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoStructRequest"/>
|
||||
<output message="tns:echoStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStructArray" parameterOrder="inputStructArray">
|
||||
<input message="tns:echoStructArrayRequest"/>
|
||||
<output message="tns:echoStructArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<input message="tns:echoVoidRequest"/>
|
||||
<output message="tns:echoVoidResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBase64" parameterOrder="inputBase64">
|
||||
<input message="tns:echoBase64Request"/>
|
||||
<output message="tns:echoBase64Response"/>
|
||||
</operation>
|
||||
<operation name="echoDate" parameterOrder="inputDate">
|
||||
<input message="tns:echoDateRequest"/>
|
||||
<output message="tns:echoDateResponse"/>
|
||||
</operation>
|
||||
<operation name="echoHexBinary" parameterOrder="inputHexBinary">
|
||||
<input message="tns:echoHexBinaryRequest"/>
|
||||
<output message="tns:echoHexBinaryResponse"/>
|
||||
</operation>
|
||||
<operation name="echoDecimal" parameterOrder="inputDecimal">
|
||||
<input message="tns:echoDecimalRequest"/>
|
||||
<output message="tns:echoDecimalResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBoolean" parameterOrder="inputBoolean">
|
||||
<input message="tns:echoBooleanRequest"/>
|
||||
<output message="tns:echoBooleanResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<portType name="InteropTestPortTypeB">
|
||||
<operation name="echoStructAsSimpleTypes" parameterOrder="inputStruct outputString outputInteger outputFloat">
|
||||
<input message="tns:echoStructAsSimpleTypesRequest"/>
|
||||
<output message="tns:echoStructAsSimpleTypesResponse"/>
|
||||
</operation>
|
||||
<operation name="echoSimpleTypesAsStruct" parameterOrder="inputString inputInteger inputFloat">
|
||||
<input message="tns:echoSimpleTypesAsStructRequest"/>
|
||||
<output message="tns:echoSimpleTypesAsStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echo2DStringArray" parameterOrder="input2DStringArray">
|
||||
<input message="tns:echo2DStringArrayRequest"/>
|
||||
<output message="tns:echo2DStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoNestedStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoNestedStructRequest"/>
|
||||
<output message="tns:echoNestedStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoNestedArray" parameterOrder="inputStruct">
|
||||
<input message="tns:echoNestedArrayRequest"/>
|
||||
<output message="tns:echoNestedArrayResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="InteropTestSoapBinding" type="tns:InteropTestPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoString">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<binding name="InteropTestSoapBindingB" type="tns:InteropTestPortTypeB">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoStructAsSimpleTypes">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoSimpleTypesAsStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echo2DStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoNestedStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoNestedArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="SOAP4R_SOAPBuildersInteropTest_R2">
|
||||
<port name="InteropTestSoapPort" binding="tns:InteropTestSoapBinding">
|
||||
<soap:address location="http://localhost:10080"/>
|
||||
</port>
|
||||
<port name="InteropTestSoapPortB" binding="tns:InteropTestSoapBindingB">
|
||||
<soap:address location="http://localhost:10080"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="SOAP4R_SOAPBuildersInteropTest_R2GroupB"
|
||||
targetNamespace="http://soapinterop.org/"
|
||||
xmlns:tns="http://soapinterop.org/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
|
||||
<import
|
||||
namespace="http://soapinterop.org/"
|
||||
location="http://www.whitemesa.com/interop/InteropTestB.wsdl"/>
|
||||
|
||||
<service name="SOAP4R_SOAPBuildersInteropTest_R2GroupB">
|
||||
<port name="InteropTestSoapPort"
|
||||
binding="tns:InteropTestSoapBindingB">
|
||||
<soap:address location="http://dev.ctor.org/soapsrv"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<definitions name="InteropTest"
|
||||
targetNamespace="http://soapinterop.org/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:tns="http://soapinterop.org/">
|
||||
|
||||
<import location="http://www.whitemesa.com/interop/InteropTestC.wsdl"
|
||||
namespace="http://soapinterop.org/"/>
|
||||
|
||||
<service name="SOAP4R_SOAPBuildersInteropTest_R2GroupC">
|
||||
<port name="InteropEchoHeaderService"
|
||||
binding="tns:InteropEchoHeaderBinding">
|
||||
<soap:address location="http://dev.ctor.org/soapsrv"/>
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
||||
288
vendor/gems/soap4r-1.5.8/test/interopR2/base.rb
vendored
288
vendor/gems/soap4r-1.5.8/test/interopR2/base.rb
vendored
|
|
@ -1,288 +0,0 @@
|
|||
require 'soap/soap'
|
||||
require 'soap/mapping'
|
||||
|
||||
|
||||
InterfaceNS = 'http://soapinterop.org/'
|
||||
TypeNS = 'http://soapinterop.org/xsd'
|
||||
ApacheNS = 'http://xml.apache.org/xml-soap'
|
||||
|
||||
|
||||
module SOAPBuildersInterop
|
||||
extend SOAP
|
||||
|
||||
|
||||
MethodsBase = [
|
||||
['echoVoid'],
|
||||
['echoString',
|
||||
['in', 'inputString', nil], ['retval', 'return', nil]],
|
||||
['echoStringArray',
|
||||
['in', 'inputStringArray', nil], ['retval', 'return', nil]],
|
||||
['echoInteger',
|
||||
['in', 'inputInteger', nil], ['retval', 'return', nil]],
|
||||
['echoIntegerArray',
|
||||
['in', 'inputIntegerArray', nil], ['retval', 'return', nil]],
|
||||
['echoFloat',
|
||||
['in', 'inputFloat', nil], ['retval', 'return', nil]],
|
||||
['echoFloatArray',
|
||||
['in', 'inputFloatArray', nil], ['retval', 'return', nil]],
|
||||
['echoStruct',
|
||||
['in', 'inputStruct', nil], ['retval', 'return', nil]],
|
||||
['echoStructArray',
|
||||
['in', 'inputStructArray', nil], ['retval', 'return', nil]],
|
||||
['echoDate',
|
||||
['in', 'inputDate', nil], ['retval', 'return', nil]],
|
||||
['echoBase64',
|
||||
['in', 'inputBase64', nil], ['retval', 'return', nil]],
|
||||
['echoHexBinary',
|
||||
['in', 'inputHexBinary', nil], ['retval', 'return', nil]],
|
||||
['echoBoolean',
|
||||
['in', 'inputBoolean', nil], ['retval', 'return', nil]],
|
||||
['echoDecimal',
|
||||
['in', 'inputDecimal', nil], ['retval', 'return', nil]],
|
||||
['echoMap',
|
||||
['in', 'inputMap', nil], ['retval', 'return', nil]],
|
||||
['echoMapArray',
|
||||
['in', 'inputMapArray', nil], ['retval', 'return', nil]],
|
||||
|
||||
['echoDouble',
|
||||
['in', 'inputDouble', nil], ['retval', 'return', nil]],
|
||||
['echoXSDDateTime',
|
||||
['in', 'inputXSDDateTime', nil], ['retval', 'return', nil]],
|
||||
['echoXSDDate',
|
||||
['in', 'inputXSDDate', nil], ['retval', 'return', nil]],
|
||||
['echoXSDTime',
|
||||
['in', 'inputXSDTime', nil], ['retval', 'return', nil]],
|
||||
]
|
||||
|
||||
MethodsGroupB = [
|
||||
['echoStructAsSimpleTypes',
|
||||
['in', 'inputStruct', nil], ['out', 'outputString', nil], ['out', 'outputInteger', nil], ['out', 'outputFloat', nil]],
|
||||
['echoSimpleTypesAsStruct',
|
||||
['in', 'inputString', nil], ['in', 'inputInteger', nil], ['in', 'inputFloat', nil], ['retval', 'return', nil]],
|
||||
['echo2DStringArray',
|
||||
['in', 'input2DStringArray', nil], ['retval', 'return', nil]],
|
||||
['echoNestedStruct',
|
||||
['in', 'inputStruct', nil], ['retval', 'return', nil]],
|
||||
['echoNestedArray',
|
||||
['in', 'inputStruct', nil], ['retval', 'return', nil]],
|
||||
]
|
||||
|
||||
MethodsPolyMorph = [
|
||||
['echoPolyMorph',
|
||||
['in', 'inputPolyMorph', nil], ['retval', 'return', nil]],
|
||||
['echoPolyMorphStruct',
|
||||
['in', 'inputPolyMorphStruct', nil], ['retval', 'return', nil]],
|
||||
['echoPolyMorphArray',
|
||||
['in', 'inputPolyMorphArray', nil], ['retval', 'return', nil]],
|
||||
]
|
||||
|
||||
|
||||
module FloatSupport
|
||||
def floatEquals( lhs, rhs )
|
||||
lhsVar = lhs.is_a?( SOAP::SOAPFloat )? lhs.data : lhs
|
||||
rhsVar = rhs.is_a?( SOAP::SOAPFloat )? rhs.data : rhs
|
||||
lhsVar == rhsVar
|
||||
end
|
||||
end
|
||||
|
||||
class SOAPStruct
|
||||
include SOAP::Marshallable
|
||||
include FloatSupport
|
||||
|
||||
attr_accessor :varInt, :varFloat, :varString
|
||||
|
||||
def initialize( varInt, varFloat, varString )
|
||||
@varInt = varInt
|
||||
@varFloat = varFloat ? SOAP::SOAPFloat.new( varFloat ) : nil
|
||||
@varString = varString
|
||||
end
|
||||
|
||||
def ==( rhs )
|
||||
r = if rhs.is_a?( self.class )
|
||||
( self.varInt == rhs.varInt &&
|
||||
floatEquals( self.varFloat, rhs.varFloat ) &&
|
||||
self.varString == rhs.varString )
|
||||
else
|
||||
false
|
||||
end
|
||||
r
|
||||
end
|
||||
|
||||
def to_s
|
||||
"#{ varInt }:#{ varFloat }:#{ varString }"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class SOAPStructStruct
|
||||
include SOAP::Marshallable
|
||||
include FloatSupport
|
||||
|
||||
attr_accessor :varInt, :varFloat, :varString, :varStruct
|
||||
|
||||
def initialize( varInt, varFloat, varString, varStruct = nil )
|
||||
@varInt = varInt
|
||||
@varFloat = varFloat ? SOAP::SOAPFloat.new( varFloat ) : nil
|
||||
@varString = varString
|
||||
@varStruct = varStruct
|
||||
end
|
||||
|
||||
def ==( rhs )
|
||||
r = if rhs.is_a?( self.class )
|
||||
( self.varInt == rhs.varInt &&
|
||||
floatEquals( self.varFloat, rhs.varFloat ) &&
|
||||
self.varString == rhs.varString &&
|
||||
self.varStruct == rhs.varStruct )
|
||||
else
|
||||
false
|
||||
end
|
||||
r
|
||||
end
|
||||
|
||||
def to_s
|
||||
"#{ varInt }:#{ varFloat }:#{ varString }:#{ varStruct }"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class PolyMorphStruct
|
||||
include SOAP::Marshallable
|
||||
|
||||
attr_reader :varA, :varB, :varC
|
||||
|
||||
def initialize( varA, varB, varC )
|
||||
@varA = varA
|
||||
@varB = varB
|
||||
@varC = varC
|
||||
end
|
||||
|
||||
def ==( rhs )
|
||||
r = if rhs.is_a?( self.class )
|
||||
( self.varA == rhs.varA &&
|
||||
self.varB == rhs.varB &&
|
||||
self.varC == rhs.varC )
|
||||
else
|
||||
false
|
||||
end
|
||||
r
|
||||
end
|
||||
|
||||
def to_s
|
||||
"#{ varA }:#{ varB }:#{ varC }"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class SOAPArrayStruct
|
||||
include SOAP::Marshallable
|
||||
include FloatSupport
|
||||
|
||||
attr_accessor :varInt, :varFloat, :varString, :varArray
|
||||
|
||||
def initialize( varInt, varFloat, varString, varArray = nil )
|
||||
@varInt = varInt
|
||||
@varFloat = varFloat ? SOAP::SOAPFloat.new( varFloat ) : nil
|
||||
@varString = varString
|
||||
@varArray = varArray
|
||||
end
|
||||
|
||||
def ==( rhs )
|
||||
r = if rhs.is_a?( self.class )
|
||||
( self.varInt == rhs.varInt &&
|
||||
floatEquals( self.varFloat, rhs.varFloat ) &&
|
||||
self.varString == rhs.varString &&
|
||||
self.varArray == rhs.varArray )
|
||||
else
|
||||
false
|
||||
end
|
||||
r
|
||||
end
|
||||
|
||||
def to_s
|
||||
"#{ varInt }:#{ varFloat }:#{ varString }:#{ varArray }"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class StringArray < Array; end
|
||||
class IntArray < Array; end
|
||||
class FloatArray < Array; end
|
||||
class SOAPStructArray < Array; end
|
||||
class SOAPMapArray < Array; end
|
||||
class ArrayOfanyType < Array; end
|
||||
|
||||
|
||||
MappingRegistry = SOAP::Mapping::Registry.new
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::SOAPStruct,
|
||||
::SOAP::SOAPStruct,
|
||||
::SOAP::Mapping::Registry::TypedStructFactory,
|
||||
{ :type => XSD::QName.new( TypeNS, "SOAPStruct" ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::SOAPStructStruct,
|
||||
::SOAP::SOAPStruct,
|
||||
::SOAP::Mapping::Registry::TypedStructFactory,
|
||||
{ :type => XSD::QName.new( TypeNS, "SOAPStructStruct" ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::PolyMorphStruct,
|
||||
::SOAP::SOAPStruct,
|
||||
::SOAP::Mapping::Registry::TypedStructFactory,
|
||||
{ :type => XSD::QName.new( TypeNS, "PolyMorphStruct" ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::SOAPArrayStruct,
|
||||
::SOAP::SOAPStruct,
|
||||
::SOAP::Mapping::Registry::TypedStructFactory,
|
||||
{ :type => XSD::QName.new( TypeNS, "SOAPArrayStruct" ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::StringArray,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new( XSD::Namespace, XSD::StringLiteral ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::IntArray,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new( XSD::Namespace, XSD::IntLiteral ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::FloatArray,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new( XSD::Namespace, XSD::FloatLiteral ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::SOAPStructArray,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new( TypeNS, 'SOAPStruct' ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::SOAPMapArray,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::QName.new( ApacheNS, 'Map' ) }
|
||||
)
|
||||
|
||||
MappingRegistry.set(
|
||||
::SOAPBuildersInterop::ArrayOfanyType,
|
||||
::SOAP::SOAPArray,
|
||||
::SOAP::Mapping::Registry::TypedArrayFactory,
|
||||
{ :type => XSD::AnyTypeName }
|
||||
)
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'dotNetRemotingWebServices'
|
||||
$serverBase = 'http://www.mssoapinterop.org/remoting/ServiceA.soap'
|
||||
$serverGroupB = 'http://www.mssoapinterop.org/remoting/ServiceB.soap'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
methodDefGroupB(drvGroupB)
|
||||
|
||||
doTestBase(drvBase)
|
||||
doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
File: client.log - Wiredumps for SOAP4R client / localhsot server.
|
||||
Date: Wed Jul 04 23:08:41 +0900 2007
|
||||
|
||||
==== test_echoMapArray_multibyte_char ========================================
|
||||
1234
vendor/gems/soap4r-1.5.8/test/interopR2/client.rb
vendored
1234
vendor/gems/soap4r-1.5.8/test/interopR2/client.rb
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = '4S4C'
|
||||
$server = 'http://soap.4s4c.com/ilab/soap.asp'
|
||||
$noEchoMap = true
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drv = SOAP::RPC::Driver.new($server, InterfaceNS)
|
||||
|
||||
methodDef(drv)
|
||||
|
||||
doTestBase(drv)
|
||||
doTestGroupB(drv)
|
||||
submitTestResult
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = '4S4C2'
|
||||
$server = 'http://soap.4s4c.com/ilab2/soap.asp'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drv = SOAP::RPC::Driver.new($server, InterfaceNS)
|
||||
|
||||
methodDef(drv)
|
||||
|
||||
doTestBase(drv)
|
||||
doTestGroupB(drv)
|
||||
submitTestResult
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'MSASPdotNETWebServices'
|
||||
$serverBase = 'http://www.mssoapinterop.org/asmx/simple.asmx'
|
||||
$serverGroupB = 'http://www.mssoapinterop.org/asmx/simpleB.asmx'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
methodDefGroupB(drvGroupB)
|
||||
|
||||
doTestBase(drvBase)
|
||||
doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'ApacheAxis'
|
||||
$server = 'http://nagoya.apache.org:5049/axis/services/echo'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($server, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
drvGroupB = SOAP::RPC::Driver.new($server, InterfaceNS)
|
||||
methodDefGroupB(drvGroupB)
|
||||
|
||||
doTestBase(drvBase)
|
||||
doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'ApacheSOAP2.2'
|
||||
$serverBase = 'http://nagoya.apache.org:5049/soap/servlet/rpcrouter'
|
||||
$serverGroupB = 'None'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
|
||||
methodDefBase( drvBase )
|
||||
|
||||
#drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
#methodDefGroupB( drvGroupB )
|
||||
|
||||
doTestBase( drvBase )
|
||||
#doTestGroupB( drvGroupB )
|
||||
submitTestResult
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'BEAWebLogic8.1'
|
||||
$serverBase = 'http://webservice.bea.com:7001/base/SoapInteropBaseService'
|
||||
$serverGroupB = 'http://webservice.bea.com:7001/groupb/SoapInteropGroupBService'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
methodDefGroupB(drvGroupB)
|
||||
|
||||
doTestBase(drvBase)
|
||||
doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
1967
vendor/gems/soap4r-1.5.8/test/interopR2/clientBase.rb
vendored
1967
vendor/gems/soap4r-1.5.8/test/interopR2/clientBase.rb
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'CapeConnect'
|
||||
|
||||
$server = 'http://interop.capeclear.com/ccx/soapbuilders-round2'
|
||||
$noEchoMap = true
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($server, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
#drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
#methodDefGroupB(drvGroupB)
|
||||
|
||||
doTestBase(drvBase)
|
||||
#doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'Delphi'
|
||||
|
||||
$serverBase = 'http://soap-server.borland.com/WebServices/Interop/cgi-bin/InteropService.exe/soap/InteropTestPortType'
|
||||
$serverGroupB = 'http://soap-server.borland.com/WebServices/Interop/cgi-bin/InteropGroupB.exe/soap/InteropTestPortTypeB'
|
||||
$noEchoMap = true
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
methodDefGroupB(drvGroupB)
|
||||
|
||||
doTestBase(drvBase)
|
||||
doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'EasySoap++'
|
||||
|
||||
$server = 'http://easysoap.sourceforge.net/cgi-bin/interopserver'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drv = SOAP::RPC::Driver.new($server, InterfaceNS)
|
||||
methodDef(drv)
|
||||
|
||||
doTestBase(drv)
|
||||
doTestGroupB(drv)
|
||||
submitTestResult
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$serverName = 'Frontier'
|
||||
|
||||
$serverBase = 'http://www.soapware.org/xmethodsInterop'
|
||||
|
||||
#$wsdlBase = 'http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/SOAP4R_SOAPBuildersInteropTest_R2base.wsdl'
|
||||
|
||||
require 'clientBase'
|
||||
|
||||
drvBase = SOAP::RPC::Driver.new($serverBase, InterfaceNS)
|
||||
methodDefBase(drvBase)
|
||||
|
||||
#drvGroupB = SOAP::RPC::Driver.new($serverGroupB, InterfaceNS)
|
||||
#methodDefGroupB(drvGroupB)
|
||||
|
||||
=begin
|
||||
require 'soap/wsdlDriver'
|
||||
drvBase = SOAP::WSDLDriverFactory.new($wsdlBase).create_rpc_driver
|
||||
drvBase.endpoint_url = $serverBase
|
||||
=end
|
||||
|
||||
doTestBase(drvBase)
|
||||
#doTestGroupB(drvGroupB)
|
||||
submitTestResult
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue