On Thursday 25 November 2004 09:44, Daniel Beland wrote:
> I had the same problem, and someone gave the answer earlier in
> another thread.
Thanks! Somehow I never find this stuff. Yes, I really look :-/
> But I found it easier to start with a wsdl and use WSDL2Java, then
> axis generates the java classes correctly.
I had hoped to make Axis generate the wsdl I want, with some help. But
that doesn't seem to work out. Let's see
> ie:
>
> <element name="getDescriptorsResponse">
> <complexType>
> <sequence>
> <element name="descriptors" type="impl:myDescriptorList"/>
> </sequence>
> </complexType>
> </element>
> <complexType name="myDescriptor">
> <sequence>
> <element name="field1" nillable="true" type="xsd:string"/>
> <element name="field2" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> <complexType name="myDescriptorList">
> <sequence>
> <element maxOccurs="unbounded" name="descriptors"
> type="impl:myDescriptor"/>
> </sequence>
> </complexType>
When I do it like that, wsdl2java generates class for myDescriptorList.
Something I don't want. I thought I could avoid it by inlining
<element name="getDescriptorsResponse">
<complexType>
<sequence>
<element name="descriptors">
<complexType>
<sequence>
<element name="item" type="impl:myDescriptor"
maxOccurs="unbounded"/>
</sequence>
</element>
</sequence>
</complexType>
</element>
but then I get a class GetDescriptorsResponseDescriptors. Apparently
Axis doesn't want to return an Array directly and always interposes
another classes. In general, I'd prefer to avoid generated domain
classes as much as possible; I already have these classes and I'd like
Axis to map to them.
Michael
--
Michael Schuerig All good people read good books
mailto:[EMAIL PROTECTED] Now your conscience is clear
http://www.schuerig.de/michael/ --Tanita Tikaram, Twist In My Sobriety