Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages | Examples

IWrapperSoapSerializer.hpp

00001 /* 00002 * Copyright 2003-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #if !defined(_IWRAPPERSOAPSERIALIZER_H____OF_AXIS_INCLUDED_) 00018 #define _IWRAPPERSOAPSERIALIZER_H____OF_AXIS_INCLUDED_ 00019 00020 #include "AxisUserAPI.hpp" 00021 #include "TypeMapping.hpp" 00022 #include "WSDDDefines.hpp" 00023 #include "ISoapAttachment.hpp" 00024 #include <stdarg.h> 00025 #include <cctype> 00026 00027 /* 00028 * @class IWrapperSoapSerializer 00029 * @brief interface for the IWrapperSoapSerializer class. 00030 * 00031 * 00032 * @author Susantha Kumara (skumara@virtusa.com, susantha@opensource.lk) 00033 * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk) 00034 * 00035 */ 00036 00037 /* 00038 * Revision 1.1 2005/01/02 Roshan 00039 * Added addAttachmentBody 00040 * Added addAttachmentHeader 00041 */ 00042 00043 /* 00044 * Revision 1.2 2005/01/07 Roshan 00045 * Added addAttachment 00046 */ 00047 00048 AXIS_CPP_NAMESPACE_START 00049 00050 class IWrapperSoapSerializer 00051 { 00052 public: 00053 virtual ~IWrapperSoapSerializer(){}; 00054 00055 virtual int AXISCALL createSoapMethod(const AxisChar* sLocalName, 00056 const AxisChar* sURI)=0; 00057 00058 virtual int AXISCALL createSoapFault(const AxisChar* sLocalName, 00059 const AxisChar* sURI, const AxisChar* sFaultCode, 00060 const AxisChar* sFaultString)=0; 00061 00062 virtual const AxisChar* AXISCALL getNamespacePrefix 00063 (const AxisChar* pNamespace)=0; 00064 00065 virtual void AXISCALL removeNamespacePrefix(const AxisChar* pNamespace)=0; 00066 00067 /* for basic types */ 00068 virtual int AXISCALL addOutputParam(const AxisChar* pchName, void* pValue, 00069 XSDTYPE type)=0; 00070 00071 /* for arrays */ 00072 virtual int AXISCALL addOutputCmplxArrayParam(const Axis_Array* pArray, 00073 void* pSZFunct, void* pDelFunct, void* pSizeFunct, 00074 const AxisChar* pName, const AxisChar* pNamespace)=0; 00075 00076 virtual int AXISCALL addOutputBasicArrayParam(const Axis_Array* pArray, 00077 XSDTYPE nType, const AxisChar* pName)=0; 00078 00079 /* for complex types */ 00080 virtual int AXISCALL addOutputCmplxParam(void* pObject, void* pSZFunct, 00081 void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace) = 0; 00082 00083 virtual int AXISCALL addFaultDetail(void* pObject, void* pSZFunct, 00084 void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace) = 0; 00085 00086 /* Methods used to serialize arrays */ 00087 virtual int AXISCALL serializeCmplxArray(const Axis_Array* pArray, 00088 void* pSZFunct, void* pDelFunct, void* pSizeFunct, 00089 const AxisChar* pName, const AxisChar* pNamespace)=0; 00090 00091 virtual int AXISCALL serializeBasicArray 00092 (const Axis_Array* pArray, XSDTYPE nType, const AxisChar* pName)=0; 00093 00094 virtual int AXISCALL serializeBasicArray 00095 (const Axis_Array* pArray, const AxisChar* pNamespace, XSDTYPE nType, const AxisChar* pName)=0; 00096 00097 /* Basic Type Serializing methods */ 00098 virtual int AXISCALL serializeAsElement(const AxisChar* sName, 00099 void* pValue, XSDTYPE type)=0; 00100 00101 virtual int AXISCALL serializeAsElement(const AxisChar* sName, const AxisChar* pNamespace, 00102 void* pValue, XSDTYPE type)=0; 00103 00104 virtual int AXISCALL serializeAsAttribute(const AxisChar* sName, 00105 const AxisChar* pNamespace, void* pValue, XSDTYPE type)=0; 00106 00107 virtual void AXISCALL serializeVargs(int count, const char** args)=0; 00108 virtual void AXISCALL serialize(const char* pFirst, ...)=0; 00109 00110 /* 00111 * following two functions are needed by serializer 00112 * functions of complex types for RPC style web services 00113 */ 00114 virtual void AXISCALL serializeStartElementOfType(const AxisChar* pName, 00115 const AxisChar* pNamespace, const AxisChar* pPrefix)=0; 00116 00117 virtual void AXISCALL serializeEndElementOfType(const AxisChar* pName)=0; 00118 00119 /* Externalization of serializer API */ 00120 00121 /* Following functions need not be exposed. They are internal to the 00122 * Axis Engine - Commented by Susantha 02/07/2004 00123 00124 virtual int setOutputStream(SOAPTransport* pStream)=0; 00125 00126 virtual void markEndOfStream()=0; 00127 00128 virtual int init()=0; 00129 00130 virtual void setStyle(AXIS_BINDING_STYLE nStyle)=0; 00131 00132 virtual AXIS_BINDING_STYLE getStyle()=0; 00133 */ 00134 00135 virtual PROVIDERTYPE getCurrentProviderType()=0; 00136 00137 virtual void setCurrentProviderType(PROVIDERTYPE nType)=0; 00138 00139 virtual int addOutputAnyObject(AnyType* pAnyObject)=0; 00140 00141 virtual int serializeAnyObject(AnyType* pAnyObject)=0; 00142 00143 virtual int serializeAsChardata(void* pValue, XSDTYPE type)=0; 00144 00145 virtual void addAttachment(const AxisChar* achId, ISoapAttachment* objAttach)=0; 00146 00147 virtual void addAttachmentBody(const AxisChar* achId, xsd__base64Binary* pAttchBody)=0; 00148 00149 virtual void addAttachmentHeader(const AxisChar* achId, const AxisChar* achHeaderName, const AxisChar* achHeaderValue)=0; 00150 00159 virtual ISoapAttachment* createSoapAttachement()=0; 00160 }; 00161 00162 AXIS_CPP_NAMESPACE_END 00163 00164 #endif 00165

Generated on Tue Feb 8 14:34:17 2005 for AxisC++ by doxygen 1.3.8