axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ros...@apache.org
Subject cvs commit: xml-axis/c/src/server/samples/webservicewrapper WebServiceWrapper.cpp
Date Sun, 27 Jul 2003 07:12:40 GMT
roshan      2003/07/27 00:12:40

  Modified:    c/src/server/samples/webservicewrapper WebServiceWrapper.cpp
  Log:
  after introducing new Serializer interfaces IWrapperSoapSerializer and IHandlerSoapSerializer
  
  Revision  Changes    Path
  1.6       +84 -2     xml-axis/c/src/server/samples/webservicewrapper/WebServiceWrapper.cpp
  
  Index: WebServiceWrapper.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/server/samples/webservicewrapper/WebServiceWrapper.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WebServiceWrapper.cpp	24 Jul 2003 05:06:46 -0000	1.5
  +++ WebServiceWrapper.cpp	27 Jul 2003 07:12:40 -0000	1.6
  @@ -67,7 +67,7 @@
   
   #include "WebServiceWrapper.h"
   #include "../../../common/ISoapDeserializer.h"
  -#include "../../../common/ISoapSerializer.h"
  +#include "../../../common/IWrapperSoapSerializer.h"
   #include "../../../common/BasicTypeSerializer.h"
   #include "../../../common/ISoapMethod.h"
   #include "../../../common/IParam.h"
  @@ -117,7 +117,15 @@
   int webservicewrapper::SetResponseMethod(IMessageData* mc, const char* name)
   {
   	string method = name;	
  +	/*
  +	comm by Roshan on 26Jul2003 4.00pm
   	ISoapMethod* pMethod= mc->getSoapSerializer()->createSoapMethod();
  +	*/
  +	//-----------added by roshan--------
  +	IWrapperSoapSerializer* pIWSz;
  +	mc->getSoapSerializer(&pIWSz);
  +	ISoapMethod* pMethod= pIWSz->createSoapMethod();
  +	//---------end of added by roshan--------
   	pMethod->setLocalName(method + "Response");
   	pMethod->setPrefix("m");
   	pMethod->setUri("http://www.opensource.lk");
  @@ -136,7 +144,20 @@
   	string strRet = pWs->Echo(str);
   	uParamValue value;
   	value.pStrValue = strRet.c_str();
  +	/*
  +	comm by Roshan on 26Jul2003 at 4.10pm
   	IParam* pRetParam = mc->getSoapSerializer()->setResponseParam(XSD_STRING, value);
  +	*/
  +
  +
  +	//--roshan--	
  +	IWrapperSoapSerializer* pIWSz;
  +	mc->getSoapSerializer(&pIWSz);
  +
  +	IParam* pRetParam = pIWSz->setResponseParam(XSD_STRING, value);
  +	//--end ros
  +
  +
   	pRetParam->SetName("EchoReturn");
   	return SUCCESS;
   }
  @@ -153,7 +174,17 @@
   	int ret = pWs->Add(i1, i2);
   	uParamValue value;
   	value.nValue = ret;
  +	/* comm ro
   	IParam* pRetParam = mc->getSoapSerializer()->setResponseParam(XSD_INT, value);
  +	*/
  +
  +	//--ro
  +	IWrapperSoapSerializer* pIWSz;
  +	mc->getSoapSerializer(&pIWSz);
  +	IParam* pRetParam = pIWSz->setResponseParam(XSD_INT, value);
  +	//--ro
  +
  +
   	pRetParam->SetName("AddReturn");
   	return SUCCESS;	
   }
  @@ -177,12 +208,34 @@
   	retarr = pWs->EchoIntArray(size,arr,&retarrsize);
   	delete [] arr;
   
  +	/*
  +	comm by ro
   	IArrayBean* pAb = mc->getSoapSerializer()->makeArrayBean(XSD_INT, (void*)retarr);
  +	*/
  +
  +
  +	//--roshan--	
  +	IWrapperSoapSerializer* pIWSz;
  +	mc->getSoapSerializer(&pIWSz);
  +	IArrayBean* pAb = pIWSz->makeArrayBean(XSD_INT, (void*)retarr);
  +	//--ro
  +
  +
   	pAb->AddDimension(retarrsize);
   	pAb->SetItemName("item");
   	uParamValue value;
   	value.pIArray = pAb;
  +	/*
  +	ro
   	IParam* pRetParam = mc->getSoapSerializer()->setResponseParam(XSD_ARRAY, value);
  +	*/
  +
  +
  +	//--roshan--	
  +	IParam* pRetParam = pIWSz->setResponseParam(XSD_ARRAY, value);
  +	//ro
  +
  +
   	pRetParam->SetName("EchoIntArrayReturn");
   	return SUCCESS;	
   }
  @@ -205,7 +258,18 @@
   
   	uParamValue value;
   	value.pIBean = pRet;
  +	/*
  +	ro
   	IParam* pRetParam = mc->getSoapSerializer()->setResponseParam(USER_TYPE, value);
  +	*/
  +
  +	//--roshan--	
  +	IWrapperSoapSerializer* pIWSz;
  +	mc->getSoapSerializer(&pIWSz);
  +	IParam* pRetParam = pIWSz->setResponseParam(USER_TYPE, value);
  +	//ro
  +	
  +
   	pRetParam->SetName("EchoIntArrayReturn");
   	return SUCCESS;
   }
  @@ -222,12 +286,30 @@
   	Point* pRet = pWs->EchoPointArray(size, arr,&size);
   	//delete [] arr;
   
  +	/*
  +	ro
   	IArrayBean* pAb = mc->getSoapSerializer()->makeArrayBean(USER_TYPE, (void*)pRet);
  +	*/
  +
  +	//--roshan--	
  +	IWrapperSoapSerializer* pIWSz;
  +	mc->getSoapSerializer(&pIWSz);
  +	IArrayBean* pAb = pIWSz->makeArrayBean(USER_TYPE, (void*)pRet);
  +	//ro
  +
   	pAb->AddDimension(size);
   	pAb->SetItemName("item");
   	uParamValue value;
   	value.pIArray = pAb;
  +	/*
  +	ro
   	IParam* pRetParam = mc->getSoapSerializer()->setResponseParam(XSD_ARRAY, value);
  +	*/
  +
  +	//--roshan--		
  +	IParam* pRetParam = pIWSz->setResponseParam(XSD_ARRAY, value);
  +	//ro
  +
   	pRetParam->SetName("EchoPointArrayReturn");
   	return SUCCESS;	
   }
  @@ -239,7 +321,7 @@
   	return SUCCESS;
   }
   
  -int Point::Serialize(ISoapSerializer& pSZ)
  +int Point::Serialize(IWrapperSoapSerializer& pSZ)
   {
   	m_URI = "http://www.opensource.lk/Axis/";
   	m_TypeName = "Point";
  
  
  

Mime
View raw message