AXISCPP-458 - unwrapped support. Fixes.
diff --git a/src/soap/SoapMethod.cpp b/src/soap/SoapMethod.cpp
index e7e4f8c..7f23e2f 100644
--- a/src/soap/SoapMethod.cpp
+++ b/src/soap/SoapMethod.cpp
@@ -160,14 +160,8 @@
             	// We are doing non-wrapper style.  
             	
             	if (!m_OutputParams.empty())
-            	{	
-            		// Serialize parameters....
-	                
-	                // remove the current NS from the NS stack - we want the bean to define the namespace.
-            		// We could have added initial namespace to envelope, but for complex types
-            		// it seemed best to declare namespace as part of root element of xml document.
-	                pSZ.removeNamespacePrefix(m_strUri.c_str());
-	                
+            	{
+                    // Serialize parameters....
 	                iStatus= serializeOutputParam(pSZ);
 	                	                
 	                if(iStatus==AXIS_FAIL)
diff --git a/src/soap/SoapSerializer.cpp b/src/soap/SoapSerializer.cpp
index af3d5ba..5004c85 100644
--- a/src/soap/SoapSerializer.cpp
+++ b/src/soap/SoapSerializer.cpp
@@ -659,11 +659,11 @@
 	    pMethod->setPrefix( getNamespacePrefix(sURI) );
 	    pMethod->setURI( sURI);
 	    
-	    // Since we want the bean to define the namespace for non-wrapper style, we need to reset
-	    // the counter.  See SoapMethod::serialize() for further information.
+        // Add initial namespace to envelope. This needs to be added to envelop
+        // since we do not get the oppurtunity to add the namespace to the element.
 	    if (!bIsWrapperStyle)
-	        m_nCounter = 0;
-	    
+	        addNamespaceToEnvelope((AxisChar * )pMethod->getUri().c_str(), (AxisChar * )pMethod->getPrefix().c_str() );
+
 	    iStatus = AXIS_SUCCESS;
     }
 
@@ -980,15 +980,7 @@
         pParam->setValue(type, xsdValue);
         
         m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->addOutputParam( pParam );
-        
-        // if non-wrapper then we need to add namespace to envelope since it will not get added
-        // any other way.  non-wrapper support was added later so that is why we are in this mess.
-        if (!(m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->isWrapperStyle()))
-        {
-            addNamespaceToEnvelope((AxisChar * )m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->getUri().c_str(), 
-                                   (AxisChar * )m_pSoapEnvelope->m_pSoapBody->m_pSoapMethod->getPrefix().c_str());
-        }
-            
+
         iStatus = AXIS_SUCCESS;
     }