axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r500493 - in /webservices/axis/trunk/c: include/axis/client/ src/cbindings/client/ src/engine/client/ src/soap/
Date Sat, 27 Jan 2007 07:05:32 GMT
Author: nadiramra
Date: Fri Jan 26 23:05:31 2007
New Revision: 500493

URL: http://svn.apache.org/viewvc?view=rev&rev=500493
Log:
AXISCPP-1010 - new method Call:clearSOAPMethodAttributes()

Modified:
    webservices/axis/trunk/c/include/axis/client/Call.h
    webservices/axis/trunk/c/include/axis/client/Call.hpp
    webservices/axis/trunk/c/src/cbindings/client/CallC.cpp
    webservices/axis/trunk/c/src/engine/client/Call.cpp
    webservices/axis/trunk/c/src/engine/client/Stub.cpp
    webservices/axis/trunk/c/src/soap/SoapMethod.cpp
    webservices/axis/trunk/c/src/soap/SoapMethod.h
    webservices/axis/trunk/c/src/soap/SoapSerializer.cpp
    webservices/axis/trunk/c/src/soap/SoapSerializer.h

Modified: webservices/axis/trunk/c/include/axis/client/Call.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/client/Call.h?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/include/axis/client/Call.h (original)
+++ webservices/axis/trunk/c/include/axis/client/Call.h Fri Jan 26 23:05:31 2007
@@ -241,6 +241,12 @@
 	const AxiscChar * pValue);
 
 /**
+ * Ensure that existing attributes are cleared.
+ */ 
+AXISC_STORAGE_CLASS_INFO                      
+void axiscCallClearSOAPMethodAttributes(AXISCHANDLE call);
+
+/**
  * Method for adding complex parameters to the engine, ready to be serialised.
  *   An example of this method (taken from the automatically generated stubs
  * of the AxisBench test) follows:- @n

Modified: webservices/axis/trunk/c/include/axis/client/Call.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/client/Call.hpp?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/include/axis/client/Call.hpp (original)
+++ webservices/axis/trunk/c/include/axis/client/Call.hpp Fri Jan 26 23:05:31 2007
@@ -249,6 +249,11 @@
                                  const AxisChar * pPrefix,
                                  const AxisChar * pUri,
                                  const AxisChar * pValue);
+    
+    /**
+     * Ensure that existing attributes are cleared.
+     */                      
+    void clearSOAPMethodAttributes();
 
     /**
      * Method for adding complex parameters to the engine, ready to be serialised.

Modified: webservices/axis/trunk/c/src/cbindings/client/CallC.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/client/CallC.cpp?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/client/CallC.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/client/CallC.cpp Fri Jan 26 23:05:31 2007
@@ -3392,6 +3392,25 @@
     }
 }
 
+AXISC_STORAGE_CLASS_INFO 
+void axiscCallClearSOAPMethodAttributes(AXISCHANDLE call)
+{
+    Call *c = (Call*)call;
+    
+    try
+    {
+        c->clearSOAPMethodAttributes();
+    }
+    catch ( AxisException& e  )
+    {
+        processException(c, e);
+    }
+    catch ( ... )
+    {
+        axiscAxisInvokeExceptionHandler(-1, "Unrecognized exception thrown.", NULL, NULL);
+    }
+}
+
 
 AXISC_STORAGE_CLASS_INFO 
 xsdc__string axiscCallGetFaultAsXMLString(AXISCHANDLE call) 

Modified: webservices/axis/trunk/c/src/engine/client/Call.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/engine/client/Call.cpp?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/engine/client/Call.cpp (original)
+++ webservices/axis/trunk/c/src/engine/client/Call.cpp Fri Jan 26 23:05:31 2007
@@ -1088,6 +1088,11 @@
     m_pIWSSZ->setSOAPMethodAttribute( ((Attribute *) pAttribute)->clone());
 }
 
+void Call::clearSOAPMethodAttributes()
+{
+    m_pIWSSZ->clearSOAPMethodAttributes();
+}
+
 xsd__string Call::getFaultAsXMLString()
 {
     return m_pIWSDZ->getFaultAsXMLString();

Modified: webservices/axis/trunk/c/src/engine/client/Stub.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/engine/client/Stub.cpp?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/engine/client/Stub.cpp (original)
+++ webservices/axis/trunk/c/src/engine/client/Stub.cpp Fri Jan 26 23:05:31 2007
@@ -39,6 +39,7 @@
     m_pCall->setProtocol (eProtocol);
     m_pTransport = m_pCall->getTransport ();
     m_pTransport->setEndpointUri( pcEndPointUri);
+    m_viCurrentSOAPHeaderBlock = m_vSOAPHeaderBlocks.end();
     
     // SSL channel related initilizations
     char * pcSSLChannelInfo = g_pConfig->getAxisConfProperty( AXCONF_SECUREINFO);

Modified: webservices/axis/trunk/c/src/soap/SoapMethod.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapMethod.cpp?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapMethod.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapMethod.cpp Fri Jan 26 23:05:31 2007
@@ -26,73 +26,61 @@
 
 AXIS_CPP_NAMESPACE_START
 
-SoapMethod::SoapMethod()
+SoapMethod::
+SoapMethod()
 {
 }
 
-SoapMethod::~SoapMethod()
+SoapMethod::
+~SoapMethod()
 {
-    /*for (list<Attribute*>::iterator it = m_attributes.begin();
-         it != m_attributes.end(); it++)
-    {
-        delete (*it);
-    }*/
-	list<Attribute*>::iterator it;
-	for (it = m_attributes.begin();
-    it != m_attributes.end(); it++)
-    {
-		if(*it)
-			delete (*it);
-    }
-
+    clearAttributes();
     clearOutParams();
-	m_attributes.clear();
-
 }
 
-void SoapMethod::setPrefix(const AxisChar* prefix)
+void SoapMethod::
+setPrefix(const AxisChar* prefix)
 {
     m_strPrefix = prefix;
 }
 
-void SoapMethod::setLocalName(const AxisChar* localname)
+void SoapMethod::
+setLocalName(const AxisChar* localname)
 {
     m_strLocalname = localname;
 }
 
-void SoapMethod::setURI(const AxisChar* uri)
+void SoapMethod::
+setURI(const AxisChar* uri)
 {
     m_strUri = uri;
 }
 
-void SoapMethod::addOutputParam(Param *param)
+void SoapMethod::
+addOutputParam(Param *param)
 {
     if (param)
-    {
         m_OutputParams.push_back(param);
-    }
 }
 
-int SoapMethod::serialize(SoapSerializer& pSZ)
+int SoapMethod::
+serialize(SoapSerializer& pSZ)
 {    
     int iStatus= AXIS_SUCCESS;
 
     do
     {
         if(isSerializable())
-        {
-                    
+        {           
             pSZ.serialize("<", m_strPrefix.c_str(), ":", m_strLocalname.c_str(),
                 " xmlns:", m_strPrefix.c_str(),
                 "=\"", m_strUri.c_str(), "\"", NULL);
 
-			list<AxisChar*> lstTmpNameSpaceStack;
+            list<AxisChar*> lstTmpNameSpaceStack;
 
             iStatus= serializeAttributes(pSZ, lstTmpNameSpaceStack);
             if(iStatus==AXIS_FAIL)
-            {
                 break;
-            }
             
             pSZ.serialize(">\n", NULL);
 
@@ -105,59 +93,53 @@
             pSZ.removeNamespacePrefix(m_strUri.c_str());
 
             if(iStatus==AXIS_FAIL)
-            {
                 break;
-            }
             
             pSZ.serialize("</", NULL);
 
             if(m_strPrefix.length() != 0)
-            {                    
                 pSZ.serialize(m_strPrefix.c_str(), ":", NULL);
-            }
             
             pSZ.serialize(m_strLocalname.c_str(), ">\n", NULL);
 
-			// Removing the namespace list of this SOAPMethod from the stack.
-			list<AxisChar*>::iterator itCurrentNamespace = 
-				lstTmpNameSpaceStack.begin();
-			while (itCurrentNamespace != lstTmpNameSpaceStack.end())
-			{
-				pSZ.removeNamespacePrefix(*itCurrentNamespace);
-				itCurrentNamespace++;
-			}
+            // Removing the namespace list of this SOAPMethod from the stack.
+            list<AxisChar*>::iterator itCurrentNamespace = lstTmpNameSpaceStack.begin();
+            while (itCurrentNamespace != lstTmpNameSpaceStack.end())
+            {
+                pSZ.removeNamespacePrefix(*itCurrentNamespace);
+                itCurrentNamespace++;
+            }
 
             iStatus= AXIS_SUCCESS;
         }
         else
-        {
             iStatus= AXIS_FAIL;
-        }
-    } while(0);
+    } 
+    while(0);
             
     return iStatus;
 }
 
