geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r561894 - in /geronimo/server/trunk/modules: geronimo-axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoQueryHandler.java
Date Wed, 01 Aug 2007 18:11:30 GMT
Author: gawor
Date: Wed Aug  1 11:11:27 2007
New Revision: 561894

URL: http://svn.apache.org/viewvc?view=rev&rev=561894
Log:
fixes for GERONIMO-3196

Modified:
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoQueryHandler.java

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java?view=diff&rev=561894&r1=561893&r2=561894
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java
Wed Aug  1 11:11:27 2007
@@ -24,6 +24,7 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -96,9 +97,9 @@
             reader.setFeature("javax.wsdl.importDocuments", true);
             reader.setFeature("javax.wsdl.verbose", false);
             Definition def = reader.readWSDL(wsdlUri);
-            mp.put("", def);
             updateDefinition(def, mp, smp, base);
             updateServices(this.service.getName(), this.service.getEndpointName(), def, base);
+            mp.put("", def);
         }
 
         Element rootElement;
@@ -241,6 +242,8 @@
         boolean updated = false;
         Map services = def.getServices();
         if (services != null) {
+            ArrayList<QName> servicesToRemove = new ArrayList<QName>();
+            
             Iterator serviceIterator = services.entrySet().iterator();
             while (serviceIterator.hasNext()) {
                 Map.Entry serviceEntry = (Map.Entry) serviceIterator.next();
@@ -250,9 +253,13 @@
                     updatePorts(portName, service, baseUri);
                     updated = true;
                 } else {
-                    def.removeService(currServiceName);
+                    servicesToRemove.add(currServiceName);
                 }
             }
+            
+            for (QName serviceToRemove : servicesToRemove) {
+                def.removeService(serviceToRemove);                
+            }
         }
         if (!updated) {
             LOG.warn("WSDL '" + serviceName + "' service not found.");
@@ -263,6 +270,8 @@
         boolean updated = false;
         Map ports = service.getPorts();
         if (ports != null) {
+            ArrayList<String> portsToRemove = new ArrayList<String>();
+            
             Iterator portIterator = ports.entrySet().iterator();
             while (portIterator.hasNext()) {
                 Map.Entry portEntry = (Map.Entry) portIterator.next();
@@ -272,8 +281,12 @@
                     updatePortLocation(port, baseUri);
                     updated = true;
                 } else {
-                    service.removePort(currPortName);
+                    portsToRemove.add(currPortName);
                 }
+            }
+            
+            for (String portToRemove : portsToRemove) {
+                service.removePort(portToRemove);               
             }
         }
         if (!updated) {

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoQueryHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoQueryHandler.java?view=diff&rev=561894&r1=561893&r2=561894
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoQueryHandler.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoQueryHandler.java
Wed Aug  1 11:11:27 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.geronimo.cxf;
 
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -64,6 +65,8 @@
         boolean updated = false;
         Map services = def.getServices();
         if (services != null) {
+            ArrayList<QName> servicesToRemove = new ArrayList<QName>();
+            
             Iterator serviceIterator = services.entrySet().iterator();
             while (serviceIterator.hasNext()) {
                 Map.Entry serviceEntry = (Map.Entry) serviceIterator.next();
@@ -73,9 +76,13 @@
                     updatePorts(portName, service, baseUri);
                     updated = true;
                 } else {
-                    def.removeService(currServiceName);
+                    servicesToRemove.add(currServiceName);
                 }
             }
+            
+            for (QName serviceToRemove : servicesToRemove) {
+                def.removeService(serviceToRemove);                
+            }
         }
         if (!updated) {
             LOG.warn("WSDL '" + serviceName.getLocalPart() + "' service not found.");
@@ -88,6 +95,8 @@
         boolean updated = false;
         Map ports = service.getPorts();
         if (ports != null) {
+            ArrayList<String> portsToRemove = new ArrayList<String>();
+            
             Iterator portIterator = ports.entrySet().iterator();
             while (portIterator.hasNext()) {
                 Map.Entry portEntry = (Map.Entry) portIterator.next();
@@ -97,8 +106,12 @@
                     updatePortLocation(port, baseUri);
                     updated = true;
                 } else {
-                    service.removePort(currPortName);
+                    portsToRemove.add(currPortName);
                 }
+            }
+            
+            for (String portToRemove : portsToRemove) {
+                service.removePort(portToRemove);               
             }
         }
         if (!updated) {



Mime
View raw message