Peter C. Tribble wrote:
> I'm looking at the JAX-RPC DII Call interface.
> (This is both in Sun's implementation and the Apache Axis implementation.)
>
> According to the JAX-RPC Specification, version 0.7, PD2, of Feb 1 2002,
> section 8.2.4, the Call interface has a method
>
> java.util.Map getOutputParams()
>
> the same method existed in Apache SOAP 2.2, and my code uses it heavily.
> Apache Axis has such a method too. In Apache SOAP 2.2 and early versions of
> Axis, the returned type was a Vector. Now it's made its way into the
> specification, the type has changed to a Map.
>
> The problem is that the contract for Map does not guarantee element ordering,
> so that it's not possible to get at the returned parameters in the order
> they were sent.
>
> This simply doesn't work - the order of the returned elements is important.
The method Map.values() is used to get a collection view of the
values contained in this Map. The iterator from this collection
view would provide the ordering (similar to a List) of output
elements. The implementation of Map used in Call has to account
for this ordering.
Regards,
Rahul
> I would like to see the specification modified so that getOutputParams() gives
> access to the returned parameters in the order they were sent. In other words,
> returning a Vector (or, more generally, a List) of parameters. (Or, some
> other mechanism to get at the returned parameters positionally.)
>
> -Peter Tribble
> HGMP Computing Services
> http://www.hgmp.mrc.ac.uk/~ptribble/