-int SoapMethod::serializeOutputParam(SoapSerializer& pSZ)
+int SoapMethod::
+serializeOutputParam(SoapSerializer& pSZ)
 {    
     int nStatus;
-    for (list<Param*>::iterator it = m_OutputParams.begin();
-    it != m_OutputParams.end(); it++)
-    {
+    
+    for (list<Param*>::iterator it = m_OutputParams.begin(); it != m_OutputParams.end();
it++)
         if (AXIS_SUCCESS != (nStatus = (*it)->serialize(pSZ)))
-        {
             return nStatus;
-        }
-    }
+
     return AXIS_SUCCESS;
 }
 
-const AxisChar* SoapMethod::getMethodName()
+const AxisChar* SoapMethod::
+getMethodName()
 {
     return m_strLocalname.c_str();
 }
 
-bool SoapMethod::isSerializable()
+bool SoapMethod::
+isSerializable()
 {
     bool bStatus= true;    
 
@@ -174,20 +156,22 @@
             bStatus= false;
             break;
         }
-    } while(0);
+    } 
+    while(0);
 
     return bStatus;
 }
 
-int SoapMethod::addAttribute(Attribute *pAttribute)
+int SoapMethod::
+addAttribute(Attribute *pAttribute)
 {
     m_attributes.push_back(pAttribute);
 
     return AXIS_SUCCESS;
 }
 
-int SoapMethod::serializeAttributes(SoapSerializer& pSZ, 
-        list<AxisChar*>& lstTmpNameSpaceStack)
+int SoapMethod::
+serializeAttributes(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack)
 {
     list<Attribute*>::iterator itCurrAttribute= m_attributes.begin();
 
@@ -200,7 +184,8 @@
     return AXIS_SUCCESS;    
 }
 
-int SoapMethod::reset()
+int SoapMethod::
+reset()
 {
     m_strUri = "";
     m_strLocalname = "";
@@ -211,18 +196,32 @@
     return AXIS_SUCCESS;
 }
 
-void SoapMethod::clearOutParams()
+void SoapMethod::
+clearOutParams()
 {
     if ( m_OutputParams.empty() )
         return;
+        
     list<Param*>::iterator itParam;
-    for (itParam = m_OutputParams.begin(); 
-         itParam != m_OutputParams.end(); itParam++)
-    {
-		if(*itParam)
-			delete (*itParam);
-    }
+    
+    for (itParam = m_OutputParams.begin(); itParam != m_OutputParams.end(); itParam++)
+        delete *itParam;
+        
     m_OutputParams.clear();
+}
+
+void SoapMethod::
+clearAttributes()
+{
+    if (m_attributes.empty())
+        return;
+    
+    list<Attribute*>::iterator it;
+    
+    for (it = m_attributes.begin(); it != m_attributes.end(); ++it)
+        delete *it;
+    
+    m_attributes.clear();
 }
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/soap/SoapMethod.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapMethod.h?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapMethod.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapMethod.h Fri Jan 26 23:05:31 2007
@@ -88,11 +88,11 @@
     SoapMethod();
     virtual ~SoapMethod();
 
-  /**
-    * This methos will clear up all the current out params in preperation of a 
-    * new method call
-    */
+    /** Method to clear up all the current out params in preparation of a new method call
*/
     void clearOutParams();
+    
+    /** Method to clear up all the current attributes in preparation of a new method call
*/
+    void clearAttributes();
 };
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/soap/SoapSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapSerializer.cpp?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapSerializer.cpp Fri Jan 26 23:05:31 2007
@@ -60,12 +60,10 @@
     m_pContentIdSet = NULL;
 }
 
-SoapSerializer::~SoapSerializer()
+SoapSerializer::
+~SoapSerializer()
 {
-    if( m_pSoapEnvelope)
-    {
-        delete m_pSoapEnvelope;
-    }
+    delete m_pSoapEnvelope;
 
     /* Cleaning the memory allocated to the SoapAttachments */       
     map<AxisXMLString, ISoapAttachment*>::iterator itCurrAttach= m_SoapAttachments.begin();
@@ -85,14 +83,16 @@
     m_attachmentRefs.clear();
 }
 
-int SoapSerializer::setSoapEnvelope( SoapEnvelope * pSoapEnvelope)
+int SoapSerializer::
+setSoapEnvelope( SoapEnvelope * pSoapEnvelope)
 {
     m_pSoapEnvelope = pSoapEnvelope;
 
     return AXIS_SUCCESS;
 }
 
-int SoapSerializer::setSoapHeader( SoapHeader * pSoapHeader)
+int SoapSerializer::
+setSoapHeader( SoapHeader * pSoapHeader)
 {
     int intStatus = AXIS_FAIL;
 
@@ -111,7 +111,8 @@
     return intStatus;
 }
 
-int SoapSerializer::setSoapBody( SoapBody * pSoapBody)
+int SoapSerializer::
+setSoapBody( SoapBody * pSoapBody)
 {
     int intStatus = AXIS_FAIL;
 
@@ -124,7 +125,8 @@
     return intStatus;
 }
 
-int SoapSerializer::setSoapMethod( SoapMethod *pSoapMethod)
+int SoapSerializer::
+setSoapMethod( SoapMethod *pSoapMethod)
 {
     int intStatus = AXIS_FAIL;
 
@@ -139,9 +141,8 @@
     return intStatus;
 }
 
-int SoapSerializer::addOutputBasicArrayParam( const Axis_Array * pArray, 
-                                              XSDTYPE nType,
-                                              const AxisChar * pName)
+int SoapSerializer::
+addOutputBasicArrayParam( const Axis_Array * pArray, XSDTYPE nType, const AxisChar * pName)
 {
     int    iSuccess = AXIS_SUCCESS;
 
@@ -184,11 +185,10 @@
     return iSuccess;  // Can it only be successful?
 }
 
-int SoapSerializer::addOutputCmplxArrayParam( const Axis_Array * pArray, 
-                                              void * pSZFunct,
-                                              void * pDelFunct,
-                                              const AxisChar * pName, 
-                                              const AxisChar * pNamespace)
+int SoapSerializer::
+addOutputCmplxArrayParam( const Axis_Array * pArray, 
+                          void * pSZFunct, void * pDelFunct,
+                          const AxisChar * pName, const AxisChar * pNamespace)
 {
     int    iSuccess = AXIS_SUCCESS;
 
@@ -240,11 +240,10 @@
     return iSuccess;  // Can it only be successful?
 }
 
-int SoapSerializer::addOutputCmplxParam( void * pObject,
-                                         void * pSZFunct, 
-                                         void * pDelFunct,
-                                         const AxisChar * pName,
-                                         const AxisChar * pNamespace)
+int SoapSerializer::
+addOutputCmplxParam( void * pObject,
+                     void * pSZFunct, void * pDelFunct,
+                     const AxisChar * pName, const AxisChar * pNamespace)
 { 
     int    iSuccess = AXIS_SUCCESS;
 
@@ -264,11 +263,10 @@
     return iSuccess;  // Can it only be successful?
 }
 
-int SoapSerializer::addFaultDetail( void * pObject,
-                                    void * pSZFunct, 
-                                    void * pDelFunct,
-                                    const AxisChar * pName,
-                                    const AxisChar * pNamespace)
+int SoapSerializer::
+addFaultDetail( void * pObject,
+                void * pSZFunct, void * pDelFunct,
+                const AxisChar * pName, const AxisChar * pNamespace)
 { 
     int    iSuccess = AXIS_SUCCESS;
     Param * pParam = new Param();
@@ -288,12 +286,12 @@
     return iSuccess;
 }
 
-int SoapSerializer::addFaultDetail( const AxisChar * pDetail)
+int SoapSerializer::
+addFaultDetail( const AxisChar * pDetail)
 {
 	int iStatus = AXIS_FAIL;
     if( m_pSoapEnvelope &&
-        (m_pSoapEnvelope->m_pSoapBody) &&
-        (m_pSoapEnvelope->m_pSoapBody->m_pSoapFault))
+        (m_pSoapEnvelope->m_pSoapBody) && (m_pSoapEnvelope->m_pSoapBody->m_pSoapFault))
 	{
 		iStatus = m_pSoapEnvelope->m_pSoapBody->m_pSoapFault->setFaultDetail(pDetail);
 	}
@@ -301,14 +299,14 @@
 	return iStatus;
 }
 
