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/11/08 09:49:14 UTC

cvs commit: ws-axis/c/src/transport/libwww LibWWWTransport.cpp LibWWWTransport.h

samisa      2004/11/08 00:49:14

  Modified:    c/src/transport Makefile Makefile.in SOAPTransport.h
               c/src/transport/axis2 Axis2Transport.cpp Axis2Transport.h
               c/src/transport/libwww LibWWWTransport.cpp LibWWWTransport.h
  Log:
  Added support to set transport protocol to be used.
  
  Revision  Changes    Path
  1.4       +1 -1      ws-axis/c/src/transport/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/Makefile,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile	5 Nov 2004 09:44:19 -0000	1.3
  +++ Makefile	8 Nov 2004 08:49:13 -0000	1.4
  @@ -163,7 +163,7 @@
   sharedstatedir = ${prefix}/com
   sysconfdir = ${prefix}/etc
   target_alias = 
  -SUBDIRS = axis axis2 
  +SUBDIRS = axis2 
   all: all-recursive
   
   .SUFFIXES:
  
  
  
  1.10      +1 -1      ws-axis/c/src/transport/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/Makefile.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in	5 Nov 2004 09:44:19 -0000	1.9
  +++ Makefile.in	8 Nov 2004 08:49:13 -0000	1.10
  @@ -163,7 +163,7 @@
   sharedstatedir = @sharedstatedir@
   sysconfdir = @sysconfdir@
   target_alias = @target_alias@
  -SUBDIRS = axis axis2 @LIBWWWBUILD@
  +SUBDIRS = axis2 @LIBWWWBUILD@
   all: all-recursive
   
   .SUFFIXES:
  
  
  
  1.4       +12 -0     ws-axis/c/src/transport/SOAPTransport.h
  
  Index: SOAPTransport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/SOAPTransport.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SOAPTransport.h	26 Oct 2004 10:41:35 -0000	1.3
  +++ SOAPTransport.h	8 Nov 2004 08:49:13 -0000	1.4
  @@ -295,6 +295,16 @@
        * @return The type of the transport. See AXIS_PROTOCOL_TYPE in Packet.h
        */
       virtual AXIS_PROTOCOL_TYPE getProtocol()=0;
  +
  +    /**
  +     * Sets the protocol to be used by the transport library. 
  +     *
  +     * @param eProtocol - protocol to be used by transport.
  +     *                    See AXIS_PROTOCOL_TYPE in GDefine.hpp
  +     * @return AXIS_SUCCESS if protocol is supported. Else AXIS_FAIL.
  +     */
  +    virtual int setProtocol(AXIS_PROTOCOL_TYPE eProtocol)=0;
  +
       /**
        * Gets the sub protocol. The usefulness of this method and the return
        * values depend on the particular implementation. For example HTTP
  @@ -345,6 +355,8 @@
        * of http transports
        */ 
       AXIS_ENGINE_CALLBACK_RELEASE_SEND_BUFFER m_pReleaseBufferCallback;
  + 
  +    AXIS_PROTOCOL_TYPE m_eProtocolType;
   
   };
   
  
  
  
  1.11      +13 -1     ws-axis/c/src/transport/axis2/Axis2Transport.cpp
  
  Index: Axis2Transport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Axis2Transport.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Axis2Transport.cpp	5 Nov 2004 09:44:19 -0000	1.10
  +++ Axis2Transport.cpp	8 Nov 2004 08:49:13 -0000	1.11
  @@ -42,6 +42,7 @@
   {
       m_pcEndpointUri = NULL;
       m_pReleaseBufferCallback = 0;
  +    m_eProtocolType = APTHTTP1_1;
       m_strBytesToSend = "";
       m_strHeaderBytesToSend = "";
       m_iBytesLeft = 0;
  @@ -848,7 +849,18 @@
   AXIS_PROTOCOL_TYPE
   Axis2Transport::getProtocol ()
   {
  -    return APTHTTP1_1;
  +    return m_eProtocolType;
  +}
  +
  +int Axis2Transport::setProtocol(AXIS_PROTOCOL_TYPE eProtocol)
  +{
  +    if( eProtocol == APTHTTP1_1 || eProtocol == APTHTTP1_0 )
  +    {
  +       m_eProtocolType = eProtocol;
  +       return AXIS_SUCCESS; 
  +    }
  +    else 
  +        return AXIS_FAIL;
   }
   
   /**
  
  
  
  1.9       +1 -0      ws-axis/c/src/transport/axis2/Axis2Transport.h
  
  Index: Axis2Transport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Axis2Transport.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Axis2Transport.h	5 Nov 2004 03:22:10 -0000	1.8
  +++ Axis2Transport.h	8 Nov 2004 08:49:13 -0000	1.9
  @@ -80,6 +80,7 @@
       };
       const char *getServiceName ();
       AXIS_PROTOCOL_TYPE getProtocol ();
  +    int setProtocol(AXIS_PROTOCOL_TYPE eProtocol);
       int getSubProtocol ();
       AXIS_TRANSPORT_STATUS flushOutput () throw (AxisTransportException);
   
  
  
  
  1.12      +13 -1     ws-axis/c/src/transport/libwww/LibWWWTransport.cpp
  
  Index: LibWWWTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/libwww/LibWWWTransport.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LibWWWTransport.cpp	28 Sep 2004 11:12:03 -0000	1.11
  +++ LibWWWTransport.cpp	8 Nov 2004 08:49:14 -0000	1.12
  @@ -84,6 +84,7 @@
          //How long we are going to wait for a response
          HTHost_setEventTimeout(20000);
        */
  +    m_eProtocolType = APTHTTP1_1;
       m_pRequest = HTRequest_new ();
   
   }
  @@ -313,7 +314,18 @@
   
   AXIS_PROTOCOL_TYPE LibWWWTransport::getProtocol ()
   {
  -    return APTHTTP;		//HTTP
  +    return m_eProtocolType;		//HTTP
  +}
  +
  +int LibWWWTransport::setProtocol(AXIS_PROTOCOL_TYPE eProtocol)
  +{
  +    if( eProtocol == APTHTTP1_1 || eProtocol == APTHTTP1_0 )
  +    {
  +       m_eProtocolType = eProtocol;
  +       return AXIS_SUCCESS;
  +    }
  +    else
  +        return AXIS_FAIL;
   }
   
   int
  
  
  
  1.5       +3 -0      ws-axis/c/src/transport/libwww/LibWWWTransport.h
  
  Index: LibWWWTransport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/libwww/LibWWWTransport.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LibWWWTransport.h	28 Sep 2004 11:12:03 -0000	1.4
  +++ LibWWWTransport.h	8 Nov 2004 08:49:14 -0000	1.5
  @@ -270,6 +270,9 @@
        * @return The type of the transport. See AXIS_PROTOCOL_TYPE in Packet.h
        */
       AXIS_PROTOCOL_TYPE getProtocol ();
  +   
  +    int setProtocol(AXIS_PROTOCOL_TYPE eProtocol);
  +
       /**
        * Gets the sub protocol. The usefulness of this method and the return
        * values depend on the particular implementation. For example HTTP