axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram Lakshmanan (JIRA)" <>
Subject [jira] Created: (AXIS2-1928) Wrong code generation when xs:extension used in schema
Date Tue, 02 Jan 2007 23:17:27 GMT
Wrong code generation when xs:extension used in schema

                 Key: AXIS2-1928
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: adb
         Environment: Windows XP, JDK 1.4
            Reporter: Ram Lakshmanan

Axis2 with ADB Binding generates wrong code when complexType elements are built with xs:extension.
Here goes excerpt from our schema:

<xs:complexType name="Reference_Type">
		<xs:extension base="acct-d1:Reference_Type">
				<xs:element ref="svc-acct:keyGrpHogan" minOccurs="0"/>

Generated code doesn't parses the elements present in "acct-d1:Reference_Type". It totally
ignores them. In the generated code you can easy that it's parsing only the: "svc-acct:keyGrpHogan"
and not the elements in "acct-d1:Reference_Type". Here goes the generated code's parse() API:

        public static Reference_Type349 parse( reader) throws
            Reference_Type349 object = new Reference_Type349();
            int event;
            try {
                while (!reader.isStartElement() && !reader.isEndElement())

                if (reader.getAttributeValue("","type")!=null){
                  java.lang.String fullTypeName = reader.getAttributeValue("",
                  if (fullTypeName!=null){
                    java.lang.String nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
                    nsPrefix = nsPrefix==null?"":nsPrefix;

                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
                    if (!"Reference_Type".equals(type)){
                        //find namespace for the prefix
                        java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
                        return (Reference_Type349)com.wellsfargo.eai_schemas.provider.aps.accountinquiry.ExtensionMapper.getTypeObject(



                // Note all attributes that were handled. Used to differ normal attributes
                // from anyAttributes.
                java.util.Vector handledAttributes = new java.util.Vector();

                boolean isReaderMTOMAware = false;
                  isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(;
                }catch(java.lang.IllegalArgumentException e){
                  isReaderMTOMAware = false;

                                    while (!reader.isStartElement() && !reader.isEndElement());
                                    if (reader.isStartElement() && new javax.xml.namespace.QName("","keyGrpHogan").equals(reader.getName())){
                              }  // End of if for expected property start element
                            while (!reader.isStartElement() && !reader.isEndElement())
                            if (reader.isStartElement())
                                // A start element we are not expecting indicates a trailing
invalid property
                                throw new java.lang.RuntimeException("Unexpected subelement
" + reader.getLocalName());

            } catch ( e) {
                throw new java.lang.Exception(e);

            return object;

        }//end of factory class

Do let me know, if you need any further information.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message