axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r544623 - /webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
Date Tue, 05 Jun 2007 20:39:58 GMT
Author: dims
Date: Tue Jun  5 13:39:57 2007
New Revision: 544623

URL: http://svn.apache.org/viewvc?view=rev&rev=544623
Log:
use the interface for typecasting and use the right member in Class.forName

Modified:
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?view=diff&rev=544623&r1=544622&r2=544623
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
Tue Jun  5 13:39:57 2007
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Map;
 import java.util.HashMap;
+import java.lang.reflect.Constructor;
 
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
@@ -312,8 +313,10 @@
             schemaGen = new DefaultSchemaGenerator(loader, className, schematargetNamespace,
schematargetNamespacePrefix);
         } else {
             try {
-                schemaGen = (DefaultSchemaGenerator) Class.forName(this.nsGenClassName).getConstructor(
-                        new Class[]{ClassLoader.class, String.class, String.class, String.class}).newInstance(
+                Class clazz = Class.forName(this.schemaGenClassName);
+                Constructor constructor = clazz.getConstructor(
+                        new Class[]{ClassLoader.class, String.class, String.class, String.class});
+                schemaGen = (SchemaGenerator) constructor.newInstance(
                             new Object[]{loader, className, schematargetNamespace, schematargetNamespacePrefix});
             } catch ( Exception e ) {
                 schemaGen = new DefaultSchemaGenerator(loader, className, schematargetNamespace,
schematargetNamespacePrefix);



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