Question for you Gurus out there:
While there's built-in serialization support for certain Java collection
classes (Map, Vector, etc) there isn't any for others like ArrayList. For
reasons I won't go into I need support for serialization of an ArrayList.
I did some 'low tech code reuse' of the serializers & factories for Vector
to create my own serialization classes for ArrayList: ArrayListSerializer,
ArrayListDeserializer, ArrayListSerializerFactory,
ArrayListDeserializerFactory.
Like the ones for Vector, they generate WSDL Schema too.

You would have noticed that when using WSDL2Java, no stub classes are
generated for complex types for which there is built-in serialization
support  (Vector, etc) -- which is exactly what you want!
My question is this: How does WSDL2Java know which types 'not' to generate
stubs for?
(How do I prevent stub code from being generated for the additional Java
types I build serialization support for?)

My problem is that stub classes are being generated for ArrayList -- and I
want to prevent that from happening (since Java libraries already provide a
definition for that)!

Btw, I contrived to use the same namespace for ArrayList as is used for
Vector, but that does not help.
I'm pasting the corresponding WSDL that's generated, in case its somehow
relevant. 
Any ideas/comments would be greatly appreciated.

<schema targetNamespace="http://xml.apache.org/xml-soap";
xmlns="http://www.w3.org/2001/XMLSchema";>
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"; /> 
<complexType name="ArrayList">
        <sequence>
                <element maxOccurs="unbounded" minOccurs="0" name="item"
type="xsd:anyType" /> 
        </sequence>
</complexType>

<element name="ArrayList" nillable="true" type="apachesoap:ArrayList" /> 

<complexType name="Vector">
        <sequence>
                <element maxOccurs="unbounded" minOccurs="0" name="item"
type="xsd:anyType" /> 
        </sequence>
</complexType>
<element name="Vector" nillable="true" type="apachesoap:Vector" /> 
</schema>

Reply via email to