You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michael Matczynski <mj...@alum.mit.edu> on 2010/09/29 23:47:18 UTC
[Axis2-1.5] wsdl2java Abstract Classes / Inheritance
Hello!
I'm having trouble generating a hierarchy of Java classes from a wsdl
with complexContent elements.
The following WSDL:
<xs:complexType abstract="true" name="shape">
<xs:sequence>
<xs:element name="id" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="square">
<complexContent>
<extension base="shape">
<xs:sequence>
<xs:element name="color" type="xs:string" />
</xs:sequence>
</extension>
</complexContent>
</xs:complexType>
<xs:complexType name="circle">
<complexContent>
<extension base="shape">
<xs:sequence>
<xs:element name="equilateral" type="xs:boolean" />
</xs:sequence>
</extension>
</complexContent>
</xs:complexType>
...generates Java classes, in particular a Circle that is not a Shape
(and a Circle that also doesn't have an 'equilateral' attribute):
public abstract class Shape
implements org.apache.axis2.databinding.ADBBean{
/* This type was generated from the piece of schema that had
name = shape
Namespace URI = http://admin.cloudswitch.com/v100/
Namespace Prefix = ns1
*/
public class Circle
implements org.apache.axis2.databinding.ADBBean{
/* This type was generated from the piece of schema that had
name = circle
Namespace URI = http://admin.cloudswitch.com/v100/
Namespace Prefix = ns1
*/
wsdl2java args:
<arg line="-g -ss -sd -S java/gen -R build/services/META-INF -p
com.mypackage.server -noWSDL -noBuildXML -ns2p
http://foo/=com.mypackage.server -uri
${basedir}/resources/myservice.wsdl"/>
It appears there have been a few other forum posts on the topic of
abstract classes / inheritance but there's no definitive answer.
Thanks!
Mike
--
Michael Matczynski
e: mjm@alum.mit.edu
w: www.zingtech.com
w: www.catchwine.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org