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 ni...@apache.org on 2005/02/21 11:42:36 UTC
cvs commit: ws-axis/c/samples/server/interoptests/base AxisServiceException.cpp InteropTestPortTypeService.cpp InteropTestPortTypeWrapper.cpp SOAPStruct.cpp
nithya 2005/02/21 02:42:36
Modified: c/samples/server/interoptests/base AxisServiceException.cpp
InteropTestPortTypeService.cpp
InteropTestPortTypeWrapper.cpp SOAPStruct.cpp
Log:
corrected the invalid conversion from `xsd__int*' to `int' error
Revision Changes Path
1.4 +15 -5 ws-axis/c/samples/server/interoptests/base/AxisServiceException.cpp
Index: AxisServiceException.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/base/AxisServiceException.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AxisServiceException.cpp 24 Nov 2004 13:25:18 -0000 1.3
+++ AxisServiceException.cpp 21 Feb 2005 10:42:36 -0000 1.4
@@ -1,15 +1,15 @@
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
- * This file contains implementations of an Exception class of the web service.
+ * This file contains implementations of the base Exception class of the web service.
*/
-#include "AxisServiceException.h"
+#include "AxisServiceException.hpp"
#include <axis/AxisWrapperAPI.hpp>
AxisServiceException::AxisServiceException()
{
-/* This only serves the pupose of indicating that the
+/* This only serves the purpose of indicating that the
* service has thrown an excpetion
*/
m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION;
@@ -19,6 +19,7 @@
AxisServiceException::AxisServiceException(ISoapFault* pFault)
{
m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION;
+ m_pISoapFault = pFault;
processException(pFault);}
AxisServiceException::AxisServiceException(int iExceptionCode)
@@ -39,6 +40,11 @@
processException (e, iExceptionCode);
}
+AxisServiceException::AxisServiceException(string sMessage)
+{
+ m_sMessage =sMessage;
+}
+
AxisServiceException::~AxisServiceException() throw ()
{
m_sMessage ="";
@@ -76,10 +82,10 @@
switch(iExceptionCode)
{
case AXISC_SERVICE_THROWN_EXCEPTION:
- sMessage = "A service has thrown an exception. see detail";
+ sMessage = "The base service has thrown an exception. see details";
break;
default:
- sMessage = "Unknown Exception has occured";
+ sMessage = "Unknown Exception has occured in the base service";
}
return sMessage;
}
@@ -93,3 +99,7 @@
return m_iExceptionCode;
}
+const ISoapFault* AxisServiceException::getFault(){
+ return m_pISoapFault;
+}
+
1.9 +1 -1 ws-axis/c/samples/server/interoptests/base/InteropTestPortTypeService.cpp
Index: InteropTestPortTypeService.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/base/InteropTestPortTypeService.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- InteropTestPortTypeService.cpp 12 Aug 2004 13:23:24 -0000 1.8
+++ InteropTestPortTypeService.cpp 21 Feb 2005 10:42:36 -0000 1.9
@@ -3,7 +3,7 @@
* This file contains the two export functions of the Web service Dynamic Library
*/
-#include "InteropTestPortTypeWrapper.h"
+#include "InteropTestPortTypeWrapper.hpp"
extern "C" {
STORAGE_CLASS_INFO
int GetClassInstance(BasicHandler **inst)
1.10 +10 -10 ws-axis/c/samples/server/interoptests/base/InteropTestPortTypeWrapper.cpp
Index: InteropTestPortTypeWrapper.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/base/InteropTestPortTypeWrapper.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- InteropTestPortTypeWrapper.cpp 12 Aug 2004 13:23:24 -0000 1.9
+++ InteropTestPortTypeWrapper.cpp 21 Feb 2005 10:42:36 -0000 1.10
@@ -3,7 +3,7 @@
* This file contains Web Service Wrapper implementations
*/
-#include "InteropTestPortTypeWrapper.h"
+#include "InteropTestPortTypeWrapper.hpp"
extern int Axis_DeSerialize_SOAPStruct(SOAPStruct* param, IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_SOAPStruct(SOAPStruct *Obj, bool bArray = false, int nSize=0);
@@ -153,11 +153,11 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoInteger", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoIntegerResponse", "http://soapinterop.org/");
- int v0 = pIWSDZ->getElementAsInt("inputInteger",0);
+ xsd__int v0 = *(pIWSDZ->getElementAsInt("inputInteger",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
- int ret = pWs->echoInteger(v0);
+ xsd__int ret = pWs->echoInteger(v0);
return pIWSSZ->addOutputParam("echoIntegerReturn", (void*)&ret, XSD_INT);
}
catch(...){
@@ -209,11 +209,11 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoFloat", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoFloatResponse", "http://soapinterop.org/");
- float v0 = pIWSDZ->getElementAsFloat("inputFloat",0);
+ xsd__float v0 = *(pIWSDZ->getElementAsFloat("inputFloat",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
- float ret = pWs->echoFloat(v0);
+ xsd__float ret = pWs->echoFloat(v0);
return pIWSSZ->addOutputParam("echoFloatReturn", (void*)&ret, XSD_FLOAT);
}
catch(...){
@@ -352,7 +352,7 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoBase64", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoBase64Response", "http://soapinterop.org/");
- xsd__base64Binary v0 = pIWSDZ->getElementAsBase64Binary("inputBase64",0);
+ xsd__base64Binary v0 = *(pIWSDZ->getElementAsBase64Binary("inputBase64",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
@@ -380,7 +380,7 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoDate", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoDateResponse", "http://soapinterop.org/");
- xsd__dateTime v0 = pIWSDZ->getElementAsDateTime("inputDate",0);
+ xsd__dateTime v0 = *(pIWSDZ->getElementAsDateTime("inputDate",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
@@ -408,7 +408,7 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoHexBinary", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoHexBinaryResponse", "http://soapinterop.org/");
- xsd__hexBinary v0 = pIWSDZ->getElementAsHexBinary("inputHexBinary",0);
+ xsd__hexBinary v0 = *(pIWSDZ->getElementAsHexBinary("inputHexBinary",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
@@ -436,7 +436,7 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoDecimal", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoDecimalResponse", "http://soapinterop.org/");
- xsd__decimal v0 = pIWSDZ->getElementAsDecimal("inputDecimal",0);
+ xsd__decimal v0 = *(pIWSDZ->getElementAsDecimal("inputDecimal",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
@@ -464,7 +464,7 @@
/* check whether we have got correct message */
if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("echoBoolean", "http://soapinterop.org/")) return AXIS_FAIL;
pIWSSZ->createSoapMethod("echoBooleanResponse", "http://soapinterop.org/");
- xsd__boolean v0 = pIWSDZ->getElementAsBoolean("inputBoolean",0);
+ xsd__boolean v0 = *(pIWSDZ->getElementAsBoolean("inputBoolean",0));
if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
try
{
1.10 +7 -5 ws-axis/c/samples/server/interoptests/base/SOAPStruct.cpp
Index: SOAPStruct.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/base/SOAPStruct.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SOAPStruct.cpp 24 Nov 2004 13:25:18 -0000 1.9
+++ SOAPStruct.cpp 21 Feb 2005 10:42:36 -0000 1.10
@@ -3,8 +3,7 @@
* This file contains functions to manipulate complex type SOAPStruct
*/
-#include <malloc.h>
-#include "SOAPStruct.h"
+#include "SOAPStruct.hpp"
#include <axis/AxisWrapperAPI.hpp>
/*
@@ -24,7 +23,7 @@
Axis_URI_SOAPStruct, "\">", NULL);
}
- pSZ->serializeAsElement("varString", (void*)&(param->varString), XSD_STRING);
+ pSZ->serializeAsElement("varString", (void*)(param->varString), XSD_STRING);
pSZ->serializeAsElement("varInt", (void*)&(param->varInt), XSD_INT);
pSZ->serializeAsElement("varFloat", (void*)&(param->varFloat), XSD_FLOAT);
@@ -38,8 +37,8 @@
int Axis_DeSerialize_SOAPStruct(SOAPStruct* param, IWrapperSoapDeSerializer* pIWSDZ)
{
param->varString = pIWSDZ->getElementAsString("varString",0);
- param->varInt = pIWSDZ->getElementAsInt("varInt",0);
- param->varFloat = pIWSDZ->getElementAsFloat("varFloat",0);
+ param->varInt = *(pIWSDZ->getElementAsInt("varInt",0));
+ param->varFloat = *(pIWSDZ->getElementAsFloat("varFloat",0));
return pIWSDZ->getStatus();
}
void* Axis_Create_SOAPStruct(SOAPStruct* pObj, bool bArray = false, int nSize=0)
@@ -89,6 +88,9 @@
{
/*do not allocate memory to any pointer members here
because deserializer will allocate memory anyway. */
+ memset( &varString, 0, sizeof( xsd__string));
+ memset( &varInt, 0, sizeof( xsd__int));
+ memset( &varFloat, 0, sizeof( xsd__float));
}
SOAPStruct::~SOAPStruct()