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

Hudson commented on AXIS2-4356:
-------------------------------

Integrated in Axis2 #1633 (See [https://builds.apache.org/job/Axis2/1633/])
    Added modification to fix AXIS2-4356 and test cases. (Revision 1360573)

     Result = FAILURE
sagara : 
Files : 
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
* /axis/axis2/java/core/trunk/modules/adb-codegen/sub-build.xml
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/xsd/fixed_value.xsd
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/test/org/apache/axis2/schema/fix
* 
/axis/axis2/java/core/trunk/modules/adb-codegen/test/org/apache/axis2/schema/fix/FixedValueTest.java

                
> WSDL2Java doesn't support xsd:element@fixed
> -------------------------------------------
>
>                 Key: AXIS2-4356
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4356
>             Project: Axis2
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.4.1
>         Environment: Java 6
>            Reporter: Aaron Gourley
>            Assignee: Sagara Gunathunga 
>            Priority: Minor
>             Fix For: 1.7.0, 1.6.3
>
>         Attachments: SchemaCompiler.java, axis2-adb-codegen-1.4.1.jar
>
>
> For reference, the default and fixed constraints are defined here:
> http://www.w3.org/TR/xmlschema-1/#e-value_constraint
> Consider the following XML schema definitions:
> <xs:element name="ResultCode" type="tns:ResultCode" />
> <xs:complexType name="ResultCode">
>     <xs:sequence>
>         <xs:element name="code" default="0" type="xs:long" />
>     </xs:sequence>
> </xs:complexType>
> <xs:element name="SuccessCode" type="tns:SuccessCode" />
> <xs:complexType name="SuccessCode">
>     <xs:sequence>
>         <xs:element name="code" fixed="0" type="xs:long" />
>     </xs:sequence>
> </xs:complexType>
> ADB code generated for the ResultCode element is correct in setting the 
> default value of the code field to 0:
>     protected long localCode = 
> org.apache.axis2.databinding.utils.ConverterUtil.convertToLong("0");
> ADB code generated for the SuccessCode element is incorrect according to XSD 
> definition for the fixed element.  It actually appears to completely ignore 
> the fixed attribute.  Considering the XSD definition for the fixed attribute, 
> I think the generated code should declare the code field as final and set the 
> final value as follows:
>     protected final long localCode = 
> org.apache.axis2.databinding.utils.ConverterUtil.convertToLong("0");
> It follows that the generated code should not contain a setter method for the 
> code field.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to