You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ro...@apache.org on 2004/06/02 19:55:44 UTC
cvs commit: ws-axis/c/src/soap SoapFault.h SoapFault.cpp SoapBody.cpp
roshan 2004/06/02 10:55:44
Modified: c/src/soap SoapFault.h SoapFault.cpp SoapBody.cpp
Log:
The "SOAP-ENV" prefix was hard-coded in the "serialize" method.
* Corrected it to serialize the correct prefix.
Revision Changes Path
1.3 +9 -1 ws-axis/c/src/soap/SoapFault.h
Index: SoapFault.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapFault.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SoapFault.h 24 May 2004 05:44:20 -0000 1.2
+++ SoapFault.h 2 Jun 2004 17:55:44 -0000 1.3
@@ -56,6 +56,14 @@
* @author Roshan Weerasuriya (roshan@jkcs.slt.lk)
* @author damitha kumarage (damitha@jkcsworld.com, damitha@opensource.lk)
*/
+
+/*
+ * Revision 1.1 2004/June/02 roshan
+ * Changed. The "SOAP-ENV" prefix was hard-coded in the "serialize" method.
+ * Corrected it to serialize the correct prefix. Added the parameter
+ * "SOAP_VERSION eSoapVersion" to the "serialize" method.
+ */
+
class SoapFault
{
friend class SoapFaultsTestCase;
@@ -74,7 +82,7 @@
const char* getSoapString();
- int serialize(SoapSerializer& pSZ);
+ int serialize(SoapSerializer& pSZ, SOAP_VERSION eSoapVersion);
/* int serialize(string&); */
1.25 +7 -3 ws-axis/c/src/soap/SoapFault.cpp
Index: SoapFault.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapFault.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- SoapFault.cpp 2 Jun 2004 17:29:30 -0000 1.24
+++ SoapFault.cpp 2 Jun 2004 17:55:44 -0000 1.25
@@ -34,6 +34,8 @@
* setParam(m_pFaultcodeParam, "faultcode", &sFaultcode, XSD_STRING);
* After change:
* setParam(m_pFaultcodeParam, "faultcode", sFaultcode.c_str(), XSD_STRING);
+ * Changed the "SOAP-ENV" prefix was hard-coded in the "serialize" method.
+ * Corrected it to serialize the correct prefix.
*/
#include "SoapFault.h"
@@ -63,13 +65,15 @@
m_pFaultDetail = NULL;
}
-int SoapFault::serialize(SoapSerializer& pSZ)
+int SoapFault::serialize(SoapSerializer& pSZ, SOAP_VERSION eSoapVersion)
{
/* written according to SOAP Version 1.1 */
int iStatus= AXIS_SUCCESS;
-
- pSZ.serialize("<SOAP-ENV:Fault>", NULL);
+
+ pSZ.serialize("<", gs_SoapEnvVersionsStruct[eSoapVersion].pchPrefix, ":",
+ gs_SoapEnvVersionsStruct[eSoapVersion].pchWords[SKW_FAULT], ">", NULL);
+
m_pFaultcodeParam->serialize(pSZ);
//pSZ.serialize("<faultcode>", m_sFaultcode.c_str(), "</faultcode>", NULL);
m_pFaultstringParam->serialize(pSZ);
1.22 +10 -3 ws-axis/c/src/soap/SoapBody.cpp
Index: SoapBody.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapBody.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- SoapBody.cpp 26 May 2004 06:27:16 -0000 1.21
+++ SoapBody.cpp 2 Jun 2004 17:55:44 -0000 1.22
@@ -23,12 +23,19 @@
*
*
*
- * @author Roshan Weerasuriya (roshan@jkcs.slt.lk)
+ * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
*
*/
/* SoapBody.cpp: implementation of the SoapBody class. */
+/*
+ * Revision 1.1 2004/June/02 roshan
+ * Added the parameter "eSoapVersion" to the call of m_pSoapFault->serialize
+ * method. The SoapFault class is expecting this parameter to determine the
+ * SoapVersion.
+ */
+
#include "SoapBody.h"
#include <axis/server/SoapSerializer.h>
#include <axis/server/GDefine.h>
@@ -84,7 +91,7 @@
if(NULL != m_pSoapFault)
{
- iStatus= m_pSoapFault->serialize(pSZ);
+ iStatus= m_pSoapFault->serialize(pSZ, eSoapVersion);
if(iStatus==AXIS_FAIL)
{
break;
@@ -103,7 +110,7 @@
m_pSoapFault = SoapFault::getSoapFault(SERVER_ENGINE_WEBSERVICEFAILED);
if(m_pSoapFault!=NULL)
{
- iStatus= m_pSoapFault->serialize(pSZ);
+ iStatus= m_pSoapFault->serialize(pSZ, eSoapVersion);
if(iStatus==AXIS_FAIL)
break;
}