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

Stub.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 00027 /* 00028 * Revision 1.1 2004/05/31 samisa 00029 * Added setProxy 00030 */ 00031 00032 /* 00033 * Revision 1.2 2004/05/31 roshan 00034 * Added calling conventions 00035 */ 00036 00037 /* 00038 * Revision 1.3 2004/06/01 roshan 00039 * Added setSOAPMethodAttribute 00040 */ 00041 00042 /* 00043 * Revision 1.4 2004/06/08 samisa 00044 * Added setTransportTimeout 00045 */ 00046 00047 /* 00048 * Revision 1.5 2004/06/10 samisa 00049 * Added doxygen comments to help autobuild API docs 00050 */ 00051 00052 /* 00053 * Revision 1.6 2004/06/13 roshan 00054 * Added doxygen comments to help autobuild API docs 00055 */ 00056 00057 /* 00058 * Revision 1.7 2004/06/13 susantha 00059 * Added support for writing C web services and handlers 00060 */ 00061 00062 /* 00063 * Revision 1.8 2005/01/06 roshan 00064 * Added the method: 00065 * IHeaderBlock* createSOAPHeaderBlock(AxisChar * pachLocalName, 00066 * AxisChar * pachUri, AxisChar * pachPrefix); 00067 */ 00068 00069 #if !defined(_STUB_H____OF_AXIS_INCLUDED_) 00070 #define _STUB_H____OF_AXIS_INCLUDED_ 00071 00072 #include <axis/client/Call.hpp> 00073 #include <axis/IAttribute.hpp> 00074 #include <vector> 00075 00076 using namespace std; 00077 00094 AXIS_CPP_NAMESPACE_START 00095 00096 class STORAGE_CLASS_INFO Stub 00097 { 00098 public: 00099 00109 Stub(const char *pcEndPointURI, AXIS_PROTOCOL_TYPE eProtocol); 00110 00118 virtual ~Stub(); 00119 00127 void AXISCALL setEndPoint(const char *pcEndPointURI); 00128 00153 void AXISCALL setTrasportProperty(const char *pcKey, const char *pcValue) {}; 00154 00166 const char* getFirstTrasportPropertyKey() {return NULL;}; 00167 00168 00183 const char* getNextTrasportPropertyKey() {return NULL;}; 00184 00203 const char* getCurrentTrasportPropertyKey() {return NULL;}; 00204 00225 const char* getCurrentTrasportPropertyValue() {return NULL;}; 00226 00233 void deleteCurrentTrasportProperty(){}; 00234 00255 void deleteTrasportProperty(char* pcKey, unsigned int uiOccurance = 1){}; 00256 00279 void AXISCALL setTransportProperty(const char *pcKey, const char *pcValue); 00280 00291 const char* AXISCALL getTransportProperty(const char *key, bool response=true); 00292 00302 const char* getFirstTransportPropertyKey(); 00303 00304 00317 const char* getNextTransportPropertyKey(); 00318 00335 const char* getCurrentTransportPropertyKey(); 00336 00355 const char* getCurrentTransportPropertyValue(); 00356 00361 void deleteCurrentTransportProperty(); 00362 00381 void deleteTransportProperty(char* pcKey, unsigned int uiOccurance = 1); 00382 00383 00391 void setHandlerProperty(AxisChar* name, void* value, int len); 00392 00452 IHeaderBlock * AXISCALL createSOAPHeaderBlock(AxisChar * pachLocalName, 00453 AxisChar * pachUri); 00454 00516 IHeaderBlock* AXISCALL createSOAPHeaderBlock(AxisChar * pachLocalName, 00517 AxisChar * pachUri, AxisChar * pachPrefix); 00518 00528 IHeaderBlock* getFirstSOAPHeaderBlock(); 00529 00542 IHeaderBlock* getNextSOAPHeaderBlock(); 00543 00561 IHeaderBlock* getCurrentSOAPHeaderBlock(); 00562 00567 void deleteCurrentSOAPHeaderBlock(); 00568 00588 void deleteSOAPHeaderBlock(IHeaderBlock* pHeaderBlock); 00589 00596 void setProxy(const char* pcProxyHost, unsigned int uiProxyPort); 00597 00606 void setTransportTimeout(const long lSeconds); 00610 int getStatus(); 00611 00616 void setMaintainSession(bool bSession); 00617 00622 void setTransportProtocol(AXIS_PROTOCOL_TYPE eProtocol); 00623 00628 AXIS_PROTOCOL_TYPE getTransportProtocol(); 00629 00633 void setUsername(const char* pcUsername); 00634 00638 void setPassword(const char* pcPassword); 00639 00643 const char* getUsername(); 00644 00648 const char* getPassword(); 00649 00654 Call *getCall() { return m_pCall; } 00655 00656 protected: 00663 void applyUserPreferences(); 00664 00665 00670 void setSOAPHeaders(); 00671 00676 void setSOAPMethodAttributes(); 00677 00681 void setAuthorizationHeader(); 00682 00683 Call *m_pCall; 00684 00688 #ifdef WIN32 00689 #pragma warning (disable : 4251) 00690 #endif 00691 vector < IHeaderBlock * >m_vSOAPHeaderBlocks; 00692 #ifdef WIN32 00693 #pragma warning (default : 4251) 00694 #endif 00695 00698 vector <IHeaderBlock *>::iterator m_viCurrentSOAPHeaderBlock; 00699 00703 #ifdef WIN32 00704 #pragma warning (disable : 4251) 00705 #endif 00706 vector <IAttribute*> m_vSOAPMethodAttributes; 00707 #ifdef WIN32 00708 #pragma warning (default : 4251) 00709 #endif 00710 00713 vector <IAttribute*>::iterator m_viCurrentSOAPMethodAttribute; 00714 00718 SOAPTransport* m_pTransport; 00719 00720 00724 char* m_pcUsername; 00725 00729 char* m_pcPassword; 00730 }; 00731 00732 AXIS_CPP_NAMESPACE_END 00733 00734 #endif /* !defined(_STUB_H____OF_AXIS_INCLUDED_) */

Generated on Sat Apr 9 15:11:57 2005 for AxisC++ by doxygen 1.3.8