My Oracle Support Banner

Clientgen Ant Task Doesnot Extend Base Class If The Base Class Has No Properties (Doc ID 1111843.1)

Last updated on FEBRUARY 28, 2019

Applies to:

Oracle WebLogic Server - Version 10.3.2 and later
Information in this document applies to any platform.

Symptoms

During the client artifacts generation using the clientgen ant task , the client gen ant task seems to be ignoring the <xs:extension > element. It doesn't extend the class, if the class
extended in the WSDL doesn't have any attribute.

For eg.

Below is the entry in the WSDL File.
The Base ResponseDo class has the attribute named BaseResponseText but
BaseResponseNoAttributesDO class has no attribute

<xs:complexType name="BaseResponseDO">
<xs:annotation>
<xs:documentation>here describe</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="1" name="BaseResponseText"
nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>

<xs:complexType name="BaseResponseNoAttributesDO">
<xs:annotation>
<xs:documentation>here describe</xs:documentation>
</xs:annotation>
</xs:complexType>




Consider two classes TestResponseDO and TestResponseDoesNotFunctionDO
extending the above classes

The inheritance is defined in the wsdl using the xs:extension tag.
Below is the entry in the wsdl file.

<xs:complexType name="TestResponseDO">
<xs:complexContent>
<xs:extension base="java1:BaseResponseDO"
xmlns:java1="java:de.test.esb.services.responseobjects">
<xs:sequence>
<xs:element minOccurs="1" name="HelloText" nillable="true"
type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TestResponseDoesNotFunctionDO">
<xs:complexContent>
<xs:extension base="java1:BaseResponseNoAttributesDO"
xmlns:java1="java:de.test.esb.services.responseobjects">
<xs:sequence>
<xs:element minOccurs="1" name="HelloText" nillable="true"
type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>




Note: Using the client gen ant task generated the client side artifacts but the class TestResponseDoesNotFunctionDO did not
extend the BaseResponseNoAttributesDO as it had no attributes.

eg.

public class TestResponseDoesNotFunctionDO implements java.io.Serializable {


Where as TestResponseDO extended BaseResponseDO successfully as it had attributes.
eg.

public class TestResponseDO extends BaseResponseDO {


Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.