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 di...@apache.org on 2005/11/23 17:40:21 UTC

svn commit: r348482 - in /webservices/axis/trunk/c: src/wsdl/org/apache/axis/wsdl/symbolTable/CSchemaUtils.java tests/auto_build/testcases/output/NilValuesTest.request

Author: dicka
Date: Wed Nov 23 08:40:14 2005
New Revision: 348482

URL: http://svn.apache.org/viewcvs?rev=348482&view=rev
Log:
AXISCPP-843

Minor tweaks for handling namespaces correctly.

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/symbolTable/CSchemaUtils.java
    webservices/axis/trunk/c/tests/auto_build/testcases/output/NilValuesTest.request

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/symbolTable/CSchemaUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/symbolTable/CSchemaUtils.java?rev=348482&r1=348481&r2=348482&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/symbolTable/CSchemaUtils.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/symbolTable/CSchemaUtils.java Wed Nov 23 08:40:14 2005
@@ -885,8 +885,7 @@
 
             // check the Form (or elementFormDefault) attribute of this node to
             // determine if it should be namespace quailfied or not.
-            String form = Utils.getAttribute(elementNode, "form");
-                        
+            String form = getAttributeRecursivly( elementNode, "form");
             if ((form != null) && form.equals("unqualified"))
             {
 
@@ -899,7 +898,6 @@
             	 * qualified nodename
             	 */            	
             	qualified = true;
-            	nodeName = Utils.findQName("", nodeName.getLocalPart());
             }
             else
                 if (form == null)
@@ -924,7 +922,6 @@
                     	 * qualified nodename
                     	 */
                     	qualified = true;
-                    	nodeName = Utils.findQName("", nodeName.getLocalPart());
                     }
                     
                 }
@@ -977,6 +974,31 @@
         }
 
         return null;
+    }
+
+    /**
+     * @param elementNode
+     * @param string
+     * @return
+     */
+    private static String getAttributeRecursivly(Node elementNode, String string)
+    {
+        String form = Utils.getAttribute(elementNode, "form");
+        
+        if (form == null)
+        {
+            Node parentNode = elementNode.getParentNode();
+            if (parentNode != null)
+            {
+                form = getAttributeRecursivly(parentNode, string);
+            }
+            else
+            {
+                
+            }
+        }
+        
+        return form;
     }
 
     /**

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/NilValuesTest.request
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/NilValuesTest.request?rev=348482&r1=348481&r2=348482&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/NilValuesTest.request (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/NilValuesTest.request Wed Nov 23 08:40:14 2005
@@ -2,13 +2,13 @@
 Host: localhost:13260
 Content-Type: text/xml; charset=UTF-8
 SOAPAction: "http://complextype.test.apache.org"
-Content-Length: 504
+Content-Length: 551
 
 <?xml version='1.0' encoding='utf-8' ?>
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <SOAP-ENV:Body>
 <ns1:myOperation xmlns:ns1="http://complextype.test.apache.org">
-<ns1:aType><ns1:field1 xsi:nil="true"></ns1:field1>
+<ns1:aType xmlns:ns1="http://complextype.test.apache.org"><ns1:field1 xsi:nil="true"></ns1:field1>
 <ns1:field2 xsi:nil="true"></ns1:field2>
 <ns1:field3 xsi:nil="true"></ns1:field3>
 </ns1:aType>