axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r473479 - in /webservices/axis/trunk/c/src/transport: ./ axis3/ axis3/HTTPChannel/
Date Fri, 10 Nov 2006 21:11:14 GMT
Author: nadiramra
Date: Fri Nov 10 13:11:12 2006
New Revision: 473479

URL: http://svn.apache.org/viewvc?view=rev&rev=473479
Log:
Cleanup - align code, remove tabs, remove if-checks on deletes since 
delete allows null to be deleted. 

Modified:
    webservices/axis/trunk/c/src/transport/SOAPTransport.h
    webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.cpp
    webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.hpp
    webservices/axis/trunk/c/src/transport/axis3/HTTPChannel/HTTPChannel.cpp
    webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.cpp
    webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.hpp
    webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.cpp
    webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.hpp
    webservices/axis/trunk/c/src/transport/axis3/HTTPTransportInstantiator.cpp
    webservices/axis/trunk/c/src/transport/axis3/IChannel.hpp
    webservices/axis/trunk/c/src/transport/axis3/URL.cpp
    webservices/axis/trunk/c/src/transport/axis3/URL.hpp

Modified: webservices/axis/trunk/c/src/transport/SOAPTransport.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/SOAPTransport.h?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/SOAPTransport.h (original)
+++ webservices/axis/trunk/c/src/transport/SOAPTransport.h Fri Nov 10 13:11:12 2006
@@ -149,7 +149,7 @@
      *       code TRANSPORT_IN_PROGRESS.
      */
     virtual AXIS_TRANSPORT_STATUS sendBytes(const char* pcSendBuffer, 
-		const void* pBufferid)=0;
+        const void* pBufferid)=0;
     /**
      * Gets a part of or full SOAP message. A Caller may call this method
      * multiple times to get parts of the SOAP message until the function
@@ -209,16 +209,8 @@
     
     virtual ~SOAPTransport()
     {
-        if (m_pcUsername)
-        {
-            delete[]m_pcUsername;
-            m_pcUsername = NULL;
-        }
-        if (m_pcPassword)
-        {
-            delete[]m_pcPassword;
-            m_pcPassword = NULL;
-        }
+        delete[]m_pcUsername;
+        delete[]m_pcPassword;
     };
     /**
      * Opens a connection with the provided endpoint URI. The connection
@@ -250,8 +242,7 @@
      *        for predefined transport property types.
      * @param pcValue Transport property value to be set.
      */
-    virtual int setTransportProperty(AXIS_TRANSPORT_INFORMATION_TYPE eType,
-    const char* pcValue)=0;
+    virtual int setTransportProperty(AXIS_TRANSPORT_INFORMATION_TYPE eType, const char* pcValue)=0;
     /**
      * @brief Gets a predefined transport property in the arrived message
      *
@@ -260,8 +251,7 @@
      * @return Value of the transport property if available. Returns null
      *         if unavailable.
      */
-    virtual const char* getTransportProperty(
-    AXIS_TRANSPORT_INFORMATION_TYPE eType)=0;
+    virtual const char* getTransportProperty(AXIS_TRANSPORT_INFORMATION_TYPE eType)=0;
     /**
      * Sets any transport property to be included in the outgoing message.
      * This transport property is not persistent in the transport layer.
@@ -276,7 +266,7 @@
      * @brief Gets any transport property in the arrived message
      *
      * @param pcKey The key of the transport property to get.
-   * @param response gets a property from the response message when true and
+     * @param response gets a property from the response message when true and
      *                 from the send message when false
      * @return Value of the transport property if available. Returns null
      *         if unavailable.
@@ -313,11 +303,11 @@
      * @return The attachment if available. Returns null if the attachment
      *         corresponding to the pcAttachmentid is not found.
      */    
-	virtual ISoapAttachment* getAttachment(const char* pcAttachmentid)=0;
-	virtual ISoapAttachment** getAllAttachments(int *pAttchArraySize)=0;
+    virtual ISoapAttachment* getAttachment(const char* pcAttachmentid)=0;
+    virtual ISoapAttachment** getAllAttachments(int *pAttchArraySize)=0;
 
 
-	virtual char* getIncomingSOAPMimeHeaders()=0;
+    virtual char* getIncomingSOAPMimeHeaders()=0;
 
     /**
      * Sets the the remote endpoint for tranport to connect to. This URI
@@ -522,7 +512,7 @@
     * Get the last channel error string from the active channel.
     * @return string - Last active channel error string.
     */
-	virtual const char * getLastChannelError() {return NULL;};
+    virtual const char * getLastChannelError() {return NULL;};
    
   /**
     * Sets the username to be used for basic authentication

Modified: webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.cpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.cpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.cpp Fri Nov 10 13:11:12 2006
@@ -23,10 +23,12 @@
  *
  */
 
+// !!! This include file must be first thing in file !!!
 #include "../../platforms/PlatformAutoSense.hpp"
 
-#include "ChannelFactory.hpp"
 #include <stdio.h>
+
+#include "ChannelFactory.hpp"
 #include "HTTPTransportException.hpp"
 #include "../../common/AxisTrace.h"
 
@@ -35,248 +37,244 @@
 #define MAXCHANNELS (int)MaxChannelCount
 ChannelLibrary *ChannelFactory::m_ChannelLibrary[MAXCHANNELS] = {NULL,NULL};
 
-ChannelFactory::ChannelFactory()
+ChannelFactory::
+ChannelFactory()
 {
-	for( int iCount = 0; iCount < (int) MaxChannelCount; iCount++)
-	{
-		m_pLibName[iCount] = NULL;
-		m_LibHandler[iCount] = NULL;
-		m_pChannel[iCount] = NULL;
-	}
+    for( int iCount = 0; iCount < (int) MaxChannelCount; iCount++)
+    {
+        m_pLibName[iCount] = NULL;
+        m_LibHandler[iCount] = NULL;
+        m_pChannel[iCount] = NULL;
+    }
 }
 
-ChannelFactory::~ChannelFactory()
+ChannelFactory::
+~ChannelFactory()
 {
-	for( int eChannelType = 0; eChannelType < (int) MaxChannelCount; eChannelType++)
-	{
-		UnLoadChannelLibrary( (g_ChannelType) eChannelType);
-	}
+    for( int eChannelType = 0; eChannelType < (int) MaxChannelCount; eChannelType++)
+    {
+        UnLoadChannelLibrary( (g_ChannelType) eChannelType);
+    }
 }
 
-IChannel * ChannelFactory::LoadChannelLibrary( g_ChannelType eChannelType, const char * pcLibraryName)
+IChannel * ChannelFactory::
+LoadChannelLibrary( g_ChannelType eChannelType, const char * pcLibraryName)
 {
-	DLHandler	sLibHandler;
-	IChannel *	pChannel = NULL;
-	int			iLibCount = (int) eChannelType;
+    DLHandler    sLibHandler;
+    IChannel *    pChannel = NULL;
+    int            iLibCount = (int) eChannelType;
 
     // Additional code added to block reloading of DLL if name has not changed.
-	if( m_pLibName[iLibCount] == NULL ||
-		strcmp( pcLibraryName, m_pLibName[iLibCount]) != 0)
-	{
-		sLibHandler = PLATFORM_LOADLIB( pcLibraryName);
-
-		if( !sLibHandler)
-		{
-                        long dwError = GETLASTERROR
-                        string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
-                        char        fullMessage[1024];
-                        sprintf(fullMessage,
-                                "Failed to load transport channel within server engine: \n
\
-                                 Error Message='%s'\
-                                 Error Code='%d'\n \
-                                 Load lib error='%s' \n",
-                                 message->c_str(), (int) dwError, PLATFORM_LOADLIB_ERROR);
-
-                        delete( message);
-
-			throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, fullMessage);
-		}
-		else
-		{
-			CREATE_OBJECT3 sCreate = (CREATE_OBJECT3) PLATFORM_GETPROCADDR( sLibHandler, CREATE_FUNCTION3);
-			DELETE_OBJECT3 sDelete = (DELETE_OBJECT3) PLATFORM_GETPROCADDR( sLibHandler, DELETE_FUNCTION3);
-
-			if (!sCreate || !sDelete)
-			{
-				PLATFORM_UNLOADLIB( sLibHandler);
-
-				char * pszErrorInfo = new char[ strlen( pcLibraryName) + 1];
-
-				strcpy( pszErrorInfo, pcLibraryName);
-
-				if( eChannelType == UnsecureChannel)
-				{
-					throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, pszErrorInfo);
-				}
-				else
-				{
-					throw HTTPTransportException( SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED, pszErrorInfo);
-				}
-			}
-
-#ifdef ENABLE_AXISTRACE
-// Load function to do lib level inits
-			void (*initializeLibrary) (AxisTraceEntrypoints*);
-			initializeLibrary = (void (*)(AxisTraceEntrypoints*))PLATFORM_GETPROCADDR(sLibHandler,
"initializeLibrary");
-
-			if( initializeLibrary)
-			{
-				(*initializeLibrary) (AxisTrace::getTraceEntrypoints());
-			}
-#endif
+    if( m_pLibName[iLibCount] == NULL ||
+        strcmp( pcLibraryName, m_pLibName[iLibCount]) != 0)
+    {
+        sLibHandler = PLATFORM_LOADLIB( pcLibraryName);
+
+        if( !sLibHandler)
+        {
+            long dwError = GETLASTERROR
+            string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
+            char        fullMessage[1024];
+            sprintf(fullMessage,
+                    "Failed to load transport channel within server engine: \n \
+                     Error Message='%s'\
+                     Error Code='%d'\n \
+                     Load lib error='%s' \n",
+                     message->c_str(), (int) dwError, PLATFORM_LOADLIB_ERROR);
+
+            delete( message);
+
+            throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, fullMessage);
+        }
+        else
+        {
+            CREATE_OBJECT3 sCreate = (CREATE_OBJECT3) PLATFORM_GETPROCADDR( sLibHandler,
CREATE_FUNCTION3);
+            DELETE_OBJECT3 sDelete = (DELETE_OBJECT3) PLATFORM_GETPROCADDR( sLibHandler,
DELETE_FUNCTION3);
 
-            // Additional code added to that when the user wants to load a different
-            // library from that which is already loaded, it will now allow the change.
-			UnLoadChannelLibrary(eChannelType);
-                        
-            if (m_pLibName[iLibCount])
+            if (!sCreate || !sDelete)
             {
-                delete [] m_pLibName[iLibCount];
-                m_pLibName[iLibCount] = NULL;
-            }
+                PLATFORM_UNLOADLIB( sLibHandler);
+
+                char * pszErrorInfo = new char[ strlen( pcLibraryName) + 1];
+                strcpy( pszErrorInfo, pcLibraryName);
 
-			m_pLibName[iLibCount] = new char[ strlen( pcLibraryName) + 1];
-			strcpy( m_pLibName[iLibCount], pcLibraryName);
-			m_LibHandler[iLibCount] = sLibHandler;
-
-			if( sCreate)
-			{
-				sCreate( &pChannel);
-				m_pChannel[iLibCount] = pChannel;
-			}
-		}
-	}
-	else
-	{
-		pChannel = m_pChannel[iLibCount];
-	}
-
-	return pChannel;
-}
-
-bool ChannelFactory::UnLoadChannelLibrary( g_ChannelType eChannelType)
-{
-	bool	bSuccess = false;
-	int		iLibIndex = (int) eChannelType;
-
-	if( m_pChannel[iLibIndex] != NULL)
-	{
-		if( m_LibHandler[iLibIndex] != NULL)
-		{
-// If there is a channel library object handle then find the entry point in
-// the library to call the channel library destructor (DestroyInstance) which
-// in turn calls the channel destructor.  On return from this call, the
-// m_pChannel[iLibIndex] object no longer exists.
-			DELETE_OBJECT3 sDelete = (DELETE_OBJECT3) PLATFORM_GETPROCADDR( m_LibHandler[iLibIndex],
DELETE_FUNCTION3);
-			sDelete( m_pChannel[iLibIndex]);
-		}
+                if( eChannelType == UnsecureChannel)
+                {
+                    throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED,
pszErrorInfo);
+                }
                 else
                 {
-                    // Samisa: somehow, the above block does not seem to deallocate the channel
-                    // As a workaround, I delete the channel here and seems this logic is
not having any side effects
-                    // More importantly I could get rid of the memory leak
-                    delete m_pChannel[iLibIndex];
+                    throw HTTPTransportException( SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED,
pszErrorInfo);
                 }
+            }
 
