axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saravanan Markandeyan" <sara...@nortelnetworks.com>
Subject Axis 1.2 Beta issue with derived classes
Date Thu, 17 Jun 2004 20:16:12 GMT

Axis 1.2 beta is not returning derived class names in the multiRefs as it
used to
in Axis 1.1. Any input on this would be great; is this a known issue?

Abstract Example below illustrates the issue:

public class A 
{ 
 private String amember1;
}

public class B extends A 
{ 
 private String bmember1;
 private String bmember2;
}

public class C extends A 
{ 
 private String cmember1;
 private String cmember2;
}

public class ContainerClass
{
 private A aInstance;
}


Suppose the reference of aInstance in an instance of the ContainerClass was
set to an instance of Class C and sent across.

------------ Axis 1.1 Multiref section ---------------------

<multiRef id="id7" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
	  xsi:type="ns7:ContainerClass" 
              xmlns:ns7="http://namespace.ws" 
              xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <aInstance href="#id14"/>
</multiRef>

<multiRef id="id14" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
	  xsi:type="ns7:C"  // THIS WORKS GREAT, SINCE aInstance had a
reference to an instance of C
              xmlns:ns7="http://namespace.ws" 
              xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
	<amember1 href="#id15"/>
	<cmember1 href="#id16"/>
	<cmember2 href="#id17"/>
</multiRef>

<multiRef id="id15" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
This is value of amember1
</multiRef>

<multiRef id="id16" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
This is value of cmember1
</multiRef>

<multiRef id="id17" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
This is value of cmember2
</multiRef>

For the same on 1.2 there is an issue

------------ Axis 1.2 beta Multiref section ---------------------

<multiRef id="id7" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
	  xsi:type="ns7:ContainerClass" 
              xmlns:ns7="http://namespace.ws" 
              xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <aInstance href="#id14"/>
</multiRef>

<multiRef id="id14" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
	  xsi:type="ns7:A"               /// THIS IS DIFFERENT!!! This
should be "ns7:C" 
              xmlns:ns7="http://namespace.ws" 
              xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
	<amember1 href="#id15"/>
	<cmember1 href="#id16"/>
	<cmember2 href="#id17"/>
</multiRef>

<multiRef id="id15" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
This is value of amember1
</multiRef>

<multiRef id="id16" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
This is value of cmember1
</multiRef>

<multiRef id="id17" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
This is value of cmember2
</multiRef>


In essence the super class type is being sent across with sub-class member
data and that breaks
the client which instantiates a super class object and tries calling 'set'
methods on sub-class members


Mime
View raw message