You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "nadir amra (JIRA)" <ax...@ws.apache.org> on 2007/02/04 23:15:06 UTC

[jira] Commented: (AXISCPP-1019) Arrays returned with 0 size (in axis client)

    [ https://issues.apache.org/jira/browse/AXISCPP-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470095 ] 

nadir amra commented on AXISCPP-1019:
-------------------------------------

Actually, I corrected the problem right now with SVN refresh of deserializer (and added some comments to clarify and a better check). 

        // For RPC-encoded arrays, the element name in array cannot be derived - 
        // within an array value element names are not significant - so  
        // we read until end-of-element is encountered (i.e. null string 
        // is returned from peek()). 

So I would suggest that you refresh with latest SVN because there was some problems with deserializing arrays.

> Arrays returned with 0 size (in axis client) 
> ---------------------------------------------
>
>                 Key: AXISCPP-1019
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1019
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Serialization
>    Affects Versions: current (nightly)
>         Environment: jdk 1.4.2 
>            Reporter: Leonid Chumanov
>             Fix For: current (nightly)
>
>
> Arrays returned with 0 size (in axis client) 
> ? May be error in class SoapDeSerializer?
> We see two function with equals code but in first we see "!="? in second we see "==" in block 
> strcmp(elementName, pName) == 0
> which add array element to array
> We thik that is error, but we can not rebuild project to test . 
> void SoapDeSerializer::deserializeEncodedArray (Axis_Array* pArray,
> IAnySimpleType* pSimpleType, const AxisChar* pName, const AxisChar* pNamespace, int size) {
> 	#ifdef ENABLE_AXISTRACE
> 		if (axiscpp::AxisTrace::isTraceOn())
> 			axiscpp::AxisTrace::traceEntry("SoapDeSerializer",
> "deserializeEncodedArray", NULL, 5,
> 					TRACETYPE_POINTER, sizeof(Axis_Array), ((void*)&pArray),
> 					TRACETYPE_POINTER, sizeof(IAnySimpleType), ((void*)&pSimpleType),
> 					TRACETYPE_STRING, 0, ((void*)&pName),
> 					TRACETYPE_STRING, 0, ((void*)&pNamespace),
> 					TRACETYPE_INT, 0, ((void*)&size));	  /* AUTOINSERTED TRACE */
> 	#endif
>      for (int count = 0 ; count < size; count++)
>      {
>          const char* elementName = peekNextElementName();
>          if(strcmp(elementName, pName) != 0)
>          {
>              getElement(pName, pNamespace, pSimpleType, true);
>              void * pValue = pSimpleType->getValue();
>              pArray->addElement(pValue);
>              Axis::AxisDelete(pValue, pSimpleType->getType());
>          }
>          else
>          {
>              	{
> 		#ifdef ENABLE_AXISTRACE
> 			if (axiscpp::AxisTrace::isTraceOn())
> 				axiscpp::AxisTrace::traceExit("SoapDeSerializer", 
> "deserializeEncodedArray", NULL, 0);	  /* AUTOINSERTED TRACE */
> 		#endif
> 		return;
> 	}
>          }
>      }
> }
> void SoapDeSerializer::deserializeLiteralArray (Axis_Array* pArray,
> IAnySimpleType* pSimpleType, const AxisChar* pName, const AxisChar*
> pNamespace)
> {
> 	#ifdef ENABLE_AXISTRACE
> 		if (axiscpp::AxisTrace::isTraceOn())
> 			axiscpp::AxisTrace::traceEntry("SoapDeSerializer",
> "deserializeLiteralArray", NULL, 4,
> 					TRACETYPE_POINTER, sizeof(Axis_Array), ((void*)&pArray),
> 					TRACETYPE_POINTER, sizeof(IAnySimpleType), ((void*)&pSimpleType),
> 					TRACETYPE_STRING, 0, ((void*)&pName),
> 					TRACETYPE_STRING, 0, ((void*)&pNamespace));	  /* AUTOINSERTED TRACE */
> 	#endif
>      while(true)
>      {
>          const char* elementName = peekNextElementName();
>          if(strcmp(elementName, pName) == 0)
>          {
>      		getElement(pName, pNamespace, pSimpleType);
>              void * pValue = pSimpleType->getValue();
>              pArray->addElement(pValue);
>              Axis::AxisDelete(pValue, pSimpleType->getType());
>          }
>          else
>          {
>              	{
> 		#ifdef ENABLE_AXISTRACE
> 			if (axiscpp::AxisTrace::isTraceOn())
> 				axiscpp::AxisTrace::traceExit("SoapDeSerializer", 
> "deserializeLiteralArray", NULL, 0);	  /* AUTOINSERTED TRACE */
> 		#endif
> 		return;
> 	}
>          }
>      }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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