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 "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org> on 2005/05/31 08:55:55 UTC

[jira] Commented: (AXIS-1797) Base attributes not serialized when simpleContent extends another simpleContent

     [ http://issues.apache.org/jira/browse/AXIS-1797?page=comments#action_66594 ]
     
Jayachandra Sekhara Rao Sunkara commented on AXIS-1797:
-------------------------------------------------------

Hi Steve,
running the given Test.java against the artifacts created from the SimpleTypes.wsdl you have provided yielded me following results

Using 1.2 source without applying your patch.
---------------------------------------------
<ns1:localpart DerivedAttr1="nonce" xsi:type="ns2:DerivedSimpleType" xmlns:ns1="
http://namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns
2="http://test.com/reference">abc123</ns1:localpart>

After applying your patch:
--------------------------
<ns1:localpart DerivedAttr1="nonce" xsi:type="ns2:DerivedSimpleType" xmlns:ns1="http://namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://test.com/reference">abc123</ns1:localpart>

Actually even after the patch is applied, I couldn't see in the serialized piece of XML the values of BaseAttr1 and BaseAttr2. However I noticed that the DerivedSimpleType class created by WSDL2Java came out extending BaseSimpleType class without the _value datamember in it. Is the patch complete enough? or did I miss something? Can you post the response you got after running Test.java with your patch applied. Does it have in total three attributes?

Thanks
Jayachandra

> Base attributes not serialized when simpleContent extends another simpleContent
> -------------------------------------------------------------------------------
>
>          Key: AXIS-1797
>          URL: http://issues.apache.org/jira/browse/AXIS-1797
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: current (nightly)
>     Reporter: Steve Green
>  Attachments: 1797.patch, 1797.test.tar, 1797.wsdl, Test.java
>
> When a simpleContent extends another simpleContent, and the base type has attributes, those attributes are not serialized.
> I believe that the problem is with the code generation, and not a serialization bug.  The code generator uses a has-a model for this, and I believe that it should be an is-a model.  This is also necessary to allow for polymorphic behavior in the generated classes.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira