xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <gdani...@allaire.com>
Subject MapSerializer + VectorSerializer
Date Thu, 10 Aug 2000 20:22:07 GMT

Quite a while ago, there was discussion on the SOAP list at develop.com
about how to represent standard mapping types such as are found in Java,
Perl, Python, etc.  There was no firm consensus, but I liked the solution
which looked like this:

<thing xmlns:xmlsoap="http://xml.apache.org/xml-soap"
 <key xsi:type="xsd:string">Key 1</key>
 <value xsi:type="xsd:int">534</value>
 <key xsi:type="xsd:string">Key 2</key>
 <value xsi:type="xmlsoap:Map">
   <key xsi:type="xsd:string">Inner Key</key>
   <value xsi:type="xsd:string">inner value</value>

I have hence written a MapSerializer which gets mapped to Hashtable and Map
in SOAPEncodingRegistry, and serializes the mapping types just this way.
What do people think of this encoding (including the new 'standard' type
"xmlsoap:Map")?  If there are no objections, I'd like to commit the changes
tomorrow sometime.

On another related note, while I was implementing "required headers"
functionality (i.e. specify in the DeploymentDescriptor that a given service
must receive certain headers or fail with a SOAP.Client fault), I found
myself serializing and deserializing Vectors.  As it stands, the
VectorSerializer spits out a standard SOAP Array, which deserializes to an
Object[].  This isn't really so hot in the long run, because sometimes you
really want a Vector back so you don't have to manually do an
Object[]->Vector conversion.  So... I'd like to introduce an xmlsoap:Vector
type, and have the VectorSerializer switch to using that.  There could also
be an option to allow serializing to regular Arrays as well, for


Glen Daniels
Allaire Corp
Engineering Manager
                                Building cool stuff for web developers

View raw message