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 wh...@apache.org on 2004/10/28 12:20:50 UTC
cvs commit: ws-axis/c/include/axis/client Call.h Stub.h
whitlock 2004/10/28 03:20:48
Modified: c/include/axis/client Call.h Stub.h
Log:
Rename external C++ headers to .hpp
Revision Changes Path
1.30 +1 -837 ws-axis/c/include/axis/client/Call.h
Index: Call.h
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/client/Call.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Call.h 15 Oct 2004 16:25:01 -0000 1.29
+++ Call.h 28 Oct 2004 10:20:48 -0000 1.30
@@ -14,840 +14,4 @@
* limitations under the License.
*
*/
-
- /**
- * @file Call.h
- *
- * This file Contains the Call class and equivalent C function tables
- * that all web service stubs generated by WSDL2Ws tool use to talk
- * to Axis Engine.
- *
- * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
- * @author Sanjaya Singharage (sanjayas@opensource.lk)
- * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
- */
-
-/*
- * Revision 1.1 2004/05/24 samisa
- * Added accesser to transport
- */
-
-/*
- * Revision 1.2 2004/05/25 samisa
- * Added accesser to SOAP serializer
- */
-
-/*
- * Revision 1.3 2004/05/31 samisa
- * Added setProxy
- */
-
-/* Call.h: interface for the Call class.*/
-
-
-#if !defined(_CALL_H____OF_AXIS_INCLUDED_)
-#define _CALL_H____OF_AXIS_INCLUDED_
-
-#include "../server/GDefine.h"
-#include "../server/Packet.h"
-
-#include "../server/TypeMapping.h"
-#include "../server/AxisUserAPI.h"
-#include "../server/SoapEnvVersions.h"
-#include "../server/WSDDDefines.h"
-#include "../server/IHeaderBlock.h"
-
-#ifdef __cplusplus
-#include "../server/ISoapHeader.h"
-
-AXIS_CPP_NAMESPACE_START
-
-class ClientAxisEngine;
-class SOAPTransport;
-class MessageData;
-class SoapDeSerializer;
-class SoapSerializer;
-
-AXIS_CPP_NAMESPACE_END
-
-#else
-#endif
-
-AXIS_CPP_NAMESPACE_USE
-
-typedef struct {
- void (AXISCALL* setSOAPVersion)(void* pObj, SOAP_VERSION version);
- int (AXISCALL* setTransportProperty)(void* pObj,
- AXIS_TRANSPORT_INFORMATION_TYPE type, const char* value);
- int (AXISCALL* setHandlerProperty)(void* pObj,
- AxisChar* name, void* value, int len);
- int (AXISCALL* setProtocol)(void* pObj, AXIS_PROTOCOL_TYPE protocol);
- int (AXISCALL* initialize)(void* pObj, PROVIDERTYPE nStyle, int secure);
- int (AXISCALL* invoke)(void* pObj);
- int (AXISCALL* unInitialize)(void* pObj);
-
- /* Method that set the remote method name */
- void (AXISCALL* setOperation)(void* pObj, const char* pchOperation,
- const char* pchNamespace);
- int (AXISCALL* setEndpointURI)(void* pObj, const char* pchEndpointURI);
-
- /* Method for adding complex parameters */
- void (AXISCALL* addCmplxParameter)(void* pObj, void* pObject,
- void* pSZFunct, void* pDelFunct, const AxisChar* pName,
- const AxisChar* pNamespace);
- /* Method for adding complex type array parameters */
- void (AXISCALL* addCmplxArrayParameter)(void* pObj, Axis_Array* pArray,
- void* pSZFunct, void* pDelFunct, void* pSizeFunct,
- const AxisChar* pName, const AxisChar* pNamespace);
- /* Method for adding basic type array parameters */
- void (AXISCALL* addBasicArrayParameter)(void* pObj, Axis_Array* pArray,
- XSDTYPE nType, const char* pName);
- /* Method for adding parameters of basic types */
- void (AXISCALL* addParameter)(void* pObj, void* pValue,const char* pName,
- XSDTYPE nType);
-
- /* Methods used by stubs to get a deserialized value of an XML element
- * as basic types
- */
- int (AXISCALL* getElementAsInt)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__boolean (AXISCALL* getElementAsBoolean)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- unsigned int (AXISCALL* getElementAsUnsignedInt)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- short (AXISCALL* getElementAsShort)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned short (AXISCALL* getElementAsUnsignedShort)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- char (AXISCALL* getElementAsByte)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned char (AXISCALL* getElementAsUnsignedByte)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- long (AXISCALL* getElementAsLong)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- long (AXISCALL* getElementAsInteger)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned long (AXISCALL* getElementAsUnsignedLong)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- float (AXISCALL* getElementAsFloat)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- double (AXISCALL* getElementAsDouble)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- double (AXISCALL* getElementAsDecimal)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* (AXISCALL* getElementAsString)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* (AXISCALL* getElementAsAnyURI)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* (AXISCALL* getElementAsQName)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__hexBinary (AXISCALL* getElementAsHexBinary)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- xsd__base64Binary (AXISCALL* getElementAsBase64Binary)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- struct tm (AXISCALL* getElementAsDateTime)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- struct tm (AXISCALL* getElementAsDate)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm (AXISCALL* getElementAsTime)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- long (AXISCALL* getElementAsDuration)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
-
- /* Methods used by stubs to get a deserialized value of an XML attribute
- * basic types
- */
- int (AXISCALL* getAttributeAsInt)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__boolean (AXISCALL* getAttributeAsBoolean)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- unsigned int (AXISCALL* getAttributeAsUnsignedInt)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- short (AXISCALL* getAttributeAsShort)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned short (AXISCALL* getAttributeAsUnsignedShort)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- char (AXISCALL* getAttributeAsByte)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned char (AXISCALL* getAttributeAsUnsignedByte)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- long (AXISCALL* getAttributeAsLong)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- long (AXISCALL* getAttributeAsInteger)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned long (AXISCALL* getAttributeAsUnsignedLong)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- float (AXISCALL* getAttributeAsFloat)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- double (AXISCALL* getAttributeAsDouble)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- double (AXISCALL* getAttributeAsDecimal)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* (AXISCALL* getAttributeAsString)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- AxisChar* (AXISCALL* getAttributeAsAnyURI)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- AxisChar* (AXISCALL* getAttributeAsQName)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- xsd__hexBinary (AXISCALL* getAttributeAsHexBinary)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- xsd__base64Binary (AXISCALL* getAttributeAsBase64Binary)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- struct tm (AXISCALL* getAttributeAsDateTime)(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace);
- struct tm (AXISCALL* getAttributeAsDate)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm (AXISCALL* getAttributeAsTime)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
- long (AXISCALL* getAttributeAsDuration)(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
-
- /* Method used by stubs to get a deserialized value of complex types */
- void* (AXISCALL* getCmplxObject)(void* pObj, void* pDZFunct,
- void* pCreFunct, void* pDelFunct, const AxisChar* pName,
- const AxisChar* pNamespace);
- /* Method used by stubs to get a deserialized Array of complex types */
- Axis_Array (AXISCALL* getCmplxArray)(void* pObj, void* pDZFunct,
- void* pCreFunct, void* pDelFunct, void* pSizeFunct,
- const AxisChar* pName, const AxisChar* pNamespace);
- /* Method used by stubs to get a deserialized Array of basic types */
- Axis_Array (AXISCALL* getBasicArray)(void* pObj, XSDTYPE nType,
- const AxisChar* pName, const AxisChar* pNamespace);
-
- int (AXISCALL* checkMessage)(void *pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
-
- void* (AXISCALL* checkFault)(void *pObj, const AxisChar* pName,
- const AxisChar* pNamespace);
-
- /* Minimal error check */
- int (AXISCALL* getStatus)(void *pObj);
-
- AnyType* (AXISCALL* getAnyObject)(void *pObj);
-
- int (AXISCALL* addAnyObject)(void *pObj, AnyType* pAnyObject);
-
- const AxisChar* (AXISCALL* getNamespacePrefix)(void *pObj,
- const AxisChar* pNamespace);
-
- HeaderBlock_C (AXISCALL* createHeaderBlock)(void *pObj,
- AxisChar *pachLocalName, AxisChar *pachUri);
-
-} CallFunctions;
-
-#ifdef __cplusplus
-AXIS_CPP_NAMESPACE_START
-class STORAGE_CLASS_INFO CallBase
-{
-public:
- virtual void AXISCALL setSOAPVersion(SOAP_VERSION version)=0;
- virtual int AXISCALL setTransportProperty(AXIS_TRANSPORT_INFORMATION_TYPE
- type, const char* value)=0;
- virtual int AXISCALL setHandlerProperty(AxisChar* name,
- void* value, int len)=0;
- virtual int AXISCALL setProtocol(AXIS_PROTOCOL_TYPE protocol)=0;
- virtual int AXISCALL initialize(PROVIDERTYPE nStyle, int secure)=0;
- virtual int AXISCALL invoke()=0;
- virtual int AXISCALL unInitialize()=0;
-
- /* Method that set the remote method name */
- virtual void AXISCALL setOperation(const char* pchOperation,
- const char* pchNamespace)=0;
- virtual int AXISCALL setEndpointURI(const char* pchEndpointURI)=0;
-
- /* Method for adding complex parameters */
- virtual void AXISCALL addCmplxParameter(void* pObject, void* pSZFunct,
- void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace)=0;
- /* Method for adding complex type array parameters */
- virtual void AXISCALL addCmplxArrayParameter(Axis_Array* pArray,
- void* pSZFunct, void* pDelFunct, void* pSizeFunct,
- const AxisChar* pName, const AxisChar* pNamespace)=0;
- /* Method for adding basic type array parameters */
- virtual void AXISCALL addBasicArrayParameter(Axis_Array* pArray,
- XSDTYPE nType, const char* pName)=0;
- /* Method for adding parameters of basic types */
- virtual void AXISCALL addParameter(void* pValue,const char* pName,
- XSDTYPE nType)=0;
-
- /* Methods used by stubs to get a deserialized value of an XML element
- * as basic types
- */
- virtual int AXISCALL getElementAsInt(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual xsd__boolean AXISCALL getElementAsBoolean(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned int AXISCALL getElementAsUnsignedInt(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual short AXISCALL getElementAsShort(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned short AXISCALL getElementAsUnsignedShort(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual char AXISCALL getElementAsByte(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned char AXISCALL getElementAsUnsignedByte(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual long AXISCALL getElementAsLong(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual long AXISCALL getElementAsInteger(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned long AXISCALL getElementAsUnsignedLong(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual float AXISCALL getElementAsFloat(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual double AXISCALL getElementAsDouble(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual double AXISCALL getElementAsDecimal(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual AxisChar* AXISCALL getElementAsString(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual AxisChar* AXISCALL getElementAsAnyURI(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual AxisChar* AXISCALL getElementAsQName(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual xsd__hexBinary AXISCALL getElementAsHexBinary(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual xsd__base64Binary AXISCALL getElementAsBase64Binary(const
- AxisChar* pName, const AxisChar* pNamespace)=0;
- virtual struct tm AXISCALL getElementAsDateTime(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual struct tm AXISCALL getElementAsDate(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual struct tm AXISCALL getElementAsTime(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual long AXISCALL getElementAsDuration(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
-
- /* Methods used by stubs to get a deserialized value of XML attribute
- * as basic types
- */
- virtual int AXISCALL getAttributeAsInt(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual xsd__boolean AXISCALL getAttributeAsBoolean(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned int AXISCALL getAttributeAsUnsignedInt(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual short AXISCALL getAttributeAsShort(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned short AXISCALL getAttributeAsUnsignedShort(const
- AxisChar* pName, const AxisChar* pNamespace)=0;
- virtual char AXISCALL getAttributeAsByte(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned char AXISCALL getAttributeAsUnsignedByte(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual long AXISCALL getAttributeAsLong(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual long AXISCALL getAttributeAsInteger(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual unsigned long AXISCALL getAttributeAsUnsignedLong(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual float AXISCALL getAttributeAsFloat(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual double AXISCALL getAttributeAsDouble(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual double AXISCALL getAttributeAsDecimal(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual AxisChar* AXISCALL getAttributeAsString(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual AxisChar* AXISCALL getAttributeAsAnyURI(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual AxisChar* AXISCALL getAttributeAsQName(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual xsd__hexBinary AXISCALL getAttributeAsHexBinary(const AxisChar*
- pName, const AxisChar* pNamespace)=0;
- virtual xsd__base64Binary AXISCALL getAttributeAsBase64Binary(const
- AxisChar* pName, const AxisChar* pNamespace)=0;
- virtual struct tm AXISCALL getAttributeAsDateTime(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual struct tm AXISCALL getAttributeAsDate(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual struct tm AXISCALL getAttributeAsTime(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- virtual long AXISCALL getAttributeAsDuration(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
-
- /* Method used by stubs to get a deserialized value of complex types */
- virtual void* AXISCALL getCmplxObject(void* pDZFunct, void* pCreFunct,
- void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace)=0;
- /* Method used by stubs to get a deserialized Array of complex types */
- virtual Axis_Array AXISCALL getCmplxArray(void* pDZFunct, void* pCreFunct,
- void* pDelFunct, void* pSizeFunct, const AxisChar* pName,
- const AxisChar* pNamespace)=0;
- /* Method used by stubs to get a deserialized Array of basic types */
- virtual Axis_Array AXISCALL getBasicArray(XSDTYPE nType,
- const AxisChar* pName, const AxisChar* pNamespace)=0;
-
- virtual int AXISCALL checkMessage(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
-
- virtual void* AXISCALL checkFault(const AxisChar* pName,
- const AxisChar* pNamespace)=0;
-
- /* Minimal error check */
- virtual int AXISCALL getStatus()=0;
-
- virtual AnyType* AXISCALL getAnyObject()=0;
- virtual int AXISCALL addAnyObject(AnyType* pAnyObject)=0;
- virtual const AxisChar* AXISCALL getNamespacePrefix
- (const AxisChar* pNamespace)=0;
-
- virtual IHeaderBlock* AXISCALL createHeaderBlock(AxisChar *pachLocalName,
- AxisChar *pachUri)=0;
-
- /* following stuff is needed to provide the interface for C web services */
-public:
- static CallFunctions ms_VFtable;
- static bool bInitialized;
- /* add static functions for all interface functions here */
- static void AXISCALL s_SetSOAPVersion(void* pObj, SOAP_VERSION version)
- {((CallBase*)pObj)->setSOAPVersion(version);};
- static int AXISCALL s_SetTransportProperty(void* pObj,
- AXIS_TRANSPORT_INFORMATION_TYPE type, const char* value)
- { return ((CallBase*)pObj)->setTransportProperty(type,value);};
- static int AXISCALL s_SetHandlerProperty(void* pObj,
- AxisChar* name, void* value, int len)
- { return ((CallBase*)pObj)->setHandlerProperty(name,value,len);};
- static int AXISCALL s_SetProtocol(void* pObj, AXIS_PROTOCOL_TYPE protocol)
- { return ((CallBase*)pObj)->setProtocol(protocol);};
- static int AXISCALL s_InitializeCall(void* pObj, PROVIDERTYPE nStyle,
- int secure)
- { return ((CallBase*)pObj)->initialize(nStyle, secure);};
- static int AXISCALL s_Invoke(void* pObj)
- { return ((CallBase*)pObj)->invoke();};
- static int AXISCALL s_UnInitialize(void* pObj)
- { return ((CallBase*)pObj)->unInitialize();};
-
- /* Method that set the remote method name */
- static void AXISCALL s_SetOperation(void* pObj, const char* pchOperation,
- const char* pchNamespace)
- { ((CallBase*)pObj)->setOperation(pchOperation, pchNamespace);};
- static int AXISCALL s_SetEndpointURI(void* pObj,
- const char* pchEndpointURI)
- { return ((CallBase*)pObj)->setEndpointURI(pchEndpointURI);};
-
- static void AXISCALL s_AddParameter(void* pObj, void* pValue,
- const AxisChar* pchName, XSDTYPE type)
- { ((CallBase*)pObj)->addParameter(pValue, pchName, type);};
- static void AXISCALL s_AddCmplxArrayParameter(void* pObj,
- Axis_Array* pArray, void* pSZFunct, void* pDelFunct, void* pSizeFunct,
- const AxisChar* pName, const AxisChar* pNamespace)
- { ((CallBase*)pObj)->addCmplxArrayParameter(pArray, pSZFunct, pDelFunct,
- pSizeFunct, pName, pNamespace);};
- static void AXISCALL s_AddBasicArrayParameter(void* pObj,
- Axis_Array* pArray, XSDTYPE nType, const AxisChar* pName)
- { ((CallBase*)pObj)->addBasicArrayParameter(pArray, nType, pName);};
- static void AXISCALL s_AddCmplxParameter(void* pObj, void* pObject,
- void* pDZFunct, void* pDelFunct, const AxisChar* pName,
- const AxisChar* pNamespace)
- { ((CallBase*)pObj)->addCmplxParameter(pObject, pDZFunct, pDelFunct, pName,
- pNamespace);};
-
- static int AXISCALL s_GetElementAsInt(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsInt(pName, pNamespace);};
- static xsd__boolean AXISCALL s_GetElementAsBoolean(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsBoolean(pName, pNamespace);};
- static unsigned int AXISCALL s_GetElementAsUnsignedInt(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsUnsignedInt(pName, pNamespace);};
- static short AXISCALL s_GetElementAsShort(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsShort(pName, pNamespace);};
- static unsigned short AXISCALL s_GetElementAsUnsignedShort(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsUnsignedShort(pName, pNamespace);};
- static char AXISCALL s_GetElementAsByte(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsByte(pName, pNamespace);};
- static unsigned char AXISCALL s_GetElementAsUnsignedByte(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsUnsignedByte(pName, pNamespace);};
- static long AXISCALL s_GetElementAsLong(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsLong(pName, pNamespace);};
- static long AXISCALL s_GetElementAsInteger(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsInteger(pName, pNamespace);};
- static unsigned long AXISCALL s_GetElementAsUnsignedLong(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsUnsignedLong(pName, pNamespace);};
- static float AXISCALL s_GetElementAsFloat(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsFloat(pName, pNamespace);};
- static double AXISCALL s_GetElementAsDouble(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsDouble(pName, pNamespace);};
- static double AXISCALL s_GetElementAsDecimal(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsDouble(pName, pNamespace);};
- static AxisChar* AXISCALL s_GetElementAsString(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsString(pName, pNamespace);};
- static AxisChar* AXISCALL s_GetElementAsAnyURI(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsAnyURI(pName, pNamespace);};
- static AxisChar* AXISCALL s_GetElementAsQName(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsQName(pName, pNamespace);};
- static xsd__hexBinary AXISCALL s_GetElementAsHexBinary(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsHexBinary(pName, pNamespace);};
- static xsd__base64Binary AXISCALL s_GetElementAsBase64Binary(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsBase64Binary(pName, pNamespace);};
- static struct tm AXISCALL s_GetElementAsDateTime(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsDateTime(pName, pNamespace);};
- static struct tm AXISCALL s_GetElementAsDate(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsDate(pName, pNamespace);};
- static struct tm AXISCALL s_GetElementAsTime(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsTime(pName, pNamespace);};
- static long AXISCALL s_GetElementAsDuration(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getElementAsDuration(pName, pNamespace);};
-
- static int AXISCALL s_GetAttributeAsInt(void* pObj, const AxisChar* pName,
- const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsInt(pName, pNamespace);};
- static xsd__boolean AXISCALL s_GetAttributeAsBoolean(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsBoolean(pName, pNamespace);};
- static unsigned int AXISCALL s_GetAttributeAsUnsignedInt(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsUnsignedInt(pName, pNamespace);};
- static short AXISCALL s_GetAttributeAsShort(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsShort(pName, pNamespace);};
- static unsigned short AXISCALL s_GetAttributeAsUnsignedShort(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsUnsignedShort(pName,
- pNamespace);};
- static char AXISCALL s_GetAttributeAsByte(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsByte(pName, pNamespace);};
- static unsigned char AXISCALL s_GetAttributeAsUnsignedByte(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsUnsignedByte(pName,
- pNamespace);};
- static long AXISCALL s_GetAttributeAsLong(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsLong(pName, pNamespace);};
- static long AXISCALL s_GetAttributeAsInteger(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsInteger(pName, pNamespace);};
- static unsigned long AXISCALL s_GetAttributeAsUnsignedLong(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsUnsignedLong(pName,
- pNamespace);};
- static float AXISCALL s_GetAttributeAsFloat(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsFloat(pName, pNamespace);};
- static double AXISCALL s_GetAttributeAsDouble(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsDouble(pName, pNamespace);};
- static double AXISCALL s_GetAttributeAsDecimal(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsDecimal(pName, pNamespace);};
- static AxisChar* AXISCALL s_GetAttributeAsString(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsString(pName, pNamespace);};
- static AxisChar* AXISCALL s_GetAttributeAsAnyURI(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsAnyURI(pName, pNamespace);};
- static AxisChar* AXISCALL s_GetAttributeAsQName(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsQName(pName, pNamespace);};
- static xsd__hexBinary AXISCALL s_GetAttributeAsHexBinary(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsHexBinary(pName, pNamespace);};
- static xsd__base64Binary AXISCALL s_GetAttributeAsBase64Binary(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsBase64Binary(pName,
- pNamespace);};
- static struct tm AXISCALL s_GetAttributeAsDateTime(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsDateTime(pName, pNamespace);};
- static struct tm AXISCALL s_GetAttributeAsDate(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsDate(pName, pNamespace);};
- static struct tm AXISCALL s_GetAttributeAsTime(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsTime(pName, pNamespace);};
- static long AXISCALL s_GetAttributeAsDuration(void* pObj,
- const AxisChar* pName, const AxisChar* pNamespace)
- { return ((CallBase*)pObj)->getAttributeAsDuration(pName, pNamespace);};
-
- static Axis_Array AXISCALL s_GetCmplxArray(void* pObj, void* pDZFunct,
- void* pCreFunct, void* pDelFunct, void* pSizeFunct,
- const AxisChar* pName, const AxisChar* pNamespace)
- {return ((CallBase*)pObj)->getCmplxArray(pDZFunct, pCreFunct, pDelFunct,
- pSizeFunct, pName, pNamespace);};
- static Axis_Array AXISCALL s_GetBasicArray(void* pObj, XSDTYPE nType,
- const AxisChar* pName, const AxisChar* pNamespace)
- {return ((CallBase*)pObj)->getBasicArray(nType, pName, pNamespace);};
- static void* AXISCALL s_GetCmplxObject(void* pObj, void* pDZFunct,
- void* pCreFunct, void* pDelFunct, const AxisChar* pName,
- const AxisChar* pNamespace)
- {return ((CallBase*)pObj)->getCmplxObject(pDZFunct, pCreFunct, pDelFunct,
- pName, pNamespace);};
-
- static int AXISCALL s_CheckMessage(void *pObj, const AxisChar* pName,
- const AxisChar* pNamespace)
- {return ((CallBase*)pObj)->checkMessage(pName, pNamespace);};
-
- static void* AXISCALL s_CheckFault(void *pObj, const AxisChar* pName,
- const AxisChar* pNamespace)
- {return ((CallBase*)pObj)->checkFault(pName, pNamespace);};
-
- /* Minimal error check */
- static int AXISCALL s_GetStatus(void *pObj)
- {return ((CallBase*)pObj)->getStatus();};
-
- static AnyType* AXISCALL s_GetAnyObject(void *pObj)
- {return ((CallBase*)pObj)->getAnyObject();};
-
- static int AXISCALL s_AddAnyObject(void *pObj, AnyType* pAnyObject)
- {return ((CallBase*)pObj)->addAnyObject(pAnyObject);};
-
- static const AxisChar* AXISCALL s_GetNamespacePrefix(void *pObj,
- const AxisChar* pNamespace)
- {return ((CallBase*)pObj)->getNamespacePrefix(pNamespace);};
-
- static HeaderBlock_C AXISCALL s_CreateHeaderBlock(void *pObj,
- AxisChar *pachLocalName, AxisChar *pachUri);
-
- /* and populate ms_VFtable with corresponding entry */
- static void s_Initialize();
-};
-
-/* A separate call class object should be used by each thread */
-class STORAGE_CLASS_INFO Call : public CallBase
-{
-public:
- Call();
- virtual ~Call();
- void AXISCALL setSOAPVersion(SOAP_VERSION version);
- int AXISCALL setTransportProperty(AXIS_TRANSPORT_INFORMATION_TYPE type,
- const char* value);
- int AXISCALL setHandlerProperty(AxisChar* name, void* value, int len);
- int AXISCALL setProtocol(AXIS_PROTOCOL_TYPE protocol);
- int AXISCALL unInitialize();
- int AXISCALL initialize(PROVIDERTYPE nStyle, int secure);
- int AXISCALL invoke();
-
- /* Method for adding complex parameters */
- void AXISCALL addCmplxParameter(void* pObject, void* pSZFunct,
- void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace);
- /* Method for adding complex type array parameters */
- void AXISCALL addCmplxArrayParameter(Axis_Array* pArray, void* pSZFunct,
- void* pDelFunct, void* pSizeFunct, const AxisChar* pName,
- const AxisChar* pNamespace);
- /* Method for adding basic type array parameters */
- void AXISCALL addBasicArrayParameter(Axis_Array* pArray, XSDTYPE nType,
- const AxisChar* pName);
- /* Method for adding parameters of basic types */
- void AXISCALL addParameter(void* pValue,const char* pchName,
- XSDTYPE nType);
-
- /* Method that set the remote method name */
- void AXISCALL setOperation(const char* pchOperation,
- const char* pchNamespace);
- int AXISCALL setEndpointURI(const char* pchEndpointURI);
-public:
- IHeaderBlock* AXISCALL createHeaderBlock(AxisChar *pachLocalName,
- AxisChar *pachUri);
- IHeaderBlock* createHeaderBlock();
- int setSoapHeader(ISoapHeader *pSoapHeader);
- /* Methods used by stubs to get a deserialized value of XML element
- * as basic types
- */
- int AXISCALL getElementAsInt(const AxisChar* pName,
- const AxisChar* pNamespace);
- int AXISCALL getFaultDetail(char** ppcDetail);
- xsd__boolean AXISCALL getElementAsBoolean(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned int AXISCALL getElementAsUnsignedInt(const AxisChar* pName,
- const AxisChar* pNamespace);
- short AXISCALL getElementAsShort(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned short AXISCALL getElementAsUnsignedShort(const AxisChar* pName,
- const AxisChar* pNamespace);
- char AXISCALL getElementAsByte(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned char AXISCALL getElementAsUnsignedByte(const AxisChar* pName,
- const AxisChar* pNamespace);
- long AXISCALL getElementAsLong(const AxisChar* pName,
- const AxisChar* pNamespace);
- long AXISCALL getElementAsInteger(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned long AXISCALL getElementAsUnsignedLong(const AxisChar* pName,
- const AxisChar* pNamespace);
- float AXISCALL getElementAsFloat(const AxisChar* pName,
- const AxisChar* pNamespace);
- double AXISCALL getElementAsDouble(const AxisChar* pName,
- const AxisChar* pNamespace);
- double AXISCALL getElementAsDecimal(const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* AXISCALL getElementAsString(const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* AXISCALL getElementAsAnyURI(const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* AXISCALL getElementAsQName(const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__hexBinary AXISCALL getElementAsHexBinary(const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__base64Binary AXISCALL getElementAsBase64Binary(const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm AXISCALL getElementAsDateTime(const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm AXISCALL getElementAsDate(const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm AXISCALL getElementAsTime(const AxisChar* pName,
- const AxisChar* pNamespace);
- long AXISCALL getElementAsDuration(const AxisChar* pName,
- const AxisChar* pNamespace);
-
- /* Methods used by stubs to get a deserialized value of a XML attribute
- * as basic types
- */
- int AXISCALL getAttributeAsInt(const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__boolean AXISCALL getAttributeAsBoolean(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned int AXISCALL getAttributeAsUnsignedInt(const AxisChar* pName,
- const AxisChar* pNamespace);
- short AXISCALL getAttributeAsShort(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned short AXISCALL getAttributeAsUnsignedShort(const AxisChar* pName,
- const AxisChar* pNamespace);
- char AXISCALL getAttributeAsByte(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned char AXISCALL getAttributeAsUnsignedByte(const AxisChar* pName,
- const AxisChar* pNamespace);
- long AXISCALL getAttributeAsLong(const AxisChar* pName,
- const AxisChar* pNamespace);
- long AXISCALL getAttributeAsInteger(const AxisChar* pName,
- const AxisChar* pNamespace);
- unsigned long AXISCALL getAttributeAsUnsignedLong(const AxisChar* pName,
- const AxisChar* pNamespace);
- float AXISCALL getAttributeAsFloat(const AxisChar* pName,
- const AxisChar* pNamespace);
- double AXISCALL getAttributeAsDouble(const AxisChar* pName,
- const AxisChar* pNamespace);
- double AXISCALL getAttributeAsDecimal(const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* AXISCALL getAttributeAsString(const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* AXISCALL getAttributeAsAnyURI(const AxisChar* pName,
- const AxisChar* pNamespace);
- AxisChar* AXISCALL getAttributeAsQName(const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__hexBinary AXISCALL getAttributeAsHexBinary(const AxisChar* pName,
- const AxisChar* pNamespace);
- xsd__base64Binary AXISCALL getAttributeAsBase64Binary(const AxisChar*
- pName, const AxisChar* pNamespace);
- struct tm AXISCALL getAttributeAsDateTime(const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm AXISCALL getAttributeAsDate(const AxisChar* pName,
- const AxisChar* pNamespace);
- struct tm AXISCALL getAttributeAsTime(const AxisChar* pName,
- const AxisChar* pNamespace);
- long AXISCALL getAttributeAsDuration(const AxisChar* pName,
- const AxisChar* pNamespace);
-
- /* Method used by stubs to get a deserialized value of complex types */
- void* AXISCALL getCmplxObject(void* pDZFunct, void* pCreFunct,
- void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace);
- /* Method used by stubs to get a deserialized Array of complex types */
- Axis_Array AXISCALL getCmplxArray(void* pDZFunct, void* pCreFunct,
- void* pDelFunct, void* pSizeFunct, const AxisChar* pName,
- const AxisChar* pNamespace);
- /* Method used by stubs to get a deserialized Array of basic types */
- Axis_Array AXISCALL getBasicArray(XSDTYPE nType, const AxisChar* pName,
- const AxisChar* pNamespace);
-
- int AXISCALL checkMessage(const AxisChar* pName,
- const AxisChar* pNamespace);
-
- void* AXISCALL checkFault(const AxisChar* pName,
- const AxisChar* pNamespace);
-
- int AXISCALL getStatus();
-
- SOAPTransport* getTransport() { return m_pTransport; }
- SoapSerializer* getSOAPSerializer() { return (SoapSerializer*)m_pIWSSZ; }
-
- /**
- * Set proxy server and port for transport.
- *
- * @param pcProxyHost Host name of proxy server
- * @param uiProxyPort Port of proxy server
- */
- void setProxy(const char* pcProxyHost, unsigned int uiProxyPort);
-
- AnyType* AXISCALL getAnyObject();
- int AXISCALL addAnyObject(AnyType* pAnyObject);
- const AxisChar* AXISCALL getNamespacePrefix(const AxisChar* pNamespace);
-
-private:
- int openConnection(int secure);
- void closeConnection();
- int makeArray();
-
-private:
- ClientAxisEngine* m_pAxisEngine;
- list<void*> m_handlerProperties;
-
- /*
- Following are pointers to relevant objects of the ClientAxisEngine
- instance. So they do not belong to this object and are not created
- or deleted
- */
- SoapSerializer* m_pIWSSZ;
- SoapDeSerializer* m_pIWSDZ;
- char* m_pcEndPointUri;
- AXIS_PROTOCOL_TYPE m_nTransportType;
- /*
- Transport object
- */
- SOAPTransport* m_pTransport;
-
- /* Minimal error check */
- int m_nStatus;
- /**
- * Proxy server name.
- */
- string m_strProxyHost;
- /**
- * Proxy server port.
- */
- unsigned int m_uiProxyPort;
- /**
- * Use Proxy or not?
- */
- bool m_bUseProxy;
-
- /**
- * If this object calls initialize_module, this will be set to true.
- * Helps keep track of whether to call uninitialize_module in destructor.
- * It is possible that initialize_module could have been called already.
- */
- bool m_bModuleInitialized;
-
-};
-AXIS_CPP_NAMESPACE_END
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-STORAGE_CLASS_INFO void* getStubObject(AXIS_PROTOCOL_TYPE nProtocol,
- AxisChar* pchEndpointURI);
-STORAGE_CLASS_INFO void destroyStubObject(void* pCall);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+#error "Please include Call.hpp instead"
1.21 +1 -697 ws-axis/c/include/axis/client/Stub.h
Index: Stub.h
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/client/Stub.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Stub.h 20 Oct 2004 09:14:36 -0000 1.20
+++ Stub.h 28 Oct 2004 10:20:48 -0000 1.21
@@ -14,700 +14,4 @@
* limitations under the License.
*
*/
-
- /**
- * @file Stub.h
- *
- * Contains the Stub base class that all C++ web service stubs inherit
- * from. The functions in this Stub base class provides the client
- * application some added functionality to manipulate the SOAP messages.
- */
-
-/*
- * Revision 1.1 2004/05/31 samisa
- * Added setProxy
- */
-
-/*
- * Revision 1.2 2004/05/31 roshan
- * Added calling conventions
- */
-
-/*
- * Revision 1.3 2004/06/01 roshan
- * Added setSOAPMethodAttribute
- */
-
-/*
- * Revision 1.4 2004/06/08 samisa
- * Added setTransportTimeout
- */
-
-/*
- * Revision 1.5 2004/06/10 samisa
- * Added doxygen comments to help autobuild API docs
- */
-
-/*
- * Revision 1.6 2004/06/13 roshan
- * Added doxygen comments to help autobuild API docs
- */
-
-/*
- * Revision 1.13 2004/06/13 susantha
- * Added support for writing C web services and handlers
- */
-
-#if !defined(_STUB_H____OF_AXIS_INCLUDED_)
-#define _STUB_H____OF_AXIS_INCLUDED_
-
-#include <axis/client/Call.h>
-#include <axis/server/Attribute.h>
-
-#ifdef __cplusplus
-
-#include <vector>
-
-AXIS_CPP_NAMESPACE_START
-
-using namespace std;
-
-AXIS_CPP_NAMESPACE_END
-
-#endif
-
-/**
- * @struct StubFunctions
- *
- * Structure that defines the set of function pointers that correspond
- * to the Stub base class's functions. These functions are provided to
- * C Stubs by Axis in order to have the same functionalities as those
- * in Stub base class.
- * @brief Structure with function pointer definitions to provide Stub
- * base class's functionalities for C stubs.
- */
-typedef struct {
- void (AXISCALL* setEndpoint)(void* pObj, const char* pchEndpoint);
- void (AXISCALL* setTransportProperty)(void* pObj,
- const char *pcKey, const char *pcValue);
- char* (AXISCALL* getFirstTrasportPropertyKey)(void* pObj);
- char* (AXISCALL* getNextTrasportPropertyKey)(void* pObj);
- char* (AXISCALL* getCurrentTrasportPropertyKey)(void* pObj);
- char* (AXISCALL* getCurrentTrasportPropertyValue)(void* pObj);
- void (AXISCALL* deleteCurrentTrasportProperty)(void* pObj);
- void (AXISCALL* deleteTrasportProperty)(void* pObj, char* pcKey,
- unsigned int uiOccurance);
- void (AXISCALL* setHandlerProperty)(void* pObj, AxisChar* name,
- void* value, int len);
- HeaderBlock_C (AXISCALL* createSOAPHeaderBlock)(void* pObj,
- AxisChar * pachLocalName, AxisChar * pachUri);
- HeaderBlock_C (AXISCALL* getFirstSOAPHeaderBlock)(void* pObj);
- HeaderBlock_C (AXISCALL* getNextSOAPHeaderBlock)(void* pObj);
- HeaderBlock_C (AXISCALL* getCurrentSOAPHeaderBlock)(void* pObj);
- void (AXISCALL* deleteCurrentSOAPHeaderBlock)(void* pObj);
- void (AXISCALL* deleteSOAPHeaderBlock)(void* pObj,
- HeaderBlock_C hdrBlk);
- void (AXISCALL* setProxy)(void* pObj, const char* pcProxyHost,
- unsigned int uiProxyPort);
- void (AXISCALL* setSOAPMethodAttribute)(void* pObj,
- const AxisChar *pLocalname, const AxisChar *pPrefix,
- const AxisChar* pUri, const AxisChar *pValue);
- Attribute_C (AXISCALL* getFirstSOAPMethodAttribute)(void* pObj);
- Attribute_C (AXISCALL* getNextSOAPMethodAttribute)(void* pObj);
- Attribute_C (AXISCALL* getCurrentSOAPMethodAttribute)(void* pObj);
- void (AXISCALL* deleteCurrentSOAPMethodAttribute)(void* pObj);
- void (AXISCALL* deleteSOAPMethodAttribute)(void* pObj,
- Attribute_C Attr);
- void (AXISCALL* setTransportTimeout)(void* pObj, const long lSeconds);
- int (AXISCALL* getStatus)(void* pObj);
- const AxisChar* (AXISCALL* getNamespacePrefix)(void* pObj,
- const AxisChar* pNamespace);
-} StubFunctions;
-
-#ifdef __cplusplus
-
-/**
- * @class Stub
- *
- * @brief This is the client Stub base class to be inherited by all stub
- * classes genarated by WSDL2WS tool. This class acts as the interface
- * between the users and the Axis C++ engine (client side). Programmer
- * can use the API defined here to enrich the client application
- * functionality. Setting transport properties, setting SOAP headers,
- * setting connection timeout and specifying a proxy on the client stub
- * is facilitated with this interface.
- *
- * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
- * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
- * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
- */
-
-AXIS_CPP_NAMESPACE_START
-
-class STORAGE_CLASS_INFO Stub
-{
- public:
- /**
- * Constructor.
- *
- * @param pcEndPointURI End point URI of the service to connect to.
- * e.g. http://localhost:8080/axis/services/echo
- * @param eProtocol The protocol that this stub should use to communicate
- * with the endpoint. See AXIS_PROTOCOL_TYPE in GDefine.h for
- * possible values for eProtocol.
- */
- Stub(const char *pcEndPointURI, AXIS_PROTOCOL_TYPE eProtocol);
-
- /**
- * Default Constructor.
- */
-
- /**
- * Destructor.
- */
- virtual ~Stub();
-
- /**
- * Set end point of service to connect to.
- *
- * @param pcEndPointURI End point URI of the service to connect to.
- * e.g. http://localhost:8080/axis/services/echo
- */
-
- void AXISCALL setEndPoint(const char *pcEndPointURI);
-
- /**
- * Set transport property.
- *
- * Handling the semantics of the headers is up to the user.
- * The user has to make sure that the key:value paires passed to this method
- * would make sense at trasport level.
- * The Stub class does not validate the key value paires to see if the properties
- * make sense to the undelying trasport.
- *
- * Some example trasport properties:
- * <BR> For HTTP: "Accept-Language: da, en-gb;q=0.8, en;q=0.7"
- * <BR> For SMTP: "Reply-To: user@apache.org"
- *
- * @param pcKey Header name e.g. "Accept-Language".
- * Note that the key is not tested for uniqueness.
- * One can set several values to the same key and they all will
- * appear in the outgoing trasport header.
- * e.g. If the method is called twise with (k,v1) and (k,v2)
- * both k:v1 and k:v2 will appear in trasport header as
- * seperate properties.
- * @param pcValue Header value e.g. "da, en-gb;q=0.8, en;q=0.7"
- */
- void AXISCALL setTransportProperty(const char *pcKey, const char *pcValue);
-
- /**
- * Iterator initiatior for trasport property keys
- *
- * This method must be called first to initiate access to the list of
- * transport property keys.
- *
- * @return First transport property key. If there are no trasport
- * properties set, returns NULL.
- */
- char* getFirstTrasportPropertyKey();
-
- /**
- * Iterator for trasport property keys
- *
- * getFirstTrasportPropertyKey() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method advances the iterator by one position.
- * Repeated calls always retuen the next value.
- *
- * @return Next transport property key. If there are no trasport
- * properties set or if iterator is at the end of the list, returns NULL.
- */
- char* getNextTrasportPropertyKey();
-
- /**
- * Accessor for trasport property keys.
- *
- * This method gives access to the key corresponding to the trasport key
- * currently being pointed by trasport property key iterator.
- *
- * getFirstTrasportPropertyKey() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method does not advance the iterator.
- * Repeated calls always retuen the same key unless
- * getNextTrasportPropertyKey() is called in between.
- *
- * @return Current transport property key. If there are no trasport
- * properties set or if iterator is at the end of the list, returns NULL.
- */
- char* getCurrentTrasportPropertyKey();
-
- /**
- * Accessor for trasport property values.
- *
- * This method gives access to the value corresponding to the trasport key
- * currently being pointed by trasport property key iterator.
- * As keys and values are treated as paires, access to the value field is
- * based on the access to the key field.
- *
- * getFirstTrasportPropertyKey() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method does not advance the iterator.
- * Repeated calls always retuen the same value unless
- * getNextTrasportPropertyKey() is called in between.
- *
- * @return Current transport property value. If there are no trasport
- * properties set or if iterator is at the end of the list, returns NULL.
- */
- char* getCurrentTrasportPropertyValue();
-
- /**
- * Deletes the trasport property key:value pair currently pointed to by
- * the iterator.
- */
- void deleteCurrentTrasportProperty();
-
- /**
- * Deletes the given occerance of the trasport property key:value pair
- * corresponding to the given key.
- *
- * This method does not advance the iterator in line with the deletes done.
- * In case you want to access the trasport properties after using this
- * method, it is advisable to reinitialize the iterator using
- * getFirstTrasportPropertyKey();
- * However you can use this method despite where the iterator is
- * pointing currently.
- *
- * @param pcKey Key of the trasport property key:value pair to be deleted
- * If the given key is not set currently, nothing will happen.
- * @param uiOccurance Which occerance of the key to be deleted, because
- * there can be multiple values for the same key.
- * Default is to delete the first occurance.
- * Count starts from 1.
- */
- void deleteTrasportProperty(char* pcKey, unsigned int uiOccurance = 1);
-
- /**
- * Sets a property that can be accessed from a handler.
- *
- * @param name The name of the property
- * @param value The value of the property
- * @param len The length of the value
- */
- void setHandlerProperty(AxisChar* name, void* value, int len);
-
- /**
- * Create and add a SOAP header block to the Stub.
- *
- * This will create a header block that would look like the following when
- * serialized:
- * <PRE>
- * <th:TestHeader xmlns:th="http://ws.apache.org/axisCppTest/">
- * </th:TestHeader>
- * </PRE>
- *
- * User must use the IHeaderBlock pointer returned and fill in the header structure.
- * e.g. To make the SOAP header look like
- * <PRE>
- * <SOAP-ENV:Header>
- * <th:TestHeader xmlns:th="http://ws.apache.org/axisCppTest/">
- * <Credentials>
- * <username>Test User</username>
- * <password>Test Password</password>
- * </Credentials>
- * </th:TestHeader>
- * </SOAP-ENV:Header>
- * </PRE>
- * the following code segment coule be used
- * <PRE>
- * IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader", "th",
- * "http://ws.apache.org/axisCppTest/");
- * //create parent node
- * BasicNode *parentNode = phb->createChild(ELEMENT_NODE);
- * parentNode->setLocalName("Credentials");
- * //create child node
- * BasicNode *childNode = phb->createChild(ELEMENT_NODE);
- * childNode->setLocalName("username");
- * //create char node for value
- * BasicNode *valueNode = phb->createChild(CHARACTER_NODE);
- * valueNode->setValue("Test User");
- * //buld node tree
- * childNode->addChild(valueNode);
- * parentNode->addChild(childNode);
- *
- * //add another node set
- * childNode = phb->createChild(ELEMENT_NODE);
- * childNode->setLocalName("password");
- *
- * valueNode = phb->createChild(CHARACTER_NODE);
- * valueNode->setValue("Test Password");
- *
- * childNode->addChild(valueNode);
- * parentNode->addChild(childNode);
- *
- * phb->addChild(parentNode);
- * </PRE>
- *
- * @param pachLocalName Local tag name of the SOAP header. e.g. TestHeader
- * @param pachPrefix Prefix to be used in XML represenation of SOAP header
- * e.g. th
- * @param pachUri Namespace URI to be used in SOAP header.
- e.g http://ws.apache.org/axisCppTestHeader/
- *
- * @return Pointer to the creater SOAP header block.
- */
- IHeaderBlock * AXISCALL createSOAPHeaderBlock(AxisChar * pachLocalName,
- AxisChar * pachUri);
-
- /**
- * Iterator initiatior for SOAP header blocks
- *
- * This method must be called first to initiate access to the list of
- * SOAP header blocks.
- *
- * @return First SOAP header block pointer. If there are no SOAP header
- * blocks set, returns NULL.
- */
- IHeaderBlock* getFirstSOAPHeaderBlock();
-
- /**
- * Iterator for SOAP header blocks
- *
- * getFirstSOAPHeaderBlock() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method advances the iterator by one position.
- * Repeated calls always retuen the next value.
- *
- * @return Next SOAP header block pointer. If there are no SOAP header
- * blocks set or if iterator is at the end of the list, returns NULL.
- */
- IHeaderBlock* getNextSOAPHeaderBlock();
-
- /**
- * Accessor for SOAP header blocks
- *
- * This method gives access to the SOAP header block pointer corresponding
- * to the SOAP header block currently being pointed by SOAP header blocks
- * iterator.
- *
- * getFirstSOAPHeaderBlock() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method does not advance the iterator.
- * Repeated calls always retuen the same key unless
- * getNextSOAPHeaderBlock() is called in between.
- *
- * @return Current SOAP header block pointer. If there are no SOAP header
- * block set or if iterator is at the end of the list, returns NULL.
- */
- IHeaderBlock* getCurrentSOAPHeaderBlock();
-
- /**
- * Deletes the SOAP header block currently pointed to by
- * the iterator.
- */
- void deleteCurrentSOAPHeaderBlock();
-
- /**
- * Deletes the given SOAP header block pointer from the current list of
- * SOAP header blocks.
- *
- * This method does a pointer comparison. It does not compare the contents
- * within objects.
- * Hence it is expected that either the pointer returned by the
- * create method or by one of the iterator methods would be used with
- * this method.
- *
- * This method does not advance the iterator in line with the deletes done.
- * In case you want to access the SOAP header blocks after using this
- * method, it is advisable to reinitialize the iterator using
- * getFirstSOAPHeaderBlock();
- * However you can use this method despite where the iterator is
- * pointing currently.
- *
- * @param pHeaderBlock Pointer of the header block to be deleted.
- */
- void deleteSOAPHeaderBlock(IHeaderBlock* pHeaderBlock);
-
- /**
- * Set proxy server and port for transport.
- *
- * @param pcProxyHost Host name of proxy server
- * @param uiProxyPort Port of proxy server
- */
- void setProxy(const char* pcProxyHost, unsigned int uiProxyPort);
-
- /**
- * Sets a Attribute to the SOAPMethod, using the given Attribute data.
- *
- * @param pLocalname The local name of the Attribute.
- * @param pPrefix The prefix of the Attribute.
- * @param pValue The value of the Attribute.
- */
- void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue);
-
- /**
- * Sets a Attribute to the SOAPMethod, using the given Attribute data.
- *
- * @param pLocalname The local name of the Attribute.
- * @param pPrefix The prefix of the Attribute.
- * @param pUri The namespace uri of the Attribute.
- * @param pValue The value of the Attribute.
- */
- void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar* pUri, const AxisChar *pValue);
-
- /**
- * Iterator initiatior for SOAP method attributes
- *
- * This method must be called first to initiate access to the list of
- * SOAP method attributes.
- *
- * @return First SOAP method attribute pointer. If there are no SOAP method
- * attributes set, returns NULL.
- */
- Attribute* getFirstSOAPMethodAttribute();
-
- /**
- * Iterator for SOAP method attributes
- *
- * getFirstSOAPMethodAttribute() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method advances the iterator by one position.
- * Repeated calls always retuen the next value.
- *
- * @return Next SOAP method attribute pointer. If there are no SOAP method
- * attributes set or if iterator is at the end of the list, returns NULL.
- */
- Attribute* getNextSOAPMethodAttribute();
-
- /**
- * Accessor for SOAP method attributes
- *
- * This method gives access to the SOAP method attribute pointer corresponding
- * to the SOAP method attribute currently being pointed by SOAP method
- * attributes iterator.
- *
- * getFirstSOAPMethodAttribute() method must have been called at least once
- * before this method is called. If not behaviour is undefined.
- *
- * This method does not advance the iterator.
- * Repeated calls always retuen the same key unless
- * getNextSOAPMethodAttribute() is called in between.
- *
- * @return Current SOAP method attribute pointer. If there are no SOAP method
- * attribute set or if iterator is at the end of the list, returns NULL.
- */
- Attribute* getCurrentSOAPMethodAttribute();
-
- /**
- * Deletes the SOAP method attribute currently pointed to by
- * the iterator.
- */
- void deleteCurrentSOAPMethodAttribute();
-
- /**
- * Deletes the given occerance of the SOAP method attribute from
- * the current list of SOAP method attributes
- *
- * This method does a pointer comparison. It does not compare the contents
- * within objects.
- * Hence it is expected that either the pointer returned by the
- * create method or by one of the iterator methods would be used with
- * this method.
- *
- * This method does not advance the iterator in line with the deletes done.
- * In case you want to access the SOAP method attributes after using this
- * method, it is advisable to reinitialize the iterator using
- * getFirstSOAPMethodAttribute();
- * However you can use this method despite where the iterator is
- * pointing currently.
- *
- * @param pAttribute Pointer of Attribute to be deleted
- */
- void deleteSOAPMethodAttribute(Attribute* pAttribute);
-
- /**
- * Set transport timeout.
- *
- * @param lSeconds Timeout in seconds.
- * If lSeconds is 0, then the transport will assume no
- * timeout. Hence you want to reset a timeout already set
- * use 0.
- */
- void setTransportTimeout(const long lSeconds);
- /**
- * Get the status of the stub to see any error situation
- */
- int getStatus();
- /**
- * Get a namespace prefix for a given namespace URI
- */
- const AxisChar* AXISCALL getNamespacePrefix(const AxisChar* pNamespace);
-
- public:
- static StubFunctions ms_VFtable;
- static bool bInitialized;
- /* add static functions for all interface functions here */
- static void AXISCALL s_setEndpoint(void* pObj, const char* pchEndpoint)
- {((Stub*)pObj)->setEndPoint(pchEndpoint);};
- static void AXISCALL s_setTransportProperty(void* pObj,
- const char *pcKey, const char *pcValue)
- {((Stub*)pObj)->setTransportProperty(pcKey, pcValue);};
- static char* AXISCALL s_getFirstTrasportPropertyKey(void* pObj)
- {return ((Stub*)pObj)->getFirstTrasportPropertyKey();};
- static char* AXISCALL s_getNextTrasportPropertyKey(void* pObj)
- {return ((Stub*)pObj)->getNextTrasportPropertyKey();};
- static char* AXISCALL s_getCurrentTrasportPropertyKey(void* pObj)
- {return ((Stub*)pObj)->getCurrentTrasportPropertyKey();};
- static char* AXISCALL s_getCurrentTrasportPropertyValue(void* pObj)
- {return ((Stub*)pObj)->getCurrentTrasportPropertyValue();};
- static void AXISCALL s_deleteCurrentTrasportProperty(void* pObj)
- {((Stub*)pObj)->deleteCurrentTrasportProperty();};
- static void AXISCALL s_deleteTrasportProperty(void* pObj, char* pcKey,
- unsigned int uiOccurance)
- {((Stub*)pObj)->deleteTrasportProperty(pcKey, uiOccurance);};
- static void AXISCALL s_setHandlerProperty(void* pObj, AxisChar* name,
- void* value, int len)
- {((Stub*)pObj)->setHandlerProperty(name, value, len);};
- static HeaderBlock_C AXISCALL s_createSOAPHeaderBlock(void* pObj,
- AxisChar * pachLocalName, AxisChar * pachUri);
- static HeaderBlock_C AXISCALL s_getFirstSOAPHeaderBlock(void* pObj);
- static HeaderBlock_C AXISCALL s_getNextSOAPHeaderBlock(void* pObj);
- static HeaderBlock_C AXISCALL s_getCurrentSOAPHeaderBlock(void* pObj);
- static void AXISCALL s_deleteCurrentSOAPHeaderBlock(void* pObj)
- {((Stub*)pObj)->deleteCurrentSOAPHeaderBlock();};
- static void AXISCALL s_deleteSOAPHeaderBlock(void* pObj,
- HeaderBlock_C hdrBlk)
- {((Stub*)pObj)->deleteSOAPHeaderBlock((IHeaderBlock*)hdrBlk._object);};
- static void AXISCALL s_setProxy(void* pObj, const char* pcProxyHost,
- unsigned int uiProxyPort)
- {((Stub*)pObj)->setProxy(pcProxyHost, uiProxyPort);};
- static void AXISCALL s_setSOAPMethodAttribute(void* pObj,
- const AxisChar *pLocalname, const AxisChar *pPrefix,
- const AxisChar* pUri, const AxisChar *pValue)
- {((Stub*)pObj)->setSOAPMethodAttribute(pLocalname, pPrefix, pUri,
- pValue);};
- static Attribute_C AXISCALL s_getFirstSOAPMethodAttribute(void* pObj);
- static Attribute_C AXISCALL s_getNextSOAPMethodAttribute(void* pObj);
- static Attribute_C AXISCALL s_getCurrentSOAPMethodAttribute(void* pObj);
- static void AXISCALL s_deleteCurrentSOAPMethodAttribute(void* pObj)
- {((Stub*)pObj)->deleteCurrentSOAPMethodAttribute();};
- static void AXISCALL s_deleteSOAPMethodAttribute(void* pObj,
- Attribute_C Attr)
- {((Stub*)pObj)->deleteSOAPMethodAttribute((Attribute*)Attr._object);};
- static void AXISCALL s_setTransportTimeout(void* pObj,
- const long lSeconds)
- {((Stub*)pObj)->setTransportTimeout(lSeconds);};
- static int AXISCALL s_getStatus(void* pObj)
- {return ((Stub*)pObj)->getStatus();};
- static const AxisChar* AXISCALL s_getNamespacePrefix(void* pObj,
- const AxisChar* pNamespace)
- {return ((Stub*)pObj)->getNamespacePrefix(pNamespace);};
- static void s_Initialize();
-
- protected:
- /**
- * Apply user set preferences to each call made on the Stub object.
- * This method is required because Axis engine holds only part of the state
- * with refereance to subsequent calls on the same Stub object.
- * Foxing this approach would make the engine much more efficient.
- */
- void applyUserPreferences();
-
- /**
- * Set transport properties stored in m_vKeys and m_vValues vectors.
- * Called by applyUserPreferences for each and every method invocation.
- */
- void setTransportProperties();
-
- /**
- * Set SOAP Headers stored in m_vSOAPHeaderBlock vector.
- * Called by applyUserPreferences for each and every method invocation.
- */
- void setSOAPHeaders();
-
- /**
- * Set SOAP method attributes stored in m_vSOAPMethodAttributes vector.
- * Called by applyUserPreferences for each and every method invocation.
- */
- void setSOAPMethodAttributes();
-
- /**
- * Set transport timeout stored in mm_lTimeoutSeconds
- * Called by applyUserPreferences for each and every method invocation.
- */
- void setTransportTimeout();
-
- /**
- * Call object of the Stub. This is the point of access to the internals
- * of the Axis engine.
- */
- Call *m_pCall;
-
- /**
- * Trasport property keys
- */
- vector < char *>m_vKeys;
-
- /**
- * Trasport keys iterator
- */
- vector <char*>::iterator m_viCurrentKey;
-
- /**
- * Trasport property values
- */
- vector < char *>m_vValues;
-
- /**
- * Trasport keys iterator
- */
- vector <char*>::iterator m_viCurrentValue;
-
- /**
- * Vector of Header Blok pointers
- */
- vector < IHeaderBlock * >m_vSOAPHeaderBlocks;
-
- /**
- * Trasport keys iterator
- */
- vector <IHeaderBlock *>::iterator m_viCurrentSOAPHeaderBlock;
-
- /**
- * List of SOAPMethod Attributes
- */
- vector <Attribute*> m_vSOAPMethodAttributes;
-
- /**
- * Trasport keys iterator
- */
- vector <Attribute*>::iterator m_viCurrentSOAPMethodAttribute;
-
- /**
- * Timeout in seconds
- */
- long m_lTimeoutSeconds;
-
-};
-
-AXIS_CPP_NAMESPACE_END
-
-#endif
-
-typedef struct {
- void* _object; /* this will be C++ Call Object */
- CallFunctions* _functions; /* this is the static function table */
- void* _stub_object; /* the stub object */
- StubFunctions* _stub_functions; /* this is the static function table */
-} Call_C;
-
-#ifndef __cplusplus
-typedef Call_C Call;
-#endif
-
-#endif /* !defined(_STUB_H____OF_AXIS_INCLUDED_) */
+#error "Please include Stub.hpp instead"
\ No newline at end of file