• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis2 wsdl2java codegen gives different bean structures than Axis1

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a problem where I can't get Axis2 to generate a java bean class so that it is compabible with how Axis1 generated the java for the same portion of wsdl.

Specifically, with Axis1 the wsld resulted in generating a primitive array, but with Axis2 it generates an additional ArrayOf class and then this new class contains the primative array.
I'm constrained in that I can't change the wsdl (due to backwards compatability with existing clients).

For example, in Axis1 the following wsdl snipit...


<complexType name="ParameterList">
<sequence>
<element name="parameters" nillable="true" type="tns1:ArrayOf_tns1_Parameter"/>
</sequence>
</complexType>

<complexType name="ArrayOf_tns1_Parameter">
<sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded" type="tns1:Parameter"/>
</sequence>
</complexType>

<complexType name="Parameter">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>


... generates code with a simple structure something like...

public class ParameterList {
protected Parameter[] parameters;
}

public class Parameter
protected String name;
protected String value;
}


... however, in Axis2 the same wsdl snipt will end up generating something more complex with an extra ArrayOf class...

public class ParameterList {
protected ArrayOf_tns1_Parameter parameters;
}

public class ArrayOf_tns1_Parameter {
protected Parameter[] item ;
}

public class Parameter
protected String name;
protected String value;
}


The question is, how can I get Axis2 to generate these class structures so that they are similar to what is generated by Axis1?
I've tried all the various Axis2-1.4 wsdl2java switches, but none seem to work for me. Has anyone seen this before?
Is there some other configuration that can be done to Axis2 so that the java will be generated as I need it?

Much thanks in advance,
Paul

[ May 15, 2008: Message edited by: Paul Sigurdson ]

[ May 15, 2008: Message edited by: Paul Sigurdson ]
[ May 15, 2008: Message edited by: Paul Sigurdson ]
 
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic