You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/03/26 04:05:04 UTC

svn commit: r641128 [1/2] - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/ org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/ org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronim...

Author: mcconne
Date: Tue Mar 25 20:05:02 2008
New Revision: 641128

URL: http://svn.apache.org/viewvc?rev=641128&view=rev
Log:
GERONIMODEVTOOLS-313 Initial set of changes to use the JAXB-generated classes (for svn)

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/CommonGeneralSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbLocalRefSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbRefSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanRefSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ImportSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/OpenEjbJarGeneralSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceEnvRefSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceRefSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityRootSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecuritySection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServiceRefSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/WebContainerSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/WebGeneralSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleWizard.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml Tue Mar 25 20:05:02 2008
@@ -99,5 +99,9 @@
             <artifactId>org.apache.geronimo.deployment.v21.jaxbmodel</artifactId>
             <version>${version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+        </dependency>
     </dependencies>
 </project>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java Tue Mar 25 20:05:02 2008
@@ -16,17 +16,20 @@
  */
 package org.apache.geronimo.st.v21.core;
 
+import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
 
+import org.apache.geronimo.jee.application.Application;
+import org.apache.geronimo.jee.connector.Connector;
+import org.apache.geronimo.jee.deployment.Artifact;
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.jee.openejb.OpenejbJar;
+import org.apache.geronimo.jee.web.WebApp;
 import org.apache.geronimo.st.core.GeronimoUtils;
 import org.apache.geronimo.st.core.internal.Trace;
-import org.apache.geronimo.st.core.jaxb.JAXBUtils;
-import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
-import org.apache.geronimo.xml.ns.j2ee.application_2.ApplicationType;
-import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
-import org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.OpenejbJarType;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
+//port org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
 import org.eclipse.wst.server.core.IModule;
@@ -111,24 +114,24 @@
     public static String getConfigId(IModule module) {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConfigId", module);
 
-        EnvironmentType environment = null;
+        Environment environment = null;
         if (isWebModule(module)) {
-            WebAppType plan = getWebDeploymentPlan(module).getValue();
+            WebApp plan = getWebDeploymentPlan(module).getValue();
             if (plan != null)
                 environment = plan.getEnvironment();
         }
         else if (isEjbJarModule(module)) {
-            OpenejbJarType plan = getOpenEjbDeploymentPlan(module).getValue();
+            OpenejbJar plan = getOpenEjbDeploymentPlan(module).getValue();
 //            if (plan != null)
 //                environment = plan.getEnvironment();
         }
         else if (isEarModule(module)) {
-            ApplicationType plan = getApplicationDeploymentPlan(module).getValue();
+            Application plan = getApplicationDeploymentPlan(module).getValue();
             if (plan != null)
                 environment = plan.getEnvironment();
         }
         else if (isRARModule(module)) {
-            ConnectorType plan = getConnectorDeploymentPlan(module).getValue();
+            Connector plan = getConnectorDeploymentPlan(module).getValue();
             if (plan != null)
                 environment = plan.getEnvironment();
         }
@@ -143,7 +146,7 @@
         return getId(module);
     }
 
-    public static String getQualifiedConfigID(ArtifactType artifact) {
+    public static String getQualifiedConfigID(Artifact artifact) {
         return getQualifiedConfigID(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType());
     }
 
@@ -154,7 +157,7 @@
     public static String getContextRoot(IModule module) {
         String contextRoot = null;
 
-        WebAppType deploymentPlan = getWebDeploymentPlan(module).getValue();
+        WebApp deploymentPlan = getWebDeploymentPlan(module).getValue();
         if (deploymentPlan != null)
             contextRoot = deploymentPlan.getContextRoot();
 
@@ -164,19 +167,19 @@
         return contextRoot;
     }
 
-    public static JAXBElement<WebAppType> getWebDeploymentPlan(IModule module) {
+    public static JAXBElement<WebApp> getWebDeploymentPlan(IModule module) {
         return getWebDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement<ApplicationType> getApplicationDeploymentPlan(IModule module) {
+    public static JAXBElement<Application> getApplicationDeploymentPlan(IModule module) {
         return getApplicationDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement<OpenejbJarType> getOpenEjbDeploymentPlan(IModule module) {
+    public static JAXBElement<OpenejbJar> getOpenEjbDeploymentPlan(IModule module) {
         return getOpenEjbDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement<ConnectorType> getConnectorDeploymentPlan(IModule module) {
+    public static JAXBElement<Connector> getConnectorDeploymentPlan(IModule module) {
         return getConnectorDeploymentPlan(getVirtualComponent(module));
     }
 
@@ -200,13 +203,21 @@
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getApplicationDeploymentPlan", file);
 
         if (file.getName().equals(APP_PLAN_NAME) && file.exists()) {
-//            ResourceSet resourceSet = new ResourceSetImpl();
-//            register(resourceSet, new ApplicationResourceFactoryImpl(), ApplicationPackage.eINSTANCE, ApplicationPackage.eNS_URI);
-//            Resource resource = load(file, resourceSet);
-//            if (resource != null) {
-//                return((org.apache.geronimo.xml.ns.j2ee.application.DocumentRoot) resource.getContents().get(0)).getApplication();
-//            }
-        	return JAXBUtils.unmarshalDeploymentPlan(file);
+            try {
+                JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" +
+                                                                   "org.apache.geronimo.jee.application:" +
+                                                                   "org.apache.geronimo.jee.deployment:" +
+                                                                   "org.apache.geronimo.jee.naming:" +
+                                                                   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+                Unmarshaller ums = jaxbContext.createUnmarshaller();
+                JAXBElement plan = (JAXBElement)ums.unmarshal( file.getContents() );
+                return plan;
+            } catch ( JAXBException e ) {
+                e.printStackTrace();
+            } catch ( Exception e ) {
+                e.printStackTrace();
+            }
+            return null;
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getApplicationDeploymentPlan", null);
@@ -217,13 +228,20 @@
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getWebDeploymentPlan", file);
 
         if (file.getName().equals(WEB_PLAN_NAME) && file.exists()) {
-//            ResourceSet resourceSet = new ResourceSetImpl();
-//            register(resourceSet, new WebResourceFactoryImpl(), WebPackage.eINSTANCE, WebPackage.eNS_URI);
-//            Resource resource = load(file, resourceSet);
-//            if (resource != null) {
-//                return((DocumentRoot) resource.getContents().get(0)).getWebApp();
-//            }
-            return JAXBUtils.unmarshalDeploymentPlan(file);
+            try {
+                JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" +
+                                                                   "org.apache.geronimo.jee.naming:" +
+                                                                   "org.apache.geronimo.jee.application:" +
+                                                                   "org.apache.geronimo.jee.deployment", Activator.class.getClassLoader() );
+                Unmarshaller ums = jaxbContext.createUnmarshaller();
+                JAXBElement plan = (JAXBElement)ums.unmarshal( file.getContents() );
+                return plan;
+            } catch ( JAXBException e ) {
+                e.printStackTrace();
+            } catch ( Exception e ) {
+                e.printStackTrace();
+            }
+            return null;
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getWebDeploymentPlan", null);
@@ -234,13 +252,22 @@
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getOpenEjbDeploymentPlan", file);
 
         if (file.getName().equals(OPENEJB_PLAN_NAME) && file.exists()) {
-//            ResourceSet resourceSet = new ResourceSetImpl();
-//            register(resourceSet, new JarResourceFactoryImpl(), JarPackage.eINSTANCE, JarPackage.eNS_URI);
-//            Resource resource = load(file, resourceSet);
-//            if (resource != null) {
-//                return((org.openejb.xml.ns.openejb.jar.DocumentRoot) resource.getContents().get(0)).getOpenejbJar();
-//            }
-        	return JAXBUtils.unmarshalDeploymentPlan(file);
+            try {
+                JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.openejb:" +
+                                                                   "org.apache.geronimo.jee.web:" +									
+                                                                   "org.apache.geronimo.jee.application:" +
+                                                                   "org.apache.geronimo.jee.deployment:" +
+                                                                   "org.apache.geronimo.jee.naming:" +
+                                                                   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+                Unmarshaller ums = jaxbContext.createUnmarshaller();
+                JAXBElement plan = (JAXBElement)ums.unmarshal( file.getContents() );
+                return plan;
+            } catch ( JAXBException e ) {
+                e.printStackTrace();
+            } catch ( Exception e ) {
+                e.printStackTrace();
+            }
+            return null;
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getOpenEjbDeploymentPlan", null);
@@ -251,13 +278,22 @@
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConnectorDeploymentPlan", file);
 
         if (file.getName().equals(CONNECTOR_PLAN_NAME) && file.exists()) {
-//            ResourceSet resourceSet = new ResourceSetImpl();
-//            register(resourceSet, new ConnectorResourceFactoryImpl(), ConnectorPackage.eINSTANCE, ConnectorPackage.eNS_URI);
-//            Resource resource = load(file, resourceSet);
-//            if (resource != null) {
-//                return((org.apache.geronimo.xml.ns.j2ee.connector.DocumentRoot) resource.getContents().get(0)).getConnector();
-//            }
-        	return JAXBUtils.unmarshalDeploymentPlan(file);
+            try {
+                JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.connector:" +
+                                                                   "org.apache.geronimo.jee.web:" +			
+                                                                   "org.apache.geronimo.jee.application:" +
+                                                                   "org.apache.geronimo.jee.deployment:" +
+                                                                   "org.apache.geronimo.jee.naming:" +
+                                                                   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+                Unmarshaller ums = jaxbContext.createUnmarshaller();
+                JAXBElement plan = (JAXBElement)ums.unmarshal( file.getContents() );
+                return plan;
+            } catch ( JAXBException e ) {
+                e.printStackTrace();
+            } catch ( Exception e ) {
+                e.printStackTrace();
+            }
+            return null;
         }
 
         Trace.tracePoint("EXIT", "GeronimoV21Utils.getConnectorDeploymentPlan", null);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java Tue Mar 25 20:05:02 2008
@@ -18,55 +18,81 @@
 
 import java.util.List;
 
+import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
 
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
-import org.apache.geronimo.xml.ns.security_2.SecurityType;
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.jee.security.Security;
+import org.apache.geronimo.jee.web.WebApp;
+import org.apache.geronimo.st.v21.core.Activator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
 
 /**
  * @version $Rev$ $Date$
  */
 public class JAXBModelUtils {
 	
-	public static SecurityType getSecurityType(JAXBElement element) {
+	public static Security getSecurity(JAXBElement element) {
 		Object plan = element.getValue();
-		if ( WebAppType.class.isInstance( plan ) ) {
-			return ((WebAppType)plan).getSecurity() == null ? null : (SecurityType)((WebAppType)plan).getSecurity().getValue();
+		if ( WebApp.class.isInstance( plan ) ) {
+			return ((WebApp)plan).getSecurity() == null ? null : (Security)((WebApp)plan).getSecurity().getValue();
 		}
 		return null;
 	}
 	
-	public static void setSecurityType(JAXBElement element, SecurityType security) {
+	public static void setSecurity(JAXBElement element, Security security) {
 		Object plan = element.getValue();
-		if ( WebAppType.class.isInstance( plan ) ) {
-			((WebAppType)plan).setSecurity((new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createSecurity( security ) );
+		if ( WebApp.class.isInstance( plan ) ) {
+			((WebApp)plan).setSecurity((new org.apache.geronimo.jee.security.ObjectFactory()).createSecurity( security ) );
 		}
 	}
 	
-	public static EnvironmentType getEnvironmentType(JAXBElement element) {
+	public static Environment getEnvironment(JAXBElement element) {
 		Object plan = element.getValue();
-		if ( WebAppType.class.isInstance( plan ) ) {
-			System.out.println( "Element : " + ((WebAppType)plan).getEnvironment() );
-			return ((WebAppType)plan).getEnvironment() == null ? null : ((WebAppType)plan).getEnvironment();
+		if ( WebApp.class.isInstance( plan ) ) {
+			System.out.println( "Element : " + ((WebApp)plan).getEnvironment() );
+			return ((WebApp)plan).getEnvironment() == null ? null : ((WebApp)plan).getEnvironment();
 		}
 		return null;
 	}
 	
 	public static List getServiceOrPersistence(JAXBElement element) {
 		Object plan = element.getValue();
-		if ( WebAppType.class.isInstance( plan ) ) {
-			return ((WebAppType)plan).getServiceOrPersistence() == null ? null : ((WebAppType)plan).getServiceOrPersistence();
+		if ( WebApp.class.isInstance( plan ) ) {
+			return ((WebApp)plan).getServiceOrPersistence() == null ? null : ((WebApp)plan).getServiceOrPersistence();
 		}
 		return null;
 	}
 	
 	public static List getGbeans(JAXBElement element) {
 		Object plan = element.getValue();
-		if ( WebAppType.class.isInstance( plan ) ) {
-//			return ((WebAppType)plan).getGbeans() == null ? null : ((WebAppType)plan).getGbeans();
+		if ( WebApp.class.isInstance( plan ) ) {
+//			return ((WebApp)plan).getGbeans() == null ? null : ((WebApp)plan).getGbeans();
 		}
 		return null;
 	}
-
+	
+//
+//  public static JAXBElement unmarshalDeploymentPlan( IFile file ) {
+//      try {
+//          JAXBContext jb = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" +
+//                                                    "org.apache.geronimo.jee.application:" +
+//                                                    "org.apache.geronimo.jee.deployment:" +
+//                                                    "org.apache.geronimo.jee.naming:" +
+//                                                    "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+//          Unmarshaller ums = jb.createUnmarshaller();
+//          JAXBElement plan = (JAXBElement)ums.unmarshal( file.getContents() );
+//          return plan;
+//      } catch ( JAXBException e ) {
+//          e.printStackTrace();
+//      } catch ( CoreException e ) {
+//          e.printStackTrace();
+//      } catch ( Exception e ) {
+//          e.printStackTrace();
+//      }
+//      return null;
+//  }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBObjectFactoryImpl.java Tue Mar 25 20:05:02 2008
@@ -17,16 +17,16 @@
 package org.apache.geronimo.st.v21.core.jaxb;
 
 import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
-import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
-import org.apache.geronimo.xml.ns.deployment_1.GbeanType;
-import org.apache.geronimo.xml.ns.naming_1.ObjectFactory;
-import org.apache.geronimo.xml.ns.naming_1.ResourceRefType;
-import org.apache.geronimo.xml.ns.security_2.DescriptionType;
-import org.apache.geronimo.xml.ns.security_2.RoleMappingsType;
-import org.apache.geronimo.xml.ns.security_2.RoleType;
-import org.apache.geronimo.xml.ns.security_2.SecurityType;
+import org.apache.geronimo.jee.deployment.Artifact;
+import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.deployment.Gbean;
+import org.apache.geronimo.jee.naming.ObjectFactory;
+import org.apache.geronimo.jee.naming.ResourceRef;
+import org.apache.geronimo.jee.security.Description;
+import org.apache.geronimo.jee.security.RoleMappings;
+import org.apache.geronimo.jee.security.Role;
+import org.apache.geronimo.jee.security.Security;
 
 /**
  * @version $Rev$ $Date$
@@ -45,24 +45,24 @@
 	
 	public Object create(Class type) {
 		System.out.println( type );
-		if ( type.equals( ResourceRefType.class ) ) {
-			return (new ObjectFactory()).createResourceRefType();
-		} else if ( type.equals( SecurityType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createSecurityType();
-		} else if ( type.equals( RoleMappingsType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createRoleMappingsType();
-		} else if ( type.equals( DescriptionType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createDescriptionType();
-		} else if ( type.equals( RoleType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.security_2.ObjectFactory()).createRoleType();
-		} else if ( type.equals( GbeanType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createGbeanType();
-		} else if ( type.equals( ArtifactType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createArtifactType();
-		} else if ( type.equals( DependenciesType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createDependenciesType();
-		} else if ( type.equals( DependencyType.class ) ) {
-			return (new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory()).createDependencyType();
+		if ( type.equals( ResourceRef.class ) ) {
+			return (new ObjectFactory()).createResourceRef();
+		} else if ( type.equals( Security.class ) ) {
+			return (new org.apache.geronimo.jee.security.ObjectFactory()).createSecurity();
+		} else if ( type.equals( RoleMappings.class ) ) {
+			return (new org.apache.geronimo.jee.security.ObjectFactory()).createRoleMappings();
+		} else if ( type.equals( Description.class ) ) {
+			return (new org.apache.geronimo.jee.security.ObjectFactory()).createDescription();
+		} else if ( type.equals( Role.class ) ) {
+			return (new org.apache.geronimo.jee.security.ObjectFactory()).createRole();
+		} else if ( type.equals( Gbean.class ) ) {
+			return (new org.apache.geronimo.jee.deployment.ObjectFactory()).createGbean();
+		} else if ( type.equals( Artifact.class ) ) {
+			return (new org.apache.geronimo.jee.deployment.ObjectFactory()).createArtifact();
+		} else if ( type.equals( Dependencies.class ) ) {
+			return (new org.apache.geronimo.jee.deployment.ObjectFactory()).createDependencies();
+		} else if ( type.equals( Dependency.class ) ) {
+			return (new org.apache.geronimo.jee.deployment.ObjectFactory()).createDependency();
 		}
 		
 		return null;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/V21DeploymentPlanCreationOperation.java Tue Mar 25 20:05:02 2008
@@ -16,29 +16,37 @@
  */
 package org.apache.geronimo.st.v21.core.operations;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.net.MalformedURLException;
+
+import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
 
-import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.jee.application.Application;
+import org.apache.geronimo.jee.connector.Connector;
+import org.apache.geronimo.jee.deployment.Artifact;
+import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.jee.openejb.GeronimoEjbJar;
+import org.apache.geronimo.jee.web.WebApp;
 import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
+import org.apache.geronimo.st.v21.core.Activator;
 import org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig;
 import org.apache.geronimo.st.v21.core.internal.Trace;
-import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
-import org.apache.geronimo.xml.ns.j2ee.application_2.ApplicationType;
-import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
-import org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.GeronimoEjbJarType;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 
 
 /**
  * <strong>V21DeploymentPlanCreationOperation</strong>
- * is invoked when projects are created that are to be deployed on the 2.1
+ * is invoked when projects are created the are to be deployment on the 2.1
  * version of the Geronimo server. One of these Geronimo-specific deployment
- * plans is created as a result and is inserted into the user's Eclipse workspace in
+ * plans is created as a result is inserted into the user's Eclipse workspace in
  * the appropriate folder:
  * 
  * <ol>
@@ -51,9 +59,16 @@
  * Remaining TODO Task(s):
  * 
  * <ol>
+ *      <li>Use the Eclipse framework IResource interface to create the files
+ *      above -- otherwise the user will have to refresh their workspace for the
+ *      contents of the file to display, and an "Out of sync" message will be
+ *      displayed.
  *      <li>JUnit testcases
+ *      <li>JAXBElement warning messages
  *      <li>How to invoke Service Deployment Plan
  *      <li>How to invoke App Client Deployment Plan
+ *      <li>Consolidate marshalDeploymentPlan and unmarshalDeploymentPlan into
+ *      JAXBModelUtils for each specific Geronimo-specific deployment plan
  * </ol>
  * 
  * @version $Rev: 509704 $ $Date: 2007-02-20 13:42:24 -0500 (Tue, 20 Feb 2007) $
@@ -66,7 +81,7 @@
 		super(model, config);
   		Trace.tracePoint("Constructor Entry/Exit", "V21DeploymentPlanCreationOperation", model, config);
 	}
-
+	
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -75,12 +90,44 @@
 	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile dpFile) {
   		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile);
 		
-		org.apache.geronimo.xml.ns.j2ee.application_2.ObjectFactory applicationFactory = new org.apache.geronimo.xml.ns.j2ee.application_2.ObjectFactory();
-		ApplicationType application = applicationFactory.createApplicationType();
+		org.apache.geronimo.jee.application.ObjectFactory applicationFactory = new org.apache.geronimo.jee.application.ObjectFactory();
+		Application application = applicationFactory.createApplication();
+		
 		application.setApplicationName(getProject().getName());
 		application.setEnvironment(getConfigEnvironment());
-		JAXBElement jaxbElement = applicationFactory.createApplication(application);
-		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+		
+		JAXBElement jaxbElement = null;
+		try {
+		
+            // 
+            // Create JAXBContext with a context path containing the packages of all the
+            // classes for the geronimo-application.xml file
+            // 
+			JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" +
+															   "org.apache.geronimo.jee.application:" +
+															   "org.apache.geronimo.jee.deployment:" +
+															   "org.apache.geronimo.jee.naming:" +
+															   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+		
+			jaxbElement = applicationFactory.createApplication(application);
+			Marshaller marshaller = jaxbContext.createMarshaller();
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+            marshaller.marshal(jaxbElement, new FileOutputStream( new File( dpFile.getLocationURI().toURL().getFile() )));
+		
+		}
+		catch( JAXBException jaxbException ) {
+			Trace.tracePoint("JAXBException", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile.getFullPath() );
+			jaxbException.printStackTrace();
+		}
+		catch( FileNotFoundException fileNotFoundException ) {
+			Trace.tracePoint("FileNotFoundException", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile.getFullPath() );
+			fileNotFoundException.printStackTrace();
+		}
+		catch( MalformedURLException malformedURLException ) {
+			Trace.tracePoint("MalformedURLException", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile.getFullPath() );
+			malformedURLException.printStackTrace();
+		}
 		
 		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", applicationFactory.createApplication(application));
 		return applicationFactory.createApplication(application);
@@ -95,14 +142,43 @@
 	public JAXBElement createGeronimoWebDeploymentPlan(IFile dpFile) {
   		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", dpFile, dpFile.getFullPath() );
 
-		org.apache.geronimo.xml.ns.j2ee.web_2_0.ObjectFactory webFactory = new org.apache.geronimo.xml.ns.j2ee.web_2_0.ObjectFactory();
-		WebAppType web = webFactory.createWebAppType();
+		org.apache.geronimo.jee.web.ObjectFactory webFactory = new org.apache.geronimo.jee.web.ObjectFactory();
+		WebApp web = webFactory.createWebApp();
 		
 		web.setContextRoot( "/" + getProject().getName() );
 		web.setEnvironment(	getConfigEnvironment() );
 		
-		JAXBElement jaxbElement = webFactory.createWebApp(web);
-		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+		JAXBElement jaxbElement = null;
+		try {
+		
+            // 
+            // Create JAXBContext with a context path containing the packages of all the
+            // classes for the geronimo-web.xml file
+            // 
+          	JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" +
+          													   "org.apache.geronimo.jee.naming:" +
+          													   "org.apache.geronimo.jee.application:" +
+          													   "org.apache.geronimo.jee.deployment", Activator.class.getClassLoader() );
+		
+			jaxbElement = webFactory.createWebApp(web);
+			Marshaller marshaller = jaxbContext.createMarshaller();
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+            marshaller.marshal(jaxbElement, new FileOutputStream( new File( dpFile.getLocationURI().toURL().getFile() )));
+		
+		}
+		catch( JAXBException jaxbException ) {
+			Trace.tracePoint("JAXBException", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", dpFile.getFullPath() );
+			jaxbException.printStackTrace();
+		}
+		catch( FileNotFoundException fileNotFoundException ) {
+			Trace.tracePoint("FileNotFoundException", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", dpFile.getFullPath() );
+			fileNotFoundException.printStackTrace();
+		}
+		catch( MalformedURLException malformedURLException ) {
+			Trace.tracePoint("MalformedURLException", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", dpFile.getFullPath() );
+			malformedURLException.printStackTrace();
+		}
 	
 		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", jaxbElement);
 		return jaxbElement;
@@ -117,16 +193,48 @@
 	public JAXBElement createOpenEjbDeploymentPlan(IFile dpFile) {
   		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile);
 
-		org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.ObjectFactory ejbFactory = new org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.ObjectFactory();
-		GeronimoEjbJarType ejbJar = ejbFactory.createGeronimoEjbJarType();
+		org.apache.geronimo.jee.openejb.ObjectFactory ejbFactory = new org.apache.geronimo.jee.openejb.ObjectFactory();
+		GeronimoEjbJar ejbJar = ejbFactory.createGeronimoEjbJar();
 
 		ejbJar.setEnvironment(getConfigEnvironment());
 		
-		JAXBElement jaxbElement = ejbFactory.createEjbJar(ejbJar);
-		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+		JAXBElement jaxbElement = null;
+		try {
+		
+            // 
+            // Create JAXBContext with a context path containing the packages of all the
+            // classes for the openejb-jar.xml
+            // 
+			JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.openejb:" +
+                                                               "org.apache.geronimo.jee.web:" +									
+                                                               "org.apache.geronimo.jee.application:" +
+															   "org.apache.geronimo.jee.deployment:" +
+															   "org.apache.geronimo.jee.naming:" +
+															   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+		
+			jaxbElement = ejbFactory.createEjbJar(ejbJar);
+			Marshaller marshaller = jaxbContext.createMarshaller();
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+            marshaller.marshal(jaxbElement, new FileOutputStream( new File( dpFile.getLocationURI().toURL().getFile() )));
+		
+		}
+		catch( JAXBException jaxbException ) {
+			Trace.tracePoint("JAXBException", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile.getFullPath() );
+			jaxbException.printStackTrace();
+		}
+		catch( FileNotFoundException fileNotFoundException ) {
+			Trace.tracePoint("FileNotFoundException", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile.getFullPath() );
+			fileNotFoundException.printStackTrace();
+		}
+		catch( MalformedURLException malformedURLException ) {
+			Trace.tracePoint("MalformedURLException", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile.getFullPath() );
+			malformedURLException.printStackTrace();
+		}
 		
 		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", jaxbElement);
 		return jaxbElement;
+		
 	}
 
 	
@@ -138,13 +246,44 @@
 	public JAXBElement createConnectorDeploymentPlan(IFile dpFile) {
   		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile);
 		
-		org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory connectorFactory = new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory();
-		ConnectorType connector = connectorFactory.createConnectorType();
+		org.apache.geronimo.jee.connector.ObjectFactory connectorFactory = new org.apache.geronimo.jee.connector.ObjectFactory();
+		Connector connector = connectorFactory.createConnector();
 		
 		connector.setEnvironment(getConfigEnvironment());
 		
-		JAXBElement jaxbElement = connectorFactory.createConnector(connector);
-		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+		JAXBElement jaxbElement = null;
+		try {
+		
+            // 
+            // Create JAXBContext with a context path containing the packages of all the
+            // classes for the geronimo-ra.xml
+            // 
+			JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.connector:" +
+                                                               "org.apache.geronimo.jee.web:" +			
+              												   "org.apache.geronimo.jee.application:" +
+															   "org.apache.geronimo.jee.deployment:" +
+															   "org.apache.geronimo.jee.naming:" +
+															   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+		
+			jaxbElement = connectorFactory.createConnector(connector);
+			Marshaller marshaller = jaxbContext.createMarshaller();
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+            marshaller.marshal(jaxbElement, new FileOutputStream( new File( dpFile.getLocationURI().toURL().getFile() )));
+		
+		}
+		catch( JAXBException jaxbException ) {
+			Trace.tracePoint("JAXBException", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile.getFullPath() );
+			jaxbException.printStackTrace();
+		}
+		catch( FileNotFoundException fileNotFoundException ) {
+			Trace.tracePoint("FileNotFoundException", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile.getFullPath() );
+			fileNotFoundException.printStackTrace();
+		}
+		catch( MalformedURLException malformedURLException ) {
+			Trace.tracePoint("MalformedURLException", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile.getFullPath() );
+			malformedURLException.printStackTrace();
+		}
 		
 		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", jaxbElement);
 		return jaxbElement;
@@ -155,13 +294,39 @@
 	public JAXBElement createServiceDeploymentPlan(IFile dpFile) {
   		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile);
 
-		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
-		org.apache.geronimo.xml.ns.deployment_1.ModuleType module = serviceFactory.createModuleType();
+		org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
+		org.apache.geronimo.jee.deployment.Module module = serviceFactory.createModule();
 		
 		module.setEnvironment(getConfigEnvironment());
 		
-		JAXBElement jaxbElement = serviceFactory.createModule(module);
-		JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+		JAXBElement jaxbElement = null;
+		try {
+		
+			JAXBContext jaxbContext = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" + 
+															   "org.apache.geronimo.jee.application:" +
+															   "org.apache.geronimo.jee.deployment:" +
+															   "org.apache.geronimo.jee.naming:" +
+															   "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+		
+			jaxbElement = serviceFactory.createModule(module);
+			Marshaller marshaller = jaxbContext.createMarshaller();
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+            marshaller.marshal(jaxbElement, new FileOutputStream( new File( dpFile.getLocationURI().toURL().getFile() )));
+		
+		}
+		catch( JAXBException jaxbException ) {
+			Trace.tracePoint("JAXBException", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile.getFullPath() );
+			jaxbException.printStackTrace();
+		}
+		catch( FileNotFoundException fileNotFoundException ) {
+			Trace.tracePoint("FileNotFoundException", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile.getFullPath() );
+			fileNotFoundException.printStackTrace();
+		}
+		catch( MalformedURLException malformedURLException ) {
+			Trace.tracePoint("MalformedURLException", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile.getFullPath() );
+			malformedURLException.printStackTrace();
+		}
 		
 		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createServiceDeploymentPlan", jaxbElement);
 		return jaxbElement;
@@ -169,7 +334,7 @@
 	}
 
 	
-	public EnvironmentType getConfigEnvironment() {
+	public Environment getConfigEnvironment() {
         Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.getConfigEnvironment");
 		
 		if (config != null && config instanceof DeploymentPlanInstallConfig) {
@@ -185,15 +350,15 @@
 		String type = cfg != null && hasValue(cfg.getType()) ? cfg.getType()
 				: "car";
 
-		ArtifactType artifact = createArtifactType(groupId, artifactId, version, type);
-		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		Artifact artifact = createArtifact(groupId, artifactId, version, type);
+		org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
    
-		EnvironmentType env = serviceFactory.createEnvironmentType();
+		Environment env = serviceFactory.createEnvironment();
 		env.setModuleId(artifact);
 
 		if (cfg != null && cfg.isSharedLib()) {
-			DependenciesType dt = serviceFactory.createDependenciesType();
-			DependencyType sharedLib = createDependencyType("org.apache.geronimo.configs", "sharedlib", null, "car");
+			Dependencies dt = serviceFactory.createDependencies();
+			Dependency sharedLib = createDependency("org.apache.geronimo.configs", "sharedlib", null, "car");
 			dt.getDependency().add(sharedLib);
 			env.setDependencies(dt);
 		}
@@ -203,11 +368,11 @@
 	}
 
 	
-	public static ArtifactType createArtifactType(String groupId, String artifactId, String version, String type) {
-  		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createArtifactType", groupId, artifactId, version, type);
+	public static Artifact createArtifact(String groupId, String artifactId, String version, String type) {
+  		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createArtifact", groupId, artifactId, version, type);
 
-		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
-		ArtifactType artifact = serviceFactory.createArtifactType();
+		org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
+		Artifact artifact = serviceFactory.createArtifact();
 
 		if (groupId != null)
 			artifact.setGroupId(groupId);
@@ -217,16 +382,16 @@
 			artifact.setVersion(version);
 		artifact.setType(type);
 		
-  		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createArtifactType", artifact);
+  		Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createArtifact", artifact);
 		return artifact;
 	}
 
 	
-	public static DependencyType createDependencyType(String groupId, String artifactId, String version, String type) {
-  		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createDependencyType", groupId, artifactId, version, type);
+	public static Dependency createDependency(String groupId, String artifactId, String version, String type) {
+  		Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createDependency", groupId, artifactId, version, type);
 
-		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
-		DependencyType dependency = serviceFactory.createDependencyType();
+		org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
+		Dependency dependency = serviceFactory.createDependency();
 		if (groupId != null)
 			dependency.setGroupId(groupId);
 		if (artifactId != null)
@@ -235,7 +400,7 @@
 			dependency.setVersion(version);
 		dependency.setType(type);
 		
-        Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createDependencyType", dependency);
+        Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createDependency", dependency);
 		return dependency;
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java Tue Mar 25 20:05:02 2008
@@ -16,13 +16,20 @@
  */
 package org.apache.geronimo.st.v21.ui.editors;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
 import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
 import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.pages.AppGeneralPage;
 import org.apache.geronimo.st.v21.ui.pages.ConnectorOverviewPage;
 import org.apache.geronimo.st.v21.ui.pages.DeploymentPage;
@@ -30,7 +37,7 @@
 import org.apache.geronimo.st.v21.ui.pages.NamingFormPage;
 import org.apache.geronimo.st.v21.ui.pages.SecurityPage;
 import org.apache.geronimo.st.v21.ui.pages.WebGeneralPage;
-import org.apache.geronimo.xml.ns.security_2.SecurityType;
+import org.apache.geronimo.jee.security.Security;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.forms.editor.FormEditor;
@@ -81,7 +88,7 @@
 		JAXBElement plan = geronimoEditor.getDeploymentPlan();
 		editor.addPage(new WebGeneralPage(editor, "generalpage", CommonMessages.editorTabGeneral));
 		editor.addPage(getWebNamingPage(editor));
-		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, (SecurityType)JAXBModelUtils.getSecurityType( plan )));
+		editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity, (Security)JAXBModelUtils.getSecurity( plan )));
 		editor.addPage(getWebDeploymentPage(editor));
 	}
 
@@ -94,22 +101,32 @@
 		return GeronimoV21Utils.getDeploymentPlan(file);
 	}
 	
+	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws IOException, JAXBException {
+		JAXBContext jb = JAXBContext.newInstance( "org.apache.geronimo.jee.web:" +
+										          "org.apache.geronimo.jee.application:" +
+										          "org.apache.geronimo.jee.deployment:" +
+										          "org.apache.geronimo.jee.naming:" +
+										          "org.apache.geronimo.jee.security", Activator.class.getClassLoader() );
+		jb.createMarshaller().marshal( deploymentPlan, new FileOutputStream( new File( file.getLocationURI().toURL().getFile()) ) );
+		//jb.createMarshaller().marshal( deploymentPlan, new File( file.getLocationURI().toURL().getFile()) );
+	}
+
 	protected FormPage getWebNamingPage(FormEditor editor) {
 		NamingFormPage formPage = createNamingFormPage(editor);
 //		WebPackage pkg = null; //WebFactory.eINSTANCE.getWebPackage();
-//		formPage.ejbLocalRef = pkg.getWebAppType_EjbLocalRef();
-//		formPage.ejbRef = pkg.getWebAppType_EjbRef();
-//		formPage.resEnvRef = pkg.getWebAppType_ResourceEnvRef();
-//		formPage.resRef = pkg.getWebAppType_ResourceRef();
-//		formPage.gbeanRef = pkg.getWebAppType_GbeanRef();
-//		formPage.serviceRef = pkg.getWebAppType_ServiceRef();
+//		formPage.ejbLocalRef = pkg.getWebApp_EjbLocalRef();
+//		formPage.ejbRef = pkg.getWebApp_EjbRef();
+//		formPage.resEnvRef = pkg.getWebApp_ResourceEnvRef();
+//		formPage.resRef = pkg.getWebApp_ResourceRef();
+//		formPage.gbeanRef = pkg.getWebApp_GbeanRef();
+//		formPage.serviceRef = pkg.getWebApp_ServiceRef();
 		return formPage;
 	}
 
 	protected FormPage getWebDeploymentPage(FormEditor editor) {
 		DeploymentPage formPage = createDeploymentFormPage(editor);
-//		formPage.environment = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Environment();
-//		formPage.gbeanERef = WebFactory.eINSTANCE.getWebPackage().getWebAppType_Gbean();
+//		formPage.environment = WebFactory.eINSTANCE.getWebPackage().getWebApp_Environment();
+//		formPage.gbeanERef = WebFactory.eINSTANCE.getWebPackage().getWebApp_Gbean();
 		return formPage;
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java Tue Mar 25 20:05:02 2008
@@ -18,12 +18,12 @@
 
 import javax.xml.bind.JAXBElement;
 
+import org.apache.geronimo.jee.deployment.Environment;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
 import org.apache.geronimo.st.v21.ui.sections.DependencySection;
 import org.apache.geronimo.st.v21.ui.sections.GBeanSection;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 
@@ -43,7 +43,7 @@
 	 * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
 	 */
 	protected void fillBody(IManagedForm managedForm) {
-		managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironmentType(getDeploymentPlan()), body, toolkit, getStyle()));
+		managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle()));
 		managedForm.addPart(new GBeanSection(getDeploymentPlan(), JAXBModelUtils.getGbeans(getDeploymentPlan()), body, toolkit, getStyle()));
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java Tue Mar 25 20:05:02 2008
@@ -18,6 +18,7 @@
 
 import java.util.List;
 
+import org.apache.geronimo.jee.web.WebApp;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
@@ -27,7 +28,6 @@
 import org.apache.geronimo.st.v21.ui.sections.ResourceEnvRefSection;
 import org.apache.geronimo.st.v21.ui.sections.ResourceRefSection;
 import org.apache.geronimo.st.v21.ui.sections.ServiceRefSection;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 
@@ -47,7 +47,7 @@
 
 	public NamingFormPage(FormEditor editor, String id, String title) {
 		super(editor, id, title);
-		WebAppType webapp = (WebAppType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
+		WebApp webapp = (WebApp)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
 		resRefs = webapp.getResourceRef();
 		serviceRefs = webapp.getServiceRef();
 	}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java Tue Mar 25 20:05:02 2008
@@ -20,16 +20,16 @@
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.ui.sections.SecurityRootSection;
 import org.apache.geronimo.st.v21.ui.sections.SecuritySection;
-import org.apache.geronimo.xml.ns.security_2.SecurityType;
+import org.apache.geronimo.jee.security.Security;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 
 public class SecurityPage extends AbstractGeronimoFormPage {
 
-	public SecurityType security;
+	public Security security;
 
-	public SecurityPage(FormEditor editor, String id, String title, SecurityType security) {
+	public SecurityPage(FormEditor editor, String id, String title, Security security) {
 		super(editor, id, title);
 		this.security = security;
 	}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/CommonGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/CommonGeneralSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/CommonGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/CommonGeneralSection.java Tue Mar 25 20:05:02 2008
@@ -21,14 +21,16 @@
 
 import javax.xml.bind.JAXBElement;
 
+import org.apache.geronimo.jee.web.WebApp;
+import org.apache.geronimo.jee.deployment.Artifact;
+import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.jee.deployment.ObjectFactory;
+import org.apache.geronimo.jee.connector.Connector;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
 import org.apache.geronimo.st.v21.ui.internal.Messages;
-import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -59,6 +61,8 @@
 	protected Button suppressDefaultEnv;
 	
 	protected Button sharedLibDepends;
+    
+	protected ObjectFactory deploymentObjectFactory = null;
 
 	public CommonGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
 		super(parent, toolkit, style, plan);
@@ -118,7 +122,7 @@
 
 		createLabel(composite, Messages.artifactType);
 
-		type = toolkit.createText(composite, getArtifactType(), SWT.BORDER);
+		type = toolkit.createText(composite, getArtifact(), SWT.BORDER);
 		type.setLayoutData(createTextFieldGridData());
 		type.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
@@ -190,7 +194,7 @@
 	}
 
 	protected String getGroupId() {
-		ArtifactType moduleId = getModuleId(false);
+		Artifact moduleId = getModuleId(false);
 		if (moduleId != null
 				&& moduleId.getGroupId() != null)
 			return moduleId.getGroupId();
@@ -198,7 +202,7 @@
 	}
 
 	protected String getArtifactId() {
-		ArtifactType moduleId = getModuleId(false);
+		Artifact moduleId = getModuleId(false);
 		if (moduleId != null
 				&& moduleId.getArtifactId() != null)
 			return moduleId.getArtifactId();
@@ -206,15 +210,15 @@
 	}
 
 	protected String getVersion() {
-		ArtifactType moduleId = getModuleId(false);
+		Artifact moduleId = getModuleId(false);
 		if (moduleId != null
 				&& moduleId.getVersion() != null)
 			return moduleId.getVersion();
 		return "";
 	}
 
-	protected String getArtifactType() {
-		ArtifactType moduleId = getModuleId(false);
+	protected String getArtifact() {
+		Artifact moduleId = getModuleId(false);
 		if (moduleId != null
 				&& moduleId.getType() != null)
 			return moduleId.getType();
@@ -222,17 +226,17 @@
 	}
 
 	protected boolean isInverseClassloading() {
-		EnvironmentType type = getEnvironmentType(false);
+		Environment type = getEnvironment(false);
 		return type != null && type.getInverseClassloading() != null;
 	}
 
 	protected boolean isSuppressDefaultEnvironment() {
-		EnvironmentType type = getEnvironmentType(false);
+		Environment type = getEnvironment(false);
 		return type != null && type.getSuppressDefaultEnvironment() != null;
 	}
 	
 	protected boolean isSharedLibDependency() {
-		DependenciesType depType = getDependenciesType(false);
+		Dependencies depType = getDependencies(false);
 		if(depType != null) {
 			return getSharedLibDependency(depType) != null;
 		}
@@ -241,10 +245,10 @@
 
 	protected void setInverseClassloading(boolean enable) {
 		if (enable) {
-			EnvironmentType type = getEnvironmentType(true);
-			type.setInverseClassloading(getDeploymentObjectFactory().createEmptyType());
+			Environment type = getEnvironment(true);
+			type.setInverseClassloading(getDeploymentObjectFactory().createEmpty());
 		} else {
-			EnvironmentType type = getEnvironmentType(false);
+			Environment type = getEnvironment(false);
 			if (type != null) {
 				type.setInverseClassloading(null);
 			}
@@ -253,10 +257,10 @@
 
 	protected void setSuppressDefaultEnvironment(boolean enable) {
 		if (enable) {
-			EnvironmentType type = getEnvironmentType(true);
-			type.setSuppressDefaultEnvironment(getDeploymentObjectFactory().createEmptyType());
+			Environment type = getEnvironment(true);
+			type.setSuppressDefaultEnvironment(getDeploymentObjectFactory().createEmpty());
 		} else {
-			EnvironmentType type = getEnvironmentType(false);
+			Environment type = getEnvironment(false);
 			if (type != null) {
 				type.setSuppressDefaultEnvironment(null);
 			}
@@ -265,16 +269,16 @@
 	
 	protected void setSharedLibDependency(boolean enable) {
 		if (enable) {
-			DependenciesType deptype = getDependenciesType(true);
-			DependencyType sharedLib = getDeploymentObjectFactory().createDependencyType();
+			Dependencies deptype = getDependencies(true);
+			Dependency sharedLib = getDeploymentObjectFactory().createDependency();
 			sharedLib.setGroupId("org.apache.geronimo.configs");
 			sharedLib.setArtifactId("sharedlib");
 			sharedLib.setType("car");
 			deptype.getDependency().add(sharedLib);
 		} else {
-			DependenciesType deptype = getDependenciesType(false);
+			Dependencies deptype = getDependencies(false);
 			if (deptype != null) {
-				ArtifactType artifact = getSharedLibDependency(deptype);
+				Artifact artifact = getSharedLibDependency(deptype);
 				if(artifact != null) {
 					deptype.getDependency().remove(artifact);
 				}
@@ -282,12 +286,12 @@
 		}
 	}
 	
-	private ArtifactType getSharedLibDependency(DependenciesType dependenciesType) {
-		DependenciesType depType = getDependenciesType(false);
-		List dependencies = depType.getDependency();
-		Iterator i = dependencies.iterator();
+	private Artifact getSharedLibDependency(Dependencies dependencies) {
+		Dependencies depType = getDependencies(false);
+		List dependenciesList = depType.getDependency();
+		Iterator i = dependenciesList.iterator();
 		while(i.hasNext()) {
-			ArtifactType artifact = (ArtifactType) i.next();
+			Artifact artifact = (Artifact) i.next();
 			if("org.apache.geronimo.configs".equals(artifact.getGroupId()) && "sharedlib".equals(artifact.getArtifactId()) && "car".equals(artifact.getType())) {
 				return artifact;
 			}
@@ -295,21 +299,38 @@
 		return null;
 	}
 
-	private EnvironmentType getEnvironmentType(boolean create) {
-		EnvironmentType type = ((WebAppType) getPlan().getValue()).getEnvironment();
-		if (type == null && create) {
-			type = getDeploymentObjectFactory().createEnvironmentType();
-			((WebAppType) getPlan().getValue()).setEnvironment( type );
+
+	//
+	// Need to support both WebApp and Connector 
+	//
+	private Environment getEnvironment(boolean create) {
+		
+		Environment type = null;
+		Object plan = getPlan().getValue();
+		if ( WebApp.class.isInstance( plan ) ) {
+			type = ((WebApp)plan).getEnvironment();
+			if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironment();
+                ((WebApp)plan).setEnvironment( type );
+			}
 		}
-		return type;
+		if ( Connector.class.isInstance( plan ) ) {
+			type = ((Connector)plan).getEnvironment();
+			if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironment();
+                ((Connector)plan).setEnvironment( type );
+			}
+		}
+        return type;
+		
 	}
 	
-	private DependenciesType getDependenciesType(boolean create) {
-		EnvironmentType env = getEnvironmentType(create);
+	private Dependencies getDependencies(boolean create) {
+		Environment env = getEnvironment(create);
 		if(env != null) {
-			DependenciesType dep = env.getDependencies();
+			Dependencies dep = env.getDependencies();
 			if (dep == null && create) {
-				dep = getDeploymentObjectFactory().createDependenciesType();
+				dep = getDeploymentObjectFactory().createDependencies();
 				env.setDependencies(dep);
 			}
 			return dep;
@@ -317,12 +338,12 @@
 		return null;
 	}
 
-	private ArtifactType getModuleId(boolean create) {
-		EnvironmentType type = getEnvironmentType(create);
+	private Artifact getModuleId(boolean create) {
+		Environment type = getEnvironment(create);
 		if (type != null) {
-			ArtifactType moduleId = type.getModuleId();
+			Artifact moduleId = type.getModuleId();
 			if (moduleId == null && create) {
-				moduleId = getDeploymentObjectFactory().createArtifactType();
+				moduleId = getDeploymentObjectFactory().createArtifact();
 				type.setModuleId(moduleId);
 			}
 			return moduleId;
@@ -330,12 +351,11 @@
 		return null;
 	}
 	
-	org.apache.geronimo.xml.ns.deployment_1.ObjectFactory deploymentObjectFacotry = null;
-	private org.apache.geronimo.xml.ns.deployment_1.ObjectFactory getDeploymentObjectFactory() {
-		if ( deploymentObjectFacotry == null ) {
-			deploymentObjectFacotry = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+	private org.apache.geronimo.jee.deployment.ObjectFactory getDeploymentObjectFactory() {
+		if ( deploymentObjectFactory == null ) {
+			deploymentObjectFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
 		}
-		return deploymentObjectFacotry;
+		return deploymentObjectFactory;
 	}
 
 	protected abstract JAXBElement getEnvironmentEReference();

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java Tue Mar 25 20:05:02 2008
@@ -18,17 +18,17 @@
 
 import javax.xml.bind.JAXBElement;
 
-import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
+import org.apache.geronimo.jee.connector.Connector;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class ConnectorGeneralSection extends CommonGeneralSection {
 
-	ConnectorType plan;
+	Connector plan;
 
 	public ConnectorGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
 		super(parent, toolkit, style, plan);
-		this.plan = (ConnectorType) plan.getValue();
+		this.plan = (Connector) plan.getValue();
 		createClient();
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java Tue Mar 25 20:05:02 2008
@@ -26,9 +26,9 @@
 import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
 import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.wizards.DependencyWizard;
-import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.deployment.Environment;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
@@ -36,7 +36,7 @@
 
 public class DependencySection extends AbstractTableSection {
 
-	private EnvironmentType environment;
+	private Environment environment;
 
 	/**
 	 * @param plan
@@ -44,7 +44,7 @@
 	 * @param toolkit
 	 * @param style
 	 */
-	public DependencySection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style) {
+	public DependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style) {
 		super(plan, parent, toolkit, style);
 		this.environment = environment;
 		createClient();
@@ -70,7 +70,7 @@
 
 	public List getObjectContainer() {
 		if ( environment.getDependencies() == null ) {
-			DependenciesType dependencies = (DependenciesType)JAXBObjectFactoryImpl.getInstance().create(DependenciesType.class);
+			Dependencies dependencies = (Dependencies)JAXBObjectFactoryImpl.getInstance().create(Dependencies.class);
 			environment.setDependencies(dependencies);
 		}
 		return environment.getDependencies().getDependency();
@@ -104,7 +104,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return DependencyType.class;
+		return Dependency.class;
 	}
 
 	
@@ -118,15 +118,15 @@
 	public AdapterFactory getAdapterFactory() {
 		return new AdapterFactory() {
 			public Object[] getElements(Object inputElement) {
-				if (!DependenciesType.class.isInstance(inputElement)) {
+				if (!Dependencies.class.isInstance(inputElement)) {
 					return new String[] { "" };
 				}
-				DependenciesType plan = (DependenciesType)inputElement;
+				Dependencies plan = (Dependencies)inputElement;
 				return plan.getDependency().toArray();
 			}
 			public String getColumnText(Object element, int columnIndex) {
-				if (DependencyType.class.isInstance(element)) {
-					DependencyType dependency = (DependencyType)element;
+				if (Dependency.class.isInstance(element)) {
+					Dependency dependency = (Dependency)element;
 					switch (columnIndex) {
 					case 0: return dependency.getGroupId();
 					case 1: return dependency.getArtifactId();

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbLocalRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbLocalRefSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbLocalRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbLocalRefSection.java Tue Mar 25 20:05:02 2008
@@ -24,7 +24,7 @@
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.wizards.EjbLocalRefWizard;
-import org.apache.geronimo.xml.ns.naming_1.EjbLocalRefType;
+import org.apache.geronimo.jee.naming.EjbLocalRef;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
@@ -99,7 +99,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return EjbLocalRefType.class;
+		return EjbLocalRef.class;
 	}
 
 //	/*

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbRefSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/EjbRefSection.java Tue Mar 25 20:05:02 2008
@@ -24,7 +24,7 @@
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.wizards.EjbRefWizard;
-import org.apache.geronimo.xml.ns.naming_1.EjbRefType;
+import org.apache.geronimo.jee.naming.EjbRef;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
@@ -105,7 +105,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return EjbRefType.class;
+		return EjbRef.class;
 	}
 
 //	/*

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanRefSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanRefSection.java Tue Mar 25 20:05:02 2008
@@ -21,7 +21,7 @@
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v21.ui.wizards.GBeanRefWizard;
-import org.apache.geronimo.xml.ns.deployment_1.GbeanType;
+import org.apache.geronimo.jee.deployment.Gbean;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -91,7 +91,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return GbeanType.class;
+		return Gbean.class;
 	}
 
 //	/*

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/GBeanSection.java Tue Mar 25 20:05:02 2008
@@ -20,13 +20,13 @@
 
 import javax.xml.bind.JAXBElement;
 
+import org.apache.geronimo.jee.web.WebApp;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.providers.AdapterFactory;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v21.ui.wizards.GBeanWizard;
-import org.apache.geronimo.xml.ns.deployment_1.GbeanType;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
-import org.apache.geronimo.xml.ns.naming_1.ResourceRefType;
+import org.apache.geronimo.jee.deployment.Gbean;
+import org.apache.geronimo.jee.naming.ResourceRef;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -96,7 +96,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return GbeanType.class;
+		return Gbean.class;
 	}
 
 	/*
@@ -111,14 +111,14 @@
 					return new String[] { "" };
 				}
 				JAXBElement plan = (JAXBElement)inputElement;
-				if (plan.getDeclaredType().equals(WebAppType.class)) {
-					return ((WebAppType)plan.getValue()).getResourceRef().toArray();
+				if (plan.getDeclaredType().equals(WebApp.class)) {
+					return ((WebApp)plan.getValue()).getResourceRef().toArray();
 				}
 				return new String[] { "" };
 			}
 			public String getColumnText(Object element, int columnIndex) {
-				if (ResourceRefType.class.isInstance(element)) {
-					ResourceRefType resourceRef = (ResourceRefType)element;
+				if (ResourceRef.class.isInstance(element)) {
+					ResourceRef resourceRef = (ResourceRef)element;
 					switch (columnIndex) {
 					case 0: return resourceRef.getRefName();
 					case 1: return resourceRef.getResourceLink();

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ImportSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ImportSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ImportSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ImportSection.java Tue Mar 25 20:05:02 2008
@@ -20,14 +20,14 @@
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.v21.ui.wizards.ImportWizard;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.jee.deployment.Environment;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class ImportSection extends DependencySection {
 
-	public ImportSection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style) {
+	public ImportSection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style) {
 		super(plan, environment, parent, toolkit, style);
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/OpenEjbJarGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/OpenEjbJarGeneralSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/OpenEjbJarGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/OpenEjbJarGeneralSection.java Tue Mar 25 20:05:02 2008
@@ -18,17 +18,17 @@
 
 import javax.xml.bind.JAXBElement;
 
-import org.apache.geronimo.xml.ns.j2ee.ejb.openejb_2.OpenejbJarType;
+import org.apache.geronimo.jee.openejb.OpenejbJar;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 public class OpenEjbJarGeneralSection extends CommonGeneralSection {
 
-	OpenejbJarType plan;
+	OpenejbJar plan;
 
 	public OpenEjbJarGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
 		super(parent, toolkit, style, plan);
-		this.plan = (OpenejbJarType) plan.getValue();
+		this.plan = (OpenejbJar) plan.getValue();
 		createClient();
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceEnvRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceEnvRefSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceEnvRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceEnvRefSection.java Tue Mar 25 20:05:02 2008
@@ -24,7 +24,7 @@
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.wizards.ResourceEnvRefWizard;
-import org.apache.geronimo.xml.ns.naming_1.ResourceEnvRefType;
+import org.apache.geronimo.jee.naming.ResourceEnvRef;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
@@ -99,7 +99,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return ResourceEnvRefType.class;
+		return ResourceEnvRef.class;
 	}
 
 //	/*

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceRefSection.java?rev=641128&r1=641127&r2=641128&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceRefSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ResourceRefSection.java Tue Mar 25 20:05:02 2008
@@ -21,13 +21,13 @@
 
 import javax.xml.bind.JAXBElement;
 
+import org.apache.geronimo.jee.web.WebApp;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.providers.AdapterFactory;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.v21.ui.Activator;
 import org.apache.geronimo.st.v21.ui.wizards.ResourceRefWizard;
-import org.apache.geronimo.xml.ns.j2ee.web_2_0.WebAppType;
-import org.apache.geronimo.xml.ns.naming_1.ResourceRefType;
+import org.apache.geronimo.jee.naming.ResourceRef;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
@@ -102,7 +102,7 @@
 	 * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
 	 */
 	public Class getTableEntryObjectType() {
-		return ResourceRefType.class;
+		return ResourceRef.class;
 	}
 	
 	public List getObjectContainer() {
@@ -121,14 +121,14 @@
 					return new String[] { "" };
 				}
 				JAXBElement plan = (JAXBElement)inputElement;
-				if (plan.getDeclaredType().equals(WebAppType.class)) {
-					return ((WebAppType)plan.getValue()).getResourceRef().toArray();
+				if (plan.getDeclaredType().equals(WebApp.class)) {
+					return ((WebApp)plan.getValue()).getResourceRef().toArray();
 				}
 				return new String[] { "" };
 			}
 			public String getColumnText(Object element, int columnIndex) {
-				if (ResourceRefType.class.isInstance(element)) {
-					ResourceRefType resourceRef = (ResourceRefType)element;
+				if (ResourceRef.class.isInstance(element)) {
+					ResourceRef resourceRef = (ResourceRef)element;
 					switch (columnIndex) {
 					case 0: return resourceRef.getRefName();
 					case 1: return resourceRef.getResourceLink();