axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/soap SoapDeSerializer.cpp
Date Wed, 22 Dec 2004 10:51:07 GMT
samisa      2004/12/22 02:51:07

  Modified:    c/src/soap SoapDeSerializer.cpp
  Log:
  Fixed trivial memory leak in getHeader, due to non deletion of local variable
  pNodeList. Also fixed indentation. AXISCPP-340.
  
  Revision  Changes    Path
  1.119     +908 -844  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.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- SoapDeSerializer.cpp	21 Dec 2004 06:20:29 -0000	1.118
  +++ SoapDeSerializer.cpp	22 Dec 2004 10:51:07 -0000	1.119
  @@ -75,8 +75,7 @@
   #else
   #define LONGLONG long long
   #endif
  -
  -SoapDeSerializer::SoapDeSerializer ()
  +    SoapDeSerializer::SoapDeSerializer ()
   {
       m_pParser = XMLParserFactory::getParserObject ();
       m_pEnv = NULL;
  @@ -100,73 +99,75 @@
       delete[]m_pcFaultDetail;
   }
   
  -int SoapDeSerializer::setInputStream (SOAPTransport * pInputStream)
  +int
  +SoapDeSerializer::setInputStream (SOAPTransport * pInputStream)
   {
       if (NULL == pInputStream)
  -	{
  -		return AXIS_FAIL;
  -	}
  +    {
  +	return AXIS_FAIL;
  +    }
   
       m_pInputStream = pInputStream;
   
       return m_pParser->setInputStream (pInputStream);
   }
   
  -SoapEnvelope * SoapDeSerializer::getEnvelope ()
  +SoapEnvelope *
  +SoapDeSerializer::getEnvelope ()
   {
       Attribute *pAttr = NULL;
   
       if (!m_pNode)
  -	{
  -		m_pNode = m_pParser->next ();
  -	}
  +    {
  +	m_pNode = m_pParser->next ();
  +    }
   
       if (!m_pNode || (START_ELEMENT != m_pNode->m_type))
  -	{
  -		return NULL;
  -	}
  +    {
  +	return NULL;
  +    }
   
       if (0 == strcmp (m_pNode->m_pchNameOrValue,
   		     SoapKeywordMapping::map (SOAP_VER_1_2).
   		     pchWords[SKW_ENVELOPE]))
       {
  -		SoapEnvelope *m_pEnvl = new SoapEnvelope ();
  +	SoapEnvelope *m_pEnvl = new SoapEnvelope ();
   	/* set all attributes of SoapEnvelope */
  -		pAttr = new Attribute ();
  +	pAttr = new Attribute ();
   
  -		pAttr->setValue (m_pNode->m_pchNamespace);
  -		m_pEnvl->addNamespaceDecl (pAttr);
  +	pAttr->setValue (m_pNode->m_pchNamespace);
  +	m_pEnvl->addNamespaceDecl (pAttr);
   
  -		if (0 == strcmp (m_pNode->m_pchNamespace,
  +	if (0 == strcmp (m_pNode->m_pchNamespace,
   			 SoapKeywordMapping::map (SOAP_VER_1_1).
   			 pchNamespaceUri))
  -		{
  -			m_nSoapVersion = SOAP_VER_1_1;
  -		}
  -		else if (0 == strcmp (m_pNode->m_pchNamespace,
  +	{
  +	    m_nSoapVersion = SOAP_VER_1_1;
  +	}
  +	else if (0 == strcmp (m_pNode->m_pchNamespace,
   			      SoapKeywordMapping::map (SOAP_VER_1_2).
   			      pchNamespaceUri))
  -		{
  -			m_nSoapVersion = SOAP_VER_1_2;
  -		}
  -		else
  -		{
  -			m_nSoapVersion = VERSION_LAST;
  -		}
  +	{
  +	    m_nSoapVersion = SOAP_VER_1_2;
  +	}
  +	else
  +	{
  +	    m_nSoapVersion = VERSION_LAST;
  +	}
   
   	/* Set Attributes */
  -		for (int i = 0; m_pNode->m_pchAttributes[i]; i += 3)
  -		{
  -			pAttr = new Attribute ();
  -			pAttr->setLocalName (m_pNode->m_pchAttributes[i]);
  -			pAttr->setUri (m_pNode->m_pchAttributes[i + 1]);
  -			pAttr->setValue (m_pNode->m_pchAttributes[i + 2]);
  -			m_pEnvl->addAttribute (pAttr);
  -		}
  -	
  -		m_pNode = NULL;		/* This is to indicate that node is identified 
  +	for (int i = 0; m_pNode->m_pchAttributes[i]; i += 3)
  +	{
  +	    pAttr = new Attribute ();
  +	    pAttr->setLocalName (m_pNode->m_pchAttributes[i]);
  +	    pAttr->setUri (m_pNode->m_pchAttributes[i + 1]);
  +	    pAttr->setValue (m_pNode->m_pchAttributes[i + 2]);
  +	    m_pEnvl->addAttribute (pAttr);
  +	}
  +
  +	m_pNode = NULL;		/* This is to indicate that node is identified 
   				 * and used */
  -		return m_pEnvl;
  +	return m_pEnvl;
       }
   
       return NULL;
  @@ -178,31 +179,33 @@
    * the SOAP stream there must be a mechanism to manage the situation. Possibly 
    * to re-parse the stream part which has unused header blocks.
    */
  -IHeaderBlock * SoapDeSerializer::getHeaderBlock (const AxisChar * pName,
  +IHeaderBlock *
  +SoapDeSerializer::getHeaderBlock (const AxisChar * pName,
   				  const AxisChar * pNamespace)
   {
       if (!m_pHeader)
  -	{
  -		return NULL;		/* there has been no <Header> element so there
  +    {
  +	return NULL;		/* there has been no <Header> element so there
   				 * can be no Header blocks */
  -	}
  +    }
   
       return m_pHeader->getHeaderBlock (pName, pNamespace, true);
   }
   
  -int SoapDeSerializer::getHeader ()
  +int
  +SoapDeSerializer::getHeader ()
   {
       if (m_pHeader)
  -	{
  -		return m_nStatus;
  -	}
  +    {
  +	return m_nStatus;
  +    }
   
       m_pNode = m_pParser->next ();
   
       if (!m_pNode)		/* this means a SOAP error */
       {
  -		m_nStatus = AXIS_FAIL;
  -		return m_nStatus;
  +	m_nStatus = AXIS_FAIL;
  +	return m_nStatus;
       }
   
       if ((START_ELEMENT == m_pNode->m_type) &&
  @@ -210,173 +213,179 @@
   		      SoapKeywordMapping::map (m_nSoapVersion).
   		      pchWords[SKW_HEADER])))
       {
  -		if (m_pHeader)
  -		{
  -		    delete m_pHeader;
  -		}
  +	if (m_pHeader)
  +	{
  +	    delete m_pHeader;
  +	}
   
  -		m_pHeader = new SoapHeader ();
  +	m_pHeader = new SoapHeader ();
   	/* Set any attributes/namspaces to the SoapHeader object */
   
  -		bool blnMainLoopContStatus = true;
  +	bool blnMainLoopContStatus = true;
   
  -		while (blnMainLoopContStatus)
  -		{
  -			m_pNode = m_pParser->next (true);
  +	while (blnMainLoopContStatus)
  +	{
  +	    m_pNode = m_pParser->next (true);
   
  -			if (!m_pNode)
  -			{
  -				m_nStatus = AXIS_FAIL;
  -				return m_nStatus;
  -			}
  +	    if (!m_pNode)
  +	    {
  +		m_nStatus = AXIS_FAIL;
  +		return m_nStatus;
  +	    }
   
  -			if ((END_ELEMENT == m_pNode->m_type) &&
  -			(0 == strcmp (m_pNode->m_pchNameOrValue,
  -					  SoapKeywordMapping::map (m_nSoapVersion).
  -					  pchWords[SKW_HEADER])))
  -			{
  -				m_pNode = NULL;	/* This is to indicate that node is identified
  -					 * and used */
  -				return m_nStatus;
  -				break;
  -			}
  +	    if ((END_ELEMENT == m_pNode->m_type) &&
  +		(0 == strcmp (m_pNode->m_pchNameOrValue,
  +			      SoapKeywordMapping::map (m_nSoapVersion).
  +			      pchWords[SKW_HEADER])))
  +	    {
  +		m_pNode = NULL;	/* This is to indicate that node is identified
  +				 * and used */
  +		return m_nStatus;
  +		break;
  +	    }
   
  -            /* The following is done to ignore anything (eg : the toplevel 
  -               whitespaces) but a start element.*/
  -            if (START_ELEMENT != m_pNode->m_type)
  -                continue;
  +	    /* The following is done to ignore anything (eg : the toplevel 
  +	       whitespaces) but a start element. */
  +	    if (START_ELEMENT != m_pNode->m_type)
  +		continue;
   
  -            HeaderBlock *pHeaderBlock = new HeaderBlock ();
  +	    HeaderBlock *pHeaderBlock = new HeaderBlock ();
   
  -			if (m_pNode->m_pchNamespace)
  -			{
  -				pHeaderBlock->setUri (m_pNode->m_pchNamespace);
  -			}
  +	    if (m_pNode->m_pchNamespace)
  +	    {
  +		pHeaderBlock->setUri (m_pNode->m_pchNamespace);
  +	    }
   
  -			pHeaderBlock->setLocalName (m_pNode->m_pchNameOrValue);
  +	    pHeaderBlock->setLocalName (m_pNode->m_pchNameOrValue);
   
  -			if ((m_pNode->m_pchAttributes[0]) != NULL)
  -			{
  -				int iAttributeArrayIndex = 0;
  +	    if ((m_pNode->m_pchAttributes[0]) != NULL)
  +	    {
  +		int iAttributeArrayIndex = 0;
   
  -				while (true)
  -				{
  -					Attribute *pAttribute = new Attribute ();
  -					pAttribute->setLocalName (m_pNode->
  -							  m_pchAttributes
  -							  [iAttributeArrayIndex++]);
  -					pAttribute->setUri (m_pNode->
  -						m_pchAttributes
  -						[iAttributeArrayIndex++]);
  -					pAttribute->setValue (m_pNode->
  -						  m_pchAttributes
  -						  [iAttributeArrayIndex++]);
  +		while (true)
  +		{
  +		    Attribute *pAttribute = new Attribute ();
  +		    pAttribute->setLocalName (m_pNode->
  +					      m_pchAttributes
  +					      [iAttributeArrayIndex++]);
  +		    pAttribute->setUri (m_pNode->
  +					m_pchAttributes
  +					[iAttributeArrayIndex++]);
  +		    pAttribute->setValue (m_pNode->
  +					  m_pchAttributes
  +					  [iAttributeArrayIndex++]);
   
  -					pHeaderBlock->addAttribute (pAttribute);
  +		    pHeaderBlock->addAttribute (pAttribute);
   
  -					if (m_pNode->m_pchAttributes
  -					[iAttributeArrayIndex] == '\0')
  -					{
  -						break;
  -					}
  -				}
  -			}
  +		    if (m_pNode->m_pchAttributes
  +			[iAttributeArrayIndex] == '\0')
  +		    {
  +			break;
  +		    }
  +		}
  +	    }
   
  -		    BasicNode **pNodeList = new BasicNode *[10];
  -		    int iListPos = 0;
  -			int iLevel = 0;
  -		    bool bContinue = true;
  +	    BasicNode **pNodeList = new BasicNode *[10];
  +	    int iListPos = 0;
  +	    int iLevel = 0;
  +	    bool bContinue = true;
   
  -			while (bContinue)
  -			{
  -				m_pNode = m_pParser->next (true);
  +	    while (bContinue)
  +	    {
  +		m_pNode = m_pParser->next (true);
   
  -				if (END_ELEMENT == m_pNode->m_type)
  -				{
  -					if (iLevel == 0)
  -					{
  +		if (END_ELEMENT == m_pNode->m_type)
  +		{
  +		    if (iLevel == 0)
  +		    {
   			//do nothing
  -						m_pHeader->addHeaderBlock (pHeaderBlock);
  -						bContinue = false;
  -					}
  -					else if (iLevel == 1)
  -					{
  -						if ((pNodeList[0]) != NULL)
  -						{
  +			m_pHeader->addHeaderBlock (pHeaderBlock);
  +			bContinue = false;
  +		    }
  +		    else if (iLevel == 1)
  +		    {
  +			if ((pNodeList[0]) != NULL)
  +			{
   			    //addToHeaderBlock(pNodeList[0]);
  -							pHeaderBlock->addChild (pNodeList[0]);
  -							m_pHeader->addHeaderBlock (pHeaderBlock);
  -							m_pParser->next (true);	//To skip the end element of the HeaderBlock
  -							bContinue = false;
  -						}
  -					}
  -					else
  -					{
  +			    pHeaderBlock->addChild (pNodeList[0]);
  +			    m_pHeader->addHeaderBlock (pHeaderBlock);
  +			    m_pParser->next (true);	//To skip the end element of the HeaderBlock
  +			    bContinue = false;
  +			}
  +		    }
  +		    else
  +		    {
   			//addToImmediateParent(pNodeList, iListPos);
  -						(pNodeList[iListPos - 2])->addChild (pNodeList[iListPos - 1]);
  -						iListPos--;
  -						iLevel--;
  -					}
  -				}	
  -				else if (START_ELEMENT == m_pNode->m_type)
  -				{
  +			(pNodeList[iListPos - 2])->
  +			    addChild (pNodeList[iListPos - 1]);
  +			iListPos--;
  +			iLevel--;
  +		    }
  +		}
  +		else if (START_ELEMENT == m_pNode->m_type)
  +		{
   		    //createBaisNode and setValue
  -					BasicNode *pComplexElement = new ComplexElement ();
  -				
  -					if (m_pNode->m_pchNamespace)
  -					{
  -						pComplexElement->setURI (m_pNode->m_pchNamespace);
  -					}
  -					
  -					pComplexElement->setLocalName (m_pNode->m_pchNameOrValue);
  +		    BasicNode *pComplexElement = new ComplexElement ();
  +
  +		    if (m_pNode->m_pchNamespace)
  +		    {
  +			pComplexElement->setURI (m_pNode->m_pchNamespace);
  +		    }
  +
  +		    pComplexElement->setLocalName (m_pNode->m_pchNameOrValue);
   
   		    //addtoList
  -					pNodeList[iListPos] = pComplexElement;
  -					iListPos++;
  -					iLevel++;
  -				}
  -				else if (CHARACTER_ELEMENT == m_pNode->m_type)
  -				{
  +		    pNodeList[iListPos] = pComplexElement;
  +		    iListPos++;
  +		    iLevel++;
  +		}
  +		else if (CHARACTER_ELEMENT == m_pNode->m_type)
  +		{
   		    //createBasicNode and setValue
  -					BasicNode *pBasicNode =	new CharacterElement (m_pNode->m_pchNameOrValue);
  +		    BasicNode *pBasicNode =
  +			new CharacterElement (m_pNode->m_pchNameOrValue);
   
   		    //addToImmidiateParent
  -					if (iLevel == 0)
  -					{
  -						pHeaderBlock->addChild (pBasicNode);
  -					}
  -					else
  -					{
  -						(pNodeList[iListPos - 1])->addChild (pBasicNode);
  -					}
  -				}
  -			}
  +		    if (iLevel == 0)
  +		    {
  +			pHeaderBlock->addChild (pBasicNode);
  +		    }
  +		    else
  +		    {
  +			(pNodeList[iListPos - 1])->addChild (pBasicNode);
  +		    }
   		}
  +	    } // end while
  +            
  +            // Samisa: clean memory
  +            delete [] pNodeList;
  +	}
       }
   
       return m_nStatus;
   }
   
  -int SoapDeSerializer::getBody ()
  +int
  +SoapDeSerializer::getBody ()
   {
       if (!m_pNode)
  -	{
  -		m_pNode = m_pParser->next ();
  -	}
  +    {
  +	m_pNode = m_pParser->next ();
  +    }
   
       /* previous header searching may have left a node unidentified */
       if (m_pNode)
       {
  -		if ((START_ELEMENT == m_pNode->m_type) &&
  +	if ((START_ELEMENT == m_pNode->m_type) &&
   	    (0 == strcmp (m_pNode->m_pchNameOrValue,
   			  SoapKeywordMapping::map (m_nSoapVersion).
   			  pchWords[SKW_BODY])))
  -		{
  +	{
   	    /* Set any attributes/namspaces to the SoapBody object */
  -			m_pNode = NULL;	/* This is to indicate that node is identified 
  +	    m_pNode = NULL;	/* This is to indicate that node is identified 
   				 * and used */
  -			return AXIS_SUCCESS;
  -		}
  +	    return AXIS_SUCCESS;
  +	}
       }
   
       m_nStatus = AXIS_FAIL;
  @@ -384,26 +393,27 @@
       return AXIS_FAIL;
   }
   
  -int SoapDeSerializer::checkMessageBody (const AxisChar * pName,
  +int
  +SoapDeSerializer::checkMessageBody (const AxisChar * pName,
   				    const AxisChar * pNamespace)
   {
       /* check and skip the soap body tag */
       if (AXIS_SUCCESS != getBody ())
  -	{
  +    {
   	//return AXIS_FAIL;    
  -		throw AxisGenException (SERVER_UNKNOWN_ERROR);
  -	}
  +	throw AxisGenException (SERVER_UNKNOWN_ERROR);
  +    }
   
       if (!m_pNode)
  -	{
  -		m_pNode = m_pParser->next ();
  -	}
  +    {
  +	m_pNode = m_pParser->next ();
  +    }
   
       if (!m_pNode || (START_ELEMENT != m_pNode->m_type))
  -	{
  +    {
   	//return AXIS_FAIL;
  -		throw AxisGenException (SERVER_UNKNOWN_ERROR);
  -	}
  +	throw AxisGenException (SERVER_UNKNOWN_ERROR);
  +    }
   
       //if (0 != strcmp(m_pNode->m_pchNameOrValue, pName)) return AXIS_FAIL;
       if (0 != strcmp (m_pNode->m_pchNameOrValue, pName))
  @@ -412,9 +422,9 @@
   	 * So we set the style as doc literal. This way of doing things
   	 * is not so nice. I'll rectify this asap
   	 */
  -		setStyle (DOC_LITERAL);
  -		AXISTRACE1 ("AXISC_NODE_VALUE_MISMATCH_EXCEPTION", CRITICAL);
  -		throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
  +	setStyle (DOC_LITERAL);
  +	AXISTRACE1 ("AXISC_NODE_VALUE_MISMATCH_EXCEPTION", CRITICAL);
  +	throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
       }
   
       /* we can check the namespace uri too here. Should we ? */
  @@ -423,7 +433,8 @@
       return AXIS_SUCCESS;
   }
   
  -void * SoapDeSerializer::checkForFault (const AxisChar * pName,
  +void *
  +SoapDeSerializer::checkForFault (const AxisChar * pName,
   				 const AxisChar * pNamespace)
   {
       const char *pcCmplxFaultName;
  @@ -433,57 +444,58 @@
       char *pcFaultactor;
       if (0 == strcmp ("Fault", pName))
       {
  -		if (0 != strcmp (m_pNode->m_pchNameOrValue, pName))
  -		{
  -			m_nStatus = AXIS_SUCCESS;
  -		    m_pNode = NULL;
  -		    AXISTRACE1 ("AXISC_NODE_VALUE_MISMATCH_EXCEPTION", CRITICAL);
  -			throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
  -		}
  +	if (0 != strcmp (m_pNode->m_pchNameOrValue, pName))
  +	{
  +	    m_nStatus = AXIS_SUCCESS;
  +	    m_pNode = NULL;
  +	    AXISTRACE1 ("AXISC_NODE_VALUE_MISMATCH_EXCEPTION", CRITICAL);
  +	    throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
  +	}
   
   	/* we can check the namespace uri too here. Should we ? */
  -		m_nStatus = AXIS_SUCCESS;
  -		m_pNode = NULL;		/*This is to indicate that node is identified and used */
  -		SoapFault *pFault = new SoapFault ();
  -		pFault->setDeSerializer (this);
  -		m_nStyle = getStyle ();
  +	m_nStatus = AXIS_SUCCESS;
  +	m_pNode = NULL;		/*This is to indicate that node is identified and used */
  +	SoapFault *pFault = new SoapFault ();
  +	pFault->setDeSerializer (this);
  +	m_nStyle = getStyle ();
   
   	/*We deserialize fault code in doc literal. */
  -		setStyle (DOC_LITERAL);
  +	setStyle (DOC_LITERAL);
   	//pFault->setFaultcode(getElementAsString("faultcode", 0));
  -		pcFaultCode = getElementAsString ("faultcode", 0);
  -		pFault->setFaultcode (pcFaultCode == NULL ? "" : pcFaultCode);
  +	pcFaultCode = getElementAsString ("faultcode", 0);
  +	pFault->setFaultcode (pcFaultCode == NULL ? "" : pcFaultCode);
   	//pFault->setFaultstring(getElementAsString("faultstring", 0));
  -		pcFaultstring = getElementAsString ("faultstring", 0);
  -		pFault->setFaultstring (pcFaultstring == NULL ? "" : pcFaultstring);
  +	pcFaultstring = getElementAsString ("faultstring", 0);
  +	pFault->setFaultstring (pcFaultstring == NULL ? "" : pcFaultstring);
   	//pFault->setFaultactor(getElementAsString("faultactor", 0));
  -		pcFaultactor = getElementAsString ("faultactor", 0);
  -		pFault->setFaultactor (pcFaultactor == NULL ? "" : pcFaultactor);
  +	pcFaultactor = getElementAsString ("faultactor", 0);
  +	pFault->setFaultactor (pcFaultactor == NULL ? "" : pcFaultactor);
   	// FJP Changed the namespace from null to a single space (an impossible
   	//     value) to help method know that it is parsing a fault message.
  -		pcDetail = getElementAsString ("detail", " ");
  +	pcDetail = getElementAsString ("detail", " ");
   
  -		if (pcDetail)
  -		{
  -			pFault->setFaultDetail (pcDetail);
  -		}
  -		else
  -		{
  -		    pcCmplxFaultName = getCmplxFaultObjectName ();
  -		    pFault->setCmplxFaultObjectName (pcCmplxFaultName);
  -		}
  +	if (pcDetail)
  +	{
  +	    pFault->setFaultDetail (pcDetail);
  +	}
  +	else
  +	{
  +	    pcCmplxFaultName = getCmplxFaultObjectName ();
  +	    pFault->setCmplxFaultObjectName (pcCmplxFaultName);
  +	}
   
   	setStyle (m_nStyle);
   
   	return pFault;
  -	}
  -	else
  -	{
  -		throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
  +    }
  +    else
  +    {
  +	throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
       }
   }
   
  -int SoapDeSerializer::getFault ()
  +int
  +SoapDeSerializer::getFault ()
   {
       /* TODO : */
       //if (!m_pNode) m_pNode = m_pParser->next();
  @@ -495,45 +507,48 @@
       //}
   }
   
  -int SoapDeSerializer::getFaultDetail (char **ppcDetail)
  +int
  +SoapDeSerializer::getFaultDetail (char **ppcDetail)
   {
       *ppcDetail = m_pcFaultDetail;
   
       return AXIS_SUCCESS;
   }
   
  -int SoapDeSerializer::init ()
  +int
  +SoapDeSerializer::init ()
   {
       m_pNode = 0;
   
       if (m_pEnv)
       {
  -		delete m_pEnv;
  -		m_pEnv = NULL;
  +	delete m_pEnv;
  +	m_pEnv = NULL;
       }
   
       if (m_pHeader)
       {
  -		delete m_pHeader;
  -		m_pHeader = NULL;
  +	delete m_pHeader;
  +	m_pHeader = NULL;
       }
   
  -	m_nSoapVersion = VERSION_LAST;
  -	m_nStatus = AXIS_SUCCESS;
  +    m_nSoapVersion = VERSION_LAST;
  +    m_nStatus = AXIS_SUCCESS;
   
  -	return m_nStatus;
  +    return m_nStatus;
   }
   
  -int SoapDeSerializer::getVersion ()
  +int
  +SoapDeSerializer::getVersion ()
   {
       if (VERSION_LAST == m_nSoapVersion)
       {
  -		if (m_pEnv)
  -		{
  -			delete m_pEnv;
  -		}
  +	if (m_pEnv)
  +	{
  +	    delete m_pEnv;
  +	}
   
  -		m_pEnv = getEnvelope ();
  +	m_pEnv = getEnvelope ();
       }
   
       return m_nSoapVersion;
  @@ -552,7 +567,8 @@
    *    <points><x>7</x><y>8</y></points>
    *
    */
  -Axis_Array SoapDeSerializer::getCmplxArray (void *pDZFunct, void *pCreFunct,
  +Axis_Array
  +SoapDeSerializer::getCmplxArray (void *pDZFunct, void *pCreFunct,
   				 void *pDelFunct, void *pSizeFunct,
   				 const AxisChar * pName,
   				 const AxisChar * pNamespace)
  @@ -564,185 +580,199 @@
       unsigned long ptrval;
   
       if (AXIS_SUCCESS != m_nStatus)
  -	{
  -		return Array;		/* if anything has gone wrong
  +    {
  +	return Array;		/* if anything has gone wrong
   				 * earlier just do nothing */
  -	}
  +    }
   
       if (RPC_ENCODED == m_nStyle)
       {
  -		m_pNode = m_pParser->next ();
  +	m_pNode = m_pParser->next ();
   	/* just skip wrapper node with type info
   	 * Ex:<tns:QuoteInfoTypeArray xmlns:tns="http://www.getquote.org/test">
   	 */
  -		if (!m_pNode)
  -		{
  -			return Array;
  -		}
  +	if (!m_pNode)
  +	{
  +	    return Array;
  +	}
   
  -		Array.m_Size = getArraySize (m_pNode);
  +	Array.m_Size = getArraySize (m_pNode);
   
  -		if (Array.m_Size > 0)
  -		{
  -			Array.m_Array = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array, true, Array.m_Size);
  +	if (Array.m_Size > 0)
  +	{
  +	    Array.m_Array =
  +		((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array, true,
  +							Array.m_Size);
   
  -			if (!Array.m_Array)
  -			{
  -				Array.m_Size = 0;
  -				m_nStatus = AXIS_FAIL;
  +	    if (!Array.m_Array)
  +	    {
  +		Array.m_Size = 0;
  +		m_nStatus = AXIS_FAIL;
   
  -				return Array;
  -			}
  +		return Array;
  +	    }
   
  -			itemsize = ((AXIS_OBJECT_SIZE_FUNCT) pSizeFunct) ();
  -			ptrval = reinterpret_cast < unsigned long >(Array.m_Array);
  +	    itemsize = ((AXIS_OBJECT_SIZE_FUNCT) pSizeFunct) ();
  +	    ptrval = reinterpret_cast < unsigned long >(Array.m_Array);
   
  -			for (; nIndex < Array.m_Size; nIndex++)
  -			{
  -				m_pNode = m_pParser->next ();
  +	    for (; nIndex < Array.m_Size; nIndex++)
  +	    {
  +		m_pNode = m_pParser->next ();
   		/* wrapper node without type info  Ex: <item> */
  -				if (!m_pNode)
  -				{  
  -                    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct)(Array.m_Array, true, Array.m_Size);
  -                    Array.m_Array = 0;
  -                    Array.m_Size = 0;
  -					return Array;
  -				}
  +		if (!m_pNode)
  +		{
  +		    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (Array.m_Array,
  +							    true,
  +							    Array.m_Size);
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
  +		    return Array;
  +		}
   
  -				pItem = reinterpret_cast < void *>(ptrval + nIndex * itemsize);
  +		pItem =
  +		    reinterpret_cast < void *>(ptrval + nIndex * itemsize);
   
  -				if (C_RPC_PROVIDER == getCurrentProviderType ())
  -				{
  +		if (C_RPC_PROVIDER == getCurrentProviderType ())
  +		{
   		    // Disable C support
   		    //IWrapperSoapDeSerializer_C cWSD;
   		    //cWSD._object = this;
   		    //cWSD._functions = &IWrapperSoapDeSerializer::ms_VFtable;
   		    //((AXIS_DESERIALIZE_FUNCT)pDZFunct)(pItem, &cWSD);
  -				}
  -				else
  -				{
  -				    m_nStatus = ((AXIS_DESERIALIZE_FUNCT) pDZFunct) (pItem, this);
  -				}
  -
  -				m_pNode = m_pParser->next ();	/* skip end element node too */
  -
  -				if (!m_pNode)
  -				{
  -                    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct)(Array.m_Array, true, Array.m_Size);
  -                    Array.m_Array = 0;
  -                    Array.m_Size = 0;
  -					return Array;
  -				}
  -			}
  +		}
  +		else
  +		{
  +		    m_nStatus =
  +			((AXIS_DESERIALIZE_FUNCT) pDZFunct) (pItem, this);
  +		}
   
   		m_pNode = m_pParser->next ();	/* skip end element node too */
   
  -		return Array;
  +		if (!m_pNode)
  +		{
  +		    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (Array.m_Array,
  +							    true,
  +							    Array.m_Size);
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
  +		    return Array;
   		}
  +	    }
  +
  +	    m_pNode = m_pParser->next ();	/* skip end element node too */
  +
  +	    return Array;
  +	}
       }
       else
       {
  -		Array.m_Array = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array,
  +	Array.m_Array = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array,
   								true,
   								INITIAL_ARRAY_SIZE);
  -		if (!Array.m_Array)
  -		{
  -			return Array;
  -		}
  +	if (!Array.m_Array)
  +	{
  +	    return Array;
  +	}
   
  -		Array.m_Size = INITIAL_ARRAY_SIZE;
  -		itemsize = ((AXIS_OBJECT_SIZE_FUNCT) pSizeFunct) ();
  +	Array.m_Size = INITIAL_ARRAY_SIZE;
  +	itemsize = ((AXIS_OBJECT_SIZE_FUNCT) pSizeFunct) ();
   
  -		while (true)
  -		{
  -			ptrval = reinterpret_cast < unsigned long >(Array.m_Array);
  +	while (true)
  +	{
  +	    ptrval = reinterpret_cast < unsigned long >(Array.m_Array);
   
  -			for (; nIndex < Array.m_Size; nIndex++)
  -			{
  -				if (!m_pNode)
  -				{		/* if there is an unprocessed node that may be
  -						 * one left from last array deserialization 
  -						*/
  -					m_pNode = m_pParser->next ();
  -				}
  +	    for (; nIndex < Array.m_Size; nIndex++)
  +	    {
  +		if (!m_pNode)
  +		{		/* if there is an unprocessed node that may be
  +				 * one left from last array deserialization 
  +				 */
  +		    m_pNode = m_pParser->next ();
  +		}
   
   		/* wrapper node without type info  Ex: <phonenumbers> */
  -				if (!m_pNode)
  -				{
  -                    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct)(Array.m_Array, true, Array.m_Size);
  -                    Array.m_Array = 0;
  -                    Array.m_Size = 0;
  -					return Array;
  -				}
  +		if (!m_pNode)
  +		{
  +		    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (Array.m_Array,
  +							    true,
  +							    Array.m_Size);
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
  +		    return Array;
  +		}
   
  -				if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  -				{
  +		if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +		{
   		    /* if this node contain attributes let them be used by the
   		     * complex type's deserializer
   		     */
  -					if (0 != m_pNode->m_pchAttributes[0])
  -					{
  -						m_pCurrNode = m_pNode;
  -					}
  +		    if (0 != m_pNode->m_pchAttributes[0])
  +		    {
  +			m_pCurrNode = m_pNode;
  +		    }
   
  -					m_pNode = NULL;	/* recognized and used the node */
  -					pItem = reinterpret_cast <void *>(ptrval + nIndex * itemsize);
  +		    m_pNode = NULL;	/* recognized and used the node */
  +		    pItem =
  +			reinterpret_cast <
  +			void *>(ptrval + nIndex * itemsize);
   
  -					if (C_DOC_PROVIDER == getCurrentProviderType ())
  -					{
  +		    if (C_DOC_PROVIDER == getCurrentProviderType ())
  +		    {
   			// Disable C support
   			//IWrapperSoapDeSerializer_C cWSD;
   			//cWSD._object = this;
   			//cWSD._functions = &IWrapperSoapDeSerializer::ms_VFtable;
   			//m_nStatus = ((AXIS_DESERIALIZE_FUNCT)pDZFunct)
   			//   (pItem, &cWSD);
  -					}
  -					else
  -					{
  -					m_nStatus = ((AXIS_DESERIALIZE_FUNCT) pDZFunct) (pItem, this);
  -					}
  +		    }
  +		    else
  +		    {
  +			m_nStatus =
  +			    ((AXIS_DESERIALIZE_FUNCT) pDZFunct) (pItem, this);
  +		    }
   
  -					if (AXIS_SUCCESS == m_nStatus)
  -					{
  +		    if (AXIS_SUCCESS == m_nStatus)
  +		    {
   			/* skip end element of the array item */
  -					m_pNode = m_pParser->next ();
  +			m_pNode = m_pParser->next ();
   
   			//Jira AXISCPP-145
   			//point to next element (can be next array elemnt or different object)
  -					m_pNode = m_pParser->next ();
  +			m_pNode = m_pParser->next ();
   // > FJP
   
  -					if( m_pNode->m_type == END_ELEMENT)
  -					{
  +			if (m_pNode->m_type == END_ELEMENT)
  +			{
   //Skip past end of item
  -						m_pNode = m_pParser->next();
  +			    m_pNode = m_pParser->next ();
   
  -						if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  -						{
  -							if( m_pNode->m_type != START_ELEMENT)
  -							{
  -								m_pNode = NULL;
  -							}
  -						}
  -					}
  -// < FJP
  -					continue;
  -				    }
  -				}
  -				else
  +			    if (0 ==
  +				strcmp (pName, m_pNode->m_pchNameOrValue))
  +			    {
  +				if (m_pNode->m_type != START_ELEMENT)
   				{
  -					if (nIndex > 0)
  -					{
  -						Array.m_Size = nIndex;
  +				    m_pNode = NULL;
  +				}
  +			    }
  +			}
  +// < FJP
  +			continue;
  +		    }
  +		}
  +		else
  +		{
  +		    if (nIndex > 0)
  +		    {
  +			Array.m_Size = nIndex;
   			/* put the actual deserialized item size
   			 * note we do not make m_pNode = NULL because this node
   			 * doesnot belong to this array 
   			 */
  -						return Array;
  -					}
  +			return Array;
  +		    }
   
   		    /* error : no elements deserialized */
  -				}
  +		}
   		/* if we come here it is an error situation */
   		/*
   		 * not an  error for self referenced array or empty array
  @@ -755,28 +785,31 @@
   		 *  </xsd:sequence>
   		 * </xsd:complexType>        
   		 */
  -				((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (Array.m_Array, true, Array.m_Size);
  -				Array.m_Array = 0;
  -				Array.m_Size = 0;
  +		((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (Array.m_Array, true,
  +							Array.m_Size);
  +		Array.m_Array = 0;
  +		Array.m_Size = 0;
   
  -				return Array;
  -				}
  +		return Array;
  +	    }
   	    /* if we come here that means the array allocated is not enough.
   	     * So double it 
   	     */
   
  -			Array.m_Array = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array, true, Array.m_Size * 2);
  +	    Array.m_Array =
  +		((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array, true,
  +							Array.m_Size * 2);
   
  -			if (!Array.m_Array)
  -			{
  -				Array.m_Size = 0;
  -		
  -				return Array;
  -			}
  +	    if (!Array.m_Array)
  +	    {
  +		Array.m_Size = 0;
   
  -			Array.m_Size *= 2;
  +		return Array;
  +	    }
  +
  +	    Array.m_Size *= 2;
   	    /* Array.m_RealSize = Array.m_Size; */
  -		}
  +	}
       }
       m_nStatus = AXIS_FAIL;
       m_pNode = NULL;
  @@ -788,30 +821,32 @@
    * Get Size of the single dimension array from arrayType attribute
    * Ex : enc:arrayType="xs:string[6]"
    */
  -int SoapDeSerializer::getArraySize (const AnyElement * pElement)
  +int
  +SoapDeSerializer::getArraySize (const AnyElement * pElement)
   {
       int nSize = 0;
       /* first check whether this is a start element node */
   
       if (START_ELEMENT != pElement->m_type)
  -	{
  -		return nSize;
  -	}
  +    {
  +	return nSize;
  +    }
   
       for (int i = 0; pElement->m_pchAttributes[i]; i += 3)
       {
  -		if (URI_ENC == URIMapping::getURI (pElement->m_pchAttributes[i + 1])
  -		    && (0 == strcmp (pElement->m_pchAttributes[i],
  -			SoapKeywordMapping::map (m_nSoapVersion).pchWords[SKW_ARRAYTYPE])))
  -		{
  -			QName qn;
  +	if (URI_ENC == URIMapping::getURI (pElement->m_pchAttributes[i + 1])
  +	    && (0 == strcmp (pElement->m_pchAttributes[i],
  +			     SoapKeywordMapping::map (m_nSoapVersion).
  +			     pchWords[SKW_ARRAYTYPE])))
  +	{
  +	    QName qn;
  +
  +	    qn.splitQNameString (pElement->m_pchAttributes[i + 2], '[');
  +	    nSize = strtol (qn.localname, &m_pEndptr, 10);
  +	    qn.mergeQNameString ('[');
   
  -		    qn.splitQNameString (pElement->m_pchAttributes[i + 2], '[');
  -		    nSize = strtol (qn.localname, &m_pEndptr, 10);
  -			qn.mergeQNameString ('[');
  -			
  -			return nSize;
  -		}
  +	    return nSize;
  +	}
       }
   
       return nSize;
  @@ -842,7 +877,8 @@
   #define CONV_STRTOBASE64BINARY(str) decodeFromBase64Binary(str)
   #define CONV_STRTOHEXBINARY(str) decodeFromHexBinary(str)
   
  -char * AxisSoapDeSerializerStringCopy (const char *s1)
  +char *
  +AxisSoapDeSerializerStringCopy (const char *s1)
   {
       char *s2 = new char[strlen (s1) + 1];
   
  @@ -959,386 +995,396 @@
               }\
               break;
   
  -Axis_Array SoapDeSerializer::getBasicArray (XSDTYPE nType,
  -											const AxisChar * pName,
  -											const AxisChar * pNamespace)
  +Axis_Array
  +SoapDeSerializer::getBasicArray (XSDTYPE nType,
  +				 const AxisChar * pName,
  +				 const AxisChar * pNamespace)
   {
       Axis_Array Array = { NULL, 0 };
       int nIndex = 0;
   
       if (AXIS_SUCCESS != m_nStatus)
  -	{
  -		return Array;
  -	}
  +    {
  +	return Array;
  +    }
   
       /* if anything has gone wrong earlier just do nothing */
       if (RPC_ENCODED == m_nStyle)
       {
  -		m_pNode = m_pParser->next ();
  +	m_pNode = m_pParser->next ();
   
   	/* just skip wrapper node with type info  Ex: <tns:ArrayOfPhoneNumbers
   	 * xmlns:tns="http://www.getquote.org/test">
   	 */
  -		if (!m_pNode)
  -		{
  -			return Array;
  -		}
  +	if (!m_pNode)
  +	{
  +	    return Array;
  +	}
   
  -		Array.m_Size = getArraySize (m_pNode);
  +	Array.m_Size = getArraySize (m_pNode);
   
  -		if (Array.m_Size > 0)
  -		{
  -			switch (nType)
  -			{
  -				case XSD_INT:
  -					Array.m_Array = new int[Array.m_Size];
  +	if (Array.m_Size > 0)
  +	{
  +	    switch (nType)
  +	    {
  +	    case XSD_INT:
  +		Array.m_Array = new int[Array.m_Size];
   
  -					if (!Array.m_Array)
  -					{
  -						Array.m_Size = 0;
  -						m_nStatus = AXIS_FAIL;
  +		if (!Array.m_Array)
  +		{
  +		    Array.m_Size = 0;
  +		    m_nStatus = AXIS_FAIL;
   
  -						return Array;
  -					}
  +		    return Array;
  +		}
   
  -					for (; nIndex < Array.m_Size; nIndex++)
  -					{
  -						m_pNode = m_pParser->next ();
  +		for (; nIndex < Array.m_Size; nIndex++)
  +		{
  +		    m_pNode = m_pParser->next ();
   		    /* wrapper node without type info  Ex: <item> */
  -						m_pNode = m_pParser->next (true);	/* charactor node */
  -		    
  -						if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -						{
  -							((int *) Array.m_Array)[nIndex] = strtol (m_pNode->m_pchNameOrValue,
  -																	  &m_pEndptr,
  -																	  10);
  -							m_pNode = m_pParser->next ();
  +		    m_pNode = m_pParser->next (true);	/* charactor node */
  +
  +		    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +		    {
  +			((int *) Array.m_Array)[nIndex] =
  +			    strtol (m_pNode->m_pchNameOrValue, &m_pEndptr,
  +				    10);
  +			m_pNode = m_pParser->next ();
   			/* skip end element node too */
  -							continue;
  -						}
  +			continue;
  +		    }
   
   		    /* error : unexpected element type or end of stream */
  -						m_nStatus = AXIS_FAIL;
  -					    delete[](int *) Array.m_Array;
  -						Array.m_Array = 0;
  -						Array.m_Size = 0;
  +		    m_nStatus = AXIS_FAIL;
  +		    delete[](int *) Array.m_Array;
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
   
  -						return Array;
  -					}
  +		    return Array;
  +		}
   
  -					m_pNode = m_pParser->next ();	/* skip end element node too */
  -					return Array;
  +		m_pNode = m_pParser->next ();	/* skip end element node too */
  +		return Array;
   
  -				case XSD_UNSIGNEDINT:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  -				case XSD_SHORT:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (short, CONV_STRTOL)
  -				case XSD_UNSIGNEDSHORT:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned short, CONV_STRTOUL)
  -				case XSD_BYTE:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (char, CONV_STRTOL)
  -				case XSD_UNSIGNEDBYTE:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned char, CONV_STRTOUL)
  -				case XSD_LONG:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG, CONV_STRTOUL)
  -				case XSD_INTEGER:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (long, CONV_STRTOL)
  -				case XSD_UNSIGNEDLONG:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned long, CONV_STRTOUL)
  -				case XSD_FLOAT:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (float, CONV_STRTOD)
  -				case XSD_DOUBLE:
  -				case XSD_DECIMAL:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (double, CONV_STRTOD)
  -				case XSD_STRING:
  -				case XSD_HEXBINARY:
  -				case XSD_BASE64BINARY:
  -				case XSD_ANYURI:
  -				case XSD_QNAME:
  -				case XSD_NOTATION:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (char *, CONV_STRINGCOPY)
  -				case XSD_DATETIME:
  -				case XSD_DATE:
  -				case XSD_TIME:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (struct tm, CONV_STRTODATETIME)
  -				case XSD_DURATION:
  -					DESERIALIZE_ENCODED_ARRAY_BLOCK (long, CONV_STRTODURATION)
  -				case XSD_BOOLEAN:
  -//					DESERIALIZE_ENCODED_ARRAY_BLOCK(long, CONV_STRTOL)
  -					Array.m_Array = new long[Array.m_Size];
  +	    case XSD_UNSIGNEDINT:
  +		DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  +		    case XSD_SHORT:DESERIALIZE_ENCODED_ARRAY_BLOCK (short,
  +								    CONV_STRTOL)
  +		    case
  +		    XSD_UNSIGNEDSHORT:DESERIALIZE_ENCODED_ARRAY_BLOCK
  +		    (unsigned short,
  +		     CONV_STRTOUL) case
  +		    XSD_BYTE:DESERIALIZE_ENCODED_ARRAY_BLOCK (char,
  +							      CONV_STRTOL)
  +		    case
  +		    XSD_UNSIGNEDBYTE:DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned
  +								      char,
  +								      CONV_STRTOUL)
  +		    case XSD_LONG:DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG,
  +								   CONV_STRTOUL)
  +		    case XSD_INTEGER:DESERIALIZE_ENCODED_ARRAY_BLOCK (long,
  +								      CONV_STRTOL)
  +		    case
  +		    XSD_UNSIGNEDLONG:DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned
  +								      long,
  +								      CONV_STRTOUL)
  +		    case XSD_FLOAT:DESERIALIZE_ENCODED_ARRAY_BLOCK (float,
  +								    CONV_STRTOD)
  +		    case XSD_DOUBLE:case
  +		    XSD_DECIMAL:DESERIALIZE_ENCODED_ARRAY_BLOCK (double,
  +								 CONV_STRTOD)
  +		    case XSD_STRING:case XSD_HEXBINARY:case
  +		    XSD_BASE64BINARY:case XSD_ANYURI:case XSD_QNAME:case
  +		    XSD_NOTATION:DESERIALIZE_ENCODED_ARRAY_BLOCK (char *,
  +								  CONV_STRINGCOPY)
  +		    case XSD_DATETIME:case XSD_DATE:case
  +		    XSD_TIME:DESERIALIZE_ENCODED_ARRAY_BLOCK (struct tm,
  +							      CONV_STRTODATETIME)
  +		    case XSD_DURATION:DESERIALIZE_ENCODED_ARRAY_BLOCK (long,
  +								       CONV_STRTODURATION)
  +		    case XSD_BOOLEAN:
  +//                                      DESERIALIZE_ENCODED_ARRAY_BLOCK(long, CONV_STRTOL)
  +		  Array.m_Array = new long[Array.m_Size];
   
  -					if (!Array.m_Array)
  -					{
  -						Array.m_Size = 0;
  -						m_nStatus = AXIS_FAIL;
  -						return Array;
  -					}
  +		if (!Array.m_Array)
  +		{
  +		    Array.m_Size = 0;
  +		    m_nStatus = AXIS_FAIL;
  +		    return Array;
  +		}
   
  -					for (; nIndex < Array.m_Size; nIndex++)
  -					{
  +		for (; nIndex < Array.m_Size; nIndex++)
  +		{
   		    /* wrapper node without type info  Ex: <item> */
  -						m_pNode = m_pParser->next ();
  -						m_pNode = m_pParser->next (true);	/* charactor node */
  +		    m_pNode = m_pParser->next ();
  +		    m_pNode = m_pParser->next (true);	/* charactor node */
   
  -						if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -						{
  -							if (!strcmp ("false", m_pNode->m_pchNameOrValue)
  -								|| !strcmp ("FALSE", m_pNode->m_pchNameOrValue))
  -							{
  -								((long *) Array.m_Array)[nIndex] = 0;
  -							}
  -							else if (!strcmp ("true", m_pNode->m_pchNameOrValue)
  -									 || !strcmp ("TRUE",
  -									 m_pNode->m_pchNameOrValue))
  -							{
  -								((long *) Array.m_Array)[nIndex] = 1;
  -							}
  -							else
  -							{
  -								((long *) Array.m_Array)[nIndex] = (long) (strtol( m_pNode->m_pchNameOrValue,
  -																			&m_pEndptr, 10) & 1);
  -							}
  +		    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +		    {
  +			if (!strcmp ("false", m_pNode->m_pchNameOrValue)
  +			    || !strcmp ("FALSE", m_pNode->m_pchNameOrValue))
  +			{
  +			    ((long *) Array.m_Array)[nIndex] = 0;
  +			}
  +			else if (!strcmp ("true", m_pNode->m_pchNameOrValue)
  +				 || !strcmp ("TRUE",
  +					     m_pNode->m_pchNameOrValue))
  +			{
  +			    ((long *) Array.m_Array)[nIndex] = 1;
  +			}
  +			else
  +			{
  +			    ((long *) Array.m_Array)[nIndex] =
  +				(long) (strtol
  +					(m_pNode->m_pchNameOrValue,
  +					 &m_pEndptr, 10) & 1);
  +			}
   
  -						m_pNode = m_pParser->next ();	/* skip end element node too */
  -						
  -						continue;
  -						}
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +
  +			continue;
  +		    }
   		    /* error : unexpected element type or end of stream */
  -					m_nStatus = AXIS_FAIL;
  -					delete[](long *) Array.m_Array;
  -				    Array.m_Array = 0;
  -				    Array.m_Size = 0;
  -					}
  -		
  -				return Array;
  -				
  -				default:;
  -			}
  +		    m_nStatus = AXIS_FAIL;
  +		    delete[](long *) Array.m_Array;
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
   		}
  +
  +		return Array;
  +
  +	    default:;
  +	    }
  +	}
       }
       else
       {
  -		switch (nType)
  -		{
  -			case XSD_INT:
  -				Array.m_Array = new int[INITIAL_ARRAY_SIZE];
  +	switch (nType)
  +	{
  +	case XSD_INT:
  +	    Array.m_Array = new int[INITIAL_ARRAY_SIZE];
   
  -				if (!Array.m_Array)
  -				{
  -					return Array;
  -				}
  +	    if (!Array.m_Array)
  +	    {
  +		return Array;
  +	    }
   
  -				Array.m_Size = INITIAL_ARRAY_SIZE;
  +	    Array.m_Size = INITIAL_ARRAY_SIZE;
   
  -				while (true)
  -				{
  -					for (; nIndex < Array.m_Size; nIndex++)
  -					{
  -						if (!m_pNode)
  -						{
  +	    while (true)
  +	    {
  +		for (; nIndex < Array.m_Size; nIndex++)
  +		{
  +		    if (!m_pNode)
  +		    {
   			/* if there is an unprocessed node that may be one 
   			 * left from last array deserialization
   			 */
  -							m_pNode = m_pParser->next ();
  -						}
  +			m_pNode = m_pParser->next ();
  +		    }
   
   		    /* wrapper node without type info  Ex: <phonenumbers> */
  -						if (!m_pNode)
  -						{
  -							m_nStatus = AXIS_FAIL;
  -							delete[](int *) Array.m_Array;
  -							Array.m_Array = 0;
  -							Array.m_Size = 0;
  +		    if (!m_pNode)
  +		    {
  +			m_nStatus = AXIS_FAIL;
  +			delete[](int *) Array.m_Array;
  +			Array.m_Array = 0;
  +			Array.m_Size = 0;
   
  -							return Array;
  -						}
  +			return Array;
  +		    }
   
  -						if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  -						{
  -							m_pNode = m_pParser->next (true);	/* charactor node */
  +		    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +		    {
  +			m_pNode = m_pParser->next (true);	/* charactor node */
   
  -							if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -							{
  -								((int *) Array.m_Array)[nIndex] = strtol (m_pNode->m_pchNameOrValue,
  -																		  &m_pEndptr,
  -																		  10);
  -								m_pNode = m_pParser->next ();
  +			if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			{
  +			    ((int *) Array.m_Array)[nIndex] =
  +				strtol (m_pNode->m_pchNameOrValue, &m_pEndptr,
  +					10);
  +			    m_pNode = m_pParser->next ();
   			    /* skip end element node too */
  -							    m_pNode = NULL;	/* this is important in doc/lit 
  +			    m_pNode = NULL;	/* this is important in doc/lit 
   						 * style when deserializing arrays
   						 */
  -								continue;
  -							}
  +			    continue;
  +			}
   			/* error : unexpected element type or end of the stream */
  -						}
  -						else
  -						{
  -							if (nIndex > 0)
  -							{
  -							    Array.m_Size = nIndex;
  +		    }
  +		    else
  +		    {
  +			if (nIndex > 0)
  +			{
  +			    Array.m_Size = nIndex;
   			    /* put the actual deserialized item size
   			     * note we do not make m_pNode = NULL because this
   			     * node doesnot belong to this array
   			     */
  -								return Array;
  -							}
  +			    return Array;
  +			}
   			/* error : no elements deserialized */
  -						}
  +		    }
   
   		    /* if we come here it is an error situation */
  -		    			m_nStatus = AXIS_FAIL;
  -						m_pNode = NULL;
  -						delete[](int *) Array.m_Array;
  -						Array.m_Array = 0;
  -						Array.m_Size = 0;
  -						return Array;
  -					}
  +		    m_nStatus = AXIS_FAIL;
  +		    m_pNode = NULL;
  +		    delete[](int *) Array.m_Array;
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
  +		    return Array;
  +		}
   		/* if we come here that means the array allocated is not enough
   		 * So double it
   		 */
  -					void *tmp = Array.m_Array;
  -					Array.m_Array = new int[Array.m_Size * 2];
  +		void *tmp = Array.m_Array;
  +		Array.m_Array = new int[Array.m_Size * 2];
   
  -					if (!Array.m_Array)
  -					{
  -						Array.m_Size = 0;
  -						return Array;
  -					}
  +		if (!Array.m_Array)
  +		{
  +		    Array.m_Size = 0;
  +		    return Array;
  +		}
   
  -					memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (int));
  -					delete[](int *) tmp;
  -					Array.m_Size *= 2;
  +		memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (int));
  +		delete[](int *) tmp;
  +		Array.m_Size *= 2;
   		/* Array.m_RealSize = Array.m_Size; */
  -				}
  +	    }
   
  -			return Array;
  -			break;
  +	    return Array;
  +	    break;
   
  -			case XSD_UNSIGNEDINT:
  -			    DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  -			case XSD_SHORT:
  -				DESERIALIZE_LITERAL_ARRAY_BLOCK (short,	CONV_STRTOL)
  -			case XSD_UNSIGNEDSHORT:
  -				DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned short, CONV_STRTOUL)
  -			case XSD_BYTE:
  -				DESERIALIZE_LITERAL_ARRAY_BLOCK (char, CONV_STRTOL)
  -			case XSD_UNSIGNEDBYTE:
  -				DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned char, CONV_STRTOUL)
  -			case XSD_LONG:
  -//				DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG, CONV_STRTOUL)
  +	case XSD_UNSIGNEDINT:
  +	    DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  +		case XSD_SHORT:DESERIALIZE_LITERAL_ARRAY_BLOCK (short,
  +								CONV_STRTOL)
  +		case
  +		XSD_UNSIGNEDSHORT:DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned
  +								   short,
  +								   CONV_STRTOUL)
  +		case XSD_BYTE:DESERIALIZE_LITERAL_ARRAY_BLOCK (char,
  +							       CONV_STRTOL)
  +		case
  +		XSD_UNSIGNEDBYTE:DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned
  +								  char,
  +								  CONV_STRTOUL)
  +		case XSD_LONG:
  +//                              DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG, CONV_STRTOUL)
   // > FJP
  -				Array.m_Array = new LONGLONG[INITIAL_ARRAY_SIZE];
  +	      Array.m_Array = new LONGLONG[INITIAL_ARRAY_SIZE];
   
  -				if( !Array.m_Array)
  -				{
  -					return Array;
  -				}
  +	    if (!Array.m_Array)
  +	    {
  +		return Array;
  +	    }
   
  -				Array.m_Size = INITIAL_ARRAY_SIZE;
  +	    Array.m_Size = INITIAL_ARRAY_SIZE;
   
  -				while (true)
  -				{
  -					for( ; nIndex < Array.m_Size; nIndex++)
  -					{
  -						if( !m_pNode)
  -						{
  +	    while (true)
  +	    {
  +		for (; nIndex < Array.m_Size; nIndex++)
  +		{
  +		    if (!m_pNode)
  +		    {
   // if there is an unprocessed node that may be one left from last array deserialization
  -							m_pNode = m_pParser->next ();
  -						}
  +			m_pNode = m_pParser->next ();
  +		    }
   
   // wrapper node without type info  Ex: <phonenumbers>
  -						if( !m_pNode)
  -						{
  -							m_nStatus = AXIS_FAIL;
  +		    if (!m_pNode)
  +		    {
  +			m_nStatus = AXIS_FAIL;
   
  -							delete[](LONGLONG *) Array.m_Array;
  +			delete[](LONGLONG *) Array.m_Array;
   
  -							Array.m_Array = 0;
  -							Array.m_Size = 0;
  +			Array.m_Array = 0;
  +			Array.m_Size = 0;
   
  -							return Array;
  -						}
  +			return Array;
  +		    }
   
  -						if( 0 == strcmp( pName, m_pNode->m_pchNameOrValue))
  -						{
  -							m_pNode = m_pParser->next (true);	// charactor node
  +		    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +		    {
  +			m_pNode = m_pParser->next (true);	// charactor node
   
  -							if( m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -							{
  -								((LONGLONG*) Array.m_Array)[nIndex] = SoapDeSerializer::strtoll( m_pNode->m_pchNameOrValue);
  -								m_pNode = m_pParser->next ();
  +			if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			{
  +			    ((LONGLONG *) Array.m_Array)[nIndex] =
  +				SoapDeSerializer::strtoll (m_pNode->
  +							   m_pchNameOrValue);
  +			    m_pNode = m_pParser->next ();
   
   // skip end element node too
  -								m_pNode = NULL;	// this is important in doc/lit style when deserializing arrays
  -								continue;
  -							}
  +			    m_pNode = NULL;	// this is important in doc/lit style when deserializing arrays
  +			    continue;
  +			}
   
   // error : unexpected element type or end of the stream
  -						}
  -						else
  -						{
  -							if( nIndex > 0)
  -							{
  -								Array.m_Size = nIndex;
  +		    }
  +		    else
  +		    {
  +			if (nIndex > 0)
  +			{
  +			    Array.m_Size = nIndex;
   
   // put the actual deserialized item size note we do not make m_pNode = NULL
   // because this node doesnot belong to this array
  -								return Array;
  -							}
  +			    return Array;
  +			}
   // error : no elements deserialized
  -						}
  +		    }
   
   // if we come here it is an error situation
  -						m_nStatus = AXIS_FAIL;
  -						m_pNode = NULL;
  +		    m_nStatus = AXIS_FAIL;
  +		    m_pNode = NULL;
   
  -						delete [] (LONGLONG *) Array.m_Array;
  +		    delete[](LONGLONG *) Array.m_Array;
   
  -						Array.m_Array = 0;
  -						Array.m_Size = 0;
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
   
  -						return Array;
  -					}
  +		    return Array;
  +		}
   
   // if we come here that means the array allocated is not enough, so double it
  -					void *	tmp = Array.m_Array;
  +		void *tmp = Array.m_Array;
   
  -					Array.m_Array = new LONGLONG[Array.m_Size * 2];
  +		Array.m_Array = new LONGLONG[Array.m_Size * 2];
   
  -					if( !Array.m_Array)
  -					{
  -						Array.m_Size = 0;
  +		if (!Array.m_Array)
  +		{
  +		    Array.m_Size = 0;
   
  -						return Array;
  -					}
  +		    return Array;
  +		}
   
  -					memcpy( Array.m_Array, tmp, Array.m_Size * sizeof( LONGLONG));
  +		memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (LONGLONG));
   
  -					delete[](LONGLONG *) tmp;
  +		delete[](LONGLONG *) tmp;
   
  -					Array.m_Size *= 2;
  -				}
  +		Array.m_Size *= 2;
  +	    }
   
  -			return Array;
  -			break;
  +	    return Array;
  +	    break;
   
   // < FJP
  -		case XSD_INTEGER:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (long, CONV_STRTOL)
  -		case XSD_UNSIGNEDLONG:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned long, CONV_STRTOUL)
  -		case XSD_FLOAT:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (float, CONV_STRTOD)
  -		case XSD_DOUBLE:
  -		case XSD_DECIMAL:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (double, CONV_STRTOD)
  -		case XSD_STRING:
  -		case XSD_HEXBINARY:
  -		case XSD_BASE64BINARY:
  -		case XSD_ANYURI:
  -		case XSD_QNAME:
  -		case XSD_NOTATION:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (char *, CONV_STRINGCOPY)
  +	case XSD_INTEGER:
  +	    DESERIALIZE_LITERAL_ARRAY_BLOCK (long, CONV_STRTOL)
  +		case
  +		XSD_UNSIGNEDLONG:DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned
  +								  long,
  +								  CONV_STRTOUL)
  +		case XSD_FLOAT:DESERIALIZE_LITERAL_ARRAY_BLOCK (float,
  +								CONV_STRTOD)
  +		case XSD_DOUBLE:case
  +		XSD_DECIMAL:DESERIALIZE_LITERAL_ARRAY_BLOCK (double,
  +							     CONV_STRTOD) case
  +		XSD_STRING:case XSD_HEXBINARY:case XSD_BASE64BINARY:case
  +		XSD_ANYURI:case XSD_QNAME:case
  +		XSD_NOTATION:DESERIALIZE_LITERAL_ARRAY_BLOCK (char *,
  +							      CONV_STRINGCOPY)
   /*
   // > FJP
   			Array.m_Array = new char *[INITIAL_ARRAY_SIZE];
  @@ -1438,119 +1484,124 @@
   
   // < FJP
   */
  -		case XSD_DATETIME:
  -		case XSD_DATE:
  -		case XSD_TIME:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (struct tm, CONV_STRTODATETIME)
  -		case XSD_DURATION:
  -			DESERIALIZE_LITERAL_ARRAY_BLOCK (long, CONV_STRTODURATION)
  +	    case XSD_DATETIME:case XSD_DATE:case
  +		XSD_TIME:DESERIALIZE_LITERAL_ARRAY_BLOCK (struct tm,
  +							  CONV_STRTODATETIME)
  +		case XSD_DURATION:DESERIALIZE_LITERAL_ARRAY_BLOCK (long,
  +								   CONV_STRTODURATION)
   		case XSD_BOOLEAN:
   //          DESERIALIZE_LITERAL_ARRAY_BLOCK(long, CONV_STRTOL)
   // Originally, The above macro was all that was required, but because boolean
   // can have any of the following values '0', '1', 'false' or 'true', special,
   // non-standard processing is required.  Thus the standard macro has had to be
   // expanded and extended to cover the additional tests, unique to this type.
  -			Array.m_Array = new long[INITIAL_ARRAY_SIZE];
  +	      Array.m_Array = new long[INITIAL_ARRAY_SIZE];
   
  -			if (!Array.m_Array)
  -			{
  -				return Array;
  -			}
  +	    if (!Array.m_Array)
  +	    {
  +		return Array;
  +	    }
   
  -			Array.m_Size = INITIAL_ARRAY_SIZE;
  +	    Array.m_Size = INITIAL_ARRAY_SIZE;
   
  -			while (true)
  -			{
  -				for (; nIndex < Array.m_Size; nIndex++)
  -				{
  -					if (!m_pNode)
  -					{
  +	    while (true)
  +	    {
  +		for (; nIndex < Array.m_Size; nIndex++)
  +		{
  +		    if (!m_pNode)
  +		    {
   			/* if there is an unprocessed node that may be one left */
   			/* from last array deserialization */
  -						m_pNode = m_pParser->next ();
  -					}
  +			m_pNode = m_pParser->next ();
  +		    }
   
   		    /* wrapper node without type info Ex: <phonenumbers> */
  -					if (!m_pNode)
  -					{
  -						m_nStatus = AXIS_FAIL;
  -						delete[](long *) Array.m_Array;
  -						Array.m_Array = 0;
  -						Array.m_Size = 0;
  -						return Array;
  -					}
  +		    if (!m_pNode)
  +		    {
  +			m_nStatus = AXIS_FAIL;
  +			delete[](long *) Array.m_Array;
  +			Array.m_Array = 0;
  +			Array.m_Size = 0;
  +			return Array;
  +		    }
   
  -					if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  -					{
  -						m_pNode = m_pParser->next (true);	/* charactor node */
  +		    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +		    {
  +			m_pNode = m_pParser->next (true);	/* charactor node */
   
  -						if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -						{
  -							if (!strcmp ("false", m_pNode->m_pchNameOrValue) ||
  -								!strcmp ("FALSE", m_pNode->m_pchNameOrValue))
  -							{
  -								((long *) Array.m_Array)[nIndex] = 0;
  -							}
  -							else if (!strcmp("true", m_pNode->m_pchNameOrValue) ||
  -									 !strcmp ("TRUE", m_pNode->m_pchNameOrValue))
  -							{
  -								((long *) Array.m_Array)[nIndex] = 1;
  -							}
  -							else
  -							{
  -								((long *) Array.m_Array)[nIndex] = (long) (strtol(m_pNode->m_pchNameOrValue, &m_pEndptr, 10) & 1);
  -							}
  +			if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			{
  +			    if (!strcmp ("false", m_pNode->m_pchNameOrValue)
  +				|| !strcmp ("FALSE",
  +					    m_pNode->m_pchNameOrValue))
  +			    {
  +				((long *) Array.m_Array)[nIndex] = 0;
  +			    }
  +			    else if (!strcmp
  +				     ("true", m_pNode->m_pchNameOrValue)
  +				     || !strcmp ("TRUE",
  +						 m_pNode->m_pchNameOrValue))
  +			    {
  +				((long *) Array.m_Array)[nIndex] = 1;
  +			    }
  +			    else
  +			    {
  +				((long *) Array.m_Array)[nIndex] =
  +				    (long) (strtol
  +					    (m_pNode->m_pchNameOrValue,
  +					     &m_pEndptr, 10) & 1);
  +			    }
   
  -						m_pNode = m_pParser->next ();
  +			    m_pNode = m_pParser->next ();
   			    /* skip end element node too */
  -						m_pNode = NULL;
  +			    m_pNode = NULL;
   			    /* this is important in doc/lit style when */
   			    /* deserializing arrays */
  -						continue;
  -						}
  +			    continue;
  +			}
   			/* error : unexpected element type or */
   			/* end of the stream */
  -					}
  -					else
  -					{
  -						if (nIndex > 0)
  -						{
  -							Array.m_Size = nIndex;
  +		    }
  +		    else
  +		    {
  +			if (nIndex > 0)
  +			{
  +			    Array.m_Size = nIndex;
   			    /* put the actual deserialized item size */
   			    /* note we do not make m_pNode = NULL because */
   			    /* this node doesnot belong to this array */
  -						    return Array;
  -						}
  +			    return Array;
  +			}
   			/* error : no elements deserialized */
  -					}
  +		    }
   		    /* if we come here it is an error situation */
  -					m_nStatus = AXIS_FAIL;
  -					m_pNode = NULL;
  -					delete[](long *) Array.m_Array;
  -					Array.m_Array = 0;
  -					Array.m_Size = 0;
  -					return Array;
  -				}
  +		    m_nStatus = AXIS_FAIL;
  +		    m_pNode = NULL;
  +		    delete[](long *) Array.m_Array;
  +		    Array.m_Array = 0;
  +		    Array.m_Size = 0;
  +		    return Array;
  +		}
   		/* if we come here that means the array allocated is */
   		/* not enough. So double it */
  -				void *tmp = Array.m_Array;
  -				Array.m_Array = new long[Array.m_Size * 2];
  +		void *tmp = Array.m_Array;
  +		Array.m_Array = new long[Array.m_Size * 2];
   
  -				if (!Array.m_Array)
  -				{
  -					Array.m_Size = 0;
  -					return Array;
  -				}
  +		if (!Array.m_Array)
  +		{
  +		    Array.m_Size = 0;
  +		    return Array;
  +		}
   
  -				memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (long));
  -				delete[](long *) tmp;
  -				Array.m_Size *= 2;
  +		memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (long));
  +		delete[](long *) tmp;
  +		Array.m_Size *= 2;
   		/*Array.m_RealSize = Array.m_Size; */
  -			}
  -			break;
  +	    }
  +	    break;
   
  -			default:;
  -		}
  +	default:;
  +	}
       }
       m_nStatus = AXIS_FAIL;
       m_pNode = NULL;
  @@ -1926,8 +1977,8 @@
   }
   
   xsd__boolean
  -SoapDeSerializer::getAttributeAsBoolean (const AxisChar * pName,
  -					 const AxisChar * pNamespace)
  +    SoapDeSerializer::getAttributeAsBoolean (const AxisChar * pName,
  +					     const AxisChar * pNamespace)
   {
       xsd__boolean ret = false_;
       if (!m_pCurrNode)
  @@ -2039,15 +2090,15 @@
   DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRINGCOPY,
   				  INIT_VALUE_NUMBER)}
   xsd__hexBinary
  -SoapDeSerializer::getAttributeAsHexBinary (const AxisChar * pName,
  -					   const AxisChar * pNamespace)
  +    SoapDeSerializer::getAttributeAsHexBinary (const AxisChar * pName,
  +					       const AxisChar * pNamespace)
   {
   DESERIALIZE_GET_ATTRIBUTE_AS (xsd__hexBinary, CONV_STRTOHEXBINARY,
   				  INIT_VALUE_XSDBINARY)}
   xsd__base64Binary
  -SoapDeSerializer::getAttributeAsBase64Binary (const AxisChar *
  -					      pName, const
  -					      AxisChar * pNamespace)
  +    SoapDeSerializer::getAttributeAsBase64Binary (const AxisChar *
  +						  pName, const
  +						  AxisChar * pNamespace)
   {
   DESERIALIZE_GET_ATTRIBUTE_AS (xsd__base64Binary, CONV_STRTOBASE64BINARY,
   				  INIT_VALUE_XSDBINARY)}
  @@ -2598,8 +2649,8 @@
   }
   
   LONGLONG
  -SoapDeSerializer::getElementAsLong (const AxisChar * pName,
  -				    const AxisChar * pNamespace)
  +    SoapDeSerializer::getElementAsLong (const AxisChar * pName,
  +					const AxisChar * pNamespace)
   {
       LONGLONG ret = 0;
       if (AXIS_SUCCESS != m_nStatus)
  @@ -2641,7 +2692,7 @@
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
   //                ret = strtol(m_pNode->m_pchNameOrValue, &m_pEndptr, 10);
  -		ret = strtoll( m_pNode->m_pchNameOrValue);
  +		ret = strtoll (m_pNode->m_pchNameOrValue);
   		m_pNode = m_pParser->next ();	/* skip end element node too */
   		m_pNode = NULL;
   		/* this is important in doc/lit style when deserializing 
  @@ -3283,8 +3334,8 @@
   }
   
   xsd__hexBinary
  -SoapDeSerializer::getElementAsHexBinary (const AxisChar * pName,
  -					 const AxisChar * pNamespace)
  +    SoapDeSerializer::getElementAsHexBinary (const AxisChar * pName,
  +					     const AxisChar * pNamespace)
   {
       xsd__hexBinary ret;
       if (AXIS_SUCCESS != m_nStatus)
  @@ -3348,7 +3399,7 @@
   }
   
   xsd__base64Binary
  -SoapDeSerializer::decodeFromBase64Binary (const AxisChar * pValue)
  +    SoapDeSerializer::decodeFromBase64Binary (const AxisChar * pValue)
   {
       xsd__base64Binary value;
       value.__size = apr_base64_decode_len (pValue);
  @@ -3362,10 +3413,10 @@
       return value;
   }
   
  -xsd__hexBinary
  -SoapDeSerializer::decodeFromHexBinary (const AxisChar * pValue)
  +xsd__hexBinary SoapDeSerializer::decodeFromHexBinary (const AxisChar * pValue)
   {
  -    xsd__hexBinary value;
  +    xsd__hexBinary
  +	value;
       value.__size = strlen (pValue) / 2;
       value.__ptr = new unsigned char[value.__size + 1];
       Hex_Decode (value.__ptr, pValue);
  @@ -3377,8 +3428,8 @@
   }
   
   xsd__base64Binary
  -SoapDeSerializer::getElementAsBase64Binary (const AxisChar * pName,
  -					    const AxisChar * pNamespace)
  +    SoapDeSerializer::getElementAsBase64Binary (const AxisChar * pName,
  +						const AxisChar * pNamespace)
   {
       xsd__base64Binary ret;
       if (AXIS_SUCCESS != m_nStatus)
  @@ -3748,8 +3799,7 @@
    * attribute. If it is found then finds what the type is. Otherwise returns 
    * XSD_UNKNOWN.
    */
  -XSDTYPE
  -SoapDeSerializer::getXSDType (const AnyElement * pElement)
  +XSDTYPE SoapDeSerializer::getXSDType (const AnyElement * pElement)
   {
       /* first check whether this is a start element node */
       if (START_ELEMENT != pElement->m_type)
  @@ -3759,9 +3809,11 @@
   	if (URI_XSI == URIMapping::getURI (pElement->m_pchAttributes[i + 1]))
   	{
   	    ::QName qn;
  -	    XSDTYPE type = XSD_UNKNOWN;
  +	    XSDTYPE
  +		type = XSD_UNKNOWN;
   	    qn.splitQNameString (pElement->m_pchAttributes[i + 2], ':');
  -	    const char *pNS = m_pParser->getNS4Prefix (qn.uri);
  +	    const char *
  +		pNS = m_pParser->getNS4Prefix (qn.uri);
   	    if (pNS)
   	    {
   		if (URI_XSD == URIMapping::getURI (pNS))
  @@ -3899,77 +3951,81 @@
       return AXIS_SUCCESS;
   }
   
  -xsd__hexBinary
  -SoapDeSerializer::getBodyAsHexBinary ()
  +xsd__hexBinary SoapDeSerializer::getBodyAsHexBinary ()
   {
       /* TODO */
  -    xsd__hexBinary hb;
  +    xsd__hexBinary
  +	hb;
       return hb;
   }
   
  -xsd__base64Binary
  -SoapDeSerializer::getBodyAsBase64Binary ()
  +xsd__base64Binary SoapDeSerializer::getBodyAsBase64Binary ()
   {
       /* TODO */
   
  -    AxisChar* pBodyContent = (AxisChar*)malloc(1000);
  -        pBodyContent[0] = '\0';
  -                                                                                                                                                                            
  -        m_pNode = m_pParser->next ();
  -                                                                                                                                                                            
  -        if ((START_ELEMENT == m_pNode->m_type) &&
  -        (0 == strcmp (m_pNode->m_pchNameOrValue,
  -                      SoapKeywordMapping::map (m_nSoapVersion).
  -                      pchWords[SKW_BODY]))) {
  -                /* This is done to skip the BODY element declaration*/
  -                m_pNode = m_pParser->next ();
  -        }
  -                                                                                                                                                                            
  -        while (!((END_ELEMENT == m_pNode->m_type) &&
  -        (0 == strcmp (m_pNode->m_pchNameOrValue,
  -                      SoapKeywordMapping::map (m_nSoapVersion).
  -                      pchWords[SKW_BODY])))) {
  -                strcat(pBodyContent, (AnyElemntUtils::toString(m_pNode)).c_str());
  -        }
  +    AxisChar *
  +	pBodyContent = (AxisChar *) malloc (1000);
  +    pBodyContent[0] = '\0';
  +
  +    m_pNode = m_pParser->next ();
  +
  +    if ((START_ELEMENT == m_pNode->m_type) &&
  +	(0 == strcmp (m_pNode->m_pchNameOrValue,
  +		      SoapKeywordMapping::map (m_nSoapVersion).
  +		      pchWords[SKW_BODY])))
  +    {
  +	/* This is done to skip the BODY element declaration */
  +	m_pNode = m_pParser->next ();
  +    }
  +
  +    while (!((END_ELEMENT == m_pNode->m_type) &&
  +	     (0 == strcmp (m_pNode->m_pchNameOrValue,
  +			   SoapKeywordMapping::map (m_nSoapVersion).
  +			   pchWords[SKW_BODY]))))
  +    {
  +	strcat (pBodyContent, (AnyElemntUtils::toString (m_pNode)).c_str ());
  +    }
   
  -    return decodeFromBase64Binary(pBodyContent);
  +    return decodeFromBase64Binary (pBodyContent);
   
   }
   
  -AxisChar* SoapDeSerializer::getBodyAsChar()
  +AxisChar *
  +SoapDeSerializer::getBodyAsChar ()
   {
  -	AxisChar* pBodyContent = (AxisChar*)malloc(1000);
  -	pBodyContent[0] = '\0';
  +    AxisChar *pBodyContent = (AxisChar *) malloc (1000);
  +    pBodyContent[0] = '\0';
   
  -	m_pNode = m_pParser->next ();
  +    m_pNode = m_pParser->next ();
   
  -	if ((START_ELEMENT == m_pNode->m_type) &&
  -        (0 == strcmp (m_pNode->m_pchNameOrValue,
  -                      SoapKeywordMapping::map (m_nSoapVersion).
  -                      pchWords[SKW_BODY]))) {
  -		/* This is done to skip the BODY element declaration*/
  -		m_pNode = m_pParser->next ();
  -	}
  +    if ((START_ELEMENT == m_pNode->m_type) &&
  +	(0 == strcmp (m_pNode->m_pchNameOrValue,
  +		      SoapKeywordMapping::map (m_nSoapVersion).
  +		      pchWords[SKW_BODY])))
  +    {
  +	/* This is done to skip the BODY element declaration */
  +	m_pNode = m_pParser->next ();
  +    }
   
  -	while (!((END_ELEMENT == m_pNode->m_type) &&
  -        (0 == strcmp (m_pNode->m_pchNameOrValue,
  -                      SoapKeywordMapping::map (m_nSoapVersion).
  -                      pchWords[SKW_BODY])))) {
  -		strcat(pBodyContent, (AnyElemntUtils::toString(m_pNode)).c_str());
  -	}		
  +    while (!((END_ELEMENT == m_pNode->m_type) &&
  +	     (0 == strcmp (m_pNode->m_pchNameOrValue,
  +			   SoapKeywordMapping::map (m_nSoapVersion).
  +			   pchWords[SKW_BODY]))))
  +    {
  +	strcat (pBodyContent, (AnyElemntUtils::toString (m_pNode)).c_str ());
  +    }
   
  -	return pBodyContent;
  +    return pBodyContent;
   }
   
   int
   SoapDeSerializer::setNewSoapBody (AxisChar * pNewSoapBody)
   {
  -    DeSerializerMemBufInputStream stream(pNewSoapBody);
  -    return m_pParser->setInputStream(&stream);
  +    DeSerializerMemBufInputStream stream (pNewSoapBody);
  +    return m_pParser->setInputStream (&stream);
   }
   
  -bool
  -SoapDeSerializer::isAnyMustUnderstandHeadersLeft ()
  +bool SoapDeSerializer::isAnyMustUnderstandHeadersLeft ()
   {
       /* TODO */
       return false;
  @@ -4273,55 +4329,63 @@
       }
   }
   
  -LONGLONG SoapDeSerializer::strtoll( const char *pValue)
  +LONGLONG
  +SoapDeSerializer::strtoll (const char *pValue)
   {
  -    LONGLONG	llRetVal = 0;
  -    LONGLONG	llPowerOf10 = 1;
  -    int			iLength = strlen( pValue);
  -    int			iCountDownTo = 0;
  -    bool		bMinus = false;
  +    LONGLONG llRetVal = 0;
  +    LONGLONG llPowerOf10 = 1;
  +    int iLength = strlen (pValue);
  +    int iCountDownTo = 0;
  +    bool bMinus = false;
   
  -    if( *pValue == '-')
  +    if (*pValue == '-')
       {
  -		bMinus = true;
  -		iCountDownTo = 1;
  +	bMinus = true;
  +	iCountDownTo = 1;
       }
   
  -    if( iLength > 0)
  +    if (iLength > 0)
       {
  -		iLength--;
  +	iLength--;
       }
   
  -    for( int iCount = iLength; iCount >= iCountDownTo; iCount--)
  +    for (int iCount = iLength; iCount >= iCountDownTo; iCount--)
       {
  -		llRetVal += (LONGLONG) (pValue[iCount] - '0') * llPowerOf10;
  -		llPowerOf10 *= (LONGLONG) 10;
  +	llRetVal += (LONGLONG) (pValue[iCount] - '0') * llPowerOf10;
  +	llPowerOf10 *= (LONGLONG) 10;
       }
   
  -    if( bMinus)
  +    if (bMinus)
       {
  -		llRetVal = -llRetVal;
  +	llRetVal = -llRetVal;
       }
   
       return llRetVal;
   }
   
   /* This function is never called. */
  -AXIS_TRANSPORT_STATUS SoapDeSerializer::DeSerializerMemBufInputStream::sendBytes(const char* pcSendBuffer, const void* pBufferid)
  -{
  -        return TRANSPORT_FINISHED;
  -}
  -                                                                                                                                                                            
  -AXIS_TRANSPORT_STATUS SoapDeSerializer::DeSerializerMemBufInputStream::getBytes(char* pcBuffer, int* piRetSize)
  -{
  -        if (!m_pcDeSeriaMemBuffer) return TRANSPORT_FAILED;
  -        int nBufLen = strlen(m_pcDeSeriaMemBuffer);
  -        if (0 == nBufLen) return TRANSPORT_FINISHED;
  -        nBufLen = ((*piRetSize - 1) < nBufLen) ? (*piRetSize - 1) : nBufLen;
  -        strncpy(pcBuffer, m_pcDeSeriaMemBuffer, nBufLen);
  -        pcBuffer[nBufLen] = 0;
  -        m_pcDeSeriaMemBuffer+=nBufLen;
  -        return TRANSPORT_IN_PROGRESS;
  +AXIS_TRANSPORT_STATUS
  +SoapDeSerializer::DeSerializerMemBufInputStream::
  +sendBytes (const char *pcSendBuffer, const void *pBufferid)
  +{
  +    return TRANSPORT_FINISHED;
  +}
  +
  +AXIS_TRANSPORT_STATUS
  +SoapDeSerializer::DeSerializerMemBufInputStream::getBytes (char *pcBuffer,
  +							   int *piRetSize)
  +{
  +    if (!m_pcDeSeriaMemBuffer)
  +	return TRANSPORT_FAILED;
  +    int
  +	nBufLen = strlen (m_pcDeSeriaMemBuffer);
  +    if (0 == nBufLen)
  +	return TRANSPORT_FINISHED;
  +    nBufLen = ((*piRetSize - 1) < nBufLen) ? (*piRetSize - 1) : nBufLen;
  +    strncpy (pcBuffer, m_pcDeSeriaMemBuffer, nBufLen);
  +    pcBuffer[nBufLen] = 0;
  +    m_pcDeSeriaMemBuffer += nBufLen;
  +    return TRANSPORT_IN_PROGRESS;
   }
   
   
  
  
  

Mime
View raw message