axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadir Amra <a...@us.ibm.com>
Subject Re: fix for parsing arrays and nil complex objects
Date Wed, 24 Jan 2007 23:59:20 GMT
Please hold off until I release new code.  Should be within the next day.

Nadir K. Amra


Nicholas Hart <nhart@real.com> wrote on 01/24/2007 05:24:52 PM:

> 
> I found a problem with how the deserializer deals with arrays and nil 
> complex objects.  in the case of a non-zero array it was failing to skip 

> the closing tag for the array, so I added a call to skipEndNode() in 
> that case.  Without that, the next element attempted to be parsed was 
> the close tag from the array.
> 
> For parsing complex objects, if it is marked as nil then it shouldn't 
> attempt to deserialize the object and just return NULL.  I found it was 
> necessary to add the skipEndNode() in that case as well, so that the 
> next element can be parsed.
> 
> I know there's some work going on in the parsing engine--should I file a 

> bug and attach this patch or wait until the new code is ready for 
testing?
> 
> 
> Index: src/soap/SoapDeSerializer.cpp
> ===================================================================
> --- src/soap/SoapDeSerializer.cpp   (revision 498771)
> +++ src/soap/SoapDeSerializer.cpp   (working copy)
> @@ -706,7 +706,10 @@
>               delete pSimpleType;
> 
>               if ( m_nStatus != AXIS_FAIL)
> -                return Array;
> +            {
> +                skipEndNode();
> +                return Array;
> +            }
>           }
>       }
>       else
> @@ -755,6 +758,12 @@
>           m_pNode = m_pParser->next ();
>           if (!m_pNode)
>               return NULL;
> +
> +        if (isNillValue())
> +        {
> +            skipEndNode();
> +            return NULL;
> +        }
> 
>           TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct, 0);
>           void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (0);
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message