axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <>
Subject Heads up - WSDL generation changes
Date Fri, 01 Feb 2002 15:10:49 GMT

Hi folks:

Currently when we have a service which uses HashMaps, like the interop echo tests, the WSDL
that gets generated looks like this:

 <schema targetNamespace="" xmlns="">
  <complexType name="Map">
    <extension base="tns3:AbstractMap">
     <all /> 
  <element name="Map" nillable="true" type="tns2:Map" /> 
 <schema targetNamespace="" xmlns="">
  <complexType name="AbstractMap">
   <all /> 

Obviously this isn't too useful.  It should look something like this:

 <schema targetNamespace="" xmlns="">
  <complexType name="Map">
    <element name="item" minOccurs="0" maxOccurs="unbounded">
       <element name="key" type="xsd:anyType"/>
       <element name="value" type="xsd:anyType"/>

This is one case where we use a non "standard" mapping between a Java concept and a Schema
concept.  There will be others as well, and we want to support them.

So I'm working on an architectural change to deal with this by having the Serializer for a
given class be the responsible party in generating a schema fragment which represents the
XML encoding which that Serializer produces.  Then the WSDL generation subsytem simply finds
the Serializer for the class in question and queries it.

This enables us to hard code the Map schema into the MapSerializer, and to allow other people
to write custom serializers which map Java to XML in ways beyond what our bean mapping can
do.  It also will prevent the WSDL generator from producing schema for types which are not
explicitly mapped in our engine, which IMHO is a good thing (since this indicates a configuration


View raw message