Author: nadiramra
Date: Sat Aug  3 03:07:18 2013
New Revision: 1509935

URL: http://svn.apache.org/r1509935
Log:
Fix problems extentions of simple types

Modified:
    axis/axis1/c/trunk/src/soap/SoapDeSerializer.cpp
    
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
    
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java

Modified: axis/axis1/c/trunk/src/soap/SoapDeSerializer.cpp
URL: 
http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/soap/SoapDeSerializer.cpp?rev=1509935&r1=1509934&r2=1509935&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/soap/SoapDeSerializer.cpp (original)
+++ axis/axis1/c/trunk/src/soap/SoapDeSerializer.cpp Sat Aug  3 03:07:18 2013
@@ -1,3 +1,4 @@
+
 /*
  *   Copyright 2003-2004 The Apache Software Foundation.
 // (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
@@ -1035,6 +1036,7 @@ getCmplxObject (void *pDZFunct, void *pC
             {
                 if (!m_doNotSkip)
                   skipNode();
+                m_doNotSkip = false;
             }
             else
             {

Modified: 
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java?rev=1509935&r1=1509934&r2=1509935&view=diff
==============================================================================
--- 
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java 
(original)
+++ 
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java 
Sat Aug  3 03:07:18 2013
@@ -748,11 +748,19 @@ public class BeanParamWriter extends Par
         
//============================================================================= 
                          
         c_writer.write("\n");
         
-        CUtils.printBlockComment(c_writer, "Ensure no extraneous elements.");  
          
-        c_writer.write("\tpeekedElementName = 
axiscSoapDeSerializerPeekNextElementName(pDZ);\n");
-        c_writer.write("\tif (0x00 != *peekedElementName)\n");
-        
c_writer.write("\t\taxiscAxisGenerateUnknownElementException(peekedElementName);\n");
-
+        // Due to partial support of extensions, we need to add this hack in 
not
+        // performing a peek - due to the fact that on empty elements the 
extension
+        // deserialization will consume the end element, and then the peek 
will 
+        // return next element causing it to mistakenly throw an exception.  
+        if (extensionBaseAttrib == null
+                || extensionBaseAttrib.getTypeName() == null)
+        {
+            CUtils.printBlockComment(c_writer, "Ensure no extraneous 
elements.");            
+            c_writer.write("\tpeekedElementName = 
axiscSoapDeSerializerPeekNextElementName(pDZ);\n");
+            c_writer.write("\tif (0x00 != *peekedElementName)\n");
+            
c_writer.write("\t\taxiscAxisGenerateUnknownElementException(peekedElementName);\n");
+        }
+        
         c_writer.write("\n");
         c_writer.write("\treturn axiscSoapDeSerializerGetStatus(pDZ);\n");
         c_writer.write("}\n");

Modified: 
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?rev=1509935&r1=1509934&r2=1509935&view=diff
==============================================================================
--- 
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
 (original)
+++ 
axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
 Sat Aug  3 03:07:18 2013
@@ -976,10 +976,18 @@ public class BeanParamWriter extends Par
         
//============================================================================= 
                          
         c_writer.write("\n");
         
-        CUtils.printBlockComment(c_writer, "Ensure no extraneous elements.");  
          
-        c_writer.write("\tpeekedElementName = 
pIWSDZ->peekNextElementName();\n");
-        c_writer.write("\tif (0x00 != *peekedElementName)\n");
-        c_writer.write("\t\tthrow 
UnknownElementException(peekedElementName);\n");
+        // Due to partial support of extensions, we need to add this hack in 
not
+        // performing a peek - due to the fact that on empty elements the 
extension
+        // deserialization will consume the end element, and then the peek 
will 
+        // return next element causing it to mistakenly throw an exception.  
+        if (extensionBaseAttrib == null
+                || extensionBaseAttrib.getTypeName() == null)
+        {
+            CUtils.printBlockComment(c_writer, "Ensure no extraneous 
elements.");            
+            c_writer.write("\tpeekedElementName = 
pIWSDZ->peekNextElementName();\n");
+            c_writer.write("\tif (0x00 != *peekedElementName)\n");
+            c_writer.write("\t\tthrow 
UnknownElementException(peekedElementName);\n");
+        }
         
         c_writer.write("\n");
         c_writer.write("\treturn pIWSDZ->getStatus();\n");


Reply via email to