axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r406529 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
Date Mon, 15 May 2006 04:15:30 GMT
Author: dims
Date: Sun May 14 21:15:28 2006
New Revision: 406529

URL: http://svn.apache.org/viewcvs?rev=406529&view=rev
Log:
Fix for AXIS2-728 - Generated WSDL contains duplicate fault messages if multiple operations
define some fault

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java?rev=406529&r1=406528&r2=406529&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
Sun May 14 21:15:28 2006
@@ -4,6 +4,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.StringWriter;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 
@@ -173,6 +174,8 @@
 
     private void generateMessages(OMFactory fac,
                                   OMElement defintions) {
+        HashSet faultMessageNames = new HashSet();
+        
         Iterator operations = axisService.getOperations();
         while (operations.hasNext()) {
             AxisOperation axisOperation = (AxisOperation) operations.next();
@@ -212,8 +215,11 @@
                 for (int i = 0; i < faultyMessages.size(); i++) {
                     AxisMessage axisMessage = (AxisMessage) faultyMessages
                             .get(i);
-                    writeMessage(axisMessage, fac, defintions);
-                    generateHeaderMessages(axisMessage, fac, defintions);
+                    String name = axisMessage.getName();
+                    if (faultMessageNames.add(name)) {
+                        writeMessage(axisMessage, fac, defintions);
+                        generateHeaderMessages(axisMessage, fac, defintions);
+                    }
                 }
             }
         }



Mime
View raw message