-		m_pChannel[iLibIndex] = NULL;
-	}
-
-// Delete library name from the library name list.
-	if( m_pLibName[iLibIndex] != NULL)
-	{
-		delete [] m_pLibName[iLibIndex];
+#ifdef ENABLE_AXISTRACE
+// Load function to do lib level inits
+            void (*initializeLibrary) (AxisTraceEntrypoints*);
+            initializeLibrary = (void (*)(AxisTraceEntrypoints*))PLATFORM_GETPROCADDR(sLibHandler,
"initializeLibrary");
 
-		m_pLibName[iLibIndex] = NULL;
-	}
+            if( initializeLibrary)
+            {
+                (*initializeLibrary) (AxisTrace::getTraceEntrypoints());
+            }
+#endif
 
-// If a channel library object handle is valid, then unload the library and
-// reset the handle.
-	if( m_LibHandler[iLibIndex] != NULL)
-	{
-	    PLATFORM_UNLOADLIB( m_LibHandler[iLibIndex]);
+            // Additional code added to that when the user wants to load a different
+            // library from that which is already loaded, it will now allow the change.
+            UnLoadChannelLibrary(eChannelType);
+                        
+            delete [] m_pLibName[iLibCount];
+            m_pLibName[iLibCount] = NULL;
 
-		m_LibHandler[iLibIndex] = 0;
+            m_pLibName[iLibCount] = new char[ strlen( pcLibraryName) + 1];
+            strcpy( m_pLibName[iLibCount], pcLibraryName);
+            m_LibHandler[iLibCount] = sLibHandler;
 
-		bSuccess = true;
-	}
+            if( sCreate)
+            {
+                sCreate( &pChannel);
+                m_pChannel[iLibCount] = pChannel;
+            }
+        }
+    }
+    else
+        pChannel = m_pChannel[iLibCount];
+
+    return pChannel;
+}
+
+bool ChannelFactory::
+UnLoadChannelLibrary( g_ChannelType eChannelType)
+{
+    bool    bSuccess = false;
+    int        iLibIndex = (int) eChannelType;
+
+    if( m_pChannel[iLibIndex] != NULL)
+    {
+        if( m_LibHandler[iLibIndex] != NULL)
+        {
+            // If there is a channel library object handle then find the entry point in
+            // the library to call the channel library destructor (DestroyInstance) which
+            // in turn calls the channel destructor.  On return from this call, the
+            // m_pChannel[iLibIndex] object no longer exists.
+            DELETE_OBJECT3 sDelete = (DELETE_OBJECT3) PLATFORM_GETPROCADDR( m_LibHandler[iLibIndex],
DELETE_FUNCTION3);
+            sDelete( m_pChannel[iLibIndex]);
+        }
+        else
+        {
+            // Samisa: somehow, the above block does not seem to deallocate the channel
+            // As a workaround, I delete the channel here and seems this logic is not having
any side effects
+            // More importantly I could get rid of the memory leak
+            delete m_pChannel[iLibIndex];
+        }
+
+        m_pChannel[iLibIndex] = NULL;
+    }
+
+    // Delete library name from the library name list.
+    delete [] m_pLibName[iLibIndex];
+    m_pLibName[iLibIndex] = NULL;
+
+    // If a channel library object handle is valid, then unload the library and
+    // reset the handle.
+    if( m_LibHandler[iLibIndex] != NULL)
+    {
+        PLATFORM_UNLOADLIB( m_LibHandler[iLibIndex]);
+        m_LibHandler[iLibIndex] = 0;
+        bSuccess = true;
+    }
 
-	return bSuccess;
+    return bSuccess;
 }
 
-void ChannelFactory::preloadChannels(char *unsecChannel, char *secChannel)
+void ChannelFactory::
+preloadChannels(char *unsecChannel, char *secChannel)
 {
 	if (unsecChannel && strcmp(unsecChannel,"Unknown")) preloadChannel(UnsecureChannel,
unsecChannel);
 	if (secChannel && strcmp(secChannel,"Unknown")) preloadChannel(SecureChannel, secChannel);
 }
 
-void ChannelFactory::preloadChannel(g_ChannelType type, const char *pcLibraryName)
+void ChannelFactory::
+preloadChannel(g_ChannelType type, const char *pcLibraryName)
 {
-	int iLibCount = (int)type;
-	ChannelLibrary *pCh = new ChannelLibrary();
+    int iLibCount = (int)type;
+    ChannelLibrary *pCh = new ChannelLibrary();
 
-	pCh->m_Library = PLATFORM_LOADLIB( pcLibraryName);
-	if( !pCh->m_Library)
-	{
-		delete pCh;
+    pCh->m_Library = PLATFORM_LOADLIB( pcLibraryName);
+    if( !pCh->m_Library)
+    {
+        delete pCh;
            
-                long dwError = GETLASTERROR
-                string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
-                char        fullMessage[1024];
-                sprintf(fullMessage,
-                        "Failed to load transport channel within server engine: \n \
-                         Error Message='%s'\
-                         Error Code='%d'\n \
-                         Load lib error='%s' \n",
-                         message->c_str(), (int) dwError, PLATFORM_LOADLIB_ERROR);
-
-                delete( message);
-
-		throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, fullMessage);
-	}
-
-	pCh->m_Create = (CREATE_OBJECT3) PLATFORM_GETPROCADDR( pCh->m_Library, CREATE_FUNCTION3);
-	pCh->m_Delete = (DELETE_OBJECT3) PLATFORM_GETPROCADDR( pCh->m_Library, DELETE_FUNCTION3);
-	if (!pCh->m_Create || !pCh->m_Delete)
-	{
-		PLATFORM_UNLOADLIB( pCh->m_Library);
-		delete pCh;
-		char * pszErrorInfo = new char[ strlen( pcLibraryName) + 1];
-		strcpy( pszErrorInfo, pcLibraryName);
-		if( type == UnsecureChannel)
-		{
-			throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, pszErrorInfo);
-		}
-		else
-		{
-			throw HTTPTransportException( SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED, pszErrorInfo);
-		}
-	}
+        long dwError = GETLASTERROR
+        string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
+        char        fullMessage[1024];
+        sprintf(fullMessage,
+                "Failed to load transport channel within server engine: \n \
+                 Error Message='%s'\
+                 Error Code='%d'\n \
+                 Load lib error='%s' \n",
+                 message->c_str(), (int) dwError, PLATFORM_LOADLIB_ERROR);
+
+        delete( message);
+
+        throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, fullMessage);
+    }
+
+    pCh->m_Create = (CREATE_OBJECT3) PLATFORM_GETPROCADDR( pCh->m_Library, CREATE_FUNCTION3);
+    pCh->m_Delete = (DELETE_OBJECT3) PLATFORM_GETPROCADDR( pCh->m_Library, DELETE_FUNCTION3);
+    if (!pCh->m_Create || !pCh->m_Delete)
+    {
+        PLATFORM_UNLOADLIB( pCh->m_Library);
+        delete pCh;
+        char * pszErrorInfo = new char[ strlen( pcLibraryName) + 1];
+        strcpy( pszErrorInfo, pcLibraryName);
+        if( type == UnsecureChannel)
+        {
+            throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, pszErrorInfo);
+        }
+        else
+        {
+            throw HTTPTransportException( SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED, pszErrorInfo);
+        }
+    }
 
 #ifdef ENABLE_AXISTRACE
