1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* added files:

* lib/soap/header/*
	  * lib/soap/rpc/httpserver.rb
	  * lib/wsdl/soap/cgiStubCreator.rb
	  * lib/wsdl/soap/classDefCreator.rb
	  * lib/wsdl/soap/classDefCreatorSupport.rb
	  * lib/wsdl/soap/clientSkeltonCreator.rb
	  * lib/wsdl/soap/driverCreator.rb
	  * lib/wsdl/soap/mappingRegistryCreator.rb
	  * lib/wsdl/soap/methodDefCreator.rb
	  * lib/wsdl/soap/servantSkeltonCreator.rb
	  * lib/wsdl/soap/standaloneServerStubCreator.rb
	  * lib/wsdl/xmlSchema/enumeration.rb
	  * lib/wsdl/xmlSchema/simpleRestriction.rb
	  * lib/wsdl/xmlSchema/simpleType.rb
	  * lib/xsd/codegen/*
	  * lib/xsd/codegen.rb
	  * sample/soap/authheader/*
	  * sample/soap/raa2.4/*
	  * sample/soap/ssl/*
	  * sample/soap/swa/*
	  * sample/soap/whois.rb
	  * sample/wsdl/raa2.4/*
	  * test/soap/header/*
	  * test/soap/ssl/*
	  * test/soap/struct/*
	  * test/soap/swa/*
	  * test/soap/wsdlDriver/*
	  * test/wsdl/multiplefault.wsdl
	  * test/wsdl/simpletype/*
	  * test/wsdl/test_multiplefault.rb

	* modified files:
	  * lib/soap/baseData.rb
	  * lib/soap/element.rb
	  * lib/soap/generator.rb
	  * lib/soap/netHttpClient.rb
	  * lib/soap/parser.rb
	  * lib/soap/property.rb
	  * lib/soap/soap.rb
	  * lib/soap/streamHandler.rb
	  * lib/soap/wsdlDriver.rb
	  * lib/soap/wsdlDriver.rb
	  * lib/soap/encodingstyle/handler.rb
	  * lib/soap/encodingstyle/literalHandler.rb
	  * lib/soap/encodingstyle/soapHandler.rb
	  * lib/soap/mapping/factory.rb
	  * lib/soap/mapping/mapping.rb
	  * lib/soap/mapping/registry.rb
	  * lib/soap/mapping/rubytypeFactory.rb
	  * lib/soap/mapping/wsdlRegistry.rb
	  * lib/soap/rpc/cgistub.rb
	  * lib/soap/rpc/driver.rb
	  * lib/soap/rpc/proxy.rb
	  * lib/soap/rpc/router.rb
	  * lib/soap/rpc/soaplet.rb
	  * lib/soap/rpc/standaloneServer.rb
	  * lib/wsdl/data.rb
	  * lib/wsdl/definitions.rb
	  * lib/wsdl/operation.rb
	  * lib/wsdl/parser.rb
	  * lib/wsdl/soap/definitions.rb
	  * lib/wsdl/xmlSchema/complexContent.rb
	  * lib/wsdl/xmlSchema/complexType.rb
	  * lib/wsdl/xmlSchema/data.rb
	  * lib/wsdl/xmlSchema/parser.rb
	  * lib/wsdl/xmlSchema/schema.rb
	  * lib/xsd/datatypes.rb
	  * lib/xsd/qname.rb
	  * sample/soap/sampleStruct/server.rb
	  * sample/wsdl/amazon/AmazonSearch.rb
	  * sample/wsdl/amazon/AmazonSearchDriver.rb
	  * test/soap/test_property.rb
	  * test/soap/calc/test_calc_cgi.rb
	  * test/wsdl/test_emptycomplextype.rb

	* summary
	  * add SOAP Header mustUnderstand support.

	  * add HTTP client SSL configuration and Cookies support (works
	    completely with http-access2).

	  * add header handler for handling sending/receiving SOAP Header.

	  * map Ruby's anonymous Struct to common SOAP Struct in SOAP Object
	    Model.  it caused error.

	  * add WSDL simpleType support to restrict lexical value space.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2004-07-03 13:33:20 +00:00
parent 0d6fa996d9
commit df731e37a1
116 changed files with 7270 additions and 2953 deletions

View file

@ -33,7 +33,7 @@ class SOAPHandler < Handler
attrs = encode_attrs(generator, ns, data, parent)
if parent && parent.is_a?(SOAPArray) && parent.position
attrs[ns.name(AttrPositionName)] = '[' << parent.position.join(',') << ']'
attrs[ns.name(AttrPositionName)] = "[#{ parent.position.join(',') }]"
end
name = nil
@ -207,16 +207,12 @@ class SOAPHandler < Handler
node.replace_node(newnode)
o = node.node
end
if o.is_a?(SOAPCompoundtype)
o.definedtype = nil
end
decode_textbuf(o)
@textbuf = ''
# unlink definedtype
o.definedtype = nil
end
def decode_text(ns, text)
# @textbuf is set at decode_tag_end.
@textbuf << text
end
@ -240,11 +236,9 @@ class SOAPHandler < Handler
end
parent.replace_node(newparent)
decode_parent(parent, node)
when SOAPStruct
parent.node.add(node.elename.name, node)
node.parent = parent.node
when SOAPArray
if node.position
parent.node[*(decode_arypos(node.position))] = node
@ -253,10 +247,8 @@ class SOAPHandler < Handler
parent.node.add(node)
end
node.parent = parent.node
when SOAPBasetype
raise EncodingStyleError.new("SOAP base type must not have a child.")
else
raise EncodingStyleError.new("Illegal parent: #{ parent.node }.")
end
@ -274,7 +266,7 @@ private
def create_arytype(ns, data)
XSD::QName.new(data.arytype.namespace,
content_typename(data.arytype.name) << '[' << data.size.join(',') << ']')
content_typename(data.arytype.name) + "[#{ data.size.join(',') }]")
end
def encode_attrs(generator, ns, data, parent)
@ -353,8 +345,7 @@ private
typename = ns.parse(typestr)
typedef = @decode_typemap[typename]
if typedef
return decode_defined_compoundtype(elename, typename, typedef,
arytypestr)
return decode_definedtype(elename, typename, typedef, arytypestr)
end
end
return decode_tag_by_type(ns, elename, typestr, parent, arytypestr,
@ -376,21 +367,42 @@ private
definedtype_name = parenttype.child_type(elename)
if definedtype_name and (klass = TypeMap[definedtype_name])
return klass.decode(elename)
return decode_basetype(klass, elename)
elsif definedtype_name == XSD::AnyTypeName
return decode_tag_by_type(ns, elename, typestr, parent, arytypestr,
extraattr)
end
typedef = definedtype_name ? @decode_typemap[definedtype_name] :
parenttype.child_defined_complextype(elename)
decode_defined_compoundtype(elename, definedtype_name, typedef, arytypestr)
if definedtype_name
typedef = @decode_typemap[definedtype_name]
else
typedef = parenttype.child_defined_complextype(elename)
end
decode_definedtype(elename, definedtype_name, typedef, arytypestr)
end
def decode_defined_compoundtype(elename, typename, typedef, arytypestr)
def decode_definedtype(elename, typename, typedef, arytypestr)
unless typedef
raise EncodingStyleError.new("Unknown type '#{ typename }'.")
end
if typedef.is_a?(::WSDL::XMLSchema::SimpleType)
decode_defined_simpletype(elename, typename, typedef, arytypestr)
else
decode_defined_complextype(elename, typename, typedef, arytypestr)
end
end
def decode_basetype(klass, elename)
klass.decode(elename)
end
def decode_defined_simpletype(elename, typename, typedef, arytypestr)
o = decode_basetype(TypeMap[typedef.base], elename)
o.definedtype = typedef
o
end
def decode_defined_complextype(elename, typename, typedef, arytypestr)
case typedef.compoundtype
when :TYPE_STRUCT
o = SOAPStruct.decode(elename, typename)
@ -410,7 +422,7 @@ private
o.definedtype = typedef
return o
end
return nil
nil
end
def decode_tag_by_type(ns, elename, typestr, parent, arytypestr, extraattr)
@ -435,7 +447,7 @@ private
end
if (klass = TypeMap[type])
node = klass.decode(elename)
node = decode_basetype(klass, elename)
node.extraattr.update(extraattr)
return node
end
@ -450,10 +462,12 @@ private
node.set_encoded(@textbuf)
when XSD::XSDString
if @charset
node.set(XSD::Charset.encoding_from_xml(@textbuf, @charset))
else
node.set(@textbuf)
@textbuf = XSD::Charset.encoding_from_xml(@textbuf, @charset)
end
if node.definedtype
node.definedtype.check_lexical_format(@textbuf)
end
node.set(@textbuf)
when SOAPNil
# Nothing to do.
when SOAPBasetype
@ -461,6 +475,7 @@ private
else
# Nothing to do...
end
@textbuf = ''
end
NilLiteralMap = {