You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Siddhartha Subramanian (JIRA)" <ax...@ws.apache.org> on 2005/03/06 08:48:52 UTC

[jira] Updated: (AXIS-1407) Axis not serializing derived classes appropriately

     [ http://issues.apache.org/jira/browse/AXIS-1407?page=history ]

Siddhartha Subramanian updated AXIS-1407:
-----------------------------------------

    Attachment: bugreport.txt

hi ashitosh, 

I am now looking into this issue on this side as saravanan is no onger working on this. I am attaching the whole scenario and how the client uses what has been described. any help on this will be greatly appreciated as we are looking at moving to the new version of axis and this one problem is preventing us from doing so.

> Axis not serializing derived classes appropriately
> --------------------------------------------------
>
>          Key: AXIS-1407
>          URL: http://issues.apache.org/jira/browse/AXIS-1407
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2 Beta
>  Environment: Windows 2000; Netbeans 3.6; iPlanet WebServer 6.1
>     Reporter: Saravanan Markandeyan
>     Priority: Critical
>  Attachments: bugreport.txt, bugreport.txt, sample.zip
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira