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/16 03:39:16 UTC

cvs commit: ws-axis/c/src/transport/axis2/ipv6 IPV6TransportInstantiator.cpp IPV6Channel.cpp Makefile.am

samisa      2004/11/15 18:39:16

  Modified:    c/src/transport/axis2 Axis2Transport.cpp Channel.cpp
                        Makefile Makefile.am Makefile.in
               c/src/transport/axis2/ipv6 IPV6Channel.cpp Makefile.am
  Added:       c/src/transport/axis2 Axis2TransportInstantiator.cpp
               c/src/transport/axis2/ipv6 IPV6TransportInstantiator.cpp
  Log:
  Seperated the Instantiator functions from the Axis2Transport.cpp source file as they are not part of the class. This helps instanciating differrent derived classes of Axis2Transport class at runtime.
  
  Revision  Changes    Path
  1.22      +1 -43     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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Axis2Transport.cpp	15 Nov 2004 05:38:29 -0000	1.21
  +++ Axis2Transport.cpp	16 Nov 2004 02:39:15 -0000	1.22
  @@ -933,48 +933,6 @@
       return m_strHTTPProtocol.c_str ();
   }
   
  -extern "C"
  -{
  -    /* CreateInstance() Is a C interface.
  -     */
  -    STORAGE_CLASS_INFO int CreateInstance (SOAPTransport ** inst)
  -    {
  -        *inst = new Axis2Transport ();
  -        if (*inst)
  -        {
  -            return AXIS_SUCCESS;
  -        }
  -        return AXIS_FAIL;
  -    }
  -
  -    /* DestroyInstance() Is a C interface.
  -     */
  -    STORAGE_CLASS_INFO int DestroyInstance (SOAPTransport * inst)
  -    {
  -        if (inst)
  -        {
  -            delete inst;
  -
  -            return AXIS_SUCCESS;
  -        }
  -        return AXIS_FAIL;
  -    }
  -
  -    /*  initializeLibrary() Is a C interface.
  -     */
  -    STORAGE_CLASS_INFO void initializeLibrary (void)
  -    {
  -        // Do init actions
  -    }
  -
  -    /*  uninitializeLibrary() Is a C interface.
  -     */
  -    STORAGE_CLASS_INFO void uninitializeLibrary (void)
  -    {
  -        // Do uninit actions
  -    }
  -}
  -
   /* axtoi( Hex) Is a private method to convert an ascii hex string to an integer.
    */
   int
  @@ -1240,4 +1198,4 @@
   const char* Axis2Transport::getSessionId ()
   {
   	return m_strSessionKey.c_str();
  -};
  \ No newline at end of file
  +}
  
  
  
  1.7       +1 -1      ws-axis/c/src/transport/axis2/Channel.cpp
  
  Index: Channel.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Channel.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Channel.cpp	10 Nov 2004 08:30:22 -0000	1.6
  +++ Channel.cpp	16 Nov 2004 02:39:15 -0000	1.7
  @@ -33,7 +33,7 @@
   
   /** Channel::Channel() Constructor
    */
  -Channel::Channel ():m_Sock (INVALID_SOCKET), m_lTimeoutSeconds(0), m_iMsgLength( 0)
  +Channel::Channel ():m_Sock (INVALID_SOCKET), m_iMsgLength( 0), m_lTimeoutSeconds(0)
   {
   #ifdef FJPDebug
   printf( ">Channel::Channel()\n");
  
  
  
  1.6       +8 -4      ws-axis/c/src/transport/axis2/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Makefile,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile	15 Nov 2004 10:15:33 -0000	1.5
  +++ Makefile	16 Nov 2004 02:39:15 -0000	1.6
  @@ -51,12 +51,14 @@
   LTLIBRARIES = $(lib_LTLIBRARIES)
   libaxis2_transport_la_DEPENDENCIES =
   am_libaxis2_transport_la_OBJECTS = SecureChannel.lo Channel.lo URL.lo \
  -	Axis2Transport.lo AxisTransportException.lo
  +	Axis2Transport.lo AxisTransportException.lo \
  +	Axis2TransportInstantiator.lo
   libaxis2_transport_la_OBJECTS = $(am_libaxis2_transport_la_OBJECTS)
   DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
   depcomp = $(SHELL) $(top_srcdir)/depcomp
   am__depfiles_maybe = depfiles
   DEP_FILES = ./$(DEPDIR)/Axis2Transport.Plo \
  +	./$(DEPDIR)/Axis2TransportInstantiator.Plo \
   	./$(DEPDIR)/AxisTransportException.Plo \
   	./$(DEPDIR)/Channel.Plo \
   	./$(DEPDIR)/SecureChannel.Plo ./$(DEPDIR)/URL.Plo
  @@ -124,7 +126,7 @@
   LIBOBJS = 
   LIBS = 
   LIBTOOL = $(SHELL) $(top_builddir)/libtool
  -LIBWWWBUILD = 
  +LIBWWWBUILD = libwww
   LINKCLIENTLIB = -L/home/samisa/autoCVS/cvsAutoBuild/src/engine/client -laxiscpp_client -ldl
   LN_S = ln -s
   LTLIBOBJS = 
  @@ -193,10 +195,11 @@
   SUBDIRS = ipv6 
   AM_CPPFLAGS = $(CPPFLAGS)
   libaxis2_transport_la_SOURCES = SecureChannel.cpp \
  -					  Channel.cpp \
  +					           Channel.cpp \
                                  URL.cpp \
                                  Axis2Transport.cpp \
  -                               AxisTransportException.cpp
  +                               AxisTransportException.cpp \
  +                               Axis2TransportInstantiator.cpp
   
   libaxis2_transport_la_LIBADD = -lstdc++
   INCLUDES = -I../../../include
  @@ -270,6 +273,7 @@
   	-rm -f *.tab.c
   
   include ./$(DEPDIR)/Axis2Transport.Plo
  +include ./$(DEPDIR)/Axis2TransportInstantiator.Plo
   include ./$(DEPDIR)/AxisTransportException.Plo
   include ./$(DEPDIR)/Channel.Plo
   include ./$(DEPDIR)/SecureChannel.Plo
  
  
  
  1.4       +3 -2      ws-axis/c/src/transport/axis2/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Makefile.am,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.am	15 Nov 2004 10:15:33 -0000	1.3
  +++ Makefile.am	16 Nov 2004 02:39:15 -0000	1.4
  @@ -2,10 +2,11 @@
   SUBDIRS = ipv6 
   AM_CPPFLAGS = $(CPPFLAGS)
   libaxis2_transport_la_SOURCES = SecureChannel.cpp \
  -					  Channel.cpp \
  +					           Channel.cpp \
                                  URL.cpp \
                                  Axis2Transport.cpp \
  -                               AxisTransportException.cpp
  +                               AxisTransportException.cpp \
  +                               Axis2TransportInstantiator.cpp
   
   libaxis2_transport_la_LIBADD = -lstdc++
   INCLUDES = -I../../../include
  
  
  
  1.5       +7 -3      ws-axis/c/src/transport/axis2/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in	15 Nov 2004 10:15:33 -0000	1.4
  +++ Makefile.in	16 Nov 2004 02:39:15 -0000	1.5
  @@ -51,12 +51,14 @@
   LTLIBRARIES = $(lib_LTLIBRARIES)
   libaxis2_transport_la_DEPENDENCIES =
   am_libaxis2_transport_la_OBJECTS = SecureChannel.lo Channel.lo URL.lo \
  -	Axis2Transport.lo AxisTransportException.lo
  +	Axis2Transport.lo AxisTransportException.lo \
  +	Axis2TransportInstantiator.lo
   libaxis2_transport_la_OBJECTS = $(am_libaxis2_transport_la_OBJECTS)
   DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
   depcomp = $(SHELL) $(top_srcdir)/depcomp
   am__depfiles_maybe = depfiles
   @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/Axis2Transport.Plo \
  +@AMDEP_TRUE@	./$(DEPDIR)/Axis2TransportInstantiator.Plo \
   @AMDEP_TRUE@	./$(DEPDIR)/AxisTransportException.Plo \
   @AMDEP_TRUE@	./$(DEPDIR)/Channel.Plo \
   @AMDEP_TRUE@	./$(DEPDIR)/SecureChannel.Plo ./$(DEPDIR)/URL.Plo
  @@ -193,10 +195,11 @@
   SUBDIRS = ipv6 
   AM_CPPFLAGS = $(CPPFLAGS)
   libaxis2_transport_la_SOURCES = SecureChannel.cpp \
  -					  Channel.cpp \
  +					           Channel.cpp \
                                  URL.cpp \
                                  Axis2Transport.cpp \
  -                               AxisTransportException.cpp
  +                               AxisTransportException.cpp \
  +                               Axis2TransportInstantiator.cpp
   
   libaxis2_transport_la_LIBADD = -lstdc++
   INCLUDES = -I../../../include
  @@ -270,6 +273,7 @@
   	-rm -f *.tab.c
   
   @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Axis2Transport.Plo@am__quote@
  +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Axis2TransportInstantiator.Plo@am__quote@
   @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AxisTransportException.Plo@am__quote@
   @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Channel.Plo@am__quote@
   @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SecureChannel.Plo@am__quote@
  
  
  
  1.1                  ws-axis/c/src/transport/axis2/Axis2TransportInstantiator.cpp
  
  Index: Axis2TransportInstantiator.cpp
  ===================================================================
  /*
  *   Copyright 2003-2004 The Apache Software Foundation.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
  *   You may obtain a copy of the License at
  *
  *       http://www.apache.org/licenses/LICENSE-2.0
  *
  *   Unless required by applicable law or agreed to in writing, software
  *   distributed under the License is distributed on an "AS IS" BASIS,
  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *   See the License for the specific language governing permissions and
  *   limitations under the License.
  */
  
  /*
   * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
   *
   */
  
  
  #ifdef WIN32
  #pragma warning (disable : 4786)
  #pragma warning (disable : 4101)
  #endif
  
  #include "Axis2Transport.h"
  
  /*
   * Instanciate functions for Axis2Transport instances.
   */
  
  extern "C"
  {
      /* CreateInstance() Is a C interface.
       */
      STORAGE_CLASS_INFO int CreateInstance (SOAPTransport ** inst)
      {
          *inst = new Axis2Transport ();
          if (*inst)
          {
              return AXIS_SUCCESS;
          }
          return AXIS_FAIL;
      }
  
      /* DestroyInstance() Is a C interface.
       */
      STORAGE_CLASS_INFO int DestroyInstance (SOAPTransport * inst)
      {
          if (inst)
          {
              delete inst;
  
              return AXIS_SUCCESS;
          }
          return AXIS_FAIL;
      }
  
      /*  initializeLibrary() Is a C interface.
       */
      STORAGE_CLASS_INFO void initializeLibrary (void)
      {
          // Do init actions
      }
  
      /*  uninitializeLibrary() Is a C interface.
       */
      STORAGE_CLASS_INFO void uninitializeLibrary (void)
      {
          // Do uninit actions
      }
  }
  
  
  
  
  1.2       +1 -1      ws-axis/c/src/transport/axis2/ipv6/IPV6Channel.cpp
  
  Index: IPV6Channel.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/ipv6/IPV6Channel.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IPV6Channel.cpp	15 Nov 2004 10:44:37 -0000	1.1
  +++ IPV6Channel.cpp	16 Nov 2004 02:39:15 -0000	1.2
  @@ -107,7 +107,7 @@
       hints.ai_socktype = SOCK_STREAM;
   
       char port[7];
  -    sprintf(port, "%ld", m_URL.getPort());
  +    sprintf(port, "%hd", m_URL.getPort());
       int err = getaddrinfo(m_URL.getHostName(), port, &hints, &addrInfo0);
       if (err)
       {
  
  
  
  1.2       +2 -1      ws-axis/c/src/transport/axis2/ipv6/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis2/ipv6/Makefile.am,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.am	15 Nov 2004 10:44:37 -0000	1.1
  +++ Makefile.am	16 Nov 2004 02:39:15 -0000	1.2
  @@ -1,7 +1,8 @@
   lib_LTLIBRARIES = libaxis2ipv6_transport.la
  -AM_CPPFLAGS = $(CPPFLAGS) -DFJPDebug
  +AM_CPPFLAGS = $(CPPFLAGS) 
   libaxis2ipv6_transport_la_SOURCES = IPV6Channel.cpp \
                                  IPV6Transport.cpp \
  +                               IPV6TransportInstantiator.cpp \
                                  ../Channel.cpp \
                                  ../URL.cpp \
                                  ../Axis2Transport.cpp \
  
  
  
  1.1                  ws-axis/c/src/transport/axis2/ipv6/IPV6TransportInstantiator.cpp
  
  Index: IPV6TransportInstantiator.cpp
  ===================================================================
  /*
  *   Copyright 2003-2004 The Apache Software Foundation.
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
  *   You may obtain a copy of the License at
  *
  *       http://www.apache.org/licenses/LICENSE-2.0
  *
  *   Unless required by applicable law or agreed to in writing, software
  *   distributed under the License is distributed on an "AS IS" BASIS,
  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *   See the License for the specific language governing permissions and
  *   limitations under the License.
  */
  
  /*
   * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
   *
   */
  
  
  #ifdef WIN32
  #pragma warning (disable : 4786)
  #pragma warning (disable : 4101)
  #endif
  
  #include "IPV6Transport.hpp"
  
  /*
   * Instanciate functions for Axis2Transport instances.
   */
  
  extern "C"
  {
      /* CreateInstance() Is a C interface.
       */
      STORAGE_CLASS_INFO int CreateInstance (SOAPTransport ** inst)
      {
          *inst = new IPV6Transport ();
          if (*inst)
          {
              return AXIS_SUCCESS;
          }
          return AXIS_FAIL;
      }
  
      /* DestroyInstance() Is a C interface.
       */
      STORAGE_CLASS_INFO int DestroyInstance (SOAPTransport * inst)
      {
          if (inst)
          {
              delete inst;
  
              return AXIS_SUCCESS;
          }
          return AXIS_FAIL;
      }
  
      /*  initializeLibrary() Is a C interface.
       */
      STORAGE_CLASS_INFO void initializeLibrary (void)
      {
          // Do init actions
      }
  
      /*  uninitializeLibrary() Is a C interface.
       */
      STORAGE_CLASS_INFO void uninitializeLibrary (void)
      {
          // Do uninit actions
      }
  }