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 na...@apache.org on 2006/02/26 07:31:24 UTC

svn commit: r381063 - in /webservices/axis/trunk/c: include/axis/ include/axis/client/ tools/org/apache/axis/tools/cbindings/

Author: nadiramra
Date: Sat Feb 25 22:31:22 2006
New Revision: 381063

URL: http://svn.apache.org/viewcvs?rev=381063&view=rev
Log:
C support fixes/enhancements.

Added:
    webservices/axis/trunk/c/include/axis/Axis.h
Modified:
    webservices/axis/trunk/c/include/axis/Axis.hpp
    webservices/axis/trunk/c/include/axis/AxisCPPConfigDefaults.hpp
    webservices/axis/trunk/c/include/axis/AxisException.hpp
    webservices/axis/trunk/c/include/axis/AxisUserAPI.h
    webservices/axis/trunk/c/include/axis/GDefine.h
    webservices/axis/trunk/c/include/axis/client/Call.hpp
    webservices/axis/trunk/c/include/axis/client/Stub.hpp
    webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java
    webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/cbindinggenerator.conf

Added: webservices/axis/trunk/c/include/axis/Axis.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/Axis.h?rev=381063&view=auto
==============================================================================
--- webservices/axis/trunk/c/include/axis/Axis.h (added)
+++ webservices/axis/trunk/c/include/axis/Axis.h Sat Feb 25 22:31:22 2006
@@ -0,0 +1,83 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ * (c) Copyright IBM Corp. 2004, 2006 All Rights Reserved
+ *
+ *   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.
+ *
+ *
+ *
+ */
+#ifndef AXIS_INCLUDED
+#define AXIS_INCLUDED
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* THIS HEADER FILE PATTERNED AFTER CORRESPONDING hpp HEADER FILE.    */
+/* CHANGES TO hpp HEADER FILE MAY NEED TO BE PROPAGATED HERE AND IN   */
+/* THE IMPLEMEMTATION OF THE APIS.                                    */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
+#include <axis/GDefine.h>
+#include <axis/TypeMapping.h>
+
+/**
+ *
+ * Contains methods to initialize and terminate the Axis runtime. Creating a stub also initializes
+ * the Axis runtime and deleting the stub terminates it. So simple applications that only ever
+ * use one stub at a time do not need to call these methods. More complicated applications that 
+ * initialize multiple stubs, use them and delete them later, should initialize Axis at the start
+ * of their application using axiscInitializeAxis and terminate Axis at the very end of their 
+ * application with axiscTerminate. Applications that use Axis in multiple threads should also 
+ * call axiscInitializeAxis and axiscTerminate.
+ */
+ 
+/**
+  * Initializes the Axis runtime.
+  * @param bIsServer should be set to false for client applications.
+  * @return AXISC_SUCCESS or AXISC_FAIL to indicate success or fail
+  */
+AXISC_STORAGE_CLASS_INFO 
+int axiscInitializeAxis(AxiscBool bIsServer);
+
+/** 
+  * Terminates the Axis runtime. 
+  * @return AXISC_SUCCESS or AXISC_FAIL to indicate success or fail
+  */
+AXISC_STORAGE_CLASS_INFO 
+int axiscTerminate();
+
+/**
+  * Deletes storage allocated by the Axis engine, that is no longer required
+  * by the customer application.
+  * 
+  * @param pValue
+  * @param type The XSDTYPE of the storage item to be deleted.
+  * @return AXISC_SUCCESS or AXISC_FAIL to indicate success or fail
+  */
+AXISC_STORAGE_CLASS_INFO 
+int axiscAxisDelete(void * pValue, AXISC_XSDTYPE type);
+
+#ifdef __cplusplus
+  }
+#endif
+
+
+#endif
+ 
\ No newline at end of file

Modified: webservices/axis/trunk/c/include/axis/Axis.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/Axis.hpp?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/Axis.hpp (original)
+++ webservices/axis/trunk/c/include/axis/Axis.hpp Sat Feb 25 22:31:22 2006
@@ -43,15 +43,15 @@
 class STORAGE_CLASS_INFO Axis
 {
   public:
-	/**
-	 * Initializes the Axis runtime.
-	 * @param bIsServer should be set to false for client applications.
-	 */
+    /**
+     * Initializes the Axis runtime.
+     * @param bIsServer should be set to false for client applications.
+     */
     static void initialize(bool bIsServer);
 
-	/**
-	 * Terminates the Axis runtime.
-	 */
+    /**
+     * Terminates the Axis runtime.
+     */
     static void terminate();
     
     /**

Modified: webservices/axis/trunk/c/include/axis/AxisCPPConfigDefaults.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/AxisCPPConfigDefaults.hpp?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisCPPConfigDefaults.hpp (original)
+++ webservices/axis/trunk/c/include/axis/AxisCPPConfigDefaults.hpp Sat Feb 25 22:31:22 2006
@@ -101,32 +101,32 @@
       AxisCPPConfigDefaults();      
       ~AxisCPPConfigDefaults();
  
-	  char* getClientLog();
-	  char* getClientWSDDFile();
-	  char* getXMLParserLibrary();
-	  char* getHTTPTransportLibrary();
-	  char* getHTTPChannelLibrary();
-	  char* getHTTPSSLChannelLibrary(); 
+      char* getClientLog();
+      char* getClientWSDDFile();
+      char* getXMLParserLibrary();
+      char* getHTTPTransportLibrary();
+      char* getHTTPChannelLibrary();
+      char* getHTTPSSLChannelLibrary(); 
       char* getNodeName();
       char* getListenPort();
-	  char* getSecureInfo();
-	  char* getAxisHome();
+      char* getSecureInfo();
+      char* getAxisHome();
         
-	  void setClientLog(char*);
-	  void setClientWSDDFile(char*);
-	  void setXMLParserLibrary(char*);
-	  void setHTTPTransportLibrary(char*);
-	  void setHTTPChannelLibrary(char*);
-	  void setHTTPSSLChannelLibrary(char*);
+      void setClientLog(char*);
+      void setClientWSDDFile(char*);
+      void setXMLParserLibrary(char*);
+      void setHTTPTransportLibrary(char*);
+      void setHTTPChannelLibrary(char*);
+      void setHTTPSSLChannelLibrary(char*);
       void setNodeName(char*);
       void setListenPort(char*);
-	  void setSecureInfo(char*);
-	  void setAxisHome(char*);                    
+      void setSecureInfo(char*);
+      void setAxisHome(char*);                    
 
       void apply();                                
 
     protected:         
-		AxisCPPConfigDefaultsImpl *m_pImpl;
+        AxisCPPConfigDefaultsImpl *m_pImpl;
 
 };
 

Modified: webservices/axis/trunk/c/include/axis/AxisException.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/AxisException.hpp?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisException.hpp (original)
+++ webservices/axis/trunk/c/include/axis/AxisException.hpp Sat Feb 25 22:31:22 2006
@@ -42,14 +42,14 @@
  * The following enumeration is used to serve the Axis C++ codes for 
  * faults.
  */
-#define CLIENT_FAULT_OFFSET		0x0
-#define SERVER_FAULT_OFFSET		0x1000
-#define SOAP_FAULT_OFFSET		0x2000
-#define ENGINE_FAULT_OFFSET		0x3000
-#define WSDD_FAULT_OFFSET		0x4000
-#define TRANSPORT_FAULT_OFFSET	0x5000
-#define CONFIG_FAULT_OFFSET		0x6000
-#define AXISC_FAULT_OFFSET		0x7000
+#define CLIENT_FAULT_OFFSET      0x0
+#define SERVER_FAULT_OFFSET      0x1000
+#define SOAP_FAULT_OFFSET        0x2000
+#define ENGINE_FAULT_OFFSET      0x3000
+#define WSDD_FAULT_OFFSET        0x4000
+#define TRANSPORT_FAULT_OFFSET   0x5000
+#define CONFIG_FAULT_OFFSET      0x6000
+#define AXISC_FAULT_OFFSET       0x7000
 
 typedef enum 
 {
@@ -68,11 +68,11 @@
      *    exception
      *CONFIG that comes next to CLIENT/SERVER means this is a axisc++ configuration
      *    related exception
-	 *AXISC ?
+     *AXISC ?
      */
-	/* SOAP faults */
+    /* SOAP faults */
 /*0*/    SOAP_VERSION_MISMATCH, /* VersionMismatch faults */
-/*1*/    SOAP_MUST_UNDERSTAND,	/* MustUnderstand faults */
+/*1*/    SOAP_MUST_UNDERSTAND,    /* MustUnderstand faults */
 
     /* Client faults */
 /*2*/    CLIENT_SOAP_MESSAGE_INCOMPLETE,
@@ -84,7 +84,7 @@
 /*8*/    CLIENT_WSDD_METHOD_NOT_ALLOWED,
 /*9*/    CLIENT_WSDD_PARA_TYPE_MISMATCH,
 /*10*/   CLIENT_ENGINE_CLIENT_HANDLER_FAILED,
-/*11*/	 CLIENT_TRANSPORT_EXCEPTION,
+/*11*/   CLIENT_TRANSPORT_EXCEPTION,
 /*12*/   CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED,
 /*13*/   CLIENT_TRANSPORT_TYPE_MISMATCH,
 /*14*/   CLIENT_TRANSPORT_HAS_NO_UNSECURE_TRANSPORT_LAYER,
@@ -137,7 +137,7 @@
 /*59*/    SERVER_TRANSPORT_TIMEOUT_EXCEPTION,
 /*60*/    SERVER_TRANSPORT_TIMEOUT_EXPIRED,
 /*61*/    SERVER_TRANSPORT_LOADING_SSLCHANNEL_FAILED,
-/*62*/	  SERVER_TRANSPORT_LOADING_CHANNEL_FAILED,
+/*62*/    SERVER_TRANSPORT_LOADING_CHANNEL_FAILED,
 /*63*/    SERVER_TRANSPORT_BUFFER_EMPTY,
 /*64*/    SERVER_PARSE_BUFFER_EMPTY,
 /*65*/    SERVER_PARSE_PARSER_FAILED, 
@@ -179,25 +179,10 @@
  */
 class STORAGE_CLASS_INFO AxisException :public exception
 {
-
-
-
-
 public:
     /** No parameter constructor*/
     AxisException():m_iExceptionCode(0), m_sMessage(NULL){};
 
-    /** This can be used to throw an exception with the exception code
-      * which is defined in the AxisException.h file, under AXISC_EXCEPTIONS
-      * type. Axis C++ exception model heavily use this.
-      *
-      * @param Exception code which is defined in the AxisException.h file, 
-      * under AXISC_EXCEPTIONS type.
-      * 
-      * @example throw AxisException(AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
-      */
-    //AxisException(const int iExceptionCode);
-
     /** This can be used to throw an exception with exception code which is
       * is defined in the AxisException.h file, under AXISC_EXCEPTIONS type.
       * An additional description of the exception could be appended.
@@ -210,12 +195,9 @@
             "Some additional exception info");
       */
     AxisException(const int iExceptionCode, const char* pcMessage = NULL):m_iExceptionCode(iExceptionCode), m_sMessage(NULL)
-	{
-		if(pcMessage)
-		{
-			setMessage(pcMessage);
-		}		
-	}
+    {
+        setMessage(pcMessage);    
+    }
 
     /** This can be used to throw an exception with another exception as a
       * parameter. One situation in which this can be used is when we catch
@@ -226,102 +208,81 @@
       * @example throw AxisException(std::bad_alloc);
       */
     AxisException(const AxisException& e):m_iExceptionCode(e.m_iExceptionCode), m_sMessage(NULL)
-	{
-		if(e.m_sMessage)
-		{
-			setMessage(e.m_sMessage);
-		}
-	};
-
-    /** This accept two parameters, both an exception code an exception object
-      * derived from std::exception
-      *
-      * @param An exception class derived from std::exception
-      * @param An exception code
-      */
-    //AxisException(const exception* e, const int iExceptionCode);
-    
-    /** This accept an exception message
-      *
-      * @param An exception message
-      */
-    //AxisException(const char* pcMessage){m_sMessage = pcMessage;};
+    {
+        setMessage(e.m_sMessage);
+    };
     
     /** Destructor */
     virtual ~AxisException() throw()
-	{
-		if (m_sMessage)
-			delete [] m_sMessage;
-	};
+    {
+        if (m_sMessage)
+            delete [] m_sMessage;
+    };
 
     /** This method is defined in std::exception. AxisException and derived
       * classes will override this to print exception messages
       */
     virtual const char* what() const throw() { return m_sMessage; };
 
-    /** This can be called to get the exception code which is passed
-      * in the constructor. This returns -1 value when the 
-      * constructor does not have a exception code parameter
-      * 
-      * @return the exception code if the construct have a exception code
-      * int parameter. Else return -1.
-      *
-      * @return exception message
-      */
-    
-	virtual const int getExceptionCode() const { return m_iExceptionCode; }
-	void setExceptionCode(int exceptionCode) { m_iExceptionCode = exceptionCode;}
-	
-	const char* getMessage() const { return what(); }
+    /** This can be called to get the exception code. */
+    virtual const int getExceptionCode() const { return m_iExceptionCode; }
+
+    /** This can be called to set the exception code */
+    void setExceptionCode(int exceptionCode) { m_iExceptionCode = exceptionCode;}
 
-	
+    /** Get error message text - deprecated, use what() */
+    const char* getMessage() const { return what(); }
+    
+    /**
+      * The method setMessage(std::string psMessage) uses to set the private data member m_sMessage
+      * This method should be used to set the m_sMessage variable in derived classes.
+      */
+    void setMessage(const char* psMessage)
+    {
+        if (m_sMessage)
+        {
+            delete [] m_sMessage;
+            m_sMessage = NULL;
+        }
+
+        if (psMessage)
+        {
+            m_sMessage = new char[strlen(psMessage) + 1];
+            strcpy(m_sMessage,psMessage);
+        }        
+    }
+    
+    /** The method will set exception data from another exception */
+    void setExceptionFromException(const AxisException& e)
+    {
+        m_iExceptionCode = e.m_iExceptionCode;
+        setMessage(e.m_sMessage);
+    }
+
+    /**
+      * The method will reset exception object as if no parameters
+      * where passed to constructor
+      */
+    void resetException()
+    {
+        m_iExceptionCode = 0;
+        setMessage((const char *)NULL);
+    }
 
 protected:
-	
-	/**
-	  *Dushshantha:
-	  *The method setMessage(std::string psMessage) uses to set the private data member m_sMessage
-	  *Please use this method whenever you need to set the m_sMessage variable in derived classes.
-	  */
-
-	void setMessage(const char* psMessage)
-	{
-		if (m_sMessage)
-		{
-			delete [] m_sMessage;
-			m_sMessage = NULL;
-		}
-
-		if (psMessage)
-		{
-			m_sMessage = new char[strlen(psMessage) + 1];
-			strcpy(m_sMessage,psMessage);
-		}
-		
-		
-		
-	}
-
-
-	/**
-	  *Dushshantha:
-	  *This data member is common to all the inherited classes of this base class.
-	  *The integer variable m_iExceptionCode stores the Exception code
+    /**
+      * This data member is common to all the inherited classes of this base class.
+      * The integer variable m_iExceptionCode stores the Exception code
+      */
+    int m_iExceptionCode;
+
+    /**
+      * This data member is common to all the inherited classes of this base class.
+      * The char* variable m_sMessage is used to store the Exception message
+      * Whenever you want to set this variable use method setMessage(std::string psMessage)
       */
-
-	int m_iExceptionCode;
-
-	/**
-	  *This data member is common to all the inherited classes of this base class.
-	  *The char* variable m_sMessage is used to store the Exception message
-	  *Whenever you want to set this variable Please use the method setMessage(std::string psMessage)
-	  */
-	char* m_sMessage;
-
-	
-
+    char* m_sMessage;
 };
-
 
 AXIS_CPP_NAMESPACE_END
 

Modified: webservices/axis/trunk/c/include/axis/AxisUserAPI.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/AxisUserAPI.h?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisUserAPI.h (original)
+++ webservices/axis/trunk/c/include/axis/AxisUserAPI.h Sat Feb 25 22:31:22 2006
@@ -18,6 +18,20 @@
 #if !defined(_AXISUSERAPI_H_OF_AXIS_INCLUDED_)
 #define _AXISUSERAPI_H_OF_AXIS_INCLUDED_
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* THIS HEADER FILE PATTERNED AFTER CORRESPONDING hpp HEADER FILE.    */
+/* CHANGES TO hpp HEADER FILE MAY NEED TO BE PROPAGATED HERE AND IN   */
+/* THE IMPLEMEMTATION OF THE APIS.                                    */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
 #include <axis/GDefine.h>
 #include <time.h>
 #include <string.h>
@@ -456,5 +470,9 @@
      */
     int _size;
 } AxiscAnyType;
+
+#ifdef __cplusplus
+  }
+#endif
 
 #endif

Modified: webservices/axis/trunk/c/include/axis/GDefine.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/GDefine.h?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/GDefine.h (original)
+++ webservices/axis/trunk/c/include/axis/GDefine.h Sat Feb 25 22:31:22 2006
@@ -19,6 +19,20 @@
 #if !defined(__GDEFINE_H_OF_AXIS_INCLUDED__)
 #define __GDEFINE_H_OF_AXIS_INCLUDED__
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* THIS HEADER FILE PATTERNED AFTER CORRESPONDING hpp HEADER FILE.    */
+/* CHANGES TO hpp HEADER FILE MAY NEED TO BE PROPAGATED HERE AND IN   */
+/* THE IMPLEMEMTATION OF THE APIS.                                    */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
 /*
  * This file contains all global definitions that are valid across whole
  * Axis C++ project.
@@ -82,6 +96,10 @@
 
 typedef int AxiscBool;
 typedef void* AXISCHANDLE;
+
+#ifdef __cplusplus
+  }
+#endif
 
 #endif 
 

Modified: webservices/axis/trunk/c/include/axis/client/Call.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/client/Call.hpp?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/client/Call.hpp (original)
+++ webservices/axis/trunk/c/include/axis/client/Call.hpp Sat Feb 25 22:31:22 2006
@@ -58,15 +58,15 @@
     void AXISCALL setSOAPVersion(SOAP_VERSION version);
     int AXISCALL setTransportProperty(AXIS_TRANSPORT_INFORMATION_TYPE type,
         const char* value);
-	const char* AXISCALL getTransportProperty(const char *key, bool response=true);
-	int AXISCALL setHandlerProperty(AxisChar* name, void* value, int len);
-	/**
-	 * set the protocol that the underlying transport will use. 
-	 * If there is not transport set then the transport protocol is stored locally until there is a transport.
-	 * 
-	 * @param protocol the protocol that you want. Allowed values are  defined in GDefine.hpp AXIS_PROTOCOL_TYPE
-	 * @return AXIS_SUCCESS if the protocol was set correctly in the underlying transport or, if there is no transport then the value was stored safely.
-	 */
+    const char* AXISCALL getTransportProperty(const char *key, bool response=true);
+    int AXISCALL setHandlerProperty(AxisChar* name, void* value, int len);
+    /**
+     * set the protocol that the underlying transport will use. 
+     * If there is not transport set then the transport protocol is stored locally until there is a transport.
+     * 
+     * @param protocol the protocol that you want. Allowed values are  defined in GDefine.hpp AXIS_PROTOCOL_TYPE
+     * @return AXIS_SUCCESS if the protocol was set correctly in the underlying transport or, if there is no transport then the value was stored safely.
+     */
     int AXISCALL setProtocol(AXIS_PROTOCOL_TYPE protocol);
     /**
      * Get the protocol that the transport is or will use.
@@ -113,30 +113,30 @@
     void AXISCALL addParameter(void* pValue,const char* pchName,
         XSDTYPE nType);
 
-	/**
-	 * Adds an attachment and references it from a parameter in the SOAP body. Axis C++ will delete the storage for
-	 * the ISoapAttachment and IAttributes passed to this method during ~Call.
-	 * 
-	 * @param attachment The attachment to add to the MIME message, referenced from the SOAP body (mandatory)
-	 * @param pName The name of the parameter (mandatory)
-	 * @param attributes An array of pointers to attributes that will be added to the attachment reference in the 
-	 * SOAP body (optional)
-	 * @param nAttributes The number of elements in the attributes array
-	 */
-	void AXISCALL addAttachmentParameter(ISoapAttachment* attachment, const char* pName, 
-		IAttribute **attributes=NULL, int nAttributes=0);
-
-	/**
-	 * Creates an IAttribute that can be used on an attachment reference on Call::addAttachmentParameter.
-	 * If this IAttribute is subsequently passed to Call::addAttachmentParameter, Axis C++ will delete the storage 
-	 * associated with the IAttribute during ~Call.
+    /**
+     * Adds an attachment and references it from a parameter in the SOAP body. Axis C++ will delete the storage for
+     * the ISoapAttachment and IAttributes passed to this method during ~Call.
+     * 
+     * @param attachment The attachment to add to the MIME message, referenced from the SOAP body (mandatory)
+     * @param pName The name of the parameter (mandatory)
+     * @param attributes An array of pointers to attributes that will be added to the attachment reference in the 
+     * SOAP body (optional)
+     * @param nAttributes The number of elements in the attributes array
+     */
+    void AXISCALL addAttachmentParameter(ISoapAttachment* attachment, const char* pName, 
+        IAttribute **attributes=NULL, int nAttributes=0);
+
+    /**
+     * Creates an IAttribute that can be used on an attachment reference on Call::addAttachmentParameter.
+     * If this IAttribute is subsequently passed to Call::addAttachmentParameter, Axis C++ will delete the storage 
+     * associated with the IAttribute during ~Call.
      * You must ensure the prefix has a valid namespace declared, otherwise an invalid SOAP message will be produced.
      * 
      * @param pLocalname The local name of the Attribute.
      * @param pPrefix The prefix of the Attribute.
      * @param pValue The value of the Attribute.
      */
