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/02/03 06:19:51 UTC
cvs commit: ws-axis/c/src/soap SoapMethod.cpp SoapFault.cpp SoapEnvelope.cpp SoapBody.cpp CharacterElement.cpp
roshan 2004/02/02 21:19:51
Modified: c/src/soap SoapMethod.cpp SoapFault.cpp SoapEnvelope.cpp
SoapBody.cpp CharacterElement.cpp
Log:
changes for unit test support
Revision Changes Path
1.16 +29 -0 ws-axis/c/src/soap/SoapMethod.cpp
Index: SoapMethod.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapMethod.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- SoapMethod.cpp 12 Jan 2004 12:20:54 -0000 1.15
+++ SoapMethod.cpp 3 Feb 2004 05:19:51 -0000 1.16
@@ -288,3 +288,32 @@
return AXIS_SUCCESS;
}
*/
+
+int SoapMethod::reset()
+{
+ m_strUri = "";
+ m_strLocalname = "";
+ m_strPrefix = "";
+ m_OutputParams.clear();
+ m_attributes.clear();
+
+ return AXIS_SUCCESS;
+}
+
+int SoapMethod::initializeForTesting()
+{
+ m_strPrefix = "mn";
+ m_strLocalname = "add";
+ m_strUri = "http://myurl.com";
+
+ Attribute* pAttribute = new Attribute();
+ pAttribute->initializeForTesting();
+ addAttribute(pAttribute);
+
+ /*
+ Param* pParam = new Param(100);
+ AddOutputParam(pParam);
+ */
+
+ return AXIS_SUCCESS;
+}
1.12 +20 -0 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.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SoapFault.cpp 12 Jan 2004 12:20:54 -0000 1.11
+++ SoapFault.cpp 3 Feb 2004 05:19:51 -0000 1.12
@@ -205,3 +205,23 @@
return pSoapFault;
}
+
+SoapFault::SoapFault(string sFaultcode, string sFaultstring, string sFaultactor, string sDetail)
+{
+ m_sFaultcode= sFaultcode;
+ m_sFaultstring= sFaultstring;
+ m_sFaultactor= sFaultactor;
+ m_sDetail= sDetail;
+}
+
+bool SoapFault::operator ==(const SoapFault &objSoapFault)
+{
+ if ((m_sFaultcode == objSoapFault.m_sFaultcode) &&
+ (m_sFaultstring == objSoapFault.m_sFaultstring) &&
+ (m_sFaultactor == objSoapFault.m_sFaultactor) &&
+ (m_sDetail == objSoapFault.m_sDetail)) {
+ return true;
+ }
+
+ return false;
+}
1.11 +20 -0 ws-axis/c/src/soap/SoapEnvelope.cpp
Index: SoapEnvelope.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapEnvelope.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SoapEnvelope.cpp 12 Jan 2004 12:20:54 -0000 1.10
+++ SoapEnvelope.cpp 3 Feb 2004 05:19:51 -0000 1.11
@@ -303,3 +303,23 @@
}
return AXIS_SUCCESS;
}
+
+int SoapEnvelope::initializeForTesting(SOAP_VERSION eSoapVersion)
+{
+ if(eSoapVersion == SOAP_VER_1_2) {
+ setPrefix("env");
+
+ Attribute* pAttribute = new Attribute();
+ pAttribute->setPrefix("xmlns");
+ pAttribute->setLocalName("env");
+ pAttribute->setUri("http://www.w3.org/2003/05/soap-envelope");
+ addNamespaceDecl(pAttribute);
+
+ SoapBody* pSoapBody = new SoapBody();
+ pSoapBody->initializeForTesting();
+
+ setSoapBody(pSoapBody);
+ }
+
+ return AXIS_SUCCESS;
+}
1.12 +10 -0 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.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SoapBody.cpp 12 Jan 2004 12:20:54 -0000 1.11
+++ SoapBody.cpp 3 Feb 2004 05:19:51 -0000 1.12
@@ -166,3 +166,13 @@
return iStatus;
}
+
+int SoapBody::initializeForTesting()
+{
+ SoapMethod* pSoapMethod = new SoapMethod();
+ pSoapMethod->initializeForTesting();
+
+ setSoapMethod(pSoapMethod);
+
+ return AXIS_SUCCESS;
+}
1.8 +11 -0 ws-axis/c/src/soap/CharacterElement.cpp
Index: CharacterElement.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/CharacterElement.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CharacterElement.cpp 12 Jan 2004 12:20:54 -0000 1.7
+++ CharacterElement.cpp 3 Feb 2004 05:19:51 -0000 1.8
@@ -126,3 +126,14 @@
return AXIS_SUCCESS;
}
+
+bool CharacterElement::operator ==( const CharacterElement &objChEle)
+{
+ if (objChEle.m_sValue == m_sValue) {
+ return true;
+ }
+ else {
+ return false;
+ }
+
+}