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 sa...@apache.org on 2005/03/17 11:58:21 UTC

cvs commit: ws-axis/c/tests/auto_build/testcases/server/cpp XSDAttribute.cpp Timeout.cpp SimpleTypeArrayWS.cpp FirstLevelElemType.cpp

sanjaya     2005/03/17 02:58:21

  Added:       c/tests/auto_build/testcases/server/cpp XSDAttribute.cpp
                        Timeout.cpp SimpleTypeArrayWS.cpp
                        FirstLevelElemType.cpp
  Log:
  commiting new serverside implementation from the JIRA,
   AXISCPP-508
  
  Revision  Changes    Path
  1.1                  ws-axis/c/tests/auto_build/testcases/server/cpp/XSDAttribute.cpp
  
  Index: XSDAttribute.cpp
  ===================================================================
  /*
   * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
   * This file contains definitions of the web service
   */
  
  #include "XSDAttribute.hpp"
  
  
  XSDAttribute::XSDAttribute()
  {
  }
  
  XSDAttribute::~XSDAttribute()
  {
  }
  
  /* This function is called by the AxisEngine when something went wrong
   with the current web service request processing. Appropriate actions should
   be taken here.*/
  void XSDAttribute::onFault()
  {
  }
  /* This function is called by the AxisEngine when this web service
   library is first loaded. So here we can initialize any global/static
   data structures of this web service or open database connections */
  void XSDAttribute::init()
  {
  }
  /* This function is called by the AxisEngine when this web service
   library is unloaded. So we can deallocate any global/static data structures
   and close database connections etc here. */
  void XSDAttribute::fini()
  {
  }
  BooleanType* XSDAttribute::getDataBoolean(BooleanType* Value0)  
  {
  	return Value0;
  }
  ByteType* XSDAttribute::getDataByte(ByteType* Value0)  
  {
  	return Value0;
  }
  UnsignedByteType* XSDAttribute::getDataUnsignedByte(UnsignedByteType* Value0)  
  {
  	return Value0;
  }
  ShortType* XSDAttribute::getDataShort(ShortType* Value0)  
  {
  	return Value0;
  }
  UnsignedShortType* XSDAttribute::getDataUnsignedShort(UnsignedShortType* Value0)  
  {
  	return Value0;
  }
  IntType* XSDAttribute::getDataInt(IntType* Value0)  
  {
  	return Value0;
  }
  UnsignedIntType* XSDAttribute::getDataUnsignedInt(UnsignedIntType* Value0)  
  {
  	return Value0;
  }
  LongType* XSDAttribute::getDataLong(LongType* Value0)  
  {
  	return Value0;
  }
  UnsignedLongType* XSDAttribute::getDataUnsignedLong(UnsignedLongType* Value0)  
  {
  	return Value0;
  }
  FloatType* XSDAttribute::getDataFloat(FloatType* Value0)  
  {
  	return Value0;
  }
  DoubleType* XSDAttribute::getDataDouble(DoubleType* Value0)  
  {
  	return Value0;
  }
  StringType* XSDAttribute::getDataString(StringType* Value0)  
  {
  	return Value0;
  }
  DateType* XSDAttribute::getDataDate(DateType* Value0)  
  {
  	return Value0;
  }
  DateTimeType* XSDAttribute::getDataDateTime(DateTimeType* Value0)  
  {
  	return Value0;
  }
  TimeType* XSDAttribute::getDataTime(TimeType* Value0)  
  {
  	return Value0;
  }
  Base64BinaryType* XSDAttribute::getDataBase64Binary(Base64BinaryType* Value0)  
  {
  	return Value0;
  }
  HexBinaryType* XSDAttribute::getDataHexBinary(HexBinaryType* Value0)  
  {
  	return Value0;
  }
  IntegerType* XSDAttribute::getDataInteger(IntegerType* Value0)  
  {
  	return Value0;
  }
  DecimalType* XSDAttribute::getDataDecimal(DecimalType* Value0)  
  {
  	return Value0;
  }
  QNameType* XSDAttribute::getDataQName(QNameType* Value0)  
  {
  	return Value0;
  }
  AnyURIType* XSDAttribute::getDataAnyURI(AnyURIType* Value0)  
  {
  	return Value0;
  }
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/server/cpp/Timeout.cpp
  
  Index: Timeout.cpp
  ===================================================================
  /*
   * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
   * This file contains definitions of the web service
   */
  
  #include "Timeout.hpp"
  
  
  Timeout::Timeout()
  {
  }
  
  Timeout::~Timeout()
  {
  }
  
  /* This function is called by the AxisEngine when something went wrong
   with the current web service request processing. Appropriate actions should
   be taken here.*/
  void Timeout::onFault()
  {
  }
  /* This function is called by the AxisEngine when this web service
   library is first loaded. So here we can initialize any global/static
   data structures of this web service or open database connections */
  void Timeout::init()
  {
  }
  /* This function is called by the AxisEngine when this web service
   library is unloaded. So we can deallocate any global/static data structures
   and close database connections etc here. */
  void Timeout::fini()
  {
  }
  xsd__int Timeout::add(xsd__int Value0, xsd__int Value1)  
  {
  	return Value1;
  }
  xsd__int Timeout::sub(xsd__int Value0, xsd__int Value1)  
  {
  	return Value1;
  }
  xsd__int Timeout::mul(xsd__int Value0, xsd__int Value1)  
  {
  	return Value1;
  }
  xsd__int Timeout::div(xsd__int Value0, xsd__int Value1)  
  {
  	return Value1;
  }
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/server/cpp/SimpleTypeArrayWS.cpp
  
  Index: SimpleTypeArrayWS.cpp
  ===================================================================
  /*
   * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
   * This file contains definitions of the web service
   */
  
  #include "SimpleTypeArrayWS.hpp"
  
  
  SimpleTypeArrayWS::SimpleTypeArrayWS()
  {
  }
  
  SimpleTypeArrayWS::~SimpleTypeArrayWS()
  {
  }
  
  /* This function is called by the AxisEngine when something went wrong
   with the current web service request processing. Appropriate actions should
   be taken here.*/
  void SimpleTypeArrayWS::onFault()
  {
  }
  /* This function is called by the AxisEngine when this web service
   library is first loaded. So here we can initialize any global/static
   data structures of this web service or open database connections */
  void SimpleTypeArrayWS::init()
  {
  }
  /* This function is called by the AxisEngine when this web service
   library is unloaded. So we can deallocate any global/static data structures
   and close database connections etc here. */
  void SimpleTypeArrayWS::fini()
  {
  }
  Type* SimpleTypeArrayWS::getInput(Type* Value0)  
  {
  	return Value0;
  }
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/server/cpp/FirstLevelElemType.cpp
  
  Index: FirstLevelElemType.cpp
  ===================================================================
  /*
   * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
   * This file contains functions to manipulate complex type FirstLevelElemType
   */
  
  #include <C:\AxisCpp\axis-c-1.5.0-Win32-bin18-02\include\axis\AxisWrapperAPI.hpp>
  
  #include "FirstLevelElemType.hpp"
  extern int Axis_DeSerialize_SecondLevelElemType(SecondLevelElemType* param, IWrapperSoapDeSerializer* pDZ);
  extern void* Axis_Create_SecondLevelElemType(SecondLevelElemType* pObj, bool bArray = false, int nSize=0);
  extern void Axis_Delete_SecondLevelElemType(SecondLevelElemType* param, bool bArray = false, int nSize=0);
  extern int Axis_Serialize_SecondLevelElemType(SecondLevelElemType* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
  extern int Axis_GetSize_SecondLevelElemType();
  
  /*
   * This static method serialize a FirstLevelElemType type of object
   */
  int Axis_Serialize_FirstLevelElemType(FirstLevelElemType* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
  {
  	if ( param == NULL )
  	{
  	 /* TODO : may need to check nillable value - Now done*/
  		pSZ->serializeAsAttribute( "xsi:nil", 0, (void*)&(xsd_boolean_true), XSD_BOOLEAN);
  		pSZ->serialize( ">", NULL);
  		return AXIS_SUCCESS;
  	}
  
  	/* first serialize attributes if any*/
  	pSZ->serialize( ">", 0);
  
  	/* then serialize elements if any*/
  	// Additional code to find is reference is pointer or pointer to a pointer
  	pSZ->serializeCmplxArray((Axis_Array*)(&param->SecondLevelElem),
  						 (void*) Axis_Serialize_SecondLevelElemType,
  						 (void*) Axis_Delete_SecondLevelElemType,
  						 (void*) Axis_GetSize_SecondLevelElemType,
  						 "SecondLevelElem", Axis_URI_SecondLevelElemType);
  	// End
  	return AXIS_SUCCESS;
  }
  
  /*
   * This static method deserialize a FirstLevelElemType type of object
   */
  int Axis_DeSerialize_FirstLevelElemType(FirstLevelElemType* param, IWrapperSoapDeSerializer* pIWSDZ)
  {
  	Axis_Array array;
  
  	array = pIWSDZ->getCmplxArray((void*)Axis_DeSerialize_SecondLevelElemType,
  								  (void*)Axis_Create_SecondLevelElemType,
  								  (void*)Axis_Delete_SecondLevelElemType,
  								  (void*)Axis_GetSize_SecondLevelElemType,
  								  "SecondLevelElem", Axis_URI_SecondLevelElemType);
  
  	// Additional code to find is reference is pointer or pointer to a pointer
  	param->SecondLevelElem = (SecondLevelElemType_Array&)array;
  	// End
  	return pIWSDZ->getStatus();
  }
  void* Axis_Create_FirstLevelElemType(FirstLevelElemType* pObj, bool bArray = false, int nSize=0)
  {
  	if (bArray && (nSize > 0))
  	{
  		if (pObj)
  		{
  			FirstLevelElemType* pNew = new FirstLevelElemType[nSize];
  			memcpy(pNew, pObj, sizeof(FirstLevelElemType)*nSize/2);
  			memset(pObj, 0, sizeof(FirstLevelElemType)*nSize/2);
  			delete [] pObj;
  			return pNew;
  		}
  		else
  		{
  			return new FirstLevelElemType[nSize];
  		}
  	}
  	else
  		return new FirstLevelElemType;
  }
  
  /*
   * This static method delete a FirstLevelElemType type of object
   */
  void Axis_Delete_FirstLevelElemType(FirstLevelElemType* param, bool bArray = false, int nSize=0)
  {
  	if (bArray)
  	{
  		delete [] param;
  	}
  	else
  	{
  		delete param;
  	}
  }
  /*
   * This static method gives the size of FirstLevelElemType type of object
   */
  int Axis_GetSize_FirstLevelElemType()
  {
  	return sizeof(FirstLevelElemType);
  }
  
  FirstLevelElemType::FirstLevelElemType()
  {
  	/*do not allocate memory to any pointer members here
  	 because deserializer will allocate memory anyway. */
  	SecondLevelElem.m_Array = 0;
  	SecondLevelElem.m_Size = 0;
  }
  
  FirstLevelElemType::~FirstLevelElemType()
  {
  	/*delete any pointer and array members here*/
  	delete [] ((SecondLevelElemType*)SecondLevelElem.m_Array);
  }