You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/03/08 18:50:13 UTC
cvs commit: ws-axis/c/src/soap SoapDeSerializer.cpp
dicka 2005/03/08 09:50:13
Modified: c/src/soap SoapDeSerializer.cpp
Log:
Check and handle nil elements in simple type arrays.
PR: AXISCPP-521
Submitted by: Adrian Dick
Revision Changes Path
1.153 +14 -0 ws-axis/c/src/soap/SoapDeSerializer.cpp
Index: SoapDeSerializer.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- SoapDeSerializer.cpp 8 Mar 2005 08:41:56 -0000 1.152
+++ SoapDeSerializer.cpp 8 Mar 2005 17:50:13 -0000 1.153
@@ -1194,6 +1194,20 @@
}\
if (0 == strcmp(pName, m_pNode->m_pchNameOrValue))\
{\
+ /* if this node contain attributes check if this elemet is nil.*/ \
+ if (0 != m_pNode->m_pchAttributes[0])\
+ {\
+ m_pCurrNode = m_pNode;\
+ /* Need to verify if the return value is NULL. */\
+ xsd__boolean * isNill = getAttributeAsBoolean("nil", 0);\
+ if (NULL != isNill && true_ == *isNill)\
+ {\
+ ((cpp_type*)Array.m_Array)[nIndex] = NULL;\
+ m_pNode = m_pParser->next();\
+ m_pNode = NULL;\
+ continue;\
+ }\
+ }\
m_pNode = m_pParser->next(true); /* charactor node */\
if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))\
{\