-int SoapSerializer::setSoapFault( SoapFault * pSoapFault)
+int SoapSerializer::
+setSoapFault( SoapFault * pSoapFault)
 {
     int intStatus = AXIS_FAIL;
 
     if( m_pSoapEnvelope && (m_pSoapEnvelope->m_pSoapBody))
     {
-        if(m_pSoapEnvelope->m_pSoapBody->m_pSoapFault)
-            delete m_pSoapEnvelope->m_pSoapBody->m_pSoapFault;
+        delete m_pSoapEnvelope->m_pSoapBody->m_pSoapFault;
 
         m_pSoapEnvelope->m_pSoapBody->m_pSoapFault = pSoapFault;
         intStatus = AXIS_SUCCESS;
@@ -317,7 +315,8 @@
     return intStatus;
 }
 
-int SoapSerializer::setOutputStream( SOAPTransport * pStream)
+int SoapSerializer::
+setOutputStream( SOAPTransport * pStream)
 {
     int    iStatus = AXIS_SUCCESS;
 
@@ -404,7 +403,8 @@
  * Some client side transport layer may wait until the end of buffers is 
  * acknowladged. Use this function to do that.
  */
-void SoapSerializer::markEndOfStream()
+void SoapSerializer::
+markEndOfStream()
 {
     m_pOutputStream->flushOutput();
 }
@@ -414,15 +414,13 @@
  * the same object instance of this class, may be used to server
  * several SOAP requests.
  */
-int SoapSerializer::init()
+int SoapSerializer::
+init()
 {
     m_nStatus = AXIS_SUCCESS;
 
-    if( m_pSoapEnvelope)
-    {
-        delete m_pSoapEnvelope;
-        m_pSoapEnvelope= NULL;
-    }
+    delete m_pSoapEnvelope;
+    m_pSoapEnvelope= NULL;
 
     /* Adding SoapEnvelop and SoapBody to Serializer */
     m_pSoapEnvelope = new SoapEnvelope();
@@ -434,7 +432,8 @@
     return m_nStatus;
 }
 
-int SoapSerializer::setSoapVersion( SOAP_VERSION nSoapVersion)
+int SoapSerializer::
+setSoapVersion( SOAP_VERSION nSoapVersion)
 {
     m_iSoapVersion = nSoapVersion;
 
@@ -453,13 +452,15 @@
 
     return AXIS_SUCCESS;
 }
-void SoapSerializer::removeNamespacePrefix( const AxisChar * pNamespace)
+void SoapSerializer::
+removeNamespacePrefix( const AxisChar * pNamespace)
 {
     if( m_NsStack.find( pNamespace) != m_NsStack.end())
         m_NsStack.erase( pNamespace);
 }
 
-const AxisChar * SoapSerializer::getNamespacePrefix( const AxisChar * pNamespace)
+const AxisChar * SoapSerializer::
+getNamespacePrefix( const AxisChar * pNamespace)
 {
     if( m_NsStack.find( pNamespace) == m_NsStack.end())
     {
@@ -471,8 +472,8 @@
     return m_NsStack[pNamespace].c_str();
 }
 
-const AxisChar * SoapSerializer::getNamespacePrefix( const AxisChar * pNamespace, 
-                                                     bool & blnIsNewPrefix)
+const AxisChar * SoapSerializer::
+getNamespacePrefix( const AxisChar * pNamespace, bool & blnIsNewPrefix)
 {
     if( m_NsStack.find( pNamespace) == m_NsStack.end())
     {
@@ -485,7 +486,8 @@
     return m_NsStack[pNamespace].c_str();
 }
 
-IWrapperSoapSerializer& SoapSerializer::operator << (const AxisChar * cSerialized)
+IWrapperSoapSerializer& SoapSerializer::
+operator << (const AxisChar * cSerialized)
 {
 	// some thing has gone wrong. So do nothing 
     if( AXIS_SUCCESS != m_nStatus) 
@@ -514,8 +516,8 @@
     return *this;
 }
 
-int SoapSerializer::createSoapMethod( const AxisChar * sLocalName, 
-                                      const AxisChar * sURI)
+int SoapSerializer::
+createSoapMethod( const AxisChar * sLocalName, const AxisChar * sURI)
 {
     SoapMethod * pMethod = NULL;
     if( !(m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod))
@@ -536,10 +538,11 @@
     return AXIS_SUCCESS;  // Can it only be successful?
 }
 
-int SoapSerializer::createSoapFault( const AxisChar * sLocalName, 
-                                     const AxisChar * sURI,
-                                     const AxisChar * sFaultCode,
-                                     const AxisChar * sFaultString)
+int SoapSerializer::
+createSoapFault( const AxisChar * sLocalName, 
+                 const AxisChar * sURI,
+                 const AxisChar * sFaultCode,
+                 const AxisChar * sFaultString)
 {
     SoapFault * pSoapFault = new SoapFault();
 
@@ -565,7 +568,8 @@
  * Used to create an ArrayBean when the return type of a method is an array
  * of basic types
  */
-ArrayBean * SoapSerializer::makeArrayBean( XSDTYPE nType, void ** pArray)
+ArrayBean * SoapSerializer::
+makeArrayBean( XSDTYPE nType, void ** pArray)
 {
     ArrayBean* pAb = new ArrayBean();
 
@@ -579,9 +583,8 @@
  * Used to create an ArrayBean when the return type of a method is an array
  * of complex types
  */
-ArrayBean * SoapSerializer::makeArrayBean(void ** pObject,
-                                           void * pSZFunct, 
-                                           void * pDelFunct)
+ArrayBean * SoapSerializer::
+makeArrayBean(void ** pObject, void * pSZFunct, void * pDelFunct)
 {
     ArrayBean* pAb = new ArrayBean();
 
@@ -594,7 +597,8 @@
     return pAb;
 }
 
-IHeaderBlock * SoapSerializer::createHeaderBlock()
+IHeaderBlock * SoapSerializer::
+createHeaderBlock()
 {
     HeaderBlock * pHeaderBlock= new HeaderBlock();
 
@@ -603,7 +607,8 @@
     return pHeaderBlock;
 }
 
-int SoapSerializer::setHeaderBlock( HeaderBlock * pHeaderBlock)
+int SoapSerializer::
+setHeaderBlock( HeaderBlock * pHeaderBlock)
 {
     int intStatus = AXIS_FAIL;
 
@@ -629,7 +634,8 @@
  * Therefore the caller of this method has to be exactly sure whether he wants
  * to do this.
  */
-int SoapSerializer::removeSoapHeader()
+int SoapSerializer::
+removeSoapHeader()
 {
     delete m_pSoapEnvelope->m_pSoapHeader;
     m_pSoapEnvelope->m_pSoapHeader= NULL;
@@ -641,11 +647,10 @@
  * Used to Serialize an array of complex types inside a complex type. Called 
  * from within the Serialize wrapper method of the complex type.
  */
-int SoapSerializer::serializeCmplxArray( const Axis_Array * pArray, 
-                                         void * pSZFunct,
-                                         void * pDelFunct, 
-                                         const AxisChar * pName, 
-                                         const AxisChar * pNamespace)
+int SoapSerializer::
+serializeCmplxArray( const Axis_Array * pArray, 
+                     void * pSZFunct, void * pDelFunct, 
+                     const AxisChar * pName, const AxisChar * pNamespace)
 {
     ArrayBean * pAb = (ArrayBean*) makeArrayBean( pArray->m_Array, pSZFunct, pDelFunct);
 
@@ -700,9 +705,8 @@
  * Used to Serialize an array of basic types inside a complex type. Called from
  * within the Serialize wrapper method of the complex type.
  */
-int SoapSerializer::serializeBasicArray( const Axis_Array * pArray, 
-                                         XSDTYPE nType,
-                                         const AxisChar * pName)
+int SoapSerializer::
+serializeBasicArray( const Axis_Array * pArray, XSDTYPE nType, const AxisChar * pName)
 {
     return serializeBasicArray( pArray, NULL, nType, pName);
 }
@@ -712,9 +716,9 @@
  * the namespace so that it can be serialized. Called from within the Serialize
  * wrapper method of the complex type.
  */
-int SoapSerializer::serializeBasicArray(const Axis_Array* pArray, 
-                                        const AxisChar* pNamespace, 
-                                        XSDTYPE nType, const AxisChar* pName)
+int SoapSerializer::
+serializeBasicArray(const Axis_Array* pArray, 
+                    const AxisChar* pNamespace, XSDTYPE nType, const AxisChar* pName)
 {
     ArrayBean * pAb = (ArrayBean *) makeArrayBean( nType, pArray->m_Array);
 
@@ -776,9 +780,8 @@
 /*
  * Basic output parameter going to be serialized as an Element later
  */
-int SoapSerializer::addOutputParam( const AxisChar * pchName,
-                                    void * pValue, 
-                                    XSDTYPE type)
+int SoapSerializer::
+addOutputParam( const AxisChar * pchName, void * pValue, XSDTYPE type)
 {
     IAnySimpleType* xsdValue = AxisUtils::createSimpleTypeObject(pValue, type);
     
@@ -1007,7 +1010,8 @@
     return NULL;
 }
 
-int SoapSerializer::setSOAPMethodAttribute( Attribute * pAttribute)
+int SoapSerializer::
+setSOAPMethodAttribute( Attribute * pAttribute)
 {
     if( m_pSoapEnvelope &&
         (m_pSoapEnvelope->m_pSoapBody) &&
@@ -1020,8 +1024,16 @@
 
     return AXIS_FAIL;
 }
+void SoapSerializer::
+clearSOAPMethodAttributes()
+{
+    if (m_pSoapEnvelope && m_pSoapEnvelope->m_pSoapBody
+            && m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod)
+        m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->clearAttributes();
+}
 
-int SoapSerializer::serializeAnyObject( AnyType * pAnyObject)
+int SoapSerializer::
+serializeAnyObject( AnyType * pAnyObject)
 {
     for( int i = 0; i < pAnyObject->_size; i++)
         serialize( pAnyObject->_array[i], 0);
@@ -1029,7 +1041,8 @@
     return AXIS_SUCCESS;  // Can it only be successful?
 }
 
-int SoapSerializer::addOutputAnyObject( AnyType * pAnyObject)
+int SoapSerializer::
+addOutputAnyObject( AnyType * pAnyObject)
 {
     Param * pParam = new Param();
 
@@ -1044,17 +1057,6 @@
     return AXIS_SUCCESS;  // Can it only be successful?
 }
 
-/*
- * TODO: Have to remove this method. Date logged 13Jan2005
- 
-IHeaderBlock* SoapSerializer::getHeaderBlock()
-{
-    if ((!m_pSoapEnvelope) || (!m_pSoapEnvelope->m_pSoapHeader)) return NULL;
-
-    return (HeaderBlock*)m_pSoapEnvelope->m_pSoapHeader->getHeaderBlock(false);   

-}
-*/
-
 IHeaderBlock * SoapSerializer::getHeaderBlock( const AxisChar * pcName, 
                                                const AxisChar * pcNamespace)
 {
@@ -1272,8 +1274,8 @@
 }
 
 
-int SoapSerializer::deleteHeaderBlock( const AxisChar * pName, 
-                                       const AxisChar * pNamespace)
+int SoapSerializer::
+deleteHeaderBlock( const AxisChar * pName, const AxisChar * pNamespace)
 {
    
     int iStatus = AXIS_SUCCESS;

Modified: webservices/axis/trunk/c/src/soap/SoapSerializer.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapSerializer.h?view=diff&rev=500493&r1=500492&r2=500493
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapSerializer.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapSerializer.h Fri Jan 26 23:05:31 2007
@@ -62,15 +62,10 @@
     AxisChar m_Buf[BTS_BUFFSIZE];
     SoapEnvelope* m_pSoapEnvelope;    	
     int m_iSoapVersion;
-    /* Current Serialization Style */
     AXIS_BINDING_STYLE m_nStyle;
-    /* Overall status of Serializer. If anything goes wrong this is not 
-     * AXIS_SUCCESS 
-     */
+    /* Overall status of Serializer. If anything goes wrong this is not AXIS_SUCCESS */
     int m_nStatus;
-    /* Map that contains pairs of currently available namespaces and 
-     * prefixes 
-     */ 
+    /* Map that contains pairs of currently available namespaces and prefixes */ 
     map<AxisXMLString, AxisXMLString> m_NsStack;
     /* Provider type of current service that uses this Serializer object */
     PROVIDERTYPE m_ProviderType;
@@ -85,14 +80,12 @@
 #ifdef UNIT_TESTING_ON
     int setOutputStreamForTesting(SOAPTransport* pStream);
 #endif
-    int AXISCALL createSoapMethod(const AxisChar* sLocalName, 
-        const AxisChar* sURI);
+    int AXISCALL createSoapMethod(const AxisChar* sLocalName, const AxisChar* sURI);
 
     int AXISCALL createSoapFault(const AxisChar* sLocalName, 
         const AxisChar* sURI, const AxisChar* sFaultCode,
 	const AxisChar* sFaultString);
 
-/*    IWrapperSoapSerializer& operator<<(const char* cSerialized); */
     IWrapperSoapSerializer& operator<<(const AxisChar* cSerialized);
     /**
      * Returns the corrosponding namespace prefix.
@@ -189,14 +182,11 @@
 	void setContentIdSet(ContentIdSet *pContentIdSet);
 	void addAttachmentParameter(ISoapAttachment* att, const char* pName, IAttribute **attributes,
int nAttributes);
 	IHeaderBlock* getHeaderBlock(const AxisChar* pcName, const AxisChar* pcNamespace);
-	/*
-	* TODO: Have to remove this method. Date logged 13Jan2005
-	IHeaderBlock* getHeaderBlock();
-	*/
 	IHeaderBlock* getFirstHeaderBlock();
 	IHeaderBlock* getNextHeaderBlock();
 
 	int setSOAPMethodAttribute(Attribute* pAttribute);
+    void clearSOAPMethodAttributes();
 	SoapMethod* getSOAPMethod();
     IHeaderBlock* createHeaderBlock(const AxisChar *pachLocalName,
         const AxisChar *pachUri);



---------------------------------------------------------------------
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