axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r474024 - /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
Date Sun, 12 Nov 2006 19:58:23 GMT
Author: dims
Date: Sun Nov 12 11:58:22 2006
New Revision: 474024

URL: http://svn.apache.org/viewvc?view=rev&rev=474024
Log:
testing yesterdays change with aar in  AXIS2-1687. add more checks to prevent NPE

Modified:
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java?view=diff&rev=474024&r1=474023&r2=474024
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
Sun Nov 12 11:58:22 2006
@@ -134,14 +134,15 @@
                         while (iterator.hasNext()) {
                             XmlSchemaElement innerElement = (XmlSchemaElement) iterator.next();
                             QName qName = innerElement.getQName();
-                            String[] parameterValuesArray = (String[]) parameterMap.get(qName.getLocalPart());
+                            String name = qName != null ? qName.getLocalPart() : innerElement.getName();
+                            String[] parameterValuesArray = (String[]) parameterMap.get(name);
                             if (parameterValuesArray != null &&
                                 !"".equals(parameterValuesArray[0]) && parameterValuesArray[0]
!= null)
                             {
-                                OMNamespace ns = (qName.getNamespaceURI() == null || qName.getNamespaceURI().length()
== 0) ?
+                                OMNamespace ns = (qName == null || qName.getNamespaceURI()
== null || qName.getNamespaceURI().length() == 0) ?
                                         null :
                                         soapFactory.createOMNamespace(qName.getNamespaceURI(),
null);
-                                soapFactory.createOMElement(qName.getLocalPart(), ns,
+                                soapFactory.createOMElement(name, ns,
                                                             bodyFirstChild).setText(parameterValuesArray[0]);
                             } else {
                                 throw new AxisFault("Required element " + qName +



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message