axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r387898 - in /webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd: WSDDDeployment.java WSDDUndeployment.java
Date Wed, 22 Mar 2006 17:30:14 GMT
Author: gawor
Date: Wed Mar 22 09:30:09 2006
New Revision: 387898

URL: http://svn.apache.org/viewcvs?rev=387898&view=rev
Log:
undeploy typemappings (from file at least)

Modified:
    webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java
    webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java

Modified: webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java?rev=387898&r1=387897&r2=387898&view=diff
==============================================================================
--- webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java (original)
+++ webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java Wed
Mar 22 09:30:09 2006
@@ -155,6 +155,20 @@
             deployMapping(typeMapping);
     }
 
+    public void undeployTypeMapping(WSDDTypeMapping typeMapping)
+    {
+        QName qname = typeMapping.getQName();
+        String encoding = typeMapping.getEncodingStyle();
+        
+        // We have to include the encoding in the key
+        // because otherwise we would overwrite exiting mappings
+        typeMappings.remove(qname + encoding);
+
+        if (tmrDeployed) {
+            undeployMapping(typeMapping);
+        }
+    }
+
     /**
      * Default constructor
      */
@@ -311,6 +325,11 @@
         } catch (Exception e) {
             throw new WSDDException(e);
         }
+    }
+
+    private void undeployMapping(WSDDTypeMapping mapping)
+    {
+        // not implemented
     }
 
     public void writeToContext(SerializationContext context)

Modified: webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java?rev=387898&r1=387897&r2=387898&view=diff
==============================================================================
--- webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java
(original)
+++ webservices/axis/trunk/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java
Wed Mar 22 09:30:09 2006
@@ -118,21 +118,17 @@
             addService(getQName(elements[i]));
         }
 
-        /*
-        // How to deal with undeploying mappings?
-
         elements = getChildElements(e, ELEM_WSDD_TYPEMAPPING);
         for (i = 0; i < elements.length; i++) {
             WSDDTypeMapping mapping = new WSDDTypeMapping(elements[i]);
-            addTypeMapping(mapping);
+            deployTypeMapping(mapping);
         }
 
         elements = getChildElements(e, ELEM_WSDD_BEANMAPPING);
         for (i = 0; i < elements.length; i++) {
             WSDDBeanMapping mapping = new WSDDBeanMapping(elements[i]);
-            addTypeMapping(mapping);
+            deployTypeMapping(mapping);
         }
-        */
     }
 
     protected QName getElementName()
@@ -174,6 +170,11 @@
                 throw new ConfigurationException(exp);
             }
             registry.undeployService(qname);
+        }
+
+        for (int n = 0; n < typeMappings.size(); n++) {
+            WSDDTypeMapping mapping  = (WSDDTypeMapping)typeMappings.get(n);
+            registry.undeployTypeMapping(mapping);
         }
     }
 



Mime
View raw message