axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5799) Axis2 xsd2java - namespace prefix added to inherited attributes
Date Sat, 09 Jul 2016 19:55:11 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369271#comment-15369271
] 

Hudson commented on AXIS2-5799:
-------------------------------

SUCCESS: Integrated in Axis2 #3573 (See [https://builds.apache.org/job/Axis2/3573/])
AXIS2-5799: Fix attribute handling in ADB. (veithen: rev 1752039)
* axis2/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
* axis2/modules/adb-codegen/test/org/apache/axis2/schema/extension/SimpleExtensionTest.java
* axis2/modules/adb-tests/pom.xml
* axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5799
* axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5799/ServiceTest.java
* axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5799/service
* axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5799/service/EchoImpl.java
* axis2/modules/adb-tests/src/test/wsdl/AXIS2-5799.wsdl


> Axis2 xsd2java - namespace prefix added to inherited attributes
> ---------------------------------------------------------------
>
>                 Key: AXIS2-5799
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5799
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.7.3
>         Environment: Axis2 1.7.3
> Windows
> Maven 3.3+
>            Reporter: Jeff Thomas
>             Fix For: 1.7.4, 1.8.0
>
>         Attachments: AXIS2-5799_Example.zip
>
>
> We have recently migrated from Axis2 1.6.2 to 1.7.3.
> We have multiple XSDs that extend complex-type elements from a common parent XSD.
> After the migration, we now have different namespace prefixes on our attributes.
> For example:  
> 1.6.2     <child:Object id="1234" name="JohnDoe".../>
> 1.7.3     <child:Object child:id="1234" parent:name="JohnDoe".../>
> According to the namespace spec ():
> "Default namespace declarations do not apply directly to attribute names; the interpretation
of unprefixed attributes is determined by the element on which they appear."
> In the generated Java code, for example the parse methods now have fully qualified attribute
names:
> {code:java}
> if (localName != null){
>   writeAttribute("http://www.example.org/core", "name", org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName),
xmlWriter);
> }
> ...
> if (localId != null){
>   writeAttribute("http://www.example.org/child", "id", org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localId),
xmlWriter);
> }
> {code}
> Previously I believe, the given attribute namespace was null.  
> The serialized XML generated with this approach does not validate in AltovaXML editor.
 (The attribute 'core:name' is not permitted in the element <child:Object>).
> I will attach an example with two XSDs and the Axis 1.7.3 generated source-code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message