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

IWrapperSoapSerializer.hpp

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

Generated on Tue May 17 02:30:31 2005 for AxisC++ by doxygen1.2.18