ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r391615 - /webservices/axis/trunk/c/src/soap/SoapFault.cpp
Date Wed, 05 Apr 2006 13:55:08 GMT
Author: dicka
Date: Wed Apr  5 06:55:07 2006
New Revision: 391615

URL: http://svn.apache.org/viewcvs?rev=391615&view=rev
Log:
AXISCPP-706

Update to the fix applied, as it was only applied to faults containing complex detail, when
it should have only been for faults containing simple detail(ie text element, not XML tags).

This was causing FaultMappingDoc and FaultMappingRepeatedDoc testcases to fail when testing
against SimpleAxisServer.

Also, took the opportunity to remove some redundant code from this method.

Modified:
    webservices/axis/trunk/c/src/soap/SoapFault.cpp

Modified: webservices/axis/trunk/c/src/soap/SoapFault.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/SoapFault.cpp?rev=391615&r1=391614&r2=391615&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapFault.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapFault.cpp Wed Apr  5 06:55:07 2006
@@ -60,36 +60,10 @@
 
 int SoapFault::serialize(SoapSerializer& pSZ, SOAP_VERSION eSoapVersion)
 {
-    // written according to SOAP Version 1.1 
+    // written according to SOAP Version 1.1
     int iStatus= AXIS_SUCCESS;
-    if(m_bIsSimpleDetail)
-    {
-        pSZ.setStyle(DOC_LITERAL);
+    pSZ.setStyle(DOC_LITERAL);
     pSZ.serialize("<", gs_SoapEnvVersionsStruct[eSoapVersion].pchPrefix, ":",
-        gs_SoapEnvVersionsStruct[eSoapVersion].pchWords[SKW_FAULT], ">\n", NULL); 
-	
-    m_pFaultcodeParam->serialize(pSZ);
-    m_pFaultstringParam->serialize(pSZ);
-
-    if(m_pFaultactorParam)
-    {        
-        m_pFaultactorParam->serialize(pSZ);
-    } 
-
-	
-	if(m_pFaultDetail) 
-	{ 
-		pSZ.serialize("<detail>", NULL); 
-		m_pFaultDetail->serialize(pSZ); 
-		pSZ.serialize("</detail>\n", NULL); 
-	} 
-    
-	pSZ.serialize("</", gs_SoapEnvVersionsStruct[eSoapVersion].pchPrefix, ":",
-		gs_SoapEnvVersionsStruct[eSoapVersion].pchWords[SKW_FAULT], ">\n", NULL); 
-    }
-    else
-    {
-        pSZ.serialize("<", gs_SoapEnvVersionsStruct[eSoapVersion].pchPrefix, ":",
         gs_SoapEnvVersionsStruct[eSoapVersion].pchWords[SKW_FAULT], ">\n", NULL);
 
     m_pFaultcodeParam->serialize(pSZ);
@@ -100,24 +74,25 @@
         m_pFaultactorParam->serialize(pSZ);
     }
 
-	//Chinthana:Changed the code to solved Issue AXISCPP-706. 
-    /*if(m_pFaultDetail)
+    if(m_pFaultDetail)
     {
-         pSZ.serialize("<detail>", NULL);
-            m_pFaultDetail->serialize(pSZ);
-            pSZ.serialize("</detail>\n", NULL);
-    }*/
-	if(m_pFaultDetail) 
-	{ 
-		pSZ.serialize("<detail><appSpecific>", NULL); 
-		m_pFaultDetail->serialize(pSZ); 
-		pSZ.serialize("</appSpecific></detail>\n", NULL); 
-	} 
-	//22/06/2005.........................................
+        pSZ.serialize("<detail>", NULL);
 
-        pSZ.serialize("</", gs_SoapEnvVersionsStruct[eSoapVersion].pchPrefix, ":",
-                gs_SoapEnvVersionsStruct[eSoapVersion].pchWords[SKW_FAULT], ">\n", NULL);
+        if(m_bIsSimpleDetail) // Fix for AXISCPP-706
+        {
+            pSZ.serialize("<appSpecific>", NULL);
+        }
+        m_pFaultDetail->serialize(pSZ);
+        if(m_bIsSimpleDetail) // Fix for AXISCPP-706
+        {
+            pSZ.serialize("</appSpecific>", NULL);
+        }
+        pSZ.serialize("</detail>\n", NULL);
     }
+
+    pSZ.serialize("</", gs_SoapEnvVersionsStruct[eSoapVersion].pchPrefix, ":",
+        gs_SoapEnvVersionsStruct[eSoapVersion].pchWords[SKW_FAULT], ">\n", NULL);
+
     return iStatus;
 }
 



Mime
View raw message