You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by du...@apache.org on 2005/11/25 10:23:55 UTC

svn commit: r348917 - in /webservices/axis/trunk/c/src: common/Param.cpp common/Param.h engine/client/Call.cpp soap/SoapSerializer.cpp soap/SoapSerializer.h

Author: dushshantha
Date: Fri Nov 25 01:23:38 2005
New Revision: 348917

URL: http://svn.apache.org/viewcvs?rev=348917&view=rev
Log:
part of the fix for AXISCPP-843 (handling elemetFormDefault)

Modified:
    webservices/axis/trunk/c/src/common/Param.cpp
    webservices/axis/trunk/c/src/common/Param.h
    webservices/axis/trunk/c/src/engine/client/Call.cpp
    webservices/axis/trunk/c/src/soap/SoapSerializer.cpp
    webservices/axis/trunk/c/src/soap/SoapSerializer.h

Modified: webservices/axis/trunk/c/src/common/Param.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/Param.cpp?rev=348917&r1=348916&r2=348917&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/Param.cpp (original)
+++ webservices/axis/trunk/c/src/common/Param.cpp Fri Nov 25 01:23:38 2005
@@ -153,7 +153,7 @@
             {
 				TRACE_SERIALIZE_FUNCT_ENTRY(m_Value.pCplxObj->pSZFunct, m_Value.pCplxObj->pObject, &pSZ, false);
                 int stat = AXIS_FAIL;
-                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
+                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false, nsQualified);
 				TRACE_SERIALIZE_FUNCT_EXIT(m_Value.pCplxObj->pSZFunct, stat);
             }
             else
@@ -164,7 +164,7 @@
                  */
 				TRACE_SERIALIZE_FUNCT_ENTRY(m_Value.pCplxObj->pSZFunct, m_Value.pCplxObj->pObject, &pSZ, false);
                 int stat = AXIS_FAIL;
-                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false);
+                stat = m_Value.pCplxObj->pSZFunct (m_Value.pCplxObj->pObject, &pSZ, false, nsQualified);
 				TRACE_SERIALIZE_FUNCT_EXIT(m_Value.pCplxObj->pSZFunct, stat);
 
 				pSZ.serialize ("</", m_sName.c_str (), ">\n", NULL);
@@ -258,6 +258,16 @@
 void Param::setName (const AxisChar* sName)
 {
     m_sName = sName;
+}
+
+bool Param::getNsQualified()
+{
+	return nsQualified;
+}
+
+void Param::setNsQualified(bool nsq)
+{
+	nsQualified = nsq;
 }
 
 // ComplexObjectHandler functions

Modified: webservices/axis/trunk/c/src/common/Param.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/Param.h?rev=348917&r1=348916&r2=348917&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/Param.h (original)
+++ webservices/axis/trunk/c/src/common/Param.h Fri Nov 25 01:23:38 2005
@@ -63,6 +63,7 @@
     AxisString m_strPrefix; /* needed in serialization only */
     AxisString m_strUri; /* needed in serialization only */
     IAnySimpleType* m_AnySimpleType;
+    bool nsQualified;
 
 public: 
     void setValue(XSDTYPE nType, IAnySimpleType* value);
@@ -75,6 +76,8 @@
     int setUserType(void* pObject, AXIS_DESERIALIZE_FUNCT pDZFunct, 
         AXIS_OBJECT_DELETE_FUNCT pDelFunct);
     void setName(const AxisChar* sName);
+    bool getNsQualified();
+    void setNsQualified(bool nsq);
 };
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/engine/client/Call.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/engine/client/Call.cpp?rev=348917&r1=348916&r2=348917&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/engine/client/Call.cpp (original)
+++ webservices/axis/trunk/c/src/engine/client/Call.cpp Fri Nov 25 01:23:38 2005
@@ -160,10 +160,10 @@
 }
 
 void Call::addCmplxParameter (void* pObject, void* pSZFunct, void* pDelFunct,
-    const AxisChar* pName, const AxisChar* pNamespace)
+    const AxisChar* pName, const AxisChar* pNamespace, bool nsQualified)
 {
      m_nStatus = m_pIWSSZ->addOutputCmplxParam (pObject, pSZFunct, pDelFunct, pName,
-        pNamespace);
+        pNamespace, nsQualified);
 }
 
 int Call::invoke ()

Modified: webservices/axis/trunk/c/src/soap/SoapSerializer.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/SoapSerializer.cpp?rev=348917&r1=348916&r2=348917&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapSerializer.cpp Fri Nov 25 01:23:38 2005
@@ -236,7 +236,8 @@
 										 void * pSZFunct, 
                                          void * pDelFunct,
 										 const AxisChar * pName,
-                                         const AxisChar * pNamespace)
+                                         const AxisChar * pNamespace,
+                                         bool nsQualified)
 { 
 	int	iSuccess = AXIS_SUCCESS;
 
@@ -246,7 +247,7 @@
     pParam->m_Value.pCplxObj->pObject = pObject;
     pParam->m_Value.pCplxObj->pSZFunct = (AXIS_SERIALIZE_FUNCT) pSZFunct;
     pParam->m_Value.pCplxObj->pDelFunct = (AXIS_OBJECT_DELETE_FUNCT) pDelFunct;
-	
+	pParam->setNsQualified(nsQualified);
     if( m_pSoapEnvelope &&
 		(m_pSoapEnvelope->m_pSoapBody) &&
 		(m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod)) 
@@ -255,6 +256,7 @@
     }
 
     pParam->setName( pName);
+    
 
     return iSuccess;  // Can it only be successful?
 }
@@ -846,13 +848,22 @@
 int SoapSerializer::serializeAsElement( const AxisChar * pName, 
                                         const AxisChar * pNamespace,
                                         void * pValue, 
-                                        XSDTYPE type) 
+                                        XSDTYPE type,
+                                        bool nsQualified) 
 {
     IAnySimpleType* pSimpleType = AxisUtils::createSimpleTypeObject(pValue, type);
+    int ret;
+    if (nsQualified)
+    {
+    	ret = serializeAsElement(pName, pNamespace, pSimpleType);
+    }
+    else
+    {
+    	ret = serializeAsElement(pName, NULL, pSimpleType);
+    }
     
-    int ret = serializeAsElement(pName, pNamespace, pSimpleType);
     
-    // Samisa: got to clen memory allocated in AxisUtils::createSimpleTypeObject
+    // Samisa: got to clean memory allocated in AxisUtils::createSimpleTypeObject
     delete pSimpleType;
 
     return ret;

Modified: webservices/axis/trunk/c/src/soap/SoapSerializer.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/SoapSerializer.h?rev=348917&r1=348916&r2=348917&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapSerializer.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapSerializer.h Fri Nov 25 01:23:38 2005
@@ -134,7 +134,7 @@
 
     /* for complex types */
     int AXISCALL addOutputCmplxParam(void* pObject, void* pSZFunct, 
-        void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace);
+        void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace, bool nsQualified = false);
 
     int AXISCALL addFaultDetail(void* pObject, void* pSZFunct,
         void* pDelFunct, const AxisChar* pName, const AxisChar* pNamespace );
@@ -209,7 +209,8 @@
     int AXISCALL serializeAsElement(const AxisChar* pchName,
                                     const AxisChar* pNamespace,
                                     void* pValue,
-                                    XSDTYPE type);
+                                    XSDTYPE type,
+                                    bool nsQualified = false);
     int AXISCALL serializeAsElement(const AxisChar* pchName,
                                     IAnySimpleType* pSimpleType);
 	int AXISCALL serializeAsElement(const AxisChar* pchName,