Changes of soap4r module in ruby-1.8.2
From ruby-1.8.1.
Note
soap/wsdlDriver in ruby-1.8.2 accidentally contains an incompatible change from ruby-1.8.1. Please apply this patch: http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/lib/soap/wsdlDriver.rb.diff?r1=1.5.2.4;r2=1.5.2.5;only_with_tag=ruby_1_8 or, download the updated soap/wsdlDriver to replace one in ruby-1.8.2: http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/lib/soap/wsdlDriver.rb?rev=1.5.2.5;only_with_tag=ruby_1_8 Especially, WSDLDriver created from WSDL for Amazon Web Service is affected by this bug. I'm very sorry for the inconvenience.
SOAP client and server
for both client side and server side
- added a header handler class for simple SOAPHeader handling. see samples in sample/soap/authheader/*.
- SSL support (both client side and server side). check sample/soap/ssl/*
- gzipped content encoding support. see sample/soap/helloworld/hw_{c,s}_gzip.rb.
client side
- HTTP-Cookies support under soap4r + http-access2. not supported under soap4r + net/http.
- added a method (SOAP::RPC::Driver#test_loopback_response) for loopback test with the specified response.
- added SOAP::RPC::Driver#loadproperty interface to load property file.
- let SOAP::RPC::Driver#add_method returns Method object. you can invoke a service like; drv.add_method("hello").call("world")
- added http options to get/set timeout seconds.
- for http-access2:
- driver.optionsprotocol.http.connect_timeout?
- driver.optionsprotocol.http.send_timeout?
- driver.optionsprotocol.http.receive_timeout?
- for net/http:
- driver.optionsprotocol.http.connect_timeout?
- driver.optionsprotocol.http.receive_timeout?
- for http-access2:
- raise NotImplementedError? when net/http + basic_auth.
server side
- introduced the new server class SOAP::RPC::HTTPServer which takes WEBrick's HTTPServer compatible config parameter.
- added a debug log of SOAP request/response.
SOAP core part
- added XMLSchema derived type support; byte, nonPositiveInteger, negativeInteger, nonNegativeInteger, positiveInteger, unsignedLong, unsignedInt, unsignedShort, unsignedByte.
- 'eval' cleanup. I hope it allows soap4r to work under mod_ruby environment.
- SOAPProperty raise RuntimeError? under ruby-1.9 when accessing locked property. still raises TypeError? under ruby-1.8 or earlier. the change is from ruby's behaviour change about an exception when accessing a frozen object.
- make SOAPHeader a child of SOAPStruct, not SOAPArray.
- SOAPProperty does not eval whole string. \\, \t, \r, \n, \f escaping chars are supported like Java's Properties.
- URI object was not mapped correctly so that URI object was not interoperable under some situation. fixed.
- SOAP::Mapping::Object: handle multiple value as an array.
<foo> <bar>1</bar> <bar>2</bar> <bar>3</bar> <baz>4</baz> </foo> -> foo.bar => [1, 2, 3] foo.baz => 4
- raise an exception while dumping singleton class. [ruby-dev:22588]
e.g. c = class << Object.new class C; self; end end SOAPMarshal.dump(c)
WSDL
WSDL definition
- added <xsd:simpleContent> support.
- initial (means "far from complete") simpleType support.
- support parts attribute of soap:body element.
- xmlSchema's 'any' element support; for parsing, just treat the element as an element which has a name 'any'.
- add mustUnderstand attribute support.
- a special well-known type: ApacheMap? support.
code generation from WSDL
NOTE: You need to download wsdl2ruby.rb and xsd2ruby.rb from http://rrr.jin.gr.jp/projects/soap4r/browser/trunk/bin/ to utilize features in this section. soap4r module in ruby distribution does not contain these "application". (Matz said that it should not contain any "application")
- added simple code generation utils (lib/xsd/codegen)
- dump attribute definition in XMLSchema as 'attr_*' attribute. [experimental]
- wsdl2ruby.rb: add document/literal service support. see sample/wsdl/documentliteral/*
- untyped element should be treated as xsd:anyType.
- added a tool xsd2ruby.rb for generating classdef from xsd file.
Samples
- added RAA/2.4 sample client
- added sample for Application/Request scope use. Session scope (with Cookies) feature is not yet exists.