From: "NAKAMURA, Hiroshi" Date: 2005-11-26T22:28:58+09:00 Subject: Re: SOAP / EncodingStyle -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Fabien Penso wrote: > Note the encodingStyle specified in the n1 part of the XML, and not in > the nd part. The server gives me an error, and I beleive because of it. > The code currently looks like : I think the cause of the problem is that you are sending arrayType="{urn:eligibilite}int[]", not arrayType="{http://www.w3.org/2001/XMLSchema}:int[]". > 106 map = SOAP::Mapping::Registry.new > 107 map.set(IntArray, SOAP::SOAPArray, > 108 SOAP::Mapping::Registry::TypedArrayFactory, > 109 { :type => XSD::QName.new('urn:eligibilite', > 'int') }) It should be { :type => XSD::XSDInt::Type } here. 0% cat intarray.rb require 'soap/marshal' include SOAP::Mapping class IntArray < Array; end map = Registry.new map.set(IntArray, SOAP::SOAPArray, Registry::TypedArrayFactory, { :type => XSD::QName.new('urn:eligibilite', 'int') }) puts SOAP::Marshal.marshal(IntArray[1, 2, 3], map) puts map2 = Registry.new map2.set(IntArray, SOAP::SOAPArray, Registry::TypedArrayFactory, { :type => XSD::XSDInt::Type }) puts SOAP::Marshal.marshal(IntArray[1, 2, 3], map2) 0% ruby intarray.rb 1 2 3 1 2 3 Please tell me if it won't work. Regards, // NaHi -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) iD8DBQFDiGLnf6b33ts2dPkRAp+gAKCQ/Kz7f/t8jVOEqLW7qWKD+z9AUACffmtZ DlLKHg5mGYWFRj85g+dpp48= =G0EH -----END PGP SIGNATURE-----