You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2004/06/08 14:02:03 UTC

cvs commit: ws-axis/c/tests/client/interop/round1 Client.cpp

samisa      2004/06/08 05:02:03

  Modified:    c        configure.ac
               c/include/axis SOAPTransport.h
               c/include/axis/client Stub.h
               c/src/engine/client Stub.cpp
               c/src/server/apache ApacheTransport.h
               c/src/server/apache2 Apache2Transport.h
               c/src/transport/axis AxisTransport.cpp AxisTransport.h
                        Channel.cpp Channel.hpp HttpTransport.cpp
                        HttpTransport.hpp Transport.hpp
               c/tests/client/interop/round1 Client.cpp
  Log:
  Added trasport timeout support for client
  
  Revision  Changes    Path
  1.24      +2 -2      ws-axis/c/configure.ac
  
  Index: configure.ac
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/configure.ac,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- configure.ac	19 May 2004 09:34:56 -0000	1.23
  +++ configure.ac	8 Jun 2004 12:02:02 -0000	1.24
  @@ -14,7 +14,7 @@
   
   #if you need to build both axis_expat and axis_xerces libraries
   
  -#AC_OUTPUT(Makefile src/Makefile src/common/Makefile src/soap/Makefile src/wsdd/Makefile src/xml/Makefile src/transport/Makefile src/transport/axis/Makefile src/engine/Makefile src/engine/server/Makefile src/engine/client/Makefile  src/server/Makefile src/server/apache2/Makefile src/server/simple_axis_server/Makefile src/server/adminservice/Makefile src/client/Makefile src/client/adminclient/Makefile src/xml/expat/Makefile src/xml/xerces/Makefile)
  +AC_OUTPUT(Makefile src/Makefile src/common/Makefile src/soap/Makefile src/wsdd/Makefile src/xml/Makefile src/transport/Makefile src/transport/axis/Makefile src/engine/Makefile src/engine/server/Makefile src/engine/client/Makefile  src/server/Makefile src/server/apache2/Makefile src/server/simple_axis_server/Makefile src/server/adminservice/Makefile src/client/Makefile src/client/adminclient/Makefile src/xml/expat/Makefile src/xml/xerces/Makefile)
   
   #if you need to build only axis_expat
   
  @@ -31,7 +31,7 @@
   
   #if you need to build both axis_expat and axis_xerces libraries
   
  -AC_OUTPUT(Makefile src/Makefile src/common/Makefile src/soap/Makefile src/wsdd/Makefile src/xml/Makefile src/transport/Makefile src/transport/axis/Makefile src/engine/Makefile src/engine/server/Makefile src/engine/client/Makefile  src/server/Makefile src/server/apache/Makefile src/server/simple_axis_server/Makefile src/server/adminservice/Makefile src/client/Makefile src/client/adminclient/Makefile src/xml/expat/Makefile src/xml/xerces/Makefile)
  +#AC_OUTPUT(Makefile src/Makefile src/common/Makefile src/soap/Makefile src/wsdd/Makefile src/xml/Makefile src/transport/Makefile src/transport/axis/Makefile src/engine/Makefile src/engine/server/Makefile src/engine/client/Makefile  src/server/Makefile src/server/apache/Makefile src/server/simple_axis_server/Makefile src/server/adminservice/Makefile src/client/Makefile src/client/adminclient/Makefile src/xml/expat/Makefile src/xml/xerces/Makefile)
   
   #if you need to build only axis_expat
   
  
  
  
  1.4       +12 -0     ws-axis/c/include/axis/SOAPTransport.h
  
  Index: SOAPTransport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/SOAPTransport.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SOAPTransport.h	31 May 2004 08:30:03 -0000	1.3
  +++ SOAPTransport.h	8 Jun 2004 12:02:02 -0000	1.4
  @@ -23,6 +23,11 @@
    * Added setProxy
    */
   
  +/*
  + * Revision 1.2  2004/06/08 samisa
  + * Added setTimeout
  + */
  +
   #if !defined(AXIS_SOAPTRANSPORT_H__OF_AXIS_INCLUDED_)
   #define AXIS_SOAPTRANSPORT_H__OF_AXIS_INCLUDED_
   
  @@ -96,6 +101,13 @@
       * @param uiProxyPort Port of proxy server
       */
       virtual void setProxy(const char* pcProxyHost, unsigned int uiProxyPort) {}
  +
  +  /**
  +    * Set transport timeout. 
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    virtual void setTimeout(const long lSeconds) = 0; 
   
   protected:
   	char* m_pcEndpointUri; /* Outgoing endpoint URI */
  
  
  
  1.6       +27 -25    ws-axis/c/include/axis/client/Stub.h
  
  Index: Stub.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/client/Stub.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Stub.h	1 Jun 2004 17:35:06 -0000	1.5
  +++ Stub.h	8 Jun 2004 12:02:02 -0000	1.6
  @@ -39,6 +39,10 @@
    * Added setSOAPMethodAttribute
    */
   
  +/*
  + * Revision 1.4  2004/06/08 samisa
  + * Added setTransportTimeout
  + */
   #if !defined(_STUB_H____OF_AXIS_INCLUDED_)
   #define _STUB_H____OF_AXIS_INCLUDED_
   
  @@ -64,22 +68,29 @@
       */
       void setProxy(const char* pcProxyHost, unsigned int uiProxyPort);
   
  -	/**
  -	 * Sets a Attribute to the SOAPMethod, using the given Attribute data.
  -	 */
  -	void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue);
  -
  -	/**
  -	 * Sets a Attribute to the SOAPMethod, using the given Attribute data.
  -	 */
  -	void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar* pUri, const AxisChar *pValue);
  +  /**
  +    * Sets a Attribute to the SOAPMethod, using the given Attribute data.
  +    */
  +    void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue);
  +
  +  /**
  +    * Sets a Attribute to the SOAPMethod, using the given Attribute data.
  +    */
  +    void setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar* pUri, const AxisChar *pValue);
  +
  +  /**
  +    * Set transport timeout.
  +    *
  +    * @param lSeconds Timeout in seconds. If lSeconds is 0, then the transport will assume no timeout.
  +    */
  +    void setTransportTimeout(const long lSeconds);
   
     protected:
  -	void setSOAPMethodAttributes();
       void applyUserPreferences();
       void setTransportProperties();
       void setSOAPHeaders();
  -    void setProxy();
  +    void setSOAPMethodAttributes();
  +    void setTransportTimeout();
   
       Call *m_pCall;
       vector < char *>m_vKeys;
  @@ -87,23 +98,14 @@
       vector < IHeaderBlock * >m_vSOAPHeaderBlocks;
   
     /**
  -    * Proxy server name.
  -    */
  -    std::string m_strProxyHost;
  -  /**
  -    * Proxy server port.
  +    * List of SOAPMethod Attributes
       */
  -    unsigned int m_uiProxyPort;
  +    vector <Attribute*> m_vSOAPMethodAttributes;
  +
     /**
  -    * Use Proxy or not?
  +    * Timeout in seconds
       */
  -    bool m_bUseProxy;
  -
  -  private:
  -	/**
  -	 * List of SOAPMethod Attributes
  -	 */
  -    vector <Attribute*> m_vSOAPMethodAttributes;
  +    long m_lTimeoutSeconds;
   
   };
   
  
  
  
  1.7       +23 -19    ws-axis/c/src/engine/client/Stub.cpp
  
  Index: Stub.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/client/Stub.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Stub.cpp	1 Jun 2004 17:35:06 -0000	1.6
  +++ Stub.cpp	8 Jun 2004 12:02:02 -0000	1.7
  @@ -44,7 +44,7 @@
   
   
   Stub::Stub (const char *pcEndPointUri)
  -:m_strProxyHost(""), m_uiProxyPort(0), m_bUseProxy(false)
  +:m_lTimeoutSeconds(0)
   {
       m_pCall = new Call ();
       m_pCall->setProtocol (APTHTTP);
  @@ -148,31 +148,15 @@
   {
       setSOAPHeaders ();
       setTransportProperties ();
  -	setSOAPMethodAttributes();
  +    setSOAPMethodAttributes();
  +    setTransportTimeout();
   }
   
   void Stub::setProxy(const char* pcProxyHost, unsigned int uiProxyPort)
   {
  -    /*m_strProxyHost = pcProxyHost;
  -    m_uiProxyPort = uiProxyPort;
  -    m_bUseProxy = true;    */
       m_pCall->setProxy(pcProxyHost, uiProxyPort);
   }
   
  -void Stub::setProxy()
  -{
  -    /*if(m_bUseProxy)
  -    {
  -        SOAPTransport *pTrasport = NULL;
  -        if (m_pCall)
  -            pTrasport = m_pCall->getTransport ();
  -        if (pTrasport)
  -        {
  -            pTrasport->setProxy(m_strProxyHost, m_uiProxyPort);
  -        }
  -    }*/
  -}
  -
   void Stub::setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue)
   {
   	Attribute* pAttribute = new Attribute(pLocalname, pPrefix, pValue);
  @@ -198,3 +182,23 @@
       Attribute* pAttribute = new Attribute(pLocalname, pPrefix, pUri, pValue);
   	m_vSOAPMethodAttributes.push_back(pAttribute);
   }
  +
  +void Stub::setTransportTimeout(const long lSeconds)
  +{
  +    m_lTimeoutSeconds = lSeconds;
  +}
  +
  +void Stub::setTransportTimeout()
  +{
  +    if(m_lTimeoutSeconds)
  +    {
  +        SOAPTransport *pTrasport = NULL;
  +        if (m_pCall)
  +            pTrasport = m_pCall->getTransport ();
  +        if (pTrasport)
  +        {
  +            pTrasport->setTimeout(m_lTimeoutSeconds);
  +        }
  +    }    
  +}
  +
  
  
  
  1.3       +14 -1     ws-axis/c/src/server/apache/ApacheTransport.h
  
  Index: ApacheTransport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache/ApacheTransport.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApacheTransport.h	24 May 2004 05:54:55 -0000	1.2
  +++ ApacheTransport.h	8 Jun 2004 12:02:02 -0000	1.3
  @@ -15,7 +15,12 @@
    *
    *
    * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
  - *
  + * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
  + */
  +
  +/*
  + * Revision 1.1  2004/06/08 samisa
  + * Added setTimeout
    */
   
   #if !defined(AXIS_APACHETRANSPORT_H__OF_AXIS_INCLUDED_)
  @@ -56,6 +61,14 @@
   	AXIS_PROTOCOL_TYPE getProtocol();
   	int getSubProtocol();
   	AXIS_TRANSPORT_STATUS flushOutput();
  +  /**
  +    * Set transport timeout.
  +    * TODO: need to implement
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    void setTimeout(const long lSeconds) {};
  +
   private:
   	void* m_pContext;
   #ifndef CHUNCKED_DATA_SUPPORTED
  
  
  
  1.2       +14 -1     ws-axis/c/src/server/apache2/Apache2Transport.h
  
  Index: Apache2Transport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache2/Apache2Transport.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Apache2Transport.h	24 May 2004 05:54:55 -0000	1.1
  +++ Apache2Transport.h	8 Jun 2004 12:02:02 -0000	1.2
  @@ -15,7 +15,12 @@
    *
    *
    * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
  - *
  + * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
  + */
  +
  +/*
  + * Revision 1.1  2004/06/08 samisa
  + * Added setTimeout
    */
   
   #if !defined(AXIS_APACHE2TRANSPORT_H__OF_AXIS_INCLUDED_)
  @@ -57,6 +62,14 @@
   	AXIS_PROTOCOL_TYPE getProtocol();
   	int getSubProtocol();
   	AXIS_TRANSPORT_STATUS flushOutput();
  +  /**
  +    * Set transport timeout.
  +    * TODO: need to implement
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    void setTimeout(const long lSeconds) {};
  +
   private:
   	void* m_pContext;
   #ifndef CHUNCKED_DATA_SUPPORTED
  
  
  
  1.28      +9 -1      ws-axis/c/src/transport/axis/AxisTransport.cpp
  
  Index: AxisTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/AxisTransport.cpp,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- AxisTransport.cpp	31 May 2004 08:40:21 -0000	1.27
  +++ AxisTransport.cpp	8 Jun 2004 12:02:02 -0000	1.28
  @@ -31,6 +31,10 @@
    * Added setProxy
    */
   
  +/*
  + * Revision 1.3  2004/06/08 samisa
  + * Added setTimeout
  + */
   
   #ifdef WIN32
   #pragma warning (disable : 4786)
  @@ -74,7 +78,7 @@
       memset(&m_SendBuffers, 0, sizeof(BufferInfo)*NO_OF_SERIALIZE_BUFFERS); 
       //set the proxy
       if(m_bUseProxy)
  -        m_pHttpTransport->setProxy( m_strProxyHost.c_str(), m_uiProxyPort);
  +        m_pHttpTransport->setProxy(m_strProxyHost.c_str(), m_uiProxyPort);
       if(m_pHttpTransport->Init())
       {
          m_pSender = new Sender(m_pHttpTransport);
  @@ -337,6 +341,10 @@
       m_bUseProxy = true;    
   }
   
  +void AxisTransport::setTimeout(const long lSeconds)
  +{
  +    m_pHttpTransport->setTimeout(lSeconds);
  +}
   
   #ifdef WIN32
   #define STORAGE_CLASS_INFO __declspec(dllexport)
  
  
  
  1.9       +14 -1     ws-axis/c/src/transport/axis/AxisTransport.h
  
  Index: AxisTransport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/AxisTransport.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AxisTransport.h	31 May 2004 08:40:21 -0000	1.8
  +++ AxisTransport.h	8 Jun 2004 12:02:02 -0000	1.9
  @@ -25,6 +25,11 @@
    * Added setProxy
    */
   
  +/*
  + * Revision 1.2  2004/06/08 samisa
  + * Added setTimeout
  + */
  +
   #if !defined(_AXIS_AXIS_TRANSPORT_HPP)
   #define _AXIS_AXIS_TRANSPORT_HPP
   
  @@ -58,7 +63,7 @@
   	int getSubProtocol();
   	AXIS_TRANSPORT_STATUS flushOutput();
   	
  -	  /**
  +  /**
       * Set proxy server and port for transport.
       *
       * @param pcProxyHost Host name of proxy server
  @@ -66,6 +71,13 @@
       */
       void setProxy(const char* pcProxyHost, unsigned int uiProxyPort); 
   
  +  /**
  +    * Set transport timeout.
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    void setTimeout(const long lSeconds);
  +
   /*
       static AXIS_TRANSPORT_STATUS AXISCALL s_Send_bytes(const char* pSendBuffer,
           const void* bufferid, const void* pSStream);
  @@ -99,6 +111,7 @@
       * Use Proxy or not?
       */
       bool m_bUseProxy;
  +
   
   };
   
  
  
  
  1.17      +52 -0     ws-axis/c/src/transport/axis/Channel.cpp
  
  Index: Channel.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/Channel.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Channel.cpp	24 May 2004 02:35:32 -0000	1.16
  +++ Channel.cpp	8 Jun 2004 12:02:02 -0000	1.17
  @@ -26,6 +26,11 @@
    * by Samisa Abeysinghe (sabeysinghe@virtusa.com)
    */
   
  +/*
  + * Revision 1.2  2004/06/08 samisa
  + * Added setTimeout
  + */
  +
   #include "Platform.hpp"
   #include "Channel.hpp"
   #include <iostream>
  @@ -235,6 +240,30 @@
       const int BUF_SIZE = 1024;
       char buf[BUF_SIZE];
   
  +    //assume timeout not set; set default tatus to OK
  +    int iTimeoutStatus = 1;
  +
  +    //check if timeout set
  +    if(m_lTimeoutSeconds)
  +        iTimeoutStatus = applyTimeout();
  +
  +    //handle timeout outcome
  +    if(iTimeoutStatus < 0)//error
  +    {
  +        perror ("select SOCKET_ERROR");
  +        Error ("Channel error while waiting for timeout.");
  +        return *this;
  +    }
  +
  +    if(iTimeoutStatus == 0)//timeout expired
  +    {
  +        perror ("select timeout expired");
  +        Error ("Channel error connection timeout before receving.");
  +        return *this;
  +    }
  +
  +    //either timeout was not set or data available before timeout; so read
  +
       if ((nByteRecv = recv (m_Sock, (char *) &buf, BUF_SIZE - 1, 0))
   	== SOCKET_ERROR)
       {
  @@ -347,3 +376,26 @@
       std::cerr << err << std::endl;
   #endif
   }
  +
  +void Channel::setTimeout(const long lSeconds)
  +{
  +    m_lTimeoutSeconds = lSeconds;
  +}
  +
  +int Channel::applyTimeout()
  +{
  +    fd_set set;
  +    struct timeval timeout;
  +
  +    /* Initialize the file descriptor set. */
  +    FD_ZERO(&set);
  +    FD_SET(m_Sock, &set);
  +
  +    /* Initialize the timeout data structure. */
  +    timeout.tv_sec = m_lTimeoutSeconds;
  +    timeout.tv_usec = 0;
  +
  +    /* select returns 0 if timeout, 1 if input available, -1 if error. */
  +    return select(FD_SETSIZE, &set, NULL, NULL, &timeout);
  +}
  +
  
  
  
  1.4       +23 -0     ws-axis/c/src/transport/axis/Channel.hpp
  
  Index: Channel.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/Channel.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Channel.hpp	21 May 2004 05:43:49 -0000	1.3
  +++ Channel.hpp	8 Jun 2004 12:02:02 -0000	1.4
  @@ -26,6 +26,11 @@
    * by Samisa Abeysinghe (sabeysinghe@virtusa.com)
    */
   
  +/*
  + * Revision 1.2  2004/06/08 samisa
  + * Added setTimeout
  + */
  +
   #if !defined(_AXIS_CHANNEL_HPP)
   #define _AXIS_CHANNEL_HPP
   
  @@ -129,6 +134,13 @@
       virtual void SetTransportHandler(Transport* transport)
       {m_pTransportHandler = transport;}
   
  +  /**
  +    * Set transport timeout.
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    void setTimeout(const long lSeconds);
  +
   protected:
       /* OS specific initilization */
       virtual bool Init();
  @@ -139,6 +151,11 @@
       /* Close & clean-up the open socket/system resources */
       virtual void CloseChannel();
   
  +  /**
  +    * @return 0 if timeout, 1 if input available, -1 if error.
  +    */
  +    int applyTimeout();
  +
       unsigned int   m_Sock;        /* Socket descriptor */
       std::string    m_RemoteNode;  /* Remote address could be IP/host-name */
       unsigned short m_RemoteEnd;   /* Remote port number */
  @@ -146,6 +163,12 @@
   
       Transport    * m_pTransportHandler;    /* Transport handler for 
                                               * validation purpose */
  +
  +  /**
  +    * Timeout in seconds
  +    */
  +    long m_lTimeoutSeconds;
  +
   };
   
   
  
  
  
  1.31      +17 -2     ws-axis/c/src/transport/axis/HttpTransport.cpp
  
  Index: HttpTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/HttpTransport.cpp,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- HttpTransport.cpp	31 May 2004 08:40:21 -0000	1.30
  +++ HttpTransport.cpp	8 Jun 2004 12:02:02 -0000	1.31
  @@ -32,6 +32,12 @@
    * Added proxy support
    */
   
  +/*
  + * Revision 1.3  2004/06/08 samisa
  + * Added setTimeout
  + */
  +
  +
   #include "Platform.hpp"
   #include "HttpTransport.hpp"
   #include <iostream>
  @@ -46,7 +52,7 @@
    *  set HTTP category default to POST
    */
   HttpTransport::HttpTransport (Url url, int secure):
  -m_Typ (POST), m_strProxyHost(""), m_uiProxyPort(0), m_bUseProxy(false)
  +m_Typ (POST), m_strProxyHost(""), m_uiProxyPort(0), m_bUseProxy(false), m_lTimeoutSeconds(0)
   {
       m_Url = url;
       m_IsHttpHeader = 0;
  @@ -70,7 +76,7 @@
    *  set HTTP category default to POST
    */
   HttpTransport::HttpTransport (std::string & strUrl, int secure):
  -m_Typ (POST), m_bUseProxy(false)
  +m_Typ (POST), m_strProxyHost(""), m_uiProxyPort(0), m_bUseProxy(false), m_lTimeoutSeconds(0)
   {
       m_Url = Url (strUrl);
       m_strUrl = strUrl;
  @@ -122,6 +128,8 @@
               port = m_uiProxyPort;
           }
   	m_Channel->Open (host, port);
  +	
  +        m_Channel->setTimeout(m_lTimeoutSeconds);
   	m_Channel->SetTransportHandler (this);
   #ifdef _DEBUG
   	cout << "Transport:init() successfull" << endl;
  @@ -736,3 +744,10 @@
       m_uiProxyPort = uiProxyPort;
       m_bUseProxy = true;    
   }
  +
  +void HttpTransport::setTimeout(const long lSeconds)
  +{
  +    m_lTimeoutSeconds = lSeconds;
  +    m_Channel->setTimeout(lSeconds);
  +}
  +
  
  
  
  1.5       +18 -0     ws-axis/c/src/transport/axis/HttpTransport.hpp
  
  Index: HttpTransport.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/HttpTransport.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HttpTransport.hpp	31 May 2004 08:40:21 -0000	1.4
  +++ HttpTransport.hpp	8 Jun 2004 12:02:02 -0000	1.5
  @@ -27,6 +27,10 @@
    * Added setProxy
    */
   
  +/*
  + * Revision 1.2  2004/06/08 samisa
  + * Added setTimeout
  + */
   
   #if !defined(_AXIS_HTTPTRANSPORT_HPP)
   #define _AXIS_HTTPTRANSPORT_HPP
  @@ -118,6 +122,7 @@
       void Error(const char * err);
   
       void ClearAdditionalHeaders();
  +
     /**
       * Set proxy server and port for transport.
       *
  @@ -126,6 +131,13 @@
       */
       void setProxy(const char* pcProxyHost, unsigned int uiProxyPort); 
   
  +  /**
  +    * Set transport timeout.
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    void setTimeout(const long lSeconds);
  +
   
   private:
   
  @@ -159,6 +171,12 @@
       * Use Proxy or not?
       */
       bool m_bUseProxy;
  +
  +  /**
  +    * Timeout in seconds
  +    */
  +    long m_lTimeoutSeconds;
  +
   };
   
   #endif
  
  
  
  1.4       +10 -1     ws-axis/c/src/transport/axis/Transport.hpp
  
  Index: Transport.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/Transport.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Transport.hpp	31 May 2004 08:40:21 -0000	1.3
  +++ Transport.hpp	8 Jun 2004 12:02:02 -0000	1.4
  @@ -26,6 +26,10 @@
    * Added setProxy
    */
   
  +/*
  + * Revision 1.2  2004/06/08 samisa
  + * Added setTimeout
  + */
   
   #if !defined(_AXIS_TRANSPORT_HPP)
   #define _AXIS_TRANSPORT_HPP
  @@ -61,7 +65,12 @@
       virtual void setBodyLength(int bodyLength) = 0;
       virtual int getIsHttpHeader() = 0;
       virtual void setProxy(const char* pcProxyHost, unsigned int uiProxyPort) = 0;
  -
  +  /**
  +    * Set transport timeout.
  +    *
  +    * @param lSeconds Timeout in seconds
  +    */
  +    virtual void setTimeout(const long lSeconds) = 0;
   
   protected:
   
  
  
  
  1.2       +4 -1      ws-axis/c/tests/client/interop/round1/Client.cpp
  
  Index: Client.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/interop/round1/Client.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Client.cpp	8 Jun 2004 09:57:18 -0000	1.1
  +++ Client.cpp	8 Jun 2004 12:02:03 -0000	1.2
  @@ -33,7 +33,10 @@
           ws.setEndPoint( "http://4.34.185.52/ilab/ilab.dll?Handler=Default" );
           //set proxy (optional)
           ws.setProxy( "proxy.my.ibm.com", 80 );
  -//getchar();
  +
  +getchar();
  +	//set timeout
  +	ws.setTransportTimeout(5);
           //set HTTP headers
           //ws.setTransportProperty( "Accept-Language", " da, en-gb;q=0.8, en;q=0.7" );
           //ws.setTransportProperty( "Accept-Language2", " my da, en-gb;q=0.8, en;q=0.7" );