<html><head></head><body><div>Hi,</div><div>I have question regarding (un)marhsaling of 0-size array.</div><div>Specifications (v0.26) says:</div><div>"A <code class="literal">UINT32</code> giving the length of the array data in bytes, followed by
alignment padding to the alignment boundary of the array element type,
followed by each array element."</div><div><br></div><div>The question is: for 0-size array, is padding to the alignment boundary of the array element type required ?</div><div>It seems that there are some differences between implementations.</div><div><br></div><div>My use case:</div><div>* my erlang code is calling a function with signature: 'sa(ysv)ui' </div><div> D-Bus implementation is <a href="https://github.com/lizenn/erlang-dbus">https://github.com/lizenn/erlang-dbus</a></div><div>(marshaller: <a href="https://github.com/lizenn/erlang-dbus/blob/master/src/dbus_marshaller.erl">https://github.com/lizenn/erlang-dbus/blob/master/src/dbus_marshaller.erl</a> , includes unit test, in particular <a href="https://github.com/lizenn/erlang-dbus/blob/master/src/dbus_marshaller.erl">https://github.com/lizenn/erlang-dbus/blob/master/src/dbus_marshaller.erl</a>)</div><div>This DBus implementation pads 0-size array like any-size array.</div><div><br></div><div>* A Python implementation works fine: <a href="https://github.com/erocci/erocci_backend_dbus/blob/master/test/dbus_python_SUITE_data/erocci_sample_backend.py">https://github.com/erocci/erocci_backend_dbus/blob/master/test/dbus_python_SUITE_data/erocci_sample_backend.py</a></div><div><br></div><div>* With the same function implemented in Java, I get: "Error Executing Method org.ow2.erocci.backend.core.Collection: wrong number of arguments"</div><div>Java uses dbus-java implementation from freedesktop (2.7 or 2.8 have the same issue).</div><div>In debugging mode, I can see dbus-java do not get the latest argument (integer 32).</div><div><br></div><div>* The error "wrong number of arguments" appears only when the array input argument is empty.</div><div><br></div><div>I suspect the java dbus implementation to be wrong, as Python implementation works and my erlang-dbus implementation is tested for this precise case. </div><div>Plus, this strange changelog message in dbus-java 2.8:</div><div>"* Fix array serialization issues (maybe!)"</div><div><br></div><div>Can anyone tell me:</div><div>1/ what is the correct interpretation of the D-Bus spec</div><div>2/ is the dbus-java implementation has been tested for this case</div><div><br></div><div>Regards,</div><div><span><pre><pre>--
</pre>Jean Parpaillon
--
Open Source Consultant
Director @ OW2 Consortium
OCCIware Strategic Orientation Committee Chairman
Research Engineer @ Inria
--
Phone: +33 6 30 10 92 86
im: jean.parpaillon@gmail.com
skype: jean.parpaillon
linkedin: http://www.linkedin.com/in/jeanparpaillon/en</pre></span></div></body></html>