[ http://jira.codehaus.org/browse/XFIRE-707?page=all ]
Dan Diephouse closed XFIRE-707.
-------------------------------
Resolution: Cannot Reproduce
Michael - What version of XFire are you using? I know we fixed something like
this in 1.2.2. I can't reproduce this currently in the SVN head so I'm marking
as cannot reproduce.
Chris - Interface inheritance isn't really supported. See the notes on this
page: http://xfire.codehaus.org/Aegis+Inheritance
> org.codehaus.xfire.aegis.type.basic.BeanType creates duplicate xml elements
> when using inheritance and overriding properties
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XFIRE-707
> URL: http://jira.codehaus.org/browse/XFIRE-707
> Project: XFire
> Issue Type: Bug
> Components: Aegis Module
> Affects Versions: 1.2.2
> Reporter: Michael Case
> Assigned To: Dan Diephouse
> Fix For: 1.2.3
>
>
> If you override a property defined in parent class that property will be
> included twice in the generated xml. While everything continues to work
> correctly (either the first or the second element is ignored) this makes me
> nervous. Fixing this may be a lot of work, I don't know, and I admit it's a
> pretty uncommon use case.
> Example, if you have two classes defined such as
> public abstract class Base {
> private String baseClassProperty;
> public String getBaseClassProperty() {
> return baseClassProperty;
> }
> public void setBaseClassProperty(String baseClassProperty) {
> this.baseClassProperty = baseClassProperty;
> }
> }
> And
> public class SubClass extends Base {
> public String childClassProperty;
> private String overriddenBaseClassProperty;
> public String getBaseClassProperty() {
> return overriddenBaseClassProperty;
> }
> public void setBaseClassProperty(String overriddenBaseClassProperty) {
> this.overriddenBaseClassProperty = overriddenBaseClassProperty;
> }
>
> public String getChildClassProperty() {
> return childClassProperty;
> }
> public void setChildClassProperty(String childClassProperty) {
> this.childClassProperty = childClassProperty;
> }
>
> }
> Note the the property 'baseClassProperty' is overridden.
> When you call code something like:
> SubClass myObject = new SubClass();
> myObject.setBaseClassProperty("my base class property");
> myObject.setChildClassProperty("my child class property");
>
> service.echoBase(myObject);
> The xml passed to and from the service will look like:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd=
> "http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-i
> nstance">
> <soap:Body>
> <echoBase xmlns="http://mynamespace">
> <in0 xsi:type="SubClass">
> <baseClassProperty>my base class property</baseClassProperty>
> <childClassProperty>my child class property</childClassProperty>
> <baseClassProperty>my base class property</baseClassProperty>
> </in0>
> </echoBase>
> </soap:Body>
> </soap:Envelope>
> And
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd=
> "http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-i
> nstance">
> <soap:Body>
> <echoBaseResponse xmlns="http://mynamespace">
> <out xsi:type="SubClass">
> <baseClassProperty>my base class property</baseClassProperty>
> <childClassProperty>my child class property</childClassProperty>
> <baseClassProperty>my base class property</baseClassProperty>
> </out>
> </echoBaseResponse>
> </soap:Body>
> </soap:Envelope>
> Note the duplicated baseClassProperty element
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email