axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r721059 - in /webservices/axis/trunk/c/src: common/ soap/ wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ wsdl/org/apache/axis/wsdl/wsdl2ws/info/
Date Thu, 27 Nov 2008 01:23:23 GMT
Author: nadiramra
Date: Wed Nov 26 17:23:23 2008
New Revision: 721059

URL: http://svn.apache.org/viewvc?rev=721059&view=rev
Log:
AXISCPP-458 - unwrapped support. Problem when simple type is input in unwrapped mode.  

Modified:
    webservices/axis/trunk/c/src/common/Param.h
    webservices/axis/trunk/c/src/soap/SoapMethod.cpp
    webservices/axis/trunk/c/src/soap/SoapMethod.h
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java

Modified: webservices/axis/trunk/c/src/common/Param.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/common/Param.h?rev=721059&r1=721058&r2=721059&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/Param.h (original)
+++ webservices/axis/trunk/c/src/common/Param.h Wed Nov 26 17:23:23 2008
@@ -69,6 +69,8 @@
     int setArrayElements(void* pObject, AXIS_DESERIALIZE_FUNCT pDZFunct, AXIS_OBJECT_DELETE_FUNCT
pDelFunct);
     int setUserType(void* pObject, AXIS_DESERIALIZE_FUNCT pDZFunct, AXIS_OBJECT_DELETE_FUNCT
pDelFunct);
     void setName(const AxisChar* sName);
+    
+    bool isSimpleType() { return (bool)(m_AnySimpleType != NULL); }
 };
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/soap/SoapMethod.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapMethod.cpp?rev=721059&r1=721058&r2=721059&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapMethod.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapMethod.cpp Wed Nov 26 17:23:23 2008
@@ -97,7 +97,12 @@
 	logEntryEngine("SoapMethod::addOutputParam")
 
     if (param)
+    {
+    	if (m_OutputParams.empty() && param->isSimpleType())
+    		m_addEndTagForUnwrapped = true;
+    	
         m_OutputParams.push_back(param);
+    }
 	
 	logExit()
 }
@@ -123,9 +128,9 @@
             if(iStatus==AXIS_FAIL)
                 break;
             
-            // If not wrapper style, then end tag will be added by bean. 
+            // If not wrapper style, then end tag will be added by bean - if parameter is
complex type. 
             // This is a hack in order to keep backward compatibility.
-            if (m_isWrapperStyle)
+            if (m_isWrapperStyle || m_addEndTagForUnwrapped)
             	pSZ.serialize(">\n", NULL);
 
             // push the current NS to the NS stack
@@ -173,6 +178,7 @@
 
     int nStatus = AXIS_SUCCESS;
     
+
     for (list<Param*>::iterator it = m_OutputParams.begin(); it != m_OutputParams.end();
it++)
         if (AXIS_SUCCESS != (nStatus = (*it)->serialize(pSZ)))
             break;
@@ -252,6 +258,7 @@
 {
 	logEntryEngine("SoapMethod::reset")
 
+    m_addEndTagForUnwrapped = false;
 	m_isWrapperStyle = true;
     m_strUri = "";
     m_strLocalname = "";

Modified: webservices/axis/trunk/c/src/soap/SoapMethod.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapMethod.h?rev=721059&r1=721058&r2=721059&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapMethod.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapMethod.h Wed Nov 26 17:23:23 2008
@@ -70,6 +70,7 @@
     AxisString m_strUri;
     list<Param*> m_OutputParams;
     bool m_isWrapperStyle;
+    bool m_addEndTagForUnwrapped;
 
 public:    
     int reset();

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java?rev=721059&r1=721058&r2=721059&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
Wed Nov 26 17:23:23 2008
@@ -442,7 +442,7 @@
                 else
                     c_writer.write("\t{\n"); // following was added to instantiate variables
on the fly
                 
-                if (minfo.isUnwrapped())
+                if (minfo.isUnwrapped() && !type.isSimpleType() && !type.isPrimitiveType())
                 {
                     c_writer.write ("\t\tchar cPrefixAndParamName" + i + "[" + "] = \"\";\n");
                   
                 }                

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=721059&r1=721058&r2=721059&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
Wed Nov 26 17:23:23 2008
@@ -446,7 +446,7 @@
                 }
                 
                 // If unwrapped, we pass in null string for qualified element name. 
-                if (minfo.isUnwrapped())
+                if (minfo.isUnwrapped() && !type.isSimpleType() && !type.isPrimitiveType())
                 {
                     c_writer.write (tab2 + "\t\tchar cPrefixAndParamName" + i + "[" + "]
= \"\";\n");                    
                 }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java?rev=721059&r1=721058&r2=721059&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java Wed
Nov 26 17:23:23 2008
@@ -1471,7 +1471,7 @@
                 type.setIsUnwrappedInputType(true);
                 pinfo.setParamName(elementName, c_typeMap);
                 
-                if (!elementNames.hasNext() && type.isSimpleType())
+                if (!elementNames.hasNext() && (type.isSimpleType() || type.isPrimitiveType()))
                     pinfo.setElementName(element.getQName());
                 else
                     pinfo.setElementName(type.getName());



Mime
View raw message