You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by sc...@apache.org on 2005/07/29 19:37:13 UTC

svn commit: r226403 - /webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java

Author: scamp
Date: Fri Jul 29 10:37:11 2005
New Revision: 226403

URL: http://svn.apache.org/viewcvs?rev=226403&view=rev
Log:
fixed bug in fault generation

Modified:
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java?rev=226403&r1=226402&r2=226403&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java Fri Jul 29 10:37:11 2005
@@ -791,7 +791,10 @@
                     throw new Exception("WSDL fault message part should have either an element or a type.");
                 }
 
-                String exceptionFaultName = StringUtils.capitalize(faultName.getLocalPart()) + "Exception";
+                String faultClassName = NameUtil.getClassNameFromQName(faultName);
+                faultClassName = faultClassName.substring(faultClassName.lastIndexOf(".") + 1);
+                QName newFaultName = new QName(faultName.getNamespaceURI(),faultClassName);
+                String exceptionFaultName =  faultClassName + "Exception";
                 //ok here's the file we'll generate
                 outputFile = new File(packageDir, exceptionFaultName + ".java");
                 context.put("faultName", exceptionFaultName);
@@ -800,7 +803,7 @@
                 {
                     try
                     {
-                        if (isBaseFaultExtension(faultName, isType))
+                        if (isBaseFaultExtension(newFaultName, isType))
                         {
                             processTemplate(context, "templates/BaseFaultExtension.vm", outputFile);
                         }