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

Stub.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 
00026 /*
00027  * Revision 1.1  2004/05/31 samisa
00028  * Added setProxy
00029  */
00030 
00031 /*
00032  * Revision 1.2  2004/05/31 roshan
00033  * Added calling conventions
00034  */
00035 
00036 /*
00037  * Revision 1.3  2004/06/01 roshan
00038  * Added setSOAPMethodAttribute
00039  */
00040 
00041 /*
00042  * Revision 1.4  2004/06/08 samisa
00043  * Added setTransportTimeout
00044  */
00045 
00046 /*
00047  * Revision 1.5  2004/06/10 samisa
00048  * Added doxygen comments to help autobuild API docs
00049  */
00050 
00051 /*
00052  * Revision 1.6  2004/06/13 roshan
00053  * Added doxygen comments to help autobuild API docs
00054  */
00055 
00056 /*
00057  * Revision 1.13  2004/06/13 susantha
00058  * Added support for writing C web services and handlers
00059  */
00060 
00061 #if !defined(_STUB_H____OF_AXIS_INCLUDED_)
00062 #define _STUB_H____OF_AXIS_INCLUDED_
00063 
00064 #include <axis/client/Call.hpp>
00065 #include <axis/IAttribute.hpp>
00066 #include <vector>
00067 
00068 using namespace std;
00069 
00086 AXIS_CPP_NAMESPACE_START
00087 
00088 class STORAGE_CLASS_INFO Stub
00089 {
00090   public:
00100     Stub(const char *pcEndPointURI, AXIS_PROTOCOL_TYPE eProtocol);
00101 
00109     virtual ~Stub();
00110 
00118     void AXISCALL setEndPoint(const char *pcEndPointURI);
00119 
00142     void AXISCALL setTransportProperty(const char *pcKey, const char *pcValue);
00143 
00153     const char* getFirstTrasportPropertyKey();
00154 
00167     const char* getNextTrasportPropertyKey();
00168 
00185     const char* getCurrentTrasportPropertyKey();
00186     
00205     const char* getCurrentTrasportPropertyValue();
00206 
00211     void deleteCurrentTrasportProperty();
00212 
00231     void deleteTrasportProperty(char* pcKey, unsigned int uiOccurance = 1);
00232 
00240     void setHandlerProperty(AxisChar* name, void* value, int len);
00241 
00302     IHeaderBlock * AXISCALL createSOAPHeaderBlock(AxisChar * pachLocalName,
00303                      AxisChar * pachUri);
00304 
00314     IHeaderBlock* getFirstSOAPHeaderBlock();
00315 
00328     IHeaderBlock* getNextSOAPHeaderBlock();
00329 
00347     IHeaderBlock* getCurrentSOAPHeaderBlock();
00348     
00353     void deleteCurrentSOAPHeaderBlock();
00354 
00374     void deleteSOAPHeaderBlock(IHeaderBlock* pHeaderBlock);
00375 
00382     void setProxy(const char* pcProxyHost, unsigned int uiProxyPort);
00383 
00391     void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue);
00392 
00401     void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar* pUri, const AxisChar *pValue);
00402   
00412     IAttribute* getFirstSOAPMethodAttribute();
00413 
00426     IAttribute* getNextSOAPMethodAttribute();
00427 
00445     IAttribute* getCurrentSOAPMethodAttribute();
00446     
00451     void deleteCurrentSOAPMethodAttribute();
00452 
00472     void deleteSOAPMethodAttribute(IAttribute* pAttribute);
00473 
00482     void setTransportTimeout(const long lSeconds);
00486        int getStatus();
00490     const AxisChar* AXISCALL getNamespacePrefix(const AxisChar* pNamespace);
00491 
00496     void setMaintainSession(bool bSession);
00497 
00502     void setTransportProtocol(AXIS_PROTOCOL_TYPE eProtocol);
00503 
00508     AXIS_PROTOCOL_TYPE getTransportProtocol();
00509 
00510   protected:
00517     void applyUserPreferences();
00518 
00524     void updateStateAfterResponse();
00525     
00530     void setSOAPHeaders();
00531     
00536     void setSOAPMethodAttributes();
00537 
00542     Call *m_pCall;
00543 
00547 #ifdef WIN32
00548   #pragma warning (disable : 4251)
00549 #endif
00550     vector < IHeaderBlock * >m_vSOAPHeaderBlocks;
00551 #ifdef WIN32
00552   #pragma warning (default : 4251)
00553 #endif
00554 
00557     vector <IHeaderBlock *>::iterator m_viCurrentSOAPHeaderBlock;
00558 
00562 #ifdef WIN32
00563   #pragma warning (disable : 4251)
00564 #endif
00565     vector <IAttribute*> m_vSOAPMethodAttributes;
00566 #ifdef WIN32
00567   #pragma warning (default : 4251)
00568 #endif
00569 
00572     vector <IAttribute*>::iterator m_viCurrentSOAPMethodAttribute;
00573 
00577     SOAPTransport* m_pTrasport;
00578 
00579 };
00580 
00581 AXIS_CPP_NAMESPACE_END
00582 
00583 #endif /* !defined(_STUB_H____OF_AXIS_INCLUDED_) */

Generated on Fri Dec 3 18:43:42 2004 for AxisC++ by doxygen1.2.18