* lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license; GPL2 -> Ruby's.
* lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb, lib/soap/streamHandler.rb: add interface to streamhandler.
* lib/soap/marshal.rb: raise error if parse fails.
* lib/soap/netHttpClient.rb: add https support. Patched by Oliver M. Bolzer.
* lib/soap/netHttpClient.rb: dump HTTP response message body by itself.
* lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb, lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce using charset for parsing response from buggy server.
* lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half typed multi-ref array.
* lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map SOAPStruct which has multi-accessors which name are the same, to an array.
* lib/soap/rpc/element.rb: fixed illegal parameter order.
* lib/soap/rpc/element.rb: element name of response message could have the name other than 'return'.
* lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb, lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb, lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural fault definition in a operation. [ruby-talk:84948]
* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add test for above fix.
* lib/wsdl/soap/complexType.rb: support WSDL array definition with maxOccures="unbound".
* lib/xsd/charset.rb: use cp932 under emx. Patched by Siena. / SHINAGAWA, Norihide in [ruby-dev:21972]
* lib/xsd/xmlparser/parser.rb: set @charset nil by default. Nil means 'follow encoding declaration in XML'.
* sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb, sample/wsdl/googleSearch/sampleClient.rb, sample/wsdl/googleSearch/wsdlDriver.rb, test/wsdl/test_emptycomplextype.rb, test/wsdl/marshal/test_wsdlmarshal.rb, test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read } instead of File.open(...).read. [ruby-dev:21964]
* test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb: simplify the test case.
* test/wsdl/axisArray/*: add tests for axis's array encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 02:31:33 -05:00
|
|
|
# SOAP4R - RPC element definition.
|
|
|
|
# Copyright (C) 2000, 2001, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
|
2003-09-24 11:18:44 -04:00
|
|
|
|
* lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license; GPL2 -> Ruby's.
* lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb, lib/soap/streamHandler.rb: add interface to streamhandler.
* lib/soap/marshal.rb: raise error if parse fails.
* lib/soap/netHttpClient.rb: add https support. Patched by Oliver M. Bolzer.
* lib/soap/netHttpClient.rb: dump HTTP response message body by itself.
* lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb, lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce using charset for parsing response from buggy server.
* lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half typed multi-ref array.
* lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map SOAPStruct which has multi-accessors which name are the same, to an array.
* lib/soap/rpc/element.rb: fixed illegal parameter order.
* lib/soap/rpc/element.rb: element name of response message could have the name other than 'return'.
* lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb, lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb, lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural fault definition in a operation. [ruby-talk:84948]
* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add test for above fix.
* lib/wsdl/soap/complexType.rb: support WSDL array definition with maxOccures="unbound".
* lib/xsd/charset.rb: use cp932 under emx. Patched by Siena. / SHINAGAWA, Norihide in [ruby-dev:21972]
* lib/xsd/xmlparser/parser.rb: set @charset nil by default. Nil means 'follow encoding declaration in XML'.
* sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb, sample/wsdl/googleSearch/sampleClient.rb, sample/wsdl/googleSearch/wsdlDriver.rb, test/wsdl/test_emptycomplextype.rb, test/wsdl/marshal/test_wsdlmarshal.rb, test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read } instead of File.open(...).read. [ruby-dev:21964]
* test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb: simplify the test case.
* test/wsdl/axisArray/*: add tests for axis's array encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 02:31:33 -05:00
|
|
|
# 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.
|
2003-09-24 11:18:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
require 'soap/baseData'
|
|
|
|
|
|
|
|
|
|
|
|
module SOAP
|
|
|
|
|
|
|
|
# Add method definitions for RPC to common definition in element.rb
|
|
|
|
class SOAPBody < SOAPStruct
|
|
|
|
public
|
|
|
|
|
|
|
|
def request
|
|
|
|
root_node
|
|
|
|
end
|
|
|
|
|
|
|
|
def response
|
|
|
|
if !@is_fault
|
|
|
|
if void?
|
|
|
|
nil
|
|
|
|
else
|
|
|
|
# Initial element is [retval].
|
|
|
|
root_node[0]
|
|
|
|
end
|
|
|
|
else
|
|
|
|
root_node
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def outparams
|
|
|
|
if !@is_fault and !void?
|
|
|
|
op = root_node[1..-1]
|
|
|
|
op = nil if op && op.empty?
|
|
|
|
op
|
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def void?
|
* import soap4r/1.5.2;
* lib/soap/{attachment.rb,baseData.rb,encodingstyle/soapHandler.rb}:
introduce SOAPExternalReference class as a referenct to SOAPEnvelope
external content.
* lib/soap/{attachment.rb,mimemessage.rb}: great SwA (SOAP messages
with Attachments) support code by Jamie Herre.
* lib/soap/{element.rb,marshal.rb,parser.rb,processor.rb,
streamHandler.rb,wsdlDriver.rb}: SwA support.
* lib/soap/rpc/{cgistub.rb,driver.rb,element.rb,proxy.rb,router.rb,
soaplet.rb}: SwA support and refactoring.
* lib/soap/generator.rb, lib/soap/mapping/mapping.rb: follow
SOAPReference#initialize signature change.
* lib/soap/mapping/factory.rb: deleted unused methods.
* lib/soap/mapping/rubytypeFactory.rb: do no ignore case while xsi:type
string <-> Ruby class name matching.
* lib/xsd/datatypes.rb: check the smallest positive non-zero
single-precision float exactly instead of packing with "f".
[ruby-talk:88822]
* test/soap/test_basetype.rb, test/xsd/test_xsd.rb: use 1.402e-45, not
1.4e-45. 1.4e-45 is smaller than 2 ** -149...
* test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb,
test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0".
* test/soap/test_streamhandler.rb: revert to the previous test that
warns "basic_auth unsupported under net/http".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-05 21:20:51 -05:00
|
|
|
root_node.nil?
|
2003-09-24 11:18:44 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def fault
|
|
|
|
if @is_fault
|
|
|
|
self['fault']
|
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def fault=(fault)
|
|
|
|
@is_fault = true
|
|
|
|
add_member('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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
init_param(@param_def) if @param_def
|
|
|
|
end
|
|
|
|
|
|
|
|
def have_outparam?
|
|
|
|
@outparam_names.size > 0
|
|
|
|
end
|
|
|
|
|
|
|
|
def each_param_name(*type)
|
|
|
|
@signature.each do |io_type, name, param_type|
|
|
|
|
if type.include?(io_type)
|
|
|
|
yield(name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def set_param(params)
|
|
|
|
params.each do |param, data|
|
|
|
|
@inparam[param] = data
|
|
|
|
data.elename.name = param
|
* import soap4r/1.5.2;
* lib/soap/{attachment.rb,baseData.rb,encodingstyle/soapHandler.rb}:
introduce SOAPExternalReference class as a referenct to SOAPEnvelope
external content.
* lib/soap/{attachment.rb,mimemessage.rb}: great SwA (SOAP messages
with Attachments) support code by Jamie Herre.
* lib/soap/{element.rb,marshal.rb,parser.rb,processor.rb,
streamHandler.rb,wsdlDriver.rb}: SwA support.
* lib/soap/rpc/{cgistub.rb,driver.rb,element.rb,proxy.rb,router.rb,
soaplet.rb}: SwA support and refactoring.
* lib/soap/generator.rb, lib/soap/mapping/mapping.rb: follow
SOAPReference#initialize signature change.
* lib/soap/mapping/factory.rb: deleted unused methods.
* lib/soap/mapping/rubytypeFactory.rb: do no ignore case while xsi:type
string <-> Ruby class name matching.
* lib/xsd/datatypes.rb: check the smallest positive non-zero
single-precision float exactly instead of packing with "f".
[ruby-talk:88822]
* test/soap/test_basetype.rb, test/xsd/test_xsd.rb: use 1.402e-45, not
1.4e-45. 1.4e-45 is smaller than 2 ** -149...
* test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb,
test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0".
* test/soap/test_streamhandler.rb: revert to the previous test that
warns "basic_auth unsupported under net/http".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-05 21:20:51 -05:00
|
|
|
data.parent = self
|
2003-09-24 11:18:44 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def set_outparam(params)
|
|
|
|
params.each do |param, data|
|
|
|
|
@outparam[param] = data
|
|
|
|
data.elename.name = param
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def SOAPMethod.create_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
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def init_param(param_def)
|
|
|
|
param_def.each do |io_type, name, param_type|
|
|
|
|
case io_type
|
|
|
|
when IN
|
|
|
|
@signature.push([IN, name, param_type])
|
|
|
|
@inparam_names.push(name)
|
|
|
|
when OUT
|
|
|
|
@signature.push([OUT, name, param_type])
|
|
|
|
@outparam_names.push(name)
|
|
|
|
when INOUT
|
|
|
|
@signature.push([INOUT, name, param_type])
|
|
|
|
@inoutparam_names.push(name)
|
|
|
|
when RETVAL
|
|
|
|
if (@retval_name)
|
|
|
|
raise MethodDefinitionError.new('Duplicated retval')
|
|
|
|
end
|
|
|
|
@retval_name = name
|
|
|
|
else
|
|
|
|
raise MethodDefinitionError.new("Unknown type: #{ io_type }")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
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
|
* lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license; GPL2 -> Ruby's.
* lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb, lib/soap/streamHandler.rb: add interface to streamhandler.
* lib/soap/marshal.rb: raise error if parse fails.
* lib/soap/netHttpClient.rb: add https support. Patched by Oliver M. Bolzer.
* lib/soap/netHttpClient.rb: dump HTTP response message body by itself.
* lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb, lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce using charset for parsing response from buggy server.
* lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half typed multi-ref array.
* lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map SOAPStruct which has multi-accessors which name are the same, to an array.
* lib/soap/rpc/element.rb: fixed illegal parameter order.
* lib/soap/rpc/element.rb: element name of response message could have the name other than 'return'.
* lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb, lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb, lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural fault definition in a operation. [ruby-talk:84948]
* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add test for above fix.
* lib/wsdl/soap/complexType.rb: support WSDL array definition with maxOccures="unbound".
* lib/xsd/charset.rb: use cp932 under emx. Patched by Siena. / SHINAGAWA, Norihide in [ruby-dev:21972]
* lib/xsd/xmlparser/parser.rb: set @charset nil by default. Nil means 'follow encoding declaration in XML'.
* sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb, sample/wsdl/googleSearch/sampleClient.rb, sample/wsdl/googleSearch/wsdlDriver.rb, test/wsdl/test_emptycomplextype.rb, test/wsdl/marshal/test_wsdlmarshal.rb, test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read } instead of File.open(...).read. [ruby-dev:21964]
* test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb: simplify the test case.
* test/wsdl/axisArray/*: add tests for axis's array encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 02:31:33 -05:00
|
|
|
param_def << [IN, param_name, nil]
|
2003-09-24 11:18:44 -04:00
|
|
|
param_value << [param_name, param]
|
|
|
|
end
|
* lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license; GPL2 -> Ruby's.
* lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb, lib/soap/streamHandler.rb: add interface to streamhandler.
* lib/soap/marshal.rb: raise error if parse fails.
* lib/soap/netHttpClient.rb: add https support. Patched by Oliver M. Bolzer.
* lib/soap/netHttpClient.rb: dump HTTP response message body by itself.
* lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb, lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce using charset for parsing response from buggy server.
* lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half typed multi-ref array.
* lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map SOAPStruct which has multi-accessors which name are the same, to an array.
* lib/soap/rpc/element.rb: fixed illegal parameter order.
* lib/soap/rpc/element.rb: element name of response message could have the name other than 'return'.
* lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb, lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb, lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural fault definition in a operation. [ruby-talk:84948]
* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add test for above fix.
* lib/wsdl/soap/complexType.rb: support WSDL array definition with maxOccures="unbound".
* lib/xsd/charset.rb: use cp932 under emx. Patched by Siena. / SHINAGAWA, Norihide in [ruby-dev:21972]
* lib/xsd/xmlparser/parser.rb: set @charset nil by default. Nil means 'follow encoding declaration in XML'.
* sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb, sample/wsdl/googleSearch/sampleClient.rb, sample/wsdl/googleSearch/wsdlDriver.rb, test/wsdl/test_emptycomplextype.rb, test/wsdl/marshal/test_wsdlmarshal.rb, test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read } instead of File.open(...).read. [ruby-dev:21964]
* test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb: simplify the test case.
* test/wsdl/axisArray/*: add tests for axis's array encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 02:31:33 -05:00
|
|
|
param_def << [RETVAL, 'return', nil]
|
2003-09-24 11:18:44 -04:00
|
|
|
o = new(qname, param_def)
|
|
|
|
o.set_param(param_value)
|
|
|
|
o
|
|
|
|
end
|
|
|
|
|
|
|
|
def initialize(qname, param_def = nil, soapaction = nil)
|
|
|
|
check_elename(qname)
|
|
|
|
super(qname, param_def)
|
|
|
|
@soapaction = soapaction
|
|
|
|
end
|
|
|
|
|
|
|
|
def each
|
|
|
|
each_param_name(IN, INOUT) 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
|
|
|
|
SOAPMethodResponse.new(
|
|
|
|
XSD::QName.new(@elename.namespace, @elename.name + 'Response'),
|
|
|
|
@param_def)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def check_elename(qname)
|
|
|
|
# NCName & ruby's method name
|
|
|
|
unless /\A[\w_][\w\d_\-]*\z/ =~ qname.name
|
|
|
|
raise MethodDefinitionError.new("Element name '#{qname.name}' not allowed")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
class SOAPMethodResponse < SOAPMethod
|
|
|
|
|
|
|
|
def initialize(qname, param_def = nil)
|
|
|
|
super(qname, param_def)
|
|
|
|
@retval = nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def retval=(retval)
|
|
|
|
@retval = retval
|
* lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license; GPL2 -> Ruby's.
* lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb, lib/soap/streamHandler.rb: add interface to streamhandler.
* lib/soap/marshal.rb: raise error if parse fails.
* lib/soap/netHttpClient.rb: add https support. Patched by Oliver M. Bolzer.
* lib/soap/netHttpClient.rb: dump HTTP response message body by itself.
* lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb, lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce using charset for parsing response from buggy server.
* lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half typed multi-ref array.
* lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map SOAPStruct which has multi-accessors which name are the same, to an array.
* lib/soap/rpc/element.rb: fixed illegal parameter order.
* lib/soap/rpc/element.rb: element name of response message could have the name other than 'return'.
* lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb, lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb, lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural fault definition in a operation. [ruby-talk:84948]
* test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add test for above fix.
* lib/wsdl/soap/complexType.rb: support WSDL array definition with maxOccures="unbound".
* lib/xsd/charset.rb: use cp932 under emx. Patched by Siena. / SHINAGAWA, Norihide in [ruby-dev:21972]
* lib/xsd/xmlparser/parser.rb: set @charset nil by default. Nil means 'follow encoding declaration in XML'.
* sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb, sample/wsdl/googleSearch/sampleClient.rb, sample/wsdl/googleSearch/wsdlDriver.rb, test/wsdl/test_emptycomplextype.rb, test/wsdl/marshal/test_wsdlmarshal.rb, test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read } instead of File.open(...).read. [ruby-dev:21964]
* test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb: simplify the test case.
* test/wsdl/axisArray/*: add tests for axis's array encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 02:31:33 -05:00
|
|
|
@retval.elename = @retval.elename.dup_name(@retval_name || 'return')
|
* import soap4r/1.5.2;
* lib/soap/{attachment.rb,baseData.rb,encodingstyle/soapHandler.rb}:
introduce SOAPExternalReference class as a referenct to SOAPEnvelope
external content.
* lib/soap/{attachment.rb,mimemessage.rb}: great SwA (SOAP messages
with Attachments) support code by Jamie Herre.
* lib/soap/{element.rb,marshal.rb,parser.rb,processor.rb,
streamHandler.rb,wsdlDriver.rb}: SwA support.
* lib/soap/rpc/{cgistub.rb,driver.rb,element.rb,proxy.rb,router.rb,
soaplet.rb}: SwA support and refactoring.
* lib/soap/generator.rb, lib/soap/mapping/mapping.rb: follow
SOAPReference#initialize signature change.
* lib/soap/mapping/factory.rb: deleted unused methods.
* lib/soap/mapping/rubytypeFactory.rb: do no ignore case while xsi:type
string <-> Ruby class name matching.
* lib/xsd/datatypes.rb: check the smallest positive non-zero
single-precision float exactly instead of packing with "f".
[ruby-talk:88822]
* test/soap/test_basetype.rb, test/xsd/test_xsd.rb: use 1.402e-45, not
1.4e-45. 1.4e-45 is smaller than 2 ** -149...
* test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb,
test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0".
* test/soap/test_streamhandler.rb: revert to the previous test that
warns "basic_auth unsupported under net/http".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-05 21:20:51 -05:00
|
|
|
retval.parent = self
|
|
|
|
retval
|
2003-09-24 11:18:44 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def each
|
|
|
|
if @retval_name and !@retval.is_a?(SOAPVoid)
|
|
|
|
yield(@retval_name, @retval)
|
|
|
|
end
|
|
|
|
|
|
|
|
each_param_name(OUT, INOUT) do |param_name|
|
|
|
|
unless @outparam[param_name]
|
|
|
|
raise ParameterError.new("Parameter: #{ param_name } was not given.")
|
|
|
|
end
|
|
|
|
yield(param_name, @outparam[param_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
|