-	// Load function to do lib level inits
-	void (*initializeLibrary) (AxisTraceEntrypoints*);
-	initializeLibrary = (void (*)(AxisTraceEntrypoints*))PLATFORM_GETPROCADDR(pCh->m_Library,
"initializeLibrary");
-	if( initializeLibrary)
-	{
-		(*initializeLibrary) (AxisTrace::getTraceEntrypoints());
-	}
+    // Load function to do lib level inits
+    void (*initializeLibrary) (AxisTraceEntrypoints*);
+    initializeLibrary = (void (*)(AxisTraceEntrypoints*))PLATFORM_GETPROCADDR(pCh->m_Library,
"initializeLibrary");
+    if( initializeLibrary)
+    {
+        (*initializeLibrary) (AxisTrace::getTraceEntrypoints());
+    }
 #endif
-	m_ChannelLibrary[iLibCount] = pCh;
+    m_ChannelLibrary[iLibCount] = pCh;
 }
 
-IChannel *ChannelFactory::createChannel(g_ChannelType type) 
+IChannel *ChannelFactory::
+createChannel(g_ChannelType type) 
 {
-	int iLibCount = (int)type;
-	IChannel *pChannel = NULL;
-	if (m_ChannelLibrary[iLibCount])
-	{
-		m_ChannelLibrary[iLibCount]->m_Create(&pChannel);
-		m_pChannel[iLibCount] = pChannel;
-	}
-	return pChannel;
-}
-
-void ChannelFactory::unloadChannels()
-{
-	for (int i=0; i<(int)MaxChannelCount; i++) 
-	{
-		if (m_ChannelLibrary[i])
-		{
-			PLATFORM_UNLOADLIB(m_ChannelLibrary[i]->m_Library);
-			delete m_ChannelLibrary[i];
-			m_ChannelLibrary[i] = NULL;
-		}
-	}
+    int iLibCount = (int)type;
+    IChannel *pChannel = NULL;
+    if (m_ChannelLibrary[iLibCount])
+    {
+        m_ChannelLibrary[iLibCount]->m_Create(&pChannel);
+        m_pChannel[iLibCount] = pChannel;
+    }
+    return pChannel;
+}
+
+void ChannelFactory::
+unloadChannels()
+{
+    for (int i=0; i<(int)MaxChannelCount; i++) 
+    {
+        if (m_ChannelLibrary[i])
+        {
+            PLATFORM_UNLOADLIB(m_ChannelLibrary[i]->m_Library);
+            delete m_ChannelLibrary[i];
+            m_ChannelLibrary[i] = NULL;
+        }
+    }
 }
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.hpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.hpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/ChannelFactory.hpp Fri Nov 10 13:11:12 2006
@@ -31,8 +31,8 @@
 #include <axis/GDefine.hpp>
 #include "IChannel.hpp"
 
-#define CREATE_FUNCTION3			"CreateInstance"
-#define DELETE_FUNCTION3			"DestroyInstance"
+#define CREATE_FUNCTION3            "CreateInstance"
+#define DELETE_FUNCTION3            "DestroyInstance"
 
 typedef int (* CREATE_OBJECT3) (IChannel** inst);
 typedef int (* DELETE_OBJECT3) (IChannel* inst);
@@ -42,29 +42,29 @@
 class ChannelLibrary
 {
 public:
-	DLHandler m_Library;
-	CREATE_OBJECT3 m_Create;
-	DELETE_OBJECT3 m_Delete;
+    DLHandler m_Library;
+    CREATE_OBJECT3 m_Create;
+    DELETE_OBJECT3 m_Delete;
 };
 
 class ChannelFactory  
 {
 public:
-	ChannelFactory();
-	virtual ~ChannelFactory();
-	virtual IChannel * LoadChannelLibrary( g_ChannelType eChannelType, const char * pcLibraryName);
-	static void preloadChannels(char *unsecChannel, char *secChannel);
-	static void unloadChannels();
-	virtual IChannel *createChannel(g_ChannelType eChannelType);
+    ChannelFactory();
+    virtual ~ChannelFactory();
+    virtual IChannel * LoadChannelLibrary( g_ChannelType eChannelType, const char * pcLibraryName);
+    static void preloadChannels(char *unsecChannel, char *secChannel);
+    static void unloadChannels();
+    virtual IChannel *createChannel(g_ChannelType eChannelType);
 
 private:
-	static void preloadChannel(g_ChannelType eChannelType, const char *pcLibraryName);
-	virtual bool UnLoadChannelLibrary( g_ChannelType eChannelType);
+    static void preloadChannel(g_ChannelType eChannelType, const char *pcLibraryName);
+    virtual bool UnLoadChannelLibrary( g_ChannelType eChannelType);
 
-	char *					m_pLibName[(int) MaxChannelCount];
-	DLHandler				m_LibHandler[(int) MaxChannelCount];
-	IChannel *				m_pChannel[(int) MaxChannelCount];
-	static ChannelLibrary	*m_ChannelLibrary[(int) MaxChannelCount];
+    char *                    m_pLibName[(int) MaxChannelCount];
+    DLHandler                 m_LibHandler[(int) MaxChannelCount];
+    IChannel *                m_pChannel[(int) MaxChannelCount];
+    static ChannelLibrary    *m_ChannelLibrary[(int) MaxChannelCount];
 };
 AXIS_CPP_NAMESPACE_END
 #endif 

