------ extPart_000_02D8_01C3DE1A.BD1C4B90 Content-Type: text/plain; charset SO-8859-1" Content-Transfer-Encoding: 7bit Hi, > From: "Ian Macdonald" <ian / caliban.org> > Sent: Sunday, January 18, 2004 4:14 AM > > Can I see the WSDL? > > I've sent it to you privately, as it's too big for the mailing list. Thanks. I implemented this feature. I've commited the change. Main trunk (1.9) of the CVS of ruby and the CVS of soap4r are updated. Attached patch should be able to applied to ruby_1_8 branch of the CVS of ruby and released 1.8.1. By the way, the WSDL you sent includes soap:header definition for session management. Soap4r now only offers very low level API for SOAP header handling. The developing code of high level API for easy use is in the CVS of soap4r (not in the CVS of ruby). I'll be able to post a sample usage of this API within this week. Regards, // NaHi ------ extPart_000_02D8_01C3DE1A.BD1C4B90 Content-Type: text/plain; name arts.diff.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename arts.diff.txt" Index: lib/soap/wsdlDriver.rb =================================================================== RCS file: /src/ruby/lib/soap/wsdlDriver.rb,v retrieving revision 1.6 diff -u -2 -p -r1.6 wsdlDriver.rb --- lib/soap/wsdlDriver.rb 6 Jan 2004 02:20:50 -0000 1.6 +++ lib/soap/wsdlDriver.rb 18 Jan 2004 10:59:46 -0000 @@ -207,9 +207,5 @@ class WSDLDriver 0Ap_info = @operations[method_name] - 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.optype_name) - method.elename = op_info.op_name - method.type = XSD::QName.new # Request should not be typed. + method = create_method_struct(op_info, params) eq_header = nil eq_body = SOAPBody.new(method) @@ -264,4 +260,22 @@ class WSDLDriver 0Arivate + + 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.optype_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 0Aef create_method_obj(names, params) Index: lib/wsdl/soap/operation.rb =================================================================== RCS file: /src/ruby/lib/wsdl/soap/operation.rb,v retrieving revision 1.2 diff -u -2 -p -r1.2 operation.rb --- lib/wsdl/soap/operation.rb 25 Nov 2003 07:31:30 -0000 1.2 +++ lib/wsdl/soap/operation.rb 18 Jan 2004 10:59:46 -0000 @@ -105,5 +105,8 @@ private nd f soapbody.parts - raise NotImplementedError.new("soap:body parts") + target = soapbody.parts.split(/\s+/) + bodyparts = name_info.parts.find_all { |part| + target.include?(part.name) + } lse odyparts = name_info.parts Index: lib/wsdl/xmlSchema/schema.rb =================================================================== RCS file: /src/ruby/lib/wsdl/xmlSchema/schema.rb,v retrieving revision 1.2 diff -u -2 -p -r1.2 schema.rb --- lib/wsdl/xmlSchema/schema.rb 25 Nov 2003 07:31:31 -0000 1.2 +++ lib/wsdl/xmlSchema/schema.rb 18 Jan 2004 10:59:46 -0000 @@ -44,4 +44,7 @@ class Schema < Info complextypes << o + when SimpleTypeName + STDERR.puts("Restriction of basetype with simpleType definition is ignored for now.") + nil hen ElementName 3D Element.new ----- extPart_000_02D8_01C3DE1A.BD1C4B90--