P.S. The class stored in the java.util.Collection corresponds to a complex
type that is defined in the WSDL under a namespace that I specify as an
argument. 

I am aware of the -extraClasses switch for Java2WSDL. But that doesn't seem to
make sense considering that:
(a) The complex type is already defined in the WSDL.
(b) -extraClasses gives no further assistance in specifying that class X is
the only type contained in collection Y. That is, what if you expose multiple
collections and multiple extra classes? How do you know which matches up with
what?

Mitch Gitman <[EMAIL PROTECTED]> wrote:
If only to play my own devil’s advocate, I wanted to see what Java2WSDL in
the Axis 1.1 RC2 would do with a Java collections interface/class
(Collection,
ArrayList, Set, etc.). So I added this method to my interface to publish:
public Collection getCollection();

Somewhat to my chagrin, Java2WSDL did not complain. However, neither did it
produce a WSDL that quite makes sense to me. Below are the highlights of what
Java2WSDL produced:
<wsdl:definitions ... xmlns:tns3="http://www.w3.org/2002/12/soap-encoding";
..>
..
<schema targetNamespace="http://www.w3.org/2002/12/soap-encoding";
xmlns="http://www.w3.org/2001/XMLSchema";>
___<import namespace="http://schemas.xmlsoap.org/soap/encoding/"; /> 
___<complexType name="Array">
______<complexContent>
_________<restriction base="soapenc:Array">
____________<attribute ref="soapenc:arrayType" wsdl:arrayType="" /> 
_________</restriction>
______</complexContent>
___</complexType>
</schema>
..
<wsdl:message name="getCollectionResponse">
___<wsdl:part name="getCollectionReturn" type="tns3:Array" /> 
</wsdl:message>

Observations/questions: 
* I had never seen before in a WSDL the namespace:
http://www.w3.org/2002/12/soap-encoding
Why the need to introduce this namespace in this situation?

* There’s a newly produced tns3:Array complex type. And this new type has
under its restriction an attribute wsdl:arrayType=“”. It seems to me this
blank should be filled in, but how?

* Is there something else I need to do to get this to work?

Thanks.



Reply via email to