00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
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