ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/output XSDElement.expected
Date Thu, 24 Mar 2005 14:27:18 GMT
dicka       2005/03/24 06:27:18

  Modified:    c/src/soap SoapSerializer.cpp
               c/tests/auto_build/testcases/client/cpp XSDElementClient.cpp
               c/tests/auto_build/testcases/output XSDElement.expected
  Log:
  I have spoken with Dims about this fix, and agree that it an appropriate fix, so have now
re-introduced with an additional check for NULL.
  
  In addition I have extended the XSDElement testcase to check correct behaviour for empty
(not "nil") strings.
  
  Submitted by: Davanum Srinivas
  Reviewed by: Adrian Dick
  
  Revision  Changes    Path
  1.109     +9 -1      ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.108
  retrieving revision 1.109
  diff -u -r1.108 -r1.109
  --- SoapSerializer.cpp	24 Mar 2005 10:49:55 -0000	1.108
  +++ SoapSerializer.cpp	24 Mar 2005 14:27:18 -0000	1.109
  @@ -836,7 +836,15 @@
       case XSD_QNAME:
       case XSD_NOTATION:
       case XSD_STRING:
  -        pParam->m_Value.pStrValue = (char *) (pValue);
  +        if (pValue == NULL)
  +        {
  +            pParam->m_Value.pStrValue = NULL;
  +        }
  +        else
  +        {
  +            pParam->m_Value.pStrValue = new char[strlen((const char*)pValue)+1];
  +            strcpy((char*)(pParam->m_Value.pStrValue),(const char*)pValue);
  +        }
           break;
   
       case XSD_HEXBINARY:
  
  
  
  1.8       +10 -1     ws-axis/c/tests/auto_build/testcases/client/cpp/XSDElementClient.cpp
  
  Index: XSDElementClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSDElementClient.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSDElementClient.cpp	23 Mar 2005 15:45:06 -0000	1.7
  +++ XSDElementClient.cpp	24 Mar 2005 14:27:18 -0000	1.8
  @@ -164,7 +164,16 @@
   		cout << "string=" << strResult << endl;
   		strResult = ws->setGetDataString("m");
   		cout << "small string=" << strResult << endl;
  -
  +        strResult = ws->setGetDataString("");
  +        if (&strResult != NULL && strResult == NULL)
  +        {
  +            cout << "empty string = <empty string>" << endl;
  +        }
  +        else
  +        {
  +            cout << "empty string failed " << endl;
  +        }
  +        
   		intResult = ws->setGetIntegerType(919191919);
   		cout << "integer=" << intResult << endl;
   
  
  
  
  1.5       +1 -0      ws-axis/c/tests/auto_build/testcases/output/XSDElement.expected
  
  Index: XSDElement.expected
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/XSDElement.expected,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XSDElement.expected	4 Mar 2005 13:51:42 -0000	1.4
  +++ XSDElement.expected	24 Mar 2005 14:27:18 -0000	1.5
  @@ -14,6 +14,7 @@
   dateTime=Fri Nov 12 07:58:43 2004
   string=never odd or even
   small string=m
  +empty string = <empty string>
   integer=919191919
   decimal=929292929.55556
   base64Binary size=41
  
  
  

Mime
View raw message