axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r499705 - /webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
Date Thu, 25 Jan 2007 09:06:25 GMT
Author: amilas
Date: Thu Jan 25 01:06:16 2007
New Revision: 499705

URL: http://svn.apache.org/viewvc?view=rev&rev=499705
Log:
Add a null pointer check when seting the complex type

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?view=diff&rev=499705&r1=499704&r2=499705
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
Thu Jan 25 01:06:16 2007
@@ -174,17 +174,20 @@
      */
     private static void setComplexTypeName(AxisMessage axisMessage) throws AxisFault {
 
-        XmlSchemaType schemaType = axisMessage.getSchemaElement().getSchemaType();
-        if (schemaType instanceof XmlSchemaComplexType){
-            XmlSchemaComplexType complexType = (XmlSchemaComplexType) schemaType;
-            if ((complexType.getName() != null) && (complexType.getQName() != null))
{
-                Map metaInfo = complexType.getMetaInfoMap();
-                String complexTypeName = (String)
-                        metaInfo.get(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY);
-                // store the complext type name to process later
-               axisMessage.addParameter(new Parameter(Constants.COMPLEX_TYPE, complexTypeName));
+        if (axisMessage.getSchemaElement() != null){
+            XmlSchemaType schemaType = axisMessage.getSchemaElement().getSchemaType();
+            if (schemaType instanceof XmlSchemaComplexType){
+                XmlSchemaComplexType complexType = (XmlSchemaComplexType) schemaType;
+                if ((complexType.getName() != null) && (complexType.getQName() !=
null)) {
+                    Map metaInfo = complexType.getMetaInfoMap();
+                    String complexTypeName = (String)
+                            metaInfo.get(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY);
+                    // store the complext type name to process later
+                   axisMessage.addParameter(new Parameter(Constants.COMPLEX_TYPE, complexTypeName));
+                }
             }
         }
+
 
     }
 



---------------------------------------------------------------------
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