Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 71247 invoked from network); 11 Feb 2010 19:48:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2010 19:48:50 -0000 Received: (qmail 89217 invoked by uid 500); 11 Feb 2010 19:48:49 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 89105 invoked by uid 500); 11 Feb 2010 19:48:49 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 89096 invoked by uid 99); 11 Feb 2010 19:48:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 19:48:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 19:48:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E556529A0016 for ; Thu, 11 Feb 2010 11:48:27 -0800 (PST) Message-ID: <1253180418.214421265917707938.JavaMail.jira@brutus.apache.org> Date: Thu, 11 Feb 2010 19:48:27 +0000 (UTC) From: "ALB (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-4356) WSDL2Java doesn't support xsd:element@fixed In-Reply-To: <1332620962.1243475145609.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832665#action_12832665 ] ALB commented on AXIS2-4356: ---------------------------- I'm looking to have elements with a fixed attribute set when the code is generated. Is there a workaround for this? > 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: adb, codegen, wsdl > Affects Versions: 1.4.1 > Environment: Java 6 > Reporter: Aaron Gourley > Priority: Minor > > 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: > > > > > > > > > > > > > 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. - You can reply to this email to add a comment to the issue online.