[ 
http://issues.apache.org/jira/browse/AXISCPP-978?page=comments#action_12427427 
] 
            
nadir amra commented on AXISCPP-978:
------------------------------------

I am going to resolve the issue as described above, i.e. inserting "m_pNode = 
NULL" in all 3 occurrences.  Also, somewhat related to nodes not being handled 
correctly, if a complex type defined as:

      <s:complexType name="SortR">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="ListMsg" 
type="tns:ArrayOfMsgS" />
          <s:element minOccurs="0" maxOccurs="1" name="DateMed" type="s:string" 
/>
          <s:element minOccurs="1" maxOccurs="1" name="NumberMed" type="s:int" 
/>
        </s:sequence>
      </s:complexType>

And the response comes back as:

<SortRResult>
    <ListMsg/>
    <DateMed>2006-11-10</DateMed>
    <NumberMed>123456</NumberMed>
.
.

The deserialization of ListMsg does not recognize the fact that empty element 
was passed and thus attempts to parse the subsequent data as if it was part of 
ListMsg.  I have added code in 
SoapDeSerializer::getCmplxObject() so that it now looks like the following (the 
else part is new):

            if (0 != m_pNode->m_pchAttributes[0])    { ... }
            else
            {
                    // AXISCPP-978
                    // If the node represents a START_END_ELEMENT, then simply 
return
                    if (START_END_ELEMENT == m_pNode->m_type2)
                    {
                        m_pNode = NULL;    /* node identified and used */
                        return NULL;
                    }
            }

Please let me know if there is a problem with this.  

> deserializing of arrays of complex types with optional elements broken
> ----------------------------------------------------------------------
>
>                 Key: AXISCPP-978
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-978
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Deserialization
>    Affects Versions: current (nightly)
>         Environment: WIN2KSP4 MSVC6SP6 JDK 1.5.0_07 XercesC 2.7.0
>            Reporter: Franz Fehringer
>         Assigned To: nadir amra
>         Attachments: pegs.wsdl, pegs.xsd, t_RoomRate2.cpp, t_SellRate.cpp, 
> vaw.xml
>
>
> With AxisC++ (current SVN plus XercesC 2.7.0 on WIN2KSP4/JDK5/VC6SP6) i have 
> a severe problem, namely that my response message is not parsed correctly.
> With the fragment (whole xml response appended)
> <pgs:RequiredRoom exactMatch="true" adults="1" children="1" cots="1" 
> extraAdultBeds="1" extraChildBeds="1">SINGLE</pgs:RequiredRoom>
> <pgs:SellRate currencyCode="USD" inclusiveOfTax="false" 
> commission="5">70</pgs:SellRate>
> in the first line the AxisC XercesC wrapper advances (using next()) from 
> START_ELEMENT to CHARACTER_ELEMENT after having read all attributes and 
> therefore correctly detects "SINGLE".
> But in the second line after having read all attributes, next() does not 
> advance to CHARACTER_ELEMENT, but stays on START_ELEMENT, which means that 
> "70" cannot be read (and the whole following xml block is disregarded too).
> It seems, that in the second line the AxisC++ deserializing code thinks that 
> there is something left, which has to be handled prior to advancing to the 
> CHARACTER_ELEMENT.
> We had some debug sessions and our first guess is, that there is something 
> wrong with deserializing arrays/lists/sequences (which are nested in this 
> case; maybe the problem?).
> A second (to our opinion less probable) guess is, that the AxisC deserializer 
> thinks, that there could be remaining attributes.
> What can be observed is, that in the first (successful) case m_bPeeked is 
> false, whereas in the second (error) case m_bPeeked is true. 

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to