axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1657298 - in /axis/axis1/c/trunk/src: common/BasicTypeSerializer.cpp soap/SoapMethod.cpp
Date Wed, 04 Feb 2015 16:04:24 GMT
Author: nadiramra
Date: Wed Feb  4 16:04:23 2015
New Revision: 1657298

URL: http://svn.apache.org/r1657298
Log:
Handle form="unqualified" correctly, remove extraneous newline character

Modified:
    axis/axis1/c/trunk/src/common/BasicTypeSerializer.cpp
    axis/axis1/c/trunk/src/soap/SoapMethod.cpp

Modified: axis/axis1/c/trunk/src/common/BasicTypeSerializer.cpp
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/common/BasicTypeSerializer.cpp?rev=1657298&r1=1657297&r2=1657298&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/common/BasicTypeSerializer.cpp (original)
+++ axis/axis1/c/trunk/src/common/BasicTypeSerializer.cpp Wed Feb  4 16:04:23 2015
@@ -74,8 +74,10 @@ serializeAsElement (const AxisChar* pNam
 {
     logEntryEngine("BasicTypeSerializer::serializeAsElement")
 
+    bool hasPrefix = (NULL != pPrefix && *pPrefix != 0x00);
+
     m_sSZ = "<";
-    if (NULL != pPrefix) 
+    if (hasPrefix)
     { 
         m_sSZ += pPrefix;
         m_sSZ += ":";
@@ -85,8 +87,12 @@ serializeAsElement (const AxisChar* pNam
 
     if (NULL != pNamespace)
     {
-        m_sSZ += " xmlns:";
-        m_sSZ += pPrefix;
+        m_sSZ += " xmlns";
+        if (hasPrefix)
+        {
+            m_sSZ += ":";
+            m_sSZ += pPrefix;
+        }
         m_sSZ += "=";
         m_sSZ += PLATFORM_DOUBLE_QUOTE_S;
         m_sSZ += pNamespace;
@@ -109,7 +115,7 @@ serializeAsElement (const AxisChar* pNam
          * It is a null value not an empty value.
          */
         m_sSZ = "<";
-        if (NULL != pPrefix)
+        if (hasPrefix)
         { 
             m_sSZ += pPrefix;
             m_sSZ += ":";
@@ -118,8 +124,12 @@ serializeAsElement (const AxisChar* pNam
         
         if (NULL != pNamespace)
         {
-            m_sSZ += " xmlns:";
-            m_sSZ += pPrefix;
+            m_sSZ += " xmlns";
+            if (hasPrefix)
+            {
+                m_sSZ += ":";
+                m_sSZ += pPrefix;
+            }
             m_sSZ += "=";
             m_sSZ += PLATFORM_DOUBLE_QUOTE_S;
             m_sSZ += pNamespace;
@@ -135,7 +145,7 @@ serializeAsElement (const AxisChar* pNam
         m_sSZ += pSimpleType->serialize();
     
     m_sSZ += "</";
-    if (NULL != pPrefix) 
+    if (hasPrefix)
     {
         m_sSZ += pPrefix;
         m_sSZ += ":";
@@ -156,7 +166,7 @@ serializeAsAttribute (const AxisChar* pN
     logEntryEngine("BasicTypeSerializer::serializeAsAttribute")
 
     m_sSZ = ' ';
-    if (pPrefix)
+    if (pPrefix && *pPrefix != 0x00)
     {
         m_sSZ += pPrefix;
         m_sSZ += ':';

Modified: axis/axis1/c/trunk/src/soap/SoapMethod.cpp
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/soap/SoapMethod.cpp?rev=1657298&r1=1657297&r2=1657298&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/soap/SoapMethod.cpp (original)
+++ axis/axis1/c/trunk/src/soap/SoapMethod.cpp Wed Feb  4 16:04:23 2015
@@ -125,7 +125,7 @@ serialize(SoapSerializer& pSZ)
                 if(iStatus==AXIS_FAIL)
                     break;
                 
-                pSZ.serialize(">\n", NULL);
+                pSZ.serialize(">", NULL);
     
                 // push the current NS to the NS stack
                 pSZ.getNamespacePrefix(m_strUri.c_str());



Mime
View raw message