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

Stub.hpp

Go to the documentation of this file.
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 #if !defined(_STUB_H____OF_AXIS_INCLUDED_)
00028 #define _STUB_H____OF_AXIS_INCLUDED_
00029 
00030 #include <axis/client/Call.hpp>
00031 #include <vector>
00032 
00033 using namespace std;
00034 
00051 AXIS_CPP_NAMESPACE_START
00052 
00053 class STORAGE_CLASS_INFO Stub
00054 {
00055   public:
00056       
00066     Stub(const char *pcEndPointURI, AXIS_PROTOCOL_TYPE eProtocol);
00067 
00075     virtual ~Stub();
00076 
00084     void AXISCALL setEndPoint(const char *pcEndPointURI);
00085 
00086 
00111     void AXISCALL setTransportProperty(const char *pcKey, const char *pcValue);
00112 
00123     const char* AXISCALL getTransportProperty(const char *key, bool response=true);
00124 
00138     const char* getFirstTransportPropertyKey(bool response=true);
00139 
00140 
00154     const char* getNextTransportPropertyKey(bool response=true);
00155 
00173     const char* getCurrentTransportPropertyKey(bool response=true);
00174     
00195     const char* getCurrentTransportPropertyValue(bool response=true);
00196 
00202     void deleteCurrentTransportProperty(bool response=true);
00203 
00225     void deleteTransportProperty(char* pcKey, unsigned int uiOccurance = 1);
00226     
00227     
00235     void setHandlerProperty(AxisChar* name, void* value, int len);
00236 
00318     IHeaderBlock * AXISCALL createSOAPHeaderBlock(AxisChar * pachLocalName,
00319                      AxisChar * pachUri);
00320 
00407     IHeaderBlock* AXISCALL createSOAPHeaderBlock(AxisChar * pachLocalName,
00408         AxisChar * pachUri, AxisChar * pachPrefix);
00409 
00419     IHeaderBlock* getFirstSOAPHeaderBlock();
00420 
00433     IHeaderBlock* getNextSOAPHeaderBlock();
00434 
00452     IHeaderBlock* getCurrentSOAPHeaderBlock();
00453     
00458     void deleteCurrentSOAPHeaderBlock();
00459 
00479     void deleteSOAPHeaderBlock(IHeaderBlock* pHeaderBlock);
00480 
00487     void setProxy(const char* pcProxyHost, unsigned int uiProxyPort);
00488 
00497     void setTransportTimeout(long lSeconds);
00501        int getStatus();
00502 
00507     void setMaintainSession(bool bSession);
00508 
00513     void setTransportProtocol(AXIS_PROTOCOL_TYPE eProtocol);
00514 
00519     AXIS_PROTOCOL_TYPE getTransportProtocol();
00520 
00524     void setUsername(const char* pcUsername);
00525 
00529     void setPassword(const char* pcPassword);
00530 
00534     const char* getUsername();
00535 
00539     const char* getPassword();
00540 
00544     void setProxyUsername(const char* pcProxyUsername);
00545 
00549     void setProxyPassword(const char* pcProxyPassword);
00550 
00554     const char* getProxyUsername();
00555 
00559     const char* getProxyPassword();
00560 
00565     Call *getCall() { return m_pCall; }
00566 
00572     ISoapAttachment* createSoapAttachment();
00573  
00577     void AXISCALL SetSecure( char *, ...);
00578 
00579   protected:
00586     void applyUserPreferences();
00587 
00591     void includeSecure();
00592     
00597     void setSOAPHeaders();
00598     
00602     void setAuthorizationHeader();
00603   
00607     void setProxyAuthorizationHeader();
00608 
00609 
00613     Call *m_pCall;
00614 
00618 #ifdef WIN32
00619   #pragma warning (disable : 4251)
00620 #endif
00621     vector < IHeaderBlock * >m_vSOAPHeaderBlocks;
00625     vector <IHeaderBlock *>::iterator m_viCurrentSOAPHeaderBlock;
00626 
00627 #ifdef WIN32
00628   #pragma warning (default : 4251)
00629 #endif
00630 
00634     SOAPTransport* m_pTransport;
00635 
00636 
00640    char* m_pcUsername;
00641 
00645    char* m_pcPassword;
00649    char* m_proxyUsername;
00650 
00654    char* m_proxyPassword;
00655    
00656 private:
00660     std::string m_sArguments[8];
00661 };
00662 
00663 AXIS_CPP_NAMESPACE_END
00664 
00665 #endif /* !defined(_STUB_H____OF_AXIS_INCLUDED_) */

Generated on Fri Mar 3 01:12:35 2006 for AxisC++ by doxygen1.2.18