Modified: webservices/axis/trunk/c/src/transport/axis3/HTTPChannel/HTTPChannel.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/HTTPChannel/HTTPChannel.cpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/HTTPChannel/HTTPChannel.cpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/HTTPChannel/HTTPChannel.cpp Fri Nov 10 13:11:12
2006
@@ -13,8 +13,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "HTTPChannel.hpp"
+// !!! Must be first thing in file !!!
 #include "../../../platforms/PlatformAutoSense.hpp"
+
+#include "HTTPChannel.hpp"
 #include "../../../common/AxisTrace.h"
 
 /**
@@ -23,7 +25,8 @@
  * HTTPChannel constuctor
  */
 
-HTTPChannel::HTTPChannel()
+HTTPChannel::
+HTTPChannel()
 {
     m_LastError = "No Errors";
 
@@ -39,7 +42,7 @@
     m_lTimeoutSeconds = 0;
 #endif
 
-	bNoExceptionOnForceClose = false;
+    bNoExceptionOnForceClose = false;
 
     if( !StartSockets())
     {
@@ -54,14 +57,13 @@
  *
  */
 
-HTTPChannel::~HTTPChannel()
+HTTPChannel::
+~HTTPChannel()
 {
     // If the socket value is not invalid, then close the socket before
     // deleting the Channel object.
     if( m_Sock != INVALID_SOCKET)
-    {
         CloseChannel();
-    }
 
     StopSockets();
 }
@@ -74,7 +76,8 @@
  * @return char * containing the URL associated with the open socket
  */
 
-const char * HTTPChannel::getURL()
+const char * HTTPChannel::
+getURL()
 {
     return m_URL.getURL();
 }
@@ -87,7 +90,8 @@
  * @param const char * containing the new URL
  */
 
-void HTTPChannel::setURL( const char * cpURL)
+void HTTPChannel::
+setURL( const char * cpURL)
 {
     m_URL.setURL( cpURL);
 }
@@ -100,7 +104,8 @@
  * @return URL & current URL object
  */
 
-URL & HTTPChannel::getURLObject()
+URL & HTTPChannel::
+getURLObject()
 {
     return m_URL;
 }
@@ -117,14 +122,13 @@
  * returned flag will only be returned on a successful outcome).
  */
 
-bool HTTPChannel::open() throw (HTTPTransportException&)
+bool HTTPChannel::
+open() throw (HTTPTransportException&)
 {
     bool    bSuccess = (bool) AXIS_FAIL;
 
     if( m_Sock != INVALID_SOCKET)
-    {
         CloseChannel();
-    }
 
     m_LastError = "No Errors";
 
@@ -146,12 +150,11 @@
  * of closing the channel.
  */
 
-bool HTTPChannel::close()
+bool HTTPChannel::
+close()
 {
     if( m_Sock != INVALID_SOCKET)
-    {
         CloseChannel();
-    }
 
     m_Sock = INVALID_SOCKET;
 
@@ -166,7 +169,8 @@
  * @return string containing last error.
  */
 
-const std::string & HTTPChannel::GetLastErrorMsg()
+const std::string & HTTPChannel::
+GetLastErrorMsg()
 {
     return m_LastError;
 }
@@ -186,7 +190,8 @@
  * recieved message.
  */
 
-const IChannel & HTTPChannel::operator >> (char * msg)
+const IChannel & HTTPChannel::
+operator >> (char * msg)
 {
     if (INVALID_SOCKET == m_Sock)
     {
@@ -242,17 +247,16 @@
 
         CloseChannel();
 
-		if( !bNoExceptionOnForceClose)
-		{
-	        throw HTTPTransportException( SERVER_TRANSPORT_INPUT_STREAMING_ERROR, 
-		                                  (char *) m_LastError.c_str());
-		}
+        if( !bNoExceptionOnForceClose)
+        {
+            throw HTTPTransportException( SERVER_TRANSPORT_INPUT_STREAMING_ERROR, 
+                                          (char *) m_LastError.c_str());
+        }
     }
 
     if( nByteRecv)
     {
         buf[nByteRecv] = '\0';
-        // got a part of the message, so add to form
         memcpy(msg, buf, nByteRecv + 1);
     }
 
@@ -271,7 +275,8 @@
  * message to be transmitted.
  */
 
-const IChannel & HTTPChannel::operator << (const char * msg)
+const IChannel & HTTPChannel::
+operator << (const char * msg)
 {
     // Check that the Tx/Rx sockets are valid (this will have been done if the
     // application has called the open method first.
@@ -316,7 +321,8 @@
  * @param long containing timeout value in seconds
  */
 
-void HTTPChannel::setTimeout( long lSeconds)
+void HTTPChannel::
+setTimeout( long lSeconds)
 {
     m_lTimeoutSeconds = lSeconds;
 }
@@ -329,7 +335,8 @@
  * @param unsigned int containing the new server socket.
  */
 
-void HTTPChannel::setSocket( unsigned int uiNewSocket)
+void HTTPChannel::
+setSocket( unsigned int uiNewSocket)
 {
     m_Sock = uiNewSocket;
 }
@@ -355,7 +362,8 @@
  * @return boolean flag indicating success of the alteration. 
  */
 
-bool HTTPChannel::setTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type, const char
* value)
+bool HTTPChannel::
+setTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type, const char * value)
 {
     bool    bSuccess = false;
 
@@ -381,7 +389,8 @@
  * @return const char * contains the value for the requested type.
  */
 
-const char * HTTPChannel::getTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type)
+const char * HTTPChannel::
+getTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type)
 {
     return NULL;
 }
@@ -395,7 +404,8 @@
  *        unsigned int containing the proxy port value.
  */
 
-void HTTPChannel::setProxy( const char * pcProxyHost, unsigned int uiProxyPort)
+void HTTPChannel::
+setProxy( const char * pcProxyHost, unsigned int uiProxyPort)
 {
     m_strProxyHost = pcProxyHost;
     m_uiProxyPort = uiProxyPort;
@@ -416,7 +426,8 @@
  * @return 
  */
 
-bool HTTPChannel::OpenChannel()
+bool HTTPChannel::
+OpenChannel()
 {
     // This method is common to all channel implementations
     bool    bSuccess = (bool) AXIS_FAIL;
@@ -562,7 +573,7 @@
 #ifdef __OS400__
     if( (pHostEntry = gethostbyname( (char *)host)))
 #else
-	if( (pHostEntry = gethostbyname( host)))
+    if( (pHostEntry = gethostbyname( host)))
 #endif
     {
         svAddr.sin_addr.s_addr = ((struct in_addr *) pHostEntry->h_addr)->s_addr;
@@ -573,7 +584,7 @@
 #ifdef __OS400__
         svAddr.sin_addr.s_addr = inet_addr( (char *)host);
 #else
-		svAddr.sin_addr.s_addr = inet_addr( host);
+        svAddr.sin_addr.s_addr = inet_addr( host);
 #endif
     }
 
@@ -586,8 +597,7 @@
         // Before we do anything else get the last error message;
         long dw = GETLASTERROR
         CloseChannel();
-
-            
+           
         string* message = PLATFORM_GET_ERROR_MESSAGE(dw);
 
         char fullMessage[600];
@@ -638,7 +648,8 @@
  * @return 
  */
 
-void HTTPChannel::CloseChannel()
+void HTTPChannel::
+CloseChannel()
 {
     if( INVALID_SOCKET != m_Sock) // Check if socket already closed : AXISCPP-185
     {
@@ -660,7 +671,8 @@
  * @return 
  */
 
-bool HTTPChannel::StartSockets()
+bool HTTPChannel::
+StartSockets()
 {
     bool    bSuccess = false;
 #ifdef WIN32
@@ -717,7 +729,8 @@
  * @return 
  */
 
-void HTTPChannel::StopSockets()
+void HTTPChannel::
+StopSockets()
 {
 #ifdef WIN32
     WSACleanup();
@@ -732,7 +745,8 @@
  * @return int 
  */
 
-int HTTPChannel::applyTimeout()
+int HTTPChannel::
+applyTimeout()
 {
     fd_set          set;
     struct timeval  timeout;
@@ -749,7 +763,8 @@
     return select( FD_SETSIZE, &set, NULL, NULL, &timeout);
 }
 
-void HTTPChannel::ReportError( char * szText1, char * szText2)
+void HTTPChannel::
+ReportError( char * szText1, char * szText2)
 {
     long        dwMsg = GETLASTERROR
     string *    sMsg = PLATFORM_GET_ERROR_MESSAGE( dwMsg);
@@ -760,7 +775,8 @@
     m_LastError = szMsg;
 }
 
-void HTTPChannel::closeQuietly( bool bNoExceptionOnForceClose_Update)
+void HTTPChannel::
+closeQuietly( bool bNoExceptionOnForceClose_Update)
 {
-	bNoExceptionOnForceClose = bNoExceptionOnForceClose_Update;
+    bNoExceptionOnForceClose = bNoExceptionOnForceClose_Update;
 }

Modified: webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.cpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.cpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.cpp Fri Nov 10 13:11:12 2006
@@ -559,7 +559,6 @@
 
                         // From the header,extract such things as chunking, message length,
etc.
                         processHTTPHeader();
-
                     }
                     while( m_iResponseHTTPStatusCode == 100);
 

Modified: webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.hpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.hpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/HTTPTransport.hpp Fri Nov 10 13:11:12 2006
@@ -243,8 +243,7 @@
   /**
     * Vector to hold response HTTP header key/value pairs
     */
-    std::vector < std::pair < std::string,
-	std::string > >m_vResponseHTTPHeaders;
+    std::vector < std::pair < std::string, std::string > >m_vResponseHTTPHeaders;
 
   /**
     * Channel used for communication

Modified: webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.cpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.cpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.cpp Fri Nov 10 13:11:12
2006
@@ -22,139 +22,141 @@
 
 #include "HTTPTransportException.hpp"
 
-HTTPTransportException::HTTPTransportException(const int iExceptionCode, char* pcMessage):AxisException(iExceptionCode)
+HTTPTransportException::
+HTTPTransportException(const int iExceptionCode, char* pcMessage):AxisException(iExceptionCode)
 {
-	std::string sMessage = "";
-	if (pcMessage) 
-	{
-		sMessage = string(pcMessage);
-		getMessageForExceptionCode(iExceptionCode);
-		m_sMessageForExceptionCode = getMessageForExceptionCode(iExceptionCode) + " " + sMessage;
-		setMessage(m_sMessageForExceptionCode.c_str());
-
-	}
-	else
-		setMessage(getMessageForExceptionCode(iExceptionCode).c_str());
+    std::string sMessage = "";
+    if (pcMessage) 
+    {
+        sMessage = string(pcMessage);
+        getMessageForExceptionCode(iExceptionCode);
+        m_sMessageForExceptionCode = getMessageForExceptionCode(iExceptionCode) + " " + sMessage;
+        setMessage(m_sMessageForExceptionCode.c_str());
+
+    }
+    else
+        setMessage(getMessageForExceptionCode(iExceptionCode).c_str());
 }
 
-HTTPTransportException::HTTPTransportException (const HTTPTransportException& e):AxisException(e)
+HTTPTransportException::
+HTTPTransportException (const HTTPTransportException& e):AxisException(e)
 {}
 
-HTTPTransportException::~HTTPTransportException() throw ()
+HTTPTransportException::
+~HTTPTransportException() throw ()
 {}
 
-string HTTPTransportException::getMessageForExceptionCode (const int iExceptionCode)
+string HTTPTransportException::
+getMessageForExceptionCode (const int iExceptionCode)
 {
-	
-    
-	switch(iExceptionCode)
+    switch(iExceptionCode)
     {
-		case SERVER_TRANSPORT_RECEPTION_EXCEPTION:
-		{
+        case SERVER_TRANSPORT_RECEPTION_EXCEPTION:
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Problem occurred when" \
                 " receiving the stream";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_SENDING_EXCEPTION:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Problem occurred when sending"
\
                 " the stream";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_HTTP_EXCEPTION:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:HTTP transport error";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_PROCESS_EXCEPTION:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:HTTP Error, cannot process"
\
                 " response message";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_UNKNOWN_HTTP_RESPONSE:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Unknow HTTP response," \
                 " cannot process response message";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_UNEXPECTED_STRING:
-		{
+        {
            m_sMessageForExceptionCode = "HTTPTransportException:Unexpected string " \
                 "received. Most probably server " \
                 "returned an empty stream";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_CHANNEL_INIT_ERROR:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Cannot initialize a " \
                 "channel to the remote end";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_OUTPUT_STREAMING_ERROR:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Output streaming error on"
\
                 " Channel while writing data";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_INPUT_STREAMING_ERROR:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Input streaming error while"
\
                 " getting data";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_TIMEOUT_EXCEPTION:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Channel error while waiting"
\
                  " for timeout";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_TIMEOUT_EXPIRED:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Channel error connection
" \
                 "timeout before receiving";
             break;
-		}
+        }
 
         case SERVER_TRANSPORT_BUFFER_EMPTY:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Transport buffer is empty";
             break;
-		}
+        }
+
+        case CLIENT_TRANSPORT_EXCEPTION:
+        {
+            m_sMessageForExceptionCode = "HTTPTransportException:Generic client transport
exception";
+                break;
+        }
+
+        case CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED:
+        {
+            m_sMessageForExceptionCode = "HTTPTransportException:Client failed to open";
+            break;
+        }
+
+        case CLIENT_TRANSPORT_TYPE_MISMATCH:
+        {
+            m_sMessageForExceptionCode = "HTTPTransportException:Client attempted to use
SSL functions without the proper prerequisites";
+            break;
+        }
 
-		case CLIENT_TRANSPORT_EXCEPTION:
-		{
-			m_sMessageForExceptionCode = "HTTPTransportException:Generic client transport exception";
-				break;
-		}
-
-		case CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED:
-		{
-			m_sMessageForExceptionCode = "HTTPTransportException:Client failed to open";
-			break;
-		}
-
-		case CLIENT_TRANSPORT_TYPE_MISMATCH:
-		{
-			m_sMessageForExceptionCode = "HTTPTransportException:Client attempted to use SSL functions
without the proper prerequisites";
-			break;
-		}
-
-		case CLIENT_TRANSPORT_HAS_NO_SECURE_TRANSPORT_LAYER:
-		{
-			m_sMessageForExceptionCode = "HTTPTransportException:Client attempted to use secure transport
(https) without an SSL layer";
-			break;
-		}
+        case CLIENT_TRANSPORT_HAS_NO_SECURE_TRANSPORT_LAYER:
+        {
+            m_sMessageForExceptionCode = "HTTPTransportException:Client attempted to use
secure transport (https) without an SSL layer";
+            break;
+        }
 
         case SERVER_TRANSPORT_LOADING_CHANNEL_FAILED:
         {
@@ -163,9 +165,9 @@
         }
 
         default:
-		{
+        {
             m_sMessageForExceptionCode = "HTTPTransportException:Unknown Transport Exception";

-		}
+        }
     }
     return m_sMessageForExceptionCode;
 }

Modified: webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.hpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.hpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/HTTPTransportException.hpp Fri Nov 10 13:11:12
2006
@@ -39,7 +39,7 @@
                                                                                         
                                    
 private:
     string getMessageForExceptionCode(const int iExceptionCode);
-	std::string m_sMessageForExceptionCode;
+    std::string m_sMessageForExceptionCode;
 };
 
 #endif

Modified: webservices/axis/trunk/c/src/transport/axis3/HTTPTransportInstantiator.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/HTTPTransportInstantiator.cpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/HTTPTransportInstantiator.cpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/HTTPTransportInstantiator.cpp Fri Nov 10
13:11:12 2006
@@ -42,9 +42,7 @@
     {
         *inst = new HTTPTransport ();
         if (*inst)
-        {
             return AXIS_SUCCESS;
-        }
         return AXIS_FAIL;
     }
 
@@ -54,7 +52,6 @@
         if (inst)
         {
             delete inst;
-
             return AXIS_SUCCESS;
         }
         return AXIS_FAIL;
@@ -72,13 +69,13 @@
     STORAGE_CLASS_INFO void uninitializeLibrary (void)
     {
         // Do uninit actions
-		ChannelFactory::unloadChannels();
+        ChannelFactory::unloadChannels();
 
     }
 
-	STORAGE_CLASS_INFO void preloadChannels(char *unsecChannel, char *secChannel)
-	{
-		ChannelFactory::preloadChannels(unsecChannel, secChannel);
-	}
+    STORAGE_CLASS_INFO void preloadChannels(char *unsecChannel, char *secChannel)
+    {
+        ChannelFactory::preloadChannels(unsecChannel, secChannel);
+    }
 }
 

Modified: webservices/axis/trunk/c/src/transport/axis3/IChannel.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/IChannel.hpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/IChannel.hpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/IChannel.hpp Fri Nov 10 13:11:12 2006
@@ -15,12 +15,18 @@
 
 #if !defined(_AXIS_ICHANNEL_HPP)
 #define _AXIS_ICHANNEL_HPP
+
 #include <string>
 #include <axis/GDefine.hpp>
 #include "URL.hpp"
 #include "HTTPTransportException.hpp"
 
-const int BUF_SIZE = 1024 * 8;
+// Need to revisit this, but for now ifdef for OS/400
+#ifndef __OS400__
+  const int BUF_SIZE = 1024 * 8;
+#else
+  const int BUF_SIZE = 1024 * 32;
+#endif
 
 using namespace std;
 
@@ -28,33 +34,33 @@
 
 enum g_ChannelType 
 {
-	UnsecureChannel,
-	SecureChannel,
-	MaxChannelCount
+    UnsecureChannel,
+    SecureChannel,
+    MaxChannelCount
 };
 
 class IChannel
 {
 public:
-    virtual                     ~IChannel() {};
-	virtual const char*			getURL()=0;
-	virtual void				setURL( const char* cpURL)=0;
-    virtual URL &				getURLObject()=0;
-    virtual bool				open() throw (HTTPTransportException&)=0;
-    virtual bool				close()=0;
-    virtual const std::string&	GetLastErrorMsg()=0;
-    virtual const IChannel&		operator >> (char * msg)=0;
-    virtual const IChannel&		operator << (const char * msg)=0;
-	virtual int					setSecureProperties( const char *) {return true;};
-	virtual const char *		getSecureProperties() {return NULL;};
-    virtual void				setTimeout( long lSeconds)=0;
-    virtual void				setSocket( unsigned int uiNewSocket)=0;
-    virtual int					getSocket()=0;
-	virtual bool				setTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type, const char*
value)=0;
-	virtual const char *		getTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type)=0;
-	virtual void                setProxy(const char *pcProxyHost,unsigned int uiProxyPort) =
0;
-	virtual bool				reopenRequired() throw() = 0;
-	virtual void				closeQuietly( bool bNoExceptionOnForceClose) = 0;
+    virtual                    ~IChannel() {};
+    virtual const char*         getURL()=0;
+    virtual void                setURL( const char* cpURL)=0;
+    virtual URL &               getURLObject()=0;
+    virtual bool                open() throw (HTTPTransportException&)=0;
+    virtual bool                close()=0;
+    virtual const std::string&  GetLastErrorMsg()=0;
+    virtual const IChannel&     operator >> (char * msg)=0;
+    virtual const IChannel&     operator << (const char * msg)=0;
+    virtual int                 setSecureProperties( const char *) {return true;};
+    virtual const char *        getSecureProperties() {return NULL;};
+    virtual void                setTimeout( long lSeconds)=0;
+    virtual void                setSocket( unsigned int uiNewSocket)=0;
+    virtual int                 getSocket()=0;
+    virtual bool                setTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type,
const char* value)=0;
+    virtual const char *        getTransportProperty( AXIS_TRANSPORT_INFORMATION_TYPE type)=0;
+    virtual void                setProxy(const char *pcProxyHost,unsigned int uiProxyPort)
= 0;
+    virtual bool                reopenRequired() throw() = 0;
+    virtual void                closeQuietly( bool bNoExceptionOnForceClose) = 0;
 };
 
 #endif

Modified: webservices/axis/trunk/c/src/transport/axis3/URL.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/URL.cpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/URL.cpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/URL.cpp Fri Nov 10 13:11:12 2006
@@ -29,8 +29,11 @@
 
 using namespace std;
 
-URL::URL()
-    : m_Protocol(unknown), m_Port(0), m_URL("")
+URL::
+URL():
+ m_Protocol(unknown), 
+ m_Port(0), 
+ m_URL("")
 {
     m_Host = "";
     m_Path = "";
@@ -39,7 +42,8 @@
     m_User = "";
 }
 
-URL::URL(std::string url)
+URL::
+URL(std::string url)
 {
     m_URL = url;
     if(isascii((int)url.at(0)))
@@ -53,12 +57,13 @@
     }
 }
 
-URL::~URL()
+URL::
+~URL()
 {
-
 }
 
-void URL::setProtocol(std::string prot)
+void URL::
+setProtocol(std::string prot)
 {
     m_Port = 0;
     if(prot == "http")
@@ -77,7 +82,6 @@
     }
     else if( prot == "https")
     {
-
         m_Protocol = https;
         m_Port = HTTPS_PORT;
     }
@@ -86,7 +90,8 @@
 
 }
 
-void URL::setURL(const char* cpURL)
+void URL::
+setURL(const char* cpURL)
 {
     m_URL = std::string(cpURL);
     if(isascii((int)m_URL.at(0)))
@@ -100,7 +105,8 @@
     }
 }
 
-const char* URL::getURL()
+const char* URL::
+getURL()
 { 
     if (m_URL.length() > 0 )
         return m_URL.c_str();
@@ -108,7 +114,8 @@
         return NULL;
 }
 
-void URL::ParseURL(std::string url)
+void URL::
+ParseURL(std::string url)
 {
     std::string::size_type begpos, pos;
 
@@ -127,8 +134,7 @@
             {
                 if(pos == std::string::npos) /* only host name found */
                 {
-                    //if(m_Host.empty())
-                        m_Host = url;
+                    m_Host = url;
                     if (key == "?") /* found path */
                         m_Path = url.substr(begpos - 1);
                     break;
@@ -139,8 +145,7 @@
                 switch(url.at(pos))
                 {
                     case ':': 
-                        //if(m_Host.empty())
-                            m_Host = url.substr(begpos, pos - begpos);
+                        m_Host = url.substr(begpos, pos - begpos);
                         pos++;
                         begpos = pos;
                         key = "/?"; 
@@ -150,10 +155,8 @@
                     case '/':
                         if (key == "/?") /* found port number */
                         {
-                            m_Port = atoi(url.substr(begpos, 
-                                pos - begpos + 1).c_str());
-                            //if(m_Host.empty())
-                                m_Host = url.substr(0, begpos - 1);
+                            m_Port = atoi(url.substr(begpos, pos - begpos + 1).c_str());
+                            m_Host = url.substr(0, begpos - 1);
                         }
                         else
                             m_Host = url.substr(0, pos);

Modified: webservices/axis/trunk/c/src/transport/axis3/URL.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/transport/axis3/URL.hpp?view=diff&rev=473479&r1=473478&r2=473479
==============================================================================
--- webservices/axis/trunk/c/src/transport/axis3/URL.hpp (original)
+++ webservices/axis/trunk/c/src/transport/axis3/URL.hpp Fri Nov 10 13:11:12 2006
@@ -83,8 +83,6 @@
 
     unsigned short getPort(){return m_Port;}
 
-    // other functions are not supported yet
-
 private:
 
     void ParseURL(std::string url);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message