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 bu...@apache.org on 2002/09/13 17:51:19 UTC

DO NOT REPLY [Bug 12621] New: - Element array Deserialization calling Windows.NET

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12621>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12621

Element array Deserialization calling Windows.NET

           Summary: Element array Deserialization calling Windows.NET
           Product: Axis
           Version: current (nightly)
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: cmarshall@infoclarus.com


I have a situation where I am attempting to call a Windows.NET service
that returns an array of complexType. A fragement from the WSDL is as follows:
 
- <s:element name="GetAllResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="GetAllResult"
type="s0:ArrayOfTimekeeper" /> 
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:complexType name="ArrayOfTimekeeper">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="unbounded" name="Timekeeper"
nillable="true" type="s0:Timekeeper" /> 
  </s:sequence>
  </s:complexType>
- <s:complexType name="Timekeeper">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="tkinit" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="tksort" type="s:short" /> 
  <s:element minOccurs="0" maxOccurs="1" name="tklast" type="s:string" /> 

I would like to have the results returned as either Element or Element[] but
the current ElementDeserializer only returns the first instance of the 
innermost complexType (Timekeeper).  ElementDeserializer has the following
code:

                ArrayList children = msgElem.getChildren();
                if ( children != null ) {
                    msgElem = (MessageElement) children.get(0);
                    if ( msgElem != null )
                        value = msgElem.getAsDOM();
                }

which seem to be causing the problem.  I have implemented my own
deserializer by replacing this with:

                value = msgElem.getAsDOM();

and I get the results I am hoping for, a single Element with all the
returned data.  

Is this a bug, restriction or should I be approaching the problem
differently?