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 "Marcel Tilly (JIRA)" <ax...@ws.apache.org> on 2005/11/13 21:52:21 UTC

[jira] Created: (AXIS-2300) This bug AXIS-1935 seemed not to be fixed

This bug  AXIS-1935 seemed not to  be fixed
-------------------------------------------

         Key: AXIS-2300
         URL: http://issues.apache.org/jira/browse/AXIS-2300
     Project: Apache Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.2    
    Reporter: Marcel Tilly


The namespace in an item element of an array is xlns:="" but it should be empty:

           <positionen>
               <position>
                  <item xmlns="">
                     <artikelNr>Test1</artikelNr>
                     <menge>2</menge>
                  </item>
               </position>
            </positionen>


The schema for this problem looks like:

   <complexType name="Position">
    <sequence>
     <element name="artikelNr" nillable="true" type="xsd:string"/>
     <element name="menge" type="xsd:int"/>
    </sequence>

   </complexType>
   <complexType name="ArrayOfPosition" >
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" ref="impl:item"/>
    </sequence>
   </complexType>
   <complexType name="Positionen">
    <sequence>
     <element name="position" nillable="true" type="impl:ArrayOfPosition"/>

Tim from bug axis-1935 has suggested the following bug fix for SerializationContext:

                // -----------------
                // NOTE: I have seen doc/lit tests that use
                // the type name as the element name in multi-ref cases
                // (for example <soapenc:Array ... >)
                // In such cases the xsi:type is not passed along.
                // -----------------
                // The multiref QName is our own fake name.
                // It may be beneficial to set the name to the
                // type name, but I didn't see any improvements
                // in the interop tests.
                //if (name.equals(multirefQName) && type != null)
                //    name = type;
                if (elemQName.getNamespaceURI().equals("")){
                  elemQName = new QName(this.nsStack.getNamespaceURI(""),elemQName.getLocalPart());
                } 
                ser.serialize(elemQName, attributes, value, this);
                return;


This bugfix works in this case.

-- 
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