-	IAttribute *createAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue);
+    IAttribute *createAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue);
 
     /* Method that set the remote method name */
     void AXISCALL setOperation(const char* pchOperation,
@@ -366,38 +366,38 @@
     AnyType* AXISCALL getAnyObject();
     int AXISCALL addAnyObject(AnyType* pAnyObject);
 
-	/**
-	 * Returns the prefix for a previously defined namespace. If the 
-	 * namespace has not previously been associated with a prefix, it
-	 * creates a new prefix, which is unique and returns that. It will
-	 * only return prefixes for user-defined namespaces, so passing a 
-	 * standard namespace will cause a new prefix to be created.
-	 * 
-	 * @param pNamespace the namespace to look for
-	 * @return the prefix for this namespace
-	 */
+    /**
+     * Returns the prefix for a previously defined namespace. If the 
+     * namespace has not previously been associated with a prefix, it
+     * creates a new prefix, which is unique and returns that. It will
+     * only return prefixes for user-defined namespaces, so passing a 
+     * standard namespace will cause a new prefix to be created.
+     * 
+     * @param pNamespace the namespace to look for
+     * @return the prefix for this namespace
+     */
     const AxisChar* AXISCALL getNamespacePrefix(const AxisChar* pNamespace);
-	
-	/**
-	 * Returns a complex fault as an XML string 
-	 */
-	const xsd__string getFaultAsXMLString();
-
-	/**
-	 * Adds an attachment to the MIME message. This attachment will not be referenced from the SOAP body. The storage
-	 * associated with the ISoapAttachment will be deleted during ~Call.
-	 * 
-	 * @param objAttach the attachment to add to the message.
-	 */
+    
+    /**
+     * Returns a complex fault as an XML string 
+     */
+    const xsd__string getFaultAsXMLString();
+
+    /**
+     * Adds an attachment to the MIME message. This attachment will not be referenced from the SOAP body. The storage
+     * associated with the ISoapAttachment will be deleted during ~Call.
+     * 
+     * @param objAttach the attachment to add to the message.
+     */
     void addAttachment(ISoapAttachment* objAttach);
 
-	/**
-	 * Creates an ISoapAttachment which represents an attachment. The ISoapAttachment can be passed to addAttachment
-	 * or addAttachmentParameter. The attachment will not be added to the message unless it is subsequently passed to
-	 * addAttachment or addAttachmentParameter. The storage associated with the ISoapAttachment will not be 
-	 * automatically deleted by Axis C++ unless it is passed to addAttachment or addAttachmentParamater.
-	 */
-	ISoapAttachment* createSoapAttachment();
+    /**
+     * Creates an ISoapAttachment which represents an attachment. The ISoapAttachment can be passed to addAttachment
+     * or addAttachmentParameter. The attachment will not be added to the message unless it is subsequently passed to
+     * addAttachment or addAttachmentParameter. The storage associated with the ISoapAttachment will not be 
+     * automatically deleted by Axis C++ unless it is passed to addAttachment or addAttachmentParamater.
+     */
+    ISoapAttachment* createSoapAttachment();
 
 private:
     void closeConnection();
@@ -410,8 +410,8 @@
 #ifdef WIN32
   #pragma warning (disable : 4251)
 #endif
-	list<void*> m_handlerProperties;
-	list<ISoapAttachment*> m_attachments;
+    list<void*> m_handlerProperties;
+    list<ISoapAttachment*> m_attachments;
 
 #ifdef WIN32
   #pragma warning (default : 4251)
@@ -454,7 +454,7 @@
     // Samisa m_pchSessionID was misssing and there was a compile error due to this
     char* m_pchSessionID;
 
-	ContentIdSet *m_pContentIdSet;
+    ContentIdSet *m_pContentIdSet;
 };
 AXIS_CPP_NAMESPACE_END
 

Modified: webservices/axis/trunk/c/include/axis/client/Stub.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/client/Stub.hpp?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/client/Stub.hpp (original)
+++ webservices/axis/trunk/c/include/axis/client/Stub.hpp Sat Feb 25 22:31:22 2006
@@ -53,7 +53,7 @@
 class STORAGE_CLASS_INFO Stub
 {
   public:
-	  
+      
   /**
     * Constructor.
     * 
@@ -112,15 +112,15 @@
 
   /**
     * Get a transport property.
-	* 
-	* Returns the value of a transport property based on a key.
-	*
-	* @param key the property's name to search for
-	* @param response set to true searches the response message for the property
-	*                 set to false searches the send message for the property
-	* @return the value of the property or NULL if it was not found.
-	*/
-	const char* AXISCALL getTransportProperty(const char *key, bool response=true);
+    * 
+    * Returns the value of a transport property based on a key.
+    *
+    * @param key the property's name to search for
+    * @param response set to true searches the response message for the property
+    *                 set to false searches the send message for the property
+    * @return the value of the property or NULL if it was not found.
+    */
+    const char* AXISCALL getTransportProperty(const char *key, bool response=true);
 
   /**
     * Iterator initiatior for transport property keys
@@ -227,11 +227,11 @@
     
   /**
     * Sets a property that can be accessed from a handler.
-	*
-	* @param name The name of the property
-	* @param value The value of the property
-	* @param len The length of the value
-	*/
+    *
+    * @param name The name of the property
+    * @param value The value of the property
+    * @param len The length of the value
+    */
     void setHandlerProperty(AxisChar* name, void* value, int len);
 
   /**
@@ -564,12 +564,12 @@
     */
     Call *getCall() { return m_pCall; }
 
-	/**
-	 * Creates an ISoapAttachment which represents an attachment. The ISoapAttachment should be passed as 
-	 * an attachmment parameter to a web service. The storage associated with the ISoapAttachment will be 
-	 * automatically deleted by Axis C++ if it is passed as a parameter to a web service.
-	 */
-	ISoapAttachment* createSoapAttachment();
+    /**
+     * Creates an ISoapAttachment which represents an attachment. The ISoapAttachment should be passed as 
+     * an attachmment parameter to a web service. The storage associated with the ISoapAttachment will be 
+     * automatically deleted by Axis C++ if it is passed as a parameter to a web service.
+     */
+    ISoapAttachment* createSoapAttachment();
  
     /**
      * Set SSL configuration properties.

Modified: webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java (original)
+++ webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java Sat Feb 25 22:31:22 2006
@@ -55,9 +55,7 @@
 	 * This method is called by the DirectoryTree with two files: the
 	 * input (source) file and the output (target) file. This method parses 
 	 * the source (header) file and writes out the C bindings to the target 
-	 * file. The depth is how deep in the source directory tree we are. Files are
-	 * excluded if they are listed in the configuration because they shouldn't
-	 * have trace added to them.
+	 * file. The depth is how deep in the source directory tree we are. 
 	 */
 	public void actOnFile(File source, File target, int depth)
 		throws Exception {
@@ -100,20 +98,43 @@
 		define = define.toUpperCase();
 		define = define.substring(0, define.indexOf("."));
 		define += "_INCLUDED";
+        
+        String syncComment = 
+            "/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */\n" +
+            "/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */\n" +
+            "/* ----------------------------------------------------------------   */\n" +
+            "/* THIS HEADER FILE PATTERNED AFTER CORRESPONDING hpp HEADER FILE.    */\n" +
+            "/* CHANGES TO hpp HEADER FILE MAY NEED TO BE PROPAGATED HERE AND IN   */\n" +
+            "/* THE IMPLEMEMTATION OF THE C APIS.                                  */\n" +
+            "/*                                                                    */\n" +
+            "/* THIS FILE GENERATED BY CBINDINGGENERATOR TOOL.                     */\n" +
+            "/* ----------------------------------------------------------------   */\n" +
+            "/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */\n" +
+            "/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */\n";
+        
+        String cplusplusStart = "#ifdef __cplusplus\n extern \"C\" {\n#endif\n"; 
+        String cplusplusEnd   = "#ifdef __cplusplus\n }\n#endif\n"; 
 
 		int prevPart = FilePart.COMMENT; // Suppresse newline before copyright
 		String text;
 		Iterator it = inputFile.getPartIterator();
-		while (it.hasNext()) {
+		while (it.hasNext()) 
+        {
 			FilePart fp = (FilePart) (it.next());
 			if (!foundCopyright
 				&& (FilePart.DIRECTIVE == fp.getType()
 					|| FilePart.ENUM == fp.getType()
-					|| FilePart.PROTOTYPE == fp.getType())) {
+					|| FilePart.PROTOTYPE == fp.getType())) 
+            {
 				outputFile.write("#ifndef " + define);
 				outputFile.newLine();
 				outputFile.write("#define " + define);
 				outputFile.newLine();
+                outputFile.newLine();
+                outputFile.write(syncComment);  
+                outputFile.newLine();
+                outputFile.write(cplusplusStart);  
+                outputFile.newLine();                
 				foundCopyright = true;
 			}
 
@@ -166,46 +187,46 @@
 					// do nothing for other file parts
 			}
 		}
+ 
+        outputFile.newLine();
+        
+        outputFile.write(cplusplusEnd);  
+        outputFile.newLine();                
 
-		outputFile.newLine();
-		outputFile.write("#endif // " + define);
+		outputFile.write("#endif /* " + define + " */");
 		outputFile.newLine();
 	}
 
 	private boolean keepIfdef = false;
-	private void generateDirective(
-		FilePart fp,
-		BufferedWriter outputFile,
-		String filename)
-		throws Exception {
-	
-		//TODO: replace axis with axisc, etc
+	private void generateDirective(FilePart fp,	BufferedWriter outputFile,String filename) throws Exception 
+    {
 		String text = fp.toString().trim();
-		if (-1 != text.indexOf("include")) {
-			if (-1 == text.indexOf(".")) {
-				// remove C++ includes with no ext
-				text = new String();
-			} else {
-				// Putting #includes of GDefine and AxisUserAPI in <> not "" is needed for the
-				// ant build because those 2 headers aren't generated.
-				text = replaceInString(text,"\"GDefine.hpp\"","<axis/GDefine.hpp>",null);
-				text = replaceInString(text,"\"../GDefine.hpp\"","<axis/GDefine.hpp>",null);
-				text = replaceInString(text,"\"AxisUserAPI.hpp\"","<axis/AxisUserAPI.hpp>",null);
-				text = replaceInString(text,"\"../AxisUserAPI.hpp\"","<axis/AxisUserAPI.hpp>",null);
-				text = replaceInString(text,".hpp",".h",null);
-			}
-			//outputFile.write(text); Remove all #include's
-			//outputFile.newLine();   TODO put these back in
-
-			if (-1 != text.indexOf("stdarg")) {
-				outputFile.write(text);
-				outputFile.newLine();
-			}
-		} else if (
-		    // In AxisUserAPI.h we must keep a #ifdef WIN32/#else/#endif
-			keepIfdef
+		if (-1 != text.indexOf("include")) 
+        {
+            if (-1 != text.indexOf("axis/"))
+            {
+                // We currently do not support handlers for C bindings
+                if (-1 == text.indexOf("BasicHandler") && 
+                    -1 == text.indexOf("IHandlerSoap"))
+                {
+                    // Change .hpp files to .h files and dump out include
+                    text = text.replaceAll(".hpp",".h");
+                    outputFile.write(text);
+                    outputFile.newLine();  
+                }
+            }
+            else if (-1 != text.indexOf(".h>"))
+            {
+                // Just dump out .h include statements
+                outputFile.write(text);
+                outputFile.newLine();               
+            }
+		} 
+        // DEAD CODE? In AxisUserAPI.h we must keep a #ifdef WIN32/#else/#endif
+        else if (keepIfdef
 				|| ("AxisUserAPI.hpp".equals(filename)
-					&& -1 != text.indexOf("WIN32"))) {
+				&& -1 != text.indexOf("WIN32"))) 
+        {
 			outputFile.write(text);
 			outputFile.newLine();
 			if (!keepIfdef)

Modified: webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/cbindinggenerator.conf
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/cbindinggenerator.conf?rev=381063&r1=381062&r2=381063&view=diff
==============================================================================
--- webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/cbindinggenerator.conf (original)
+++ webservices/axis/trunk/c/tools/org/apache/axis/tools/cbindings/cbindinggenerator.conf Sat Feb 25 22:31:22 2006
@@ -25,6 +25,7 @@
 attribute=AXISCALL
 attribute=STORAGE_CLASS_INFO
 #
+excludefile=Axis.hpp
 excludefile=GDefine.hpp
 excludefile=AxisUserAPI.hpp
 excludefile=Handler.hpp
@@ -41,6 +42,7 @@
 excludemethod=IHeaderBlock::IHeaderBlock
 excludemethod=IWrapperSoapSerializer::serializeVargs
 excludemethod=AxisException::AxisException
+excludemethod=AxisException::setExceptionFromException