axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damr...@apache.org
Subject svn commit: r677606 - in /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description: builder/FaultActionAnnot.java impl/OperationDescriptionImpl.java
Date Thu, 17 Jul 2008 15:14:52 GMT
Author: damrhei
Date: Thu Jul 17 08:14:51 2008
New Revision: 677606

URL: http://svn.apache.org/viewvc?rev=677606&view=rev
Log:
Fix to allow a String representing the fully qualified class name of the fault class to be
set on the FaultActionAnnot object.

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/FaultActionAnnot.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/FaultActionAnnot.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/FaultActionAnnot.java?rev=677606&r1=677605&r2=677606&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/FaultActionAnnot.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/FaultActionAnnot.java
Thu Jul 17 08:14:51 2008
@@ -26,6 +26,7 @@
     
     private Class className;
     private String value;
+    private String classNameString;
 
     private FaultActionAnnot() {
     }
@@ -42,6 +43,10 @@
     public static FaultActionAnnot createFaultActionAnnotImpl(Class className, String value)
{
         return new FaultActionAnnot(className, value);
     }
+    
+    public void setClassName(String classNameString) {
+        this.classNameString = classNameString;
+    }
 
     public void setClassName(Class className) {
         this.className = className;
@@ -54,6 +59,10 @@
     public Class className() {
         return className;
     }
+    
+    public String classNameString() {
+        return classNameString;
+    }
 
     public String value() {
         return value;

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=677606&r1=677605&r2=677606&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
Thu Jul 17 08:14:51 2008
@@ -41,6 +41,7 @@
 import org.apache.axis2.jaxws.description.ParameterDescription;
 import org.apache.axis2.jaxws.description.ParameterDescriptionJava;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
+import org.apache.axis2.jaxws.description.builder.FaultActionAnnot;
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
 import org.apache.axis2.jaxws.description.builder.OneWayAnnot;
 import org.apache.axis2.jaxws.description.builder.ParameterDescriptionComposite;
@@ -532,10 +533,27 @@
         
         if (faultActions != null) {
             for (FaultAction faultAction : faultActions) {
-                String className = faultAction.className().getName();
-                FaultDescription faultDesc = resolveFaultByExceptionName(className);
-                if (faultDesc != null)  {
-                    newAxisOperation.addFaultAction(className, faultAction.value());
+                
+                String className = null;
+                
+                if(faultAction instanceof FaultActionAnnot
+                        &&
+                        ((FaultActionAnnot) faultAction).classNameString() != null) {
+                    className = ((FaultActionAnnot) faultAction).classNameString();
+                }
+                else if(faultAction.className() != null) {
+                    className = faultAction.className().getName();
+                }
+                
+                if(className != null) {
+                    if(log.isDebugEnabled()) {
+                        log.debug("Looking for FaultDescription for class: " + className
+ 
+                                  " from @FaultAction annotation");
+                    }
+                    FaultDescription faultDesc = resolveFaultByExceptionName(className);
+                    if (faultDesc != null)  {
+                        newAxisOperation.addFaultAction(className, faultAction.value());
+                    }
                 }
             }
         }



Mime
View raw message