------=_NextPart_000_02D8_01C3DE1A.BD1C4B90
Content-Type: text/plain;
charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Hi,
From: "Ian Macdonald" <
[email protected]>
Sent: Sunday, January 18, 2004 4:14 AM
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
------=_NextPart_000_02D8_01C3DE1A.BD1C4B90
Content-Type: text/plain;
name="parts.diff.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="parts.diff.txt"
Index: lib/soap/wsdlDriver.rb=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /src/ruby/lib/soap/wsdlDriver.rb,v=0A=
retrieving revision 1.6=0A=
diff -u -2 -p -r1.6 wsdlDriver.rb=0A=
--- lib/soap/wsdlDriver.rb 6 Jan 2004 02:20:50 -0000 1.6=0A=
+++ lib/soap/wsdlDriver.rb 18 Jan 2004 10:59:46 -0000=0A=
@@ -207,9 +207,5 @@ class WSDLDriver=0A=
=0A=
op_info =3D @operations[method_name]=0A=
- parts_names =3D op_info.bodyparts.collect { |part| part.name }=0A=
- obj =3D create_method_obj(parts_names, params)=0A=
- method =3D Mapping.obj2soap(obj, @wsdl_mapping_registry, =
op_info.optype_name)=0A=
- method.elename =3D op_info.op_name=0A=
- method.type =3D XSD::QName.new # Request should not be typed.=0A=
+ method =3D create_method_struct(op_info, params)=0A=
req_header =3D nil=0A=
req_body =3D SOAPBody.new(method)=0A=
@@ -264,4 +260,22 @@ class WSDLDriver=0A=
=0A=
private=0A=
+=0A=
+ def create_method_struct(op_info, params)=0A=
+ parts_names =3D op_info.bodyparts.collect { |part| part.name }=0A=
+ obj =3D create_method_obj(parts_names, params)=0A=
+ method =3D Mapping.obj2soap(obj, @wsdl_mapping_registry, =
op_info.optype_name)=0A=
+ if method.members.size !=3D parts_names.size=0A=
+ new_method =3D SOAPStruct.new=0A=
+ method.each do |key, value|=0A=
+ if parts_names.include?(key)=0A=
+ new_method.add(key, value)=0A=
+ end=0A=
+ end=0A=
+ method =3D new_method=0A=
+ end=0A=
+ method.elename =3D op_info.op_name=0A=
+ method.type =3D XSD::QName.new # Request should not be typed.=0A=
+ method=0A=
+ end=0A=
=0A=
def create_method_obj(names, params)=0A=
Index: lib/wsdl/soap/operation.rb=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /src/ruby/lib/wsdl/soap/operation.rb,v=0A=
retrieving revision 1.2=0A=
diff -u -2 -p -r1.2 operation.rb=0A=
--- lib/wsdl/soap/operation.rb 25 Nov 2003 07:31:30 -0000 1.2=0A=
+++ lib/wsdl/soap/operation.rb 18 Jan 2004 10:59:46 -0000=0A=
@@ -105,5 +105,8 @@ private=0A=
end=0A=
if soapbody.parts=0A=
- raise NotImplementedError.new("soap:body parts")=0A=
+ target =3D soapbody.parts.split(/\s+/)=0A=
+ bodyparts =3D name_info.parts.find_all { |part|=0A=
+ target.include?(part.name)=0A=
+ }=0A=
else=0A=
bodyparts =3D name_info.parts=0A=
Index: lib/wsdl/xmlSchema/schema.rb=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /src/ruby/lib/wsdl/xmlSchema/schema.rb,v=0A=
retrieving revision 1.2=0A=
diff -u -2 -p -r1.2 schema.rb=0A=
--- lib/wsdl/xmlSchema/schema.rb 25 Nov 2003 07:31:31 -0000 1.2=0A=
+++ lib/wsdl/xmlSchema/schema.rb 18 Jan 2004 10:59:46 -0000=0A=
@@ -44,4 +44,7 @@ class Schema < Info=0A=
@complextypes << o=0A=
o=0A=
+ when SimpleTypeName=0A=
+ STDERR.puts("Restriction of basetype with simpleType definition =
is ignored for now.")=0A=
+ nil=0A=
when ElementName=0A=
o =3D Element.new=0A=
------=_NextPart_000_02D8_01C3DE1A.BD1C4B90--