JAX-WS DOM Tools check-in
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.classpath b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.classpath
new file mode 100755
index 0000000..2d1a430
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.project b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.project
new file mode 100755
index 0000000..0b19add
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.jaxws.dom.integration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..ae0484e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Jul 20 15:25:31 EEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..e1f9838
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: DOM Integration (Incubation)
+Bundle-SymbolicName: org.eclipse.jst.ws.jaxws.dom.integration;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.jdt.core,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.navigator,
+ org.eclipse.wst.validation,
+ org.eclipse.jdt.ui,
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.jst.jee.ui,
+ org.eclipse.jem.util,
+ org.eclipse.jst.ws.jaxws.dom.ui,
+ org.eclipse.jst.ws.jaxws.utils
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.jst.ws.jaxws.dom.integration.navigator,
+ org.eclipse.jst.ws.jaxws.dom.integration.navigator.actions,
+ org.eclipse.jst.ws.jaxws.dom.integration.validation
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/about.html b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/about.html
new file mode 100644
index 0000000..8410afb
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>August 15, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/build.properties b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/build.properties
new file mode 100755
index 0000000..df4e79e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2009 by SAP AG, Walldorf.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# SAP AG - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/plugin.properties b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/plugin.properties
new file mode 100755
index 0000000..4f2cc83
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2009 by SAP AG, Walldorf.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# SAP AG - initial API and implementation
+###############################################################################
+###############################################################################
+# Language File for this Plugin
+###############################################################################
+
+# Generic Label and Description
+DomValidator_Name = Web Services Validation
+DomValidation_MarkerName = Web Services Problem Marker
+navigatorContent.name.0 = JAX-WS Web Services Elements
+decorator.label.0 = Web Service Decorator
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/plugin.xml b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/plugin.xml
new file mode 100755
index 0000000..4037979
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/plugin.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+ Copyright (c) 2009 by SAP AG, Walldorf.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ SAP AG - initial API and implementation
+ -->
+
+<plugin>
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri = "http:///org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore"
+ class = "org.eclipse.jst.ws.jaxws.dom.integration.navigator.CustomDomItemProviderAdapterFactory"
+ supportedTypes =
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource" />
+ </extension>
+
+ <!-- {{{ Defines integration for DOM objects to navigation tree -->
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ id="org.eclipse.jst.navigator.j2ee.ui.sapWS"
+ contentProvider="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMAdapterFactoryContentProvider"
+ labelProvider="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMAdapterFactoryLabelProvider"
+ activeByDefault="true"
+ name="%navigatorContent.name.0"
+ priority="highest">
+ <triggerPoints>
+ <or>
+ <instanceof value="org.eclipse.core.resources.IProject" />
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService"/>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface"/>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod"/>
+ </or>
+ </possibleChildren>
+ <actionProvider
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.actions.WSActionProvider"
+ id="org.eclipse.jst.ws.jaxws.dom.integration.navigator.actions.WSActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.jst.javaee.ejb.SessionBean"/>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService"/>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface"/>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod"/>
+ <instanceof value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </navigatorContent>
+ </extension>
+
+ <extension point="org.eclipse.ui.decorators">
+ <decorator
+ adaptable="true"
+ location="BOTTOM_RIGHT"
+ lightweight="false"
+ label="%decorator.label.0"
+ state="true"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.WebServiceProblemsDecorator"
+ id="org.eclipse.jst.ws.jaxws.dom.integration.navigator.WebServiceDecorator">
+ <enablement>
+ <or>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.integration.navigator.ISEIChildList"/>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.integration.navigator.IWebServiceChildList"/>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject"/>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod"/>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam"/>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService"/>
+ <objectClass name="org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface"/>
+ </or>
+ </enablement>
+ </decorator>
+ </extension>
+ <!-- }}} -->
+ <!-- {{{ Defines integration for DOM objects to properties view -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMPropertyViewAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySourceProvider">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMPropertyViewAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySourceProvider">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMPropertyViewAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySourceProvider">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMPropertyViewAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySourceProvider">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMPropertyViewAdapterFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySourceProvider">
+ </adapter>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.jst.ws.jaxws.dom.ui.IDOMPropertyValue"
+ class="org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMItemValuePropertySourceFactory">
+ <adapter
+ type="org.eclipse.ui.views.properties.IPropertySource">
+ </adapter>
+ </factory>
+ </extension>
+<!-- }}} -->
+<!-- {{{ Defines integration for WST validation framework -->
+ <extension
+ id="wsValidator"
+ name="%DomValidator_Name"
+ point="org.eclipse.wst.validation.validator">
+ <validator>
+ <filter objectClass="org.eclipse.core.resources.IFile" nameFilter="*.java" />
+ <markerId markerIdValue="WsValidatorMarker" />
+ <helper
+ class="org.eclipse.jst.ws.jaxws.dom.integration.validation.DomValidationHelper">
+ </helper>
+ <run
+ class="org.eclipse.jst.ws.jaxws.dom.integration.validation.DomValidationManager">
+ </run>
+ </validator>
+ </extension>
+ <extension
+ id="WsValidatorMarker"
+ name="%DomValidation_MarkerName"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true" />
+ <attribute name="implementation"/>
+ </extension>
+</plugin>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationMessages.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationMessages.java
new file mode 100755
index 0000000..34421b0
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationMessages.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin;
+
+import org.eclipse.osgi.util.NLS;
+
+public class DomIntegrationMessages extends NLS
+{
+ private static final String BUNDLE_NAME = "org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationMessages"; //$NON-NLS-1$
+
+ public static String DOMAdapterFactoryLabelProvider_JaxWsWebServicesLabel;
+
+ public static String DOMAdapterFactoryLabelProvider_LoadingCanceledLabel;
+
+ public static String DOMAdapterFactoryLabelProvider_LoadingDummyLabel;
+
+ public static String DOMAdapterFactoryLabelProvider_SeiLabel;
+
+ public static String DOMAdapterFactoryLabelProvider_WebServicesLabel;
+
+ /** message constant */
+ public static String OpenWSResourceAction_Name;
+
+ /** message constant */
+ public static String NavigateToImplementationAction_ShowInWebServicesAreaAction;
+
+ /** message constant */
+ public static String NavigateToImplementationAction_ShowInEJBAreaAction;
+
+ /** message constant */
+ public static String SelectFilesToCheckoutDlgTitle;
+
+ /** message constant */
+ public static String SelectFilesToCheckoutDlgTblTitle;
+
+ /** message constant */
+ public static String SelectFilesToCheckout_CanceledMessage;
+
+
+ static
+ {
+ NLS.initializeMessages(BUNDLE_NAME, DomIntegrationMessages.class);
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationMessages.properties b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationMessages.properties
new file mode 100755
index 0000000..07f9578
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationMessages.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2009 by SAP AG, Walldorf.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# SAP AG - initial API and implementation
+###############################################################################
+DOMAdapterFactoryLabelProvider_JaxWsWebServicesLabel = JAX-WS Web Services
+DOMAdapterFactoryLabelProvider_LoadingCanceledLabel = Loading Canceled
+DOMAdapterFactoryLabelProvider_LoadingDummyLabel = Loading...
+DOMAdapterFactoryLabelProvider_SeiLabel = Service Endpoint Interfaces
+DOMAdapterFactoryLabelProvider_WebServicesLabel = Web Services
+
+OpenWSResourceAction_Name = Open
+
+NavigateToImplementationAction_ShowInWebServicesAreaAction = Locate in Web Services Node
+NavigateToImplementationAction_ShowInEJBAreaAction = Locate in Deployment Descriptor Node
+
+
+SelectFilesToCheckoutDlgTitle = Confirm resource checkout
+SelectFilesToCheckoutDlgTblTitle = The following resources need to be checked out during the operation
+SelectFilesToCheckout_CanceledMessage = Operation cannot continue as resources checkout has been canceled
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationPlugin.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationPlugin.java
new file mode 100755
index 0000000..6a9ab0e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/plugin/DomIntegrationPlugin.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin;
+
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMAdapterFactoryLabelProvider;
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class DomIntegrationPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.jaxws.dom.integration";
+
+ // The shared instance
+ private static DomIntegrationPlugin plugin;
+
+ private DOMAdapterFactoryLabelProvider labelProvider;
+
+ /**
+ * The constructor
+ */
+ public DomIntegrationPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static DomIntegrationPlugin getDefault() {
+ return plugin;
+ }
+
+ public void setLabelProvider(final DOMAdapterFactoryLabelProvider labelProvider)
+ {
+ ContractChecker.nullCheckParam(labelProvider, "labelProvider"); //$NON-NLS-1$
+ this.labelProvider = labelProvider;
+ }
+
+ public DOMAdapterFactoryLabelProvider getLabelProvider()
+ {
+ return labelProvider;
+ }
+
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/util/ProjectExplorerUtil.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/util/ProjectExplorerUtil.java
new file mode 100755
index 0000000..82f68fd
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/internal/util/ProjectExplorerUtil.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.internal.util;
+
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Utility class that holds methods to manipulate ProjectExplorer
+ *
+ * @author Georgi Vachkov
+ */
+public class ProjectExplorerUtil
+{
+ public static final ProjectExplorerUtil INSTANCE = new ProjectExplorerUtil();
+
+ /**
+ * This method should be called only from UI thread otherwise <code>null</code> will be returned
+ *
+ * @return the project explorer {@link IViewPart} in case it is available otherwise <code>null</code>
+ */
+ public IViewPart findProjectExplorer()
+ {
+ final IWorkbenchWindow workbenchWin = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (workbenchWin==null || workbenchWin.getActivePage()==null) {
+ return null;
+ }
+
+ return workbenchWin.getActivePage().findView("org.eclipse.ui.navigator.ProjectExplorer"); //$NON-NLS-1$
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/CustomDomItemProviderAdapterFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/CustomDomItemProviderAdapterFactory.java
new file mode 100755
index 0000000..55f2522
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/CustomDomItemProviderAdapterFactory.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.ui.DomItemProviderAdapterFactory;
+
+/**
+ * Factory that adapts DOM objects with Item provider adapters. For {@link ISEIChildList} and
+ * {@link IWebServiceChildList} it creates specific adapter for other DOM objects delegates to
+ * {@link DomItemProviderAdapterFactory}.
+ *
+ * @author
+ */
+public class CustomDomItemProviderAdapterFactory extends DomItemProviderAdapterFactory
+{
+ /**
+ * The singleton instance
+ */
+ public static final CustomDomItemProviderAdapterFactory INSTANCE = new CustomDomItemProviderAdapterFactory();
+
+ /**
+ * Constructor
+ */
+ private CustomDomItemProviderAdapterFactory()
+ {
+ super();
+
+ supportedTypes.add(IWebServiceChildList.class);
+ supportedTypes.add(ISEIChildList.class);
+ }
+
+ protected Adapter createIWebServiceChildListAdapter(final IWebServiceProject wsProj)
+ {
+ return new IWebServiceChildList()
+ {
+ public EList<IWebService> getWSChildList()
+ {
+ return wsProj.getWebServices();
+ }
+
+ public Notifier getTarget()
+ {
+ return wsProj;
+ }
+
+ public boolean isAdapterForType(Object type)
+ {
+ return false;
+ }
+
+ public void notifyChanged(Notification notification)
+ {
+ // no processing needed currently
+ }
+
+ public void setTarget(Notifier newTarget)
+ {
+ // no processing needed currently
+ }
+ };
+ }
+
+ protected Adapter createISEIChildListAdapter(final IWebServiceProject wsProj)
+ {
+ return new ISEIChildList()
+ {
+ public EList<IServiceEndpointInterface> getSEIChildList()
+ {
+ return wsProj.getServiceEndpointInterfaces();
+ }
+
+ public Notifier getTarget()
+ {
+ return wsProj;
+ }
+
+ public boolean isAdapterForType(Object type)
+ {
+ return false;
+ }
+
+ public void notifyChanged(Notification notification)
+ {
+ // no processing needed currently
+ }
+
+ public void setTarget(Notifier newTarget)
+ {
+ // no processing needed currently
+ }
+ };
+ }
+
+ @Override
+ public Adapter adapt(Notifier notifier, Object type)
+ {
+ if (notifier instanceof IWebServiceProject && type instanceof Class)
+ {
+ if(type.equals(IWebServiceChildList.class))
+ {
+ return adaptIWebServiceChildList((IWebServiceProject)notifier);
+ }
+ else if(type.equals(ISEIChildList.class))
+ {
+ return adaptISEIChildList((IWebServiceProject)notifier);
+ }
+ }
+
+ return super.adapt(notifier, type);
+ }
+
+ protected Adapter adaptISEIChildList(final IWebServiceProject wsProject)
+ {
+ for(Adapter adapter : wsProject.eAdapters())
+ {
+ if(adapter instanceof ISEIChildList) {
+ return adapter;
+ }
+ }
+
+ final Adapter adapter = createISEIChildListAdapter(wsProject);
+ associate(adapter, wsProject);
+
+ return adapter;
+ }
+
+ protected Adapter adaptIWebServiceChildList(final IWebServiceProject wsProject)
+ {
+ for(Adapter adapter : wsProject.eAdapters())
+ {
+ if(adapter instanceof IWebServiceChildList) {
+ return adapter;
+ }
+ }
+
+ final Adapter adapter = createIWebServiceChildListAdapter(wsProject);
+ associate(adapter, wsProject);
+
+ return adapter;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMAdapterFactoryContentProvider.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMAdapterFactoryContentProvider.java
new file mode 100755
index 0000000..5c0e3dd
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMAdapterFactoryContentProvider.java
@@ -0,0 +1,370 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.jst.ws.jaxws.dom.integration.internal.util.ProjectExplorerUtil;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.ILoadingWsProject.ILoadingCanceled;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.ILoadingWsProject.ILoadingDummy;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDOMRuntimeExtension;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDomLoadListener;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMRuntimeManager;
+import org.eclipse.jst.ws.jaxws.dom.runtime.registry.IWsDOMRuntimeInfo;
+import org.eclipse.jst.ws.jaxws.dom.runtime.registry.WsDOMRuntimeRegistry;
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+import org.eclipse.jst.ws.jaxws.utils.facets.FacetUtils;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.eclipse.ui.navigator.CommonViewer;
+
+/**
+ * Content provider for DOM related objects
+ *
+ * @author
+ */
+public class DOMAdapterFactoryContentProvider extends AdapterFactoryContentProvider
+{
+ private Map<IWsDOMRuntimeExtension, IWsDomLoadListener> loadListeners = new HashMap<IWsDOMRuntimeExtension, IWsDomLoadListener>();
+
+ /**
+ * Constructor
+ */
+ public DOMAdapterFactoryContentProvider()
+ {
+ this(CustomDomItemProviderAdapterFactory.INSTANCE);
+ }
+
+ /**
+ * Constructor
+ * @param adapterFactory
+ */
+ public DOMAdapterFactoryContentProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ @Override
+ public Object[] getChildren(final Object context)
+ {
+ if (context instanceof IAdaptable)
+ {
+ return getWsProject((IProject)((IAdaptable) context).getAdapter(IProject.class));
+ }
+ else if(context instanceof ILoadingWsProject)
+ {
+ return new Object[] { ((ILoadingWsProject)context).isLoadCanceled() ? new ILoadingCanceled(){} : new ILoadingDummy(){} };
+ }
+ else if(context instanceof IWebServiceProject)
+ {
+ return new Object[]{ adapterFactory.adapt(context, ISEIChildList.class),
+ adapterFactory.adapt(context, IWebServiceChildList.class) };
+ }
+ else if(context instanceof IWebServiceChildList)
+ {
+ Object[] webServices = ((IWebServiceChildList)context).getWSChildList().toArray();
+
+ for(int ii=0; ii<webServices.length; ii++)
+ {
+ adapterFactory.adapt(webServices[ii], ITreeItemContentProvider.class);
+ }
+
+ return webServices;
+ }
+ else if(context instanceof ISEIChildList)
+ {
+ Object[] sEIs = ((ISEIChildList)context).getSEIChildList().toArray();
+
+ for(int ii=0; ii<sEIs.length; ii++)
+ {
+ adapterFactory.adapt(sEIs[ii], ITreeItemContentProvider.class);
+ }
+
+ return sEIs;
+ }
+ else if(context instanceof IWebService)
+ {
+ final IServiceEndpointInterface sei = ((IWebService)context).getServiceEndpoint();
+ if (sei == null) {
+ return new Object[0];
+ }
+
+ adapterFactory.adapt(sei, ITreeItemContentProvider.class);
+ return new Object[]{ sei };
+ }
+ else if(context instanceof IServiceEndpointInterface) {
+ return extractMethods((IServiceEndpointInterface) context);
+ }
+ else if (context instanceof IWebMethod) {
+ return extractParams((IWebMethod)context);
+ }
+
+ return new Object[0];
+ }
+
+ protected Object[] getWsProject(final IProject project)
+ {
+ try {
+ final IWsDOMRuntimeExtension runtime = getSupportingRuntime(project);
+ if (runtime == null) {
+ return new Object[0];
+ }
+
+ // WS project is loaded already
+ final IWebServiceProject wsProject = getWsProject(runtime.getDOM(), project);
+ if (wsProject != null)
+ {
+ adapterFactory.adapt(wsProject, ITreeItemContentProvider.class);
+ return new Object[] { wsProject };
+ }
+
+ addRuntimeLoadListener(runtime);
+ return new Object[] { new LoadingWsProject(project, false) };
+ }
+ catch (WsDOMLoadCanceledException e) { // $JL-EXC$
+ return new Object[] { new LoadingWsProject(project, true) };
+ }
+ }
+
+ protected IWsDomLoadListener addRuntimeLoadListener(final IWsDOMRuntimeExtension runtime)
+ {
+ IWsDomLoadListener loadListener = loadListeners.get(runtime);
+ if (loadListener!=null) {
+ return loadListener;
+ }
+
+ loadListener = new LoadListener(runtime);
+ loadListeners.put(runtime, loadListener);
+ runtime.addLoadListener(loadListener);
+
+ return loadListener;
+ }
+
+ protected Object[] extractMethods(final IServiceEndpointInterface sei)
+ {
+ final List<IWebMethod> webMethods = sei.getWebMethods();
+ for (IWebMethod webMethod : webMethods) {
+ adapterFactory.adapt(webMethod, ITreeItemContentProvider.class);
+ }
+
+ return webMethods.toArray();
+ }
+
+ protected Object[] extractParams(final IWebMethod method)
+ {
+ final List<IWebParam> params = method.getParameters();
+ for (IWebParam webParam : params) {
+ adapterFactory.adapt(webParam, ITreeItemContentProvider.class);
+ }
+
+ return params.toArray();
+ }
+
+ @Override
+ public boolean hasChildren(Object element)
+ {
+ if (element instanceof IWebServiceProject)
+ {
+ return true;
+ }
+ else if(element instanceof ILoadingWsProject)
+ {
+ return true;
+ }
+ else if(element instanceof IWebServiceChildList)
+ {
+ return !((IWebServiceChildList)element).getWSChildList().isEmpty();
+ }
+ else if(element instanceof ISEIChildList)
+ {
+ return !((ISEIChildList)element).getSEIChildList().isEmpty();
+ }
+ else if (element instanceof IWebService)
+ {
+ return ((IWebService) element).getServiceEndpoint() != null;
+ }
+ else if (element instanceof IServiceEndpointInterface)
+ {
+ return !((IServiceEndpointInterface)element).getWebMethods().isEmpty();
+ }
+ else if (element instanceof IWebMethod)
+ {
+ return !((IWebMethod)element).getParameters().isEmpty();
+ }
+
+ return false;
+ }
+
+ protected IWebServiceProject getWsProject(final IDOM dom, final IProject project)
+ {
+ if (dom == null) {
+ return null;
+ }
+
+ for (IWebServiceProject wsProject : dom.getWebServiceProjects()) {
+ if(wsProject.getName().equals(project.getName())) {
+ return wsProject;
+ }
+ }
+
+ return null;
+ }
+
+ protected IWsDOMRuntimeExtension getSupportingRuntime(final IProject project)
+ {
+ final Collection<IWsDOMRuntimeInfo> domRuntimeInfos = WsDOMRuntimeRegistry.getRegisteredRuntimesInfo();
+ Map<String, String> facets;
+ for (IWsDOMRuntimeInfo domRuntimeInfo : domRuntimeInfos)
+ {
+ facets = domRuntimeInfo.getProjectFacets();
+ if (hasFacet(facets, project)) {
+ return getDomRuntime(domRuntimeInfo.getId());
+ }
+ }
+
+ return null;
+ }
+
+ protected boolean hasFacet(final Map<String, String> facets, final IProject project)
+ {
+ for (String facetId : facets.keySet())
+ {
+ if (facetId == null || facets.get(facetId) == null) {
+ continue;
+ }
+
+ try {
+ if ((new FacetUtils()).hasFacetWithVersion(project, facets.get(facetId), facetId, true)){
+ return true;
+ }
+ }
+ catch (CoreException e) {
+ (new Logger()).logError(e.getMessage(), e);
+ }
+ }
+
+ return false;
+ }
+
+ protected IWsDOMRuntimeExtension getDomRuntime(String runtimeId) {
+ return WsDOMRuntimeManager.instance().getDOMRuntime(runtimeId);
+ }
+
+ /**
+ * Class that is used to listen when the DOM load will be finished. After the load has finished
+ * this class traverses the project explorers tree in order to find all instances of
+ * {@link ILoadingWsProject} and substitute them with loaded {@link IWebServiceProject}
+ *
+ * @author Georgi Vachkov
+ */
+ protected class LoadListener implements IWsDomLoadListener
+ {
+ private final IWsDOMRuntimeExtension runtime;
+
+ public LoadListener(final IWsDOMRuntimeExtension runtime)
+ {
+ ContractChecker.nullCheckParam(runtime, "runtime"); //$NON-NLS-1$
+ this.runtime = runtime;
+ }
+
+ public void finished()
+ {
+ Display.getDefault().asyncExec(new Runnable()
+ {
+ public void run()
+ {
+ final IViewPart viewPart = ProjectExplorerUtil.INSTANCE.findProjectExplorer();
+ if (viewPart instanceof CommonNavigator)
+ {
+ final CommonViewer commonViewer = ((CommonNavigator)viewPart).getCommonViewer();
+ for (TreeItem item : commonViewer.getTree().getItems()) {
+ exchangeDummy(item, commonViewer);
+ }
+ }
+ }
+ });
+ }
+
+ protected void exchangeDummy(final TreeItem treeItem, final CommonViewer commonViewer)
+ {
+ if (treeItem == null || treeItem.getData() instanceof IWebServiceProject) {
+ return;
+ }
+
+ if (treeItem.getData() instanceof ILoadingWsProject) {
+ exchangeTreeItemData(treeItem, commonViewer);
+ }
+ else {
+ for (TreeItem child : treeItem.getItems()) {
+ exchangeDummy(child, commonViewer);
+ }
+ }
+ }
+
+ private void exchangeTreeItemData(final TreeItem treeItem, final CommonViewer commonViewer)
+ {
+ final ILoadingWsProject loadingProject = (ILoadingWsProject)treeItem.getData();
+ try {
+ final IWebServiceProject wsProject = getWsProject(runtime.getDOM(), loadingProject.getProject());
+ adapterFactory.adapt(wsProject, ITreeItemContentProvider.class);
+ treeItem.setData(wsProject);
+
+ } catch (WsDOMLoadCanceledException e) { // $JL-EXC$
+ treeItem.setData(new LoadingWsProject(loadingProject.getProject(), true));
+ }
+
+ commonViewer.refresh(loadingProject.getProject());
+ }
+
+ public void started() {
+ // nothing to do here
+ }
+ }
+
+ private class LoadingWsProject implements ILoadingWsProject
+ {
+ final IProject project;
+ final boolean isCanceled;
+
+ public LoadingWsProject(final IProject project, final boolean isCanceled) {
+ ContractChecker.nullCheckParam(project, "project"); //$NON-NLS-1$
+ this.project = project;
+ this.isCanceled = isCanceled;
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public boolean isLoadCanceled() {
+ return isCanceled;
+ }
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMAdapterFactoryLabelProvider.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMAdapterFactoryLabelProvider.java
new file mode 100755
index 0000000..9484e8f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMAdapterFactoryLabelProvider.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationMessages;
+import org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationPlugin;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.ILoadingWsProject.ILoadingCanceled;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.ILoadingWsProject.ILoadingDummy;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.ui.Images;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.navigator.IDescriptionProvider;
+
+/**
+ * DOM adapter factory that extends {@link AdapterFactoryLabelProvider} by providing
+ * icons and labels for some objects that are not part of DOM and also overrides some
+ * labels
+ *
+ * @author
+ */
+public class DOMAdapterFactoryLabelProvider extends AdapterFactoryLabelProvider implements IDescriptionProvider
+{
+ /**
+ * Default Constructor uses {@link CustomDomItemProviderAdapterFactory} as default
+ * adapter factory provided to the base class.
+ */
+ public DOMAdapterFactoryLabelProvider()
+ {
+ super(CustomDomItemProviderAdapterFactory.INSTANCE);
+
+ DomIntegrationPlugin.getDefault().setLabelProvider(this);
+ }
+
+ @Override
+ public Image getImage(Object element)
+ {
+ if(element instanceof IWebServiceChildList)
+ {
+ return Images.INSTANCE.getImage(Images.IMG_WEB_SERVICE_GROUP);
+ }
+ else if(element instanceof ISEIChildList)
+ {
+ return Images.INSTANCE.getImage(Images.IMG_SEI_GROUP);
+ }
+ else if(element instanceof ILoadingWsProject)
+ {
+ return Images.INSTANCE.getImage(Images.IMG_DOM_WS_PROVIDER);
+ }
+ else if (element instanceof ILoadingDummy || element instanceof ILoadingCanceled)
+ {
+ return null;
+ }
+
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element)
+ {
+ if(element instanceof IWebServiceProject || element instanceof ILoadingWsProject)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_JaxWsWebServicesLabel;
+ }
+ if (element instanceof ILoadingDummy)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_LoadingDummyLabel;
+ }
+ if (element instanceof ILoadingCanceled)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_LoadingCanceledLabel;
+ }
+ else if(element instanceof IWebServiceChildList)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_WebServicesLabel;
+ }
+ else if(element instanceof ISEIChildList)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_SeiLabel;
+ }
+
+ return super.getText(element);
+ }
+
+ public String getDescription(Object element)
+ {
+ if(element instanceof IWebService)
+ {
+ return ((IWebService)element).getName();
+ }
+ else if(element instanceof IServiceEndpointInterface)
+ {
+ return ((IServiceEndpointInterface)element).getName();
+ }
+ else if(element instanceof IWebServiceProject || element instanceof ILoadingWsProject)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_JaxWsWebServicesLabel;
+ }
+ else if(element instanceof IWebServiceChildList)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_WebServicesLabel;
+ }
+ else if(element instanceof ISEIChildList)
+ {
+ return DomIntegrationMessages.DOMAdapterFactoryLabelProvider_SeiLabel;
+ }
+ else if(element instanceof IWebMethod)
+ {
+ return ((IWebMethod)element).getName();
+ }
+
+ return super.getText(element);
+ }
+
+ public void fireLabelProviderChanged(Object element)
+ {
+ for (ILabelProviderListener labelProviderListener : labelProviderListeners) {
+ labelProviderListener.labelProviderChanged(new LabelProviderChangedEvent(this, element));
+ }
+ }
+
+ @Override
+ protected Image getDefaultImage(Object object)
+ {
+ // No dfault images
+ return null;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMItemValuePropertySourceFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMItemValuePropertySourceFactory.java
new file mode 100755
index 0000000..fd4f630
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMItemValuePropertySourceFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.PropertySource;
+import org.eclipse.jst.ws.jaxws.dom.ui.IDOMPropertyValue;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * Adapter factory for that creates adapter from {@link IDOMPropertyValue} to
+ * {@link IPropertySource} interface. This factory is registered in org.eclipse.core.runtime.adapters extension
+ * point and is called when object of type {@link IDOMPropertyValue} needs to be
+ * displayed or edited in property sheet.
+ *
+ * @author Georgi Vachkov
+ */
+@SuppressWarnings("unchecked")
+public class DOMItemValuePropertySourceFactory implements IAdapterFactory
+{
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType)
+ {
+ assert adaptableObject instanceof IDOMPropertyValue;
+
+ final IDOMPropertyValue wrapper = (IDOMPropertyValue)adaptableObject;
+
+ return new PropertySource(wrapper.getEditableValue(), wrapper);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+ return new Class[] {PropertySource.class};
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMPropertyViewAdapterFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMPropertyViewAdapterFactory.java
new file mode 100755
index 0000000..7a3343f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/DOMPropertyViewAdapterFactory.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+
+public class DOMPropertyViewAdapterFactory implements IAdapterFactory
+{
+ private DOMAdapterFactoryContentProvider adapterFactory;
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Object adaptableObject, Class adapterType)
+ {
+ if (adapterType.isInstance(adaptableObject))
+ {
+ return adaptableObject;
+ }
+
+ if (adapterType == IPropertySourceProvider.class)
+ {
+ return getAdapterFactory();
+ }
+
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Class[] getAdapterList()
+ {
+ return new Class[] {
+ DOMAdapterFactoryContentProvider.class,
+ };
+ }
+
+ protected DOMAdapterFactoryContentProvider getAdapterFactory()
+ {
+ if (adapterFactory == null) {
+ adapterFactory = new DOMAdapterFactoryContentProvider();
+ }
+
+ return adapterFactory;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/ILoadingWsProject.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/ILoadingWsProject.java
new file mode 100755
index 0000000..262eaa6
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/ILoadingWsProject.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.core.resources.IProject;
+
+
+/**
+ * An interface presenting not loaded web service project. This interface is used
+ * to be added to the project explorer WS tree in cases when the project is relevant
+ * but it is not yet loaded by DOM loader.
+ *
+ * @author Georgi Vachkov
+ */
+public interface ILoadingWsProject
+{
+ /**
+ * @return the relevant project
+ */
+ public IProject getProject();
+
+ /**
+ * @return if the DOM loading has been canceled
+ */
+ public boolean isLoadCanceled();
+
+ /**
+ * Interface used to be added to the tree as a sub node of INotLoadedWsProject node
+ * and displayed with text "Loading...".
+ *
+ * @author Georgi Vachkov
+ */
+ public interface ILoadingDummy {};
+
+ public interface ILoadingCanceled {};
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/ISEIChildList.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/ISEIChildList.java
new file mode 100755
index 0000000..04f6b4b
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/ISEIChildList.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+
+public interface ISEIChildList extends Adapter
+{
+ public EList<IServiceEndpointInterface> getSEIChildList();
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/IWebServiceChildList.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/IWebServiceChildList.java
new file mode 100755
index 0000000..96381d8
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/IWebServiceChildList.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+
+public interface IWebServiceChildList extends Adapter
+{
+ public EList<IWebService> getWSChildList();
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/WebServiceProblemsDecorator.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/WebServiceProblemsDecorator.java
new file mode 100755
index 0000000..5a9d2be
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/WebServiceProblemsDecorator.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jdt.ui.JavaElementImageDescriptor;
+import org.eclipse.jdt.ui.ProblemsLabelDecorator;
+import org.eclipse.jst.ws.jaxws.dom.runtime.DomUtil;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.util.Dom2ResourceMapper;
+import org.eclipse.jst.ws.jaxws.utils.dom.validation.DomValidationConstants;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+
+public class WebServiceProblemsDecorator extends ProblemsLabelDecorator
+{
+ /** Enum to represent different marker types */
+ public enum Severity {OK, ERROR, WARNING};
+
+ private DomUtil domUtil = DomUtil.INSTANCE;
+
+ @Override
+ protected int computeAdornmentFlags(Object obj)
+ {
+ final Severity severity = defineSeverity(obj);
+ if (severity == Severity.ERROR) {
+ return JavaElementImageDescriptor.ERROR;
+ }
+
+ if (severity == Severity.WARNING) {
+ return JavaElementImageDescriptor.WARNING;
+ }
+
+ return 0;
+ }
+
+ /**
+ * Checks the object's resource for markers and defines the severity of the
+ * problem if any.
+ * @param obj
+ * @return the severity calculated.
+ */
+ protected Severity defineSeverity(final Object obj)
+ {
+ try
+ {
+ // process additional DOM objects needed for UI - IWebServiceChildList and ISEIChildList
+ if (obj instanceof IWebServiceChildList) {
+ return defineSeverityForEList(((IWebServiceChildList)obj).getWSChildList());
+ }
+
+ if (obj instanceof ISEIChildList) {
+ return defineSeverityForEList(((ISEIChildList)obj).getSEIChildList());
+ }
+
+ // do not process non DOM objects
+ if( !(obj instanceof EObject) ) {
+ return Severity.OK;
+ }
+
+ return defineSeverity((EObject) obj);
+ }
+ catch (CoreException e) {
+ (new Logger()).logError(e.getMessage(), e);
+ }
+
+ return Severity.OK;
+ }
+
+ protected Severity defineSeverityForEList(final List<? extends EObject> list) throws CoreException
+ {
+ Severity severity = Severity.OK;
+ for (EObject eObject : list)
+ {
+ Severity tempSeverity = defineSeverity(eObject);
+ if (tempSeverity == Severity.ERROR) {
+ return Severity.ERROR;
+ }
+
+ if (tempSeverity==Severity.WARNING) {
+ severity = Severity.WARNING;
+ }
+ }
+
+ return severity;
+ }
+
+ protected Severity defineSeverity(final EObject eObject) throws CoreException
+ {
+ final IResource resource = Dom2ResourceMapper.INSTANCE.findResource(eObject);
+ if (resource!=null) {
+ return defineSeverity(eObject, resource);
+ }
+
+ return Severity.OK;
+ }
+
+ protected Severity defineSeverity(final EObject eObject, final IResource resource) throws CoreException
+ {
+ if (!resource.isAccessible()) {
+ return Severity.OK;
+ }
+
+ final int depth = (resource.getType()==IResource.PROJECT) ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO;
+ final IMarker[] markers = resource.findMarkers(DomValidationConstants.MARKER_ID, false, depth);
+ Severity severity = Severity.OK;
+ for (IMarker marker : markers)
+ {
+ if (!isRelevantFor(eObject, marker)) {
+ continue;
+ }
+
+ int tempSeverity = (Integer)marker.getAttribute(IMarker.SEVERITY);
+ if (tempSeverity==IMarker.SEVERITY_ERROR) {
+ return Severity.ERROR;
+ }
+
+ if(tempSeverity==IMarker.SEVERITY_WARNING) {
+ severity = Severity.WARNING;
+ }
+ }
+
+ if (severity == Severity.OK && (eObject instanceof IWebService))
+ {
+ // for bean with explicit interface we need to check the interface as well
+ // because it resides in another resource
+ final IServiceEndpointInterface sei = ((IWebService)eObject).getServiceEndpoint();
+ if (sei != null && !sei.isImplicit()) {
+ severity = defineSeverity(sei);
+ }
+ }
+
+ return severity;
+ }
+
+ /**
+ * Defines if <code>marker</code> is relevant for <code>eObject</code>.
+ * Only for web method and web parameter we need to define if the marker is relevant
+ * because they are not unique in the scope of the resource. For example if there is a
+ * marker set on the resource containing SEI, the SEI should be marked in any case
+ * while the method only in case when the error is specifically for this method or
+ * method parameter.
+ * @param eObject the object to be validated
+ * @param marker the resource marker
+ * @return <code>true</code> in case the marker is relevant for <code>eObject</code>
+ * @throws CoreException
+ */
+ protected boolean isRelevantFor(final EObject eObject, final IMarker marker) throws CoreException
+ {
+ switch (eObject.eClass().getClassifierID())
+ {
+ case DomPackage.IWEB_METHOD:
+ return isRelevantForMethod((IWebMethod)eObject, marker);
+ case DomPackage.IWEB_PARAM:
+ return isRelevant(domUtil.calcUniqueImpl(eObject), marker);
+ }
+
+ return true;
+ }
+
+ /**
+ * Defines if <code>marker</code> is relevant for <code>webMethod</code>.
+ * Checks if the marker is specifically for this method or some of it's parameters.
+ * @param webMethod the method to be checked
+ * @param marker the marker to be checked
+ * @return <code>true</code> in case marker is relevant
+ * @throws CoreException
+ */
+ protected boolean isRelevantForMethod(final IWebMethod webMethod, final IMarker marker) throws CoreException
+ {
+ if (isRelevant(domUtil.calcUniqueImpl(webMethod), marker)) {
+ return true;
+ }
+
+ for (IWebParam webParam : webMethod.getParameters())
+ {
+ if (isRelevant(domUtil.calcUniqueImpl(webParam), marker)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if marker's {@link DomValidationConstants#IMPLEMENTATION} attribute has same
+ * value as <code>implementation</code>.
+ * @param implementation the implementation signature
+ * @param marker the marker to be checked
+ * @return <code>true</code> in case marker is for this implementation
+ * @throws CoreException
+ */
+ protected boolean isRelevant(final String implementation, final IMarker marker) throws CoreException
+ {
+ final Object found = marker.getAttribute(DomValidationConstants.IMPLEMENTATION);
+ if (found != null && found.equals(implementation)) {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/NavigateToImplementationAction.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/NavigateToImplementationAction.java
new file mode 100755
index 0000000..0bf1369
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/NavigateToImplementationAction.java
@@ -0,0 +1,509 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator.actions;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jst.javaee.ejb.MessageDrivenBean;
+import org.eclipse.jst.javaee.ejb.SessionBean;
+import org.eclipse.jst.jee.ui.internal.navigator.ejb.GroupEJBProvider;
+import org.eclipse.jst.jee.ui.internal.navigator.ejb.GroupEjbSession;
+import org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationMessages;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.ISEIChildList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.DomUtil;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDOMRuntimeExtension;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMRuntimeManager;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.Jee5WsDomRuntimeExtension;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+import org.eclipse.jst.ws.jaxws.utils.resources.ProjectManagementUtils;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.actions.SelectionListenerAction;
+
+public class NavigateToImplementationAction extends SelectionListenerAction
+ implements IActionDelegate2 {
+ protected Object srcObject;
+
+ private IJavaProject project;
+
+ private StructuredViewer viewer;
+
+ protected NavigateToImplementationAction(StructuredViewer viewer) {
+ this(DomIntegrationMessages.OpenWSResourceAction_Name);
+
+ this.viewer = viewer;
+ }
+
+ protected NavigateToImplementationAction(String text) {
+ super(text);
+ }
+
+ @Override
+ public String getText()
+ {
+ if(srcObject instanceof SessionBean)
+ {
+ return DomIntegrationMessages.NavigateToImplementationAction_ShowInWebServicesAreaAction;
+ }
+ else
+ {
+ return DomIntegrationMessages.NavigateToImplementationAction_ShowInEJBAreaAction;
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ boolean isEnabled = super.isEnabled()
+ && this.viewer instanceof TreeViewer
+ && this.project !=null
+ && ProjectManagementUtils.isEjb3Project(this.project.getProject().getName());
+
+ if(srcObject instanceof IWebService)
+ {
+ return isEnabled;
+ }
+
+ if(srcObject instanceof SessionBean)
+ {
+ SessionBean sessionBean = ((SessionBean)srcObject);
+ IWebService webService = getWebService(sessionBean);
+ if (webService == null)
+ {
+ return false;
+ }
+ return isEnabled;
+ }
+
+ if(srcObject instanceof IServiceEndpointInterface
+ && ((IServiceEndpointInterface)srcObject).isImplicit())
+ {
+ return isEnabled;
+ }
+
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ // TODO Auto-generated method stub
+ run();
+
+ }
+
+ /**
+ * The user has invoked this action
+ */
+ public void run() {
+ if (!isEnabled())
+ return;
+
+ ICompilationUnit cu = null;
+
+ if(srcObject instanceof SessionBean)
+ {
+ SessionBean sessionBean = ((SessionBean)srcObject);
+ String ejbClass = sessionBean.getEjbClass();
+ IWebService webService = getWebService(sessionBean);
+ if (webService == null)
+ {
+ return;
+ }
+
+ IServiceEndpointInterface sEI = webService.getServiceEndpoint();
+ boolean isImplicit = sEI.isImplicit();
+ String sEIClass;
+ if (!isImplicit){
+ String impl = sEI.getImplementation();
+ sEIClass = impl;
+ } else {
+ sEIClass = ejbClass;
+ }
+ try {
+ cu = project.findType(sEIClass).getCompilationUnit();
+ IResource resource = cu.getResource();
+ moveToSEINode(resource);
+ } catch (JavaModelException jme) {
+ logger().logError("Unexpected exception occurred", jme); //$NON-NLS-1$
+ return;
+ }
+
+ }
+ else
+ {
+ try {
+ cu = project.findType(
+ ((IJavaWebServiceElement) srcObject)
+ .getImplementation()).getCompilationUnit();
+ } catch (JavaModelException jme) {
+ logger().logError("Unexpected exception occurred", jme); //$NON-NLS-1$
+ return;
+ }
+
+ moveToEjbNode(cu.getResource());
+ }
+ }
+
+ /**
+ * Returns IWebService if sessionBean has been exposed as web service.
+ * @param sessionBean a session bean.
+ * @return IWebService if sessionBean has been exposed as web service. If the session bean has not been
+ * exposed as web service - returns null.
+ * @throws NullPointerException if sessionBean is null.
+ */
+ protected IWebService getWebService(final SessionBean sessionBean)
+ {
+ final IWsDOMRuntimeExtension domRuntime = getDomRuntime();
+ if (domRuntime == null) {
+ return null;
+ }
+
+ try {
+ final IDOM dom = domRuntime.getDOM();
+ if (dom == null) {
+ return null;
+ }
+
+ final IWebServiceProject webServiceProject = DomUtil.INSTANCE.findProjectByName(dom, this.project.getProject().getName());
+ return DomUtil.INSTANCE.findWsByImplName(webServiceProject, sessionBean.getEjbClass());
+ }
+ catch (WsDOMLoadCanceledException e) { // $JL-EXC$
+ return null;
+ }
+ }
+
+ protected IWsDOMRuntimeExtension getDomRuntime() {
+ return WsDOMRuntimeManager.instance().getDOMRuntime(Jee5WsDomRuntimeExtension.ID);
+ }
+
+ private void moveToSEINode(IResource resource)
+ {
+ TreeViewer treeViewer = (TreeViewer)this.viewer;
+ ISelection sel = null;
+
+ Object[] expandedObjects = treeViewer.getExpandedElements();
+
+ Object[] projectElements = ((ITreeContentProvider) treeViewer
+ .getContentProvider()).getChildren(this.project.getProject());
+ IWebServiceProject wsProject = null;
+
+ for (int ii = 0; ii < projectElements.length; ii++) {
+ if (projectElements[ii] instanceof IWebServiceProject) {
+ wsProject = (IWebServiceProject) projectElements[ii];
+ treeViewer.expandToLevel(wsProject, 2);
+ break;
+ }
+ }
+
+ if (wsProject == null)
+ return;
+
+ for(IServiceEndpointInterface sEI : wsProject.getServiceEndpointInterfaces())
+ {
+ try {
+ ICompilationUnit cu = project.findType(
+ ((IJavaWebServiceElement) sEI)
+ .getImplementation()).getCompilationUnit();
+
+ if(cu.getResource().equals(resource))
+ {
+ sel = new StructuredSelection(sEI);
+ TreePath treePath = getTreePathForSEI(treeViewer,
+ wsProject);
+ Object[] elementsToExpand = new Object[treePath
+ .getSegmentCount()];
+
+ for (int jj = 0; jj < elementsToExpand.length; jj++) {
+ if (notAlreadyExpanded(treePath.getSegment(jj),
+ expandedObjects)) {
+ elementsToExpand[jj] = treePath.getSegment(jj);
+ }
+ }
+
+ for (int jj = 0; jj < elementsToExpand.length; jj++) {
+ if (elementsToExpand[jj] != null) {
+ Object[] tmp = expandedObjects;
+ expandedObjects = new Object[expandedObjects.length + 1];
+
+ for (int kk = 0; kk < tmp.length; kk++) {
+ expandedObjects[kk] = tmp[kk];
+ }
+
+ expandedObjects[expandedObjects.length - 1] = elementsToExpand[jj];
+ }
+ }
+
+ break;
+ }
+ } catch (JavaModelException jme) {
+ logger().logError("Unexpected exception occurred", jme); //$NON-NLS-1$
+ return;
+ }
+
+ }
+ setExpandedElementsAndSelection(treeViewer, expandedObjects, sel);
+ }
+
+ private void moveToEjbNode(IResource resource) {
+ TreeViewer treeViewer = (TreeViewer)this.viewer;
+ ISelection sel = null;
+
+ Object[] expandedObjects = treeViewer.getExpandedElements();
+
+ Object[] projectElements = ((ITreeContentProvider) treeViewer
+ .getContentProvider()).getChildren(this.project.getProject());
+ GroupEJBProvider ejbProvider = null;
+ GroupEjbSession ejbSession = null;
+
+ for (int ii = 0; ii < projectElements.length; ii++) {
+ if (projectElements[ii] instanceof GroupEJBProvider) {
+ ejbProvider = (GroupEJBProvider) projectElements[ii];
+ treeViewer.expandToLevel(ejbProvider, 1);
+ break;
+ }
+ }
+
+ if (ejbProvider == null)
+ return;
+
+ for (Object ejbProviderChild : ejbProvider.getChildren()) {
+ if (ejbProviderChild instanceof GroupEjbSession) {
+ ejbSession = (GroupEjbSession) ejbProviderChild;
+ treeViewer.expandToLevel(ejbSession, 2);
+ }
+ }
+
+ if (ejbSession == null) {
+ return;
+ }
+
+ Object[] ejbs = treeViewer.getExpandedElements();
+
+ for (int ii = 0; ii < ejbs.length; ii++) {
+ if ((ejbs[ii] instanceof SessionBean)||(ejbs[ii] instanceof MessageDrivenBean)) {
+
+ IJavaProject javaProject = findJavaProject(ejbs[ii]);
+ IType t = null;
+ try {
+ if((ejbs[ii] instanceof SessionBean))
+ t = javaProject.findType(((SessionBean)ejbs[ii]).getEjbClass());
+ else
+ t = javaProject.findType(((MessageDrivenBean)ejbs[ii]).getEjbClass());
+ } catch (JavaModelException e) {
+ return;
+ }
+ IResource r = t.getResource();
+
+ if (r.equals(resource)) {
+ sel = new StructuredSelection(ejbs[ii]);
+ TreePath treePath = getTreePathForObject(treeViewer,
+ ejbs[ii]);
+ expandElements(expandedObjects, treePath);
+
+ break;
+ }
+ }
+ }
+
+ setExpandedElementsAndSelection(treeViewer, expandedObjects, sel);
+ }
+
+ protected IJavaProject findJavaProject(Object ejb)
+ {
+ IProject proj = ProjectUtilities.getProject(ejb);
+ return JavaCore.create(proj);
+ }
+
+ private void setExpandedElementsAndSelection(TreeViewer treeViewer, Object[] expandedObjects, ISelection sel)
+ {
+ treeViewer.setExpandedElements(expandedObjects);
+
+ if (sel != null) {
+ treeViewer.setSelection(sel, true);
+ }
+ }
+
+ private void expandElements(Object[] expandedObjects, TreePath treePath)
+ {
+
+ Object[] elementsToExpand = new Object[treePath.getSegmentCount()];
+
+ for (int jj = 0; jj < elementsToExpand.length; jj++)
+ {
+ if (notAlreadyExpanded(treePath.getSegment(jj), expandedObjects))
+ {
+ elementsToExpand[jj] = treePath.getSegment(jj);
+ }
+ }
+
+ for (int jj = 0; jj < elementsToExpand.length; jj++) {
+ if (elementsToExpand[jj] != null) {
+ Object[] tmp = expandedObjects;
+ expandedObjects = new Object[expandedObjects.length + 1];
+
+ for (int kk = 0; kk < tmp.length; kk++) {
+ expandedObjects[kk] = tmp[kk];
+ }
+
+ expandedObjects[expandedObjects.length - 1] = elementsToExpand[jj];
+ }
+ }
+ }
+
+
+ private boolean notAlreadyExpanded(Object obj, Object[] expObjs) {
+ for (int ii = 0; ii < expObjs.length; ii++) {
+ if (expObjs[ii].equals(obj)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private TreePath getTreePathForSEI(TreeViewer treeViewer, IWebServiceProject wsProject)
+ {
+ TreePath[] treePaths = treeViewer.getExpandedTreePaths();
+
+ for (int ii = 0; ii < treePaths.length; ii++) {
+ if (treePaths[ii].getLastSegment() instanceof ISEIChildList
+ && contains(treePaths[ii], wsProject)) {
+ return treePaths[ii];
+ }
+ }
+ return null;
+ }
+
+ private boolean contains(TreePath treePath, IWebServiceProject wsProject)
+ {
+ for(int ii=0; ii<treePath.getSegmentCount(); ii++)
+ {
+ if(treePath.getSegment(ii).equals(wsProject))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ private TreePath getTreePathForObject(TreeViewer treeViewer, Object obj) {
+ TreePath[] treePaths = treeViewer.getExpandedTreePaths();
+
+ for (int ii = 0; ii < treePaths.length; ii++) {
+ if (treePaths[ii].getLastSegment().equals(obj)) {
+ return treePaths[ii];
+ }
+ }
+
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ // TODO HACK!
+ updateSelection((IStructuredSelection) selection);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IStructuredSelection selection,
+ IJavaProject project) {
+ super.selectionChanged(selection);
+
+ this.project = project;
+ }
+
+ /**
+ * The structured selection has changed in the workbench. Subclasses should
+ * override this method to react to the change. Returns true if the action
+ * should be enabled for this selection, and false otherwise.
+ *
+ * When this method is overridden, the super method must always be invoked.
+ * If the super method returns false, this method must also return false.
+ *
+ * @param sel
+ * the new structured selection
+ */
+ public boolean updateSelection(IStructuredSelection s) {
+ if (!super.updateSelection(s))
+ return false;
+
+ srcObject = s.getFirstElement();
+
+ return true;
+ }
+
+ private ILogger logger() {
+ return new Logger();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate2#dispose()
+ */
+ public void dispose() {
+ // Dispose
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+ */
+ public void init(IAction action) {
+ // init
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
+ * org.eclipse.swt.widgets.Event)
+ */
+ public void runWithEvent(IAction action, Event event) {
+ runWithEvent(event);
+
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/OpenWSResourceAction.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/OpenWSResourceAction.java
new file mode 100755
index 0000000..62f86dd
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/OpenWSResourceAction.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator.actions;
+
+import java.util.HashMap;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationMessages;
+import org.eclipse.jst.ws.jaxws.dom.runtime.DomUtil;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.SelectionListenerAction;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.part.FileEditorInput;
+
+public class OpenWSResourceAction extends SelectionListenerAction implements IActionDelegate2
+{
+ protected Object srcObject;
+
+ private IJavaProject project;
+
+ private IServiceEndpointInterface sei;
+ private DomUtil util = DomUtil.INSTANCE;
+
+ protected OpenWSResourceAction() {
+ this(DomIntegrationMessages.OpenWSResourceAction_Name);
+ }
+
+ protected OpenWSResourceAction(String text) {
+ super(text);
+ }
+
+ @Override
+ public boolean isEnabled() {
+ boolean isEnabled = super.isEnabled()
+ && this.project!=null;
+
+ if(srcObject instanceof IWebService)
+ {
+ return isEnabled;
+ }
+
+ if(srcObject instanceof IServiceEndpointInterface)
+ {
+ return isEnabled;
+ }
+
+ if(srcObject instanceof IWebMethod)
+ {
+ return isEnabled;
+ }
+
+ if(srcObject instanceof IWebParam)
+ {
+ return isEnabled;
+ }
+
+ return false;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ run();
+ }
+
+ /**
+ * The user has invoked this action
+ */
+ public void run() {
+ if (!isEnabled())
+ return;
+
+ ICompilationUnit cu;
+ IWebMethod webMethod = null;
+ IWebParam webParam = null;
+
+ if(srcObject instanceof IWebMethod)
+ {
+ webMethod = (IWebMethod)srcObject;
+ srcObject = sei;
+ }
+ if(srcObject instanceof IWebParam)
+ {
+ webParam = (IWebParam)srcObject;
+ webMethod = (IWebMethod)webParam.eContainer();
+ srcObject = sei;
+ }
+
+ try {
+
+ cu = project.findType(((IJavaWebServiceElement) srcObject).getImplementation()).getCompilationUnit();
+
+ IWorkbenchPage page = getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+ IEditorDescriptor desc = getWorkbench().getEditorRegistry().getDefaultEditor(cu.getResource().getName());
+
+ cu = getCUToOpen(cu, webMethod);
+ if (cu == null)
+ {
+ logger().logError("Unable to locate containing CU to open"); //$NON-NLS-1$
+ return;
+ }
+
+ IFile file = getWorkspace().getRoot().findFilesForLocation(cu.getResource().getLocation())[0];
+ IEditorPart editor = page.openEditor(new FileEditorInput(file), desc.getId());
+
+ IMarker marker = file.createMarker(IMarker.TEXT);
+ HashMap<String, Integer> map = new HashMap<String, Integer>();
+
+ map.put(IMarker.CHAR_START, getMarkerPosition(cu, webMethod, false));
+ map.put(IMarker.CHAR_END, getMarkerPosition(cu, webMethod, true));
+
+ marker.setAttributes(map);
+
+ IDE.gotoMarker(editor, marker);
+ } catch (PartInitException pie) {
+ logger().logError("Unable to open part editor", pie); //$NON-NLS-1$
+ } catch(CoreException ce) {
+ logger().logError(ce.getMessage(), ce);
+ }
+ }
+
+ private int getMarkerPosition(ICompilationUnit cu, IWebMethod webMethod, boolean endPos) throws JavaModelException
+ {
+ final IType[] types = cu.getTypes();
+ for (int ii = 0; ii < types.length; ii++)
+ {
+ if (webMethod == null)
+ {
+ return getPosition(types[ii], endPos);
+ }
+
+ final IMethod method = util.findMethod(types[ii], webMethod);
+ if (method==null) {
+ continue;
+ }
+
+ return getPosition(method, endPos);
+ }
+
+ return 0;
+ }
+
+ private int getPosition(IMember member, boolean endPos) throws JavaModelException
+ {
+ return member.getNameRange().getOffset() + ((endPos) ? member.getNameRange().getLength() : 0);
+ }
+
+ private ICompilationUnit getCUToOpen(ICompilationUnit cu, IWebMethod webMethod)
+ {
+ if (webMethod == null)
+ {
+ return cu;
+ }
+
+ try
+ {
+ final IType[] types = cu.getTypes();
+ for(int ii=0; ii<types.length; ii++)
+ {
+ IMethod method = util.findMethod(types[ii], webMethod);
+ if (method != null)
+ {
+ return types[ii].getCompilationUnit();
+ }
+ }
+
+ for(int ii=0; ii<types.length; ii++)
+ {
+ IType[] superIntfTypes = types[ii].newSupertypeHierarchy(null).getSuperInterfaces(types[ii]);
+
+ for(int jj=0; jj<superIntfTypes.length; jj++)
+ {
+ ICompilationUnit cuToOpen = getCUToOpen(superIntfTypes[jj].getCompilationUnit(), webMethod);
+
+ if(cuToOpen!=null)
+ {
+ return cuToOpen;
+ }
+ }
+
+ IType superClassType = types[ii].newSupertypeHierarchy(null).getSuperclass(types[ii]);
+
+ ICompilationUnit cuToOpen = getCUToOpen(superClassType.getCompilationUnit(), webMethod);
+
+ if(cuToOpen!=null)
+ {
+ return cuToOpen;
+ }
+ }
+ }
+ catch(JavaModelException jme)
+ {
+ logger().logError(jme.getMessage(), jme);
+ }
+
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ updateSelection((IStructuredSelection) selection);
+ }
+
+ public void selectionChanged(IStructuredSelection selection, IJavaProject project, IServiceEndpointInterface sei) {
+ super.selectionChanged(selection);
+
+ this.project = project;
+ this.sei = sei;
+ }
+
+ /**
+ * The structured selection has changed in the workbench. Subclasses should
+ * override this method to react to the change. Returns true if the action
+ * should be enabled for this selection, and false otherwise.
+ *
+ * When this method is overridden, the super method must always be invoked.
+ * If the super method returns false, this method must also return false.
+ *
+ * @param sel
+ * the new structured selection
+ */
+ public boolean updateSelection(IStructuredSelection s) {
+ if (!super.updateSelection(s))
+ return false;
+
+ srcObject = s.getFirstElement();
+
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate2#dispose()
+ */
+ public void dispose() {
+ // Dispose
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+ */
+ public void init(IAction action) {
+ // init
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
+ * org.eclipse.swt.widgets.Event)
+ */
+ public void runWithEvent(IAction action, Event event) {
+ runWithEvent(event);
+
+ }
+
+ private ILogger logger() {
+ return new Logger();
+ }
+
+ private IWorkbench getWorkbench() {
+ return PlatformUI.getWorkbench();
+ }
+
+ private IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/WSActionProvider.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/WSActionProvider.java
new file mode 100755
index 0000000..bdf8ddf
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/navigator/actions/WSActionProvider.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.navigator.actions;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.actions.ActionContext;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionConstants;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonMenuConstants;
+
+
+public class WSActionProvider extends CommonActionProvider
+{
+ private OpenWSResourceAction openAction;
+
+ private NavigateToImplementationAction navigateAction;
+
+ @Override
+ public void fillActionBars(IActionBars actionBars)
+ {
+ if(openAction.isEnabled())
+ actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openAction);
+
+ if(navigateAction.isEnabled())
+ actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), navigateAction);
+ }
+
+ @Override
+ public void fillContextMenu(IMenuManager menu)
+ {
+ if (getContext()==null || getContext().getSelection().isEmpty())
+ return;
+
+ IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
+ openAction.selectionChanged(selection);
+ navigateAction.selectionChanged(selection);
+ navigateAction.setText(navigateAction.getText());
+
+ if (openAction.isEnabled())
+ menu.insertAfter(ICommonMenuConstants.GROUP_OPEN, openAction);
+
+ if(navigateAction.isEnabled())
+ menu.insertAfter(ICommonMenuConstants.GROUP_OPEN_WITH, navigateAction);
+ }
+
+ @Override
+ public void init(ICommonActionExtensionSite site) {
+ super.init(site);
+
+ openAction = new OpenWSResourceAction();
+ navigateAction = initNavigateAction(site);
+ }
+
+ protected NavigateToImplementationAction initNavigateAction(ICommonActionExtensionSite site)
+ {
+ return new NavigateToImplementationAction(site.getStructuredViewer());
+ }
+
+ @Override
+ public void setContext(ActionContext context) {
+ if (context != null && context.getSelection() instanceof IStructuredSelection)
+ {
+ IStructuredSelection selection = (IStructuredSelection) context.getSelection();
+
+ if(selection instanceof ITreeSelection)
+ {
+ TreePath[] paths = ((ITreeSelection)selection).getPathsFor(selection.getFirstElement());
+ IProject project = null;
+
+ for(int ii=0; ii<paths.length; ii++)
+ {
+ TreePath path = paths[ii];
+ IServiceEndpointInterface sei = null;
+
+ for(int jj=0; jj<path.getSegmentCount(); jj++)
+ {
+ if(path.getSegment(jj) instanceof IServiceEndpointInterface)
+ {
+ sei = (IServiceEndpointInterface)path.getSegment(jj);
+ break;
+ }
+ }
+
+ for(int jj=0; jj<path.getSegmentCount(); jj++)
+ {
+ if(path.getSegment(jj) instanceof IProject)
+ {
+ project = (IProject)path.getSegment(jj);
+ openAction.selectionChanged(selection, getJavaProject(project), sei);
+ navigateAction.selectionChanged(selection, getJavaProject(project));
+ super.setContext(context);
+ return;
+ }
+ }
+ }
+ }
+
+ openAction.selectionChanged(selection);
+ navigateAction.selectionChanged(selection);
+ }
+
+ super.setContext(context);
+ }
+
+ protected IJavaProject getJavaProject(IProject project)
+ {
+ return JavaCore.create(project);
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/validation/DomValidationHelper.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/validation/DomValidationHelper.java
new file mode 100755
index 0000000..b5ec3a4
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/validation/DomValidationHelper.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.validation;
+
+import org.eclipse.jst.ws.jaxws.dom.runtime.DomUtil;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDOMRuntimeExtension;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMRuntimeManager;
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+import org.eclipse.wst.validation.internal.operations.WorkbenchContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+
+/**
+ * {@link IValidationContext} implementor. Acts as helper class for validation. Used
+ * by {@link DomValidationManager} to retrieve DOM model.
+ *
+ * @author Georgi Vachkov
+ */
+@SuppressWarnings("restriction")
+public class DomValidationHelper extends WorkbenchContext
+{
+ /**
+ * Constructor - registers models that this helper will support. Registration is done
+ * by setting model 'symbolicName' and method to be called for this method to be retrieved
+ */
+ public DomValidationHelper()
+ {
+ registerModel("webServiceProject", "getWebServiceProject", new Class[] {String.class}); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Executed by {@link WorkbenchContext} when {@link WorkbenchContext#loadModel(String, Object[])} is called
+ * and finds the corresponding to {@link #getProject()} {@link IWebServiceProject}
+ *
+ * @param domId
+ * @return found {@link IWebServiceProject} or <code>null</code>
+ */
+ public IWebServiceProject getWebServiceProject(final String domId)
+ {
+ ContractChecker.nullCheckParam(domId, "domId"); //$NON-NLS-1$
+
+ final IWsDOMRuntimeExtension domRuntime = getDomRuntime(domId);
+ if (domRuntime == null) {
+ return null;
+ }
+
+ try {
+ final IDOM dom = domRuntime.getDOM();
+ if (dom==null) {
+ return null;
+ }
+
+ return DomUtil.INSTANCE.findProjectByName(dom, getProject().getName());
+ }
+ catch (WsDOMLoadCanceledException e) { // $JL-EXC$
+ return null;
+ }
+ }
+
+ protected IWsDOMRuntimeExtension getDomRuntime(final String domId) {
+ return WsDOMRuntimeManager.instance().getDOMRuntime(domId);
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/validation/DomValidationManager.java b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/validation/DomValidationManager.java
new file mode 100755
index 0000000..622f26c
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.integration/src/org/eclipse/jst/ws/jaxws/dom/integration/validation/DomValidationManager.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.integration.validation;
+
+import java.util.Collection;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jst.ws.jaxws.dom.integration.internal.plugin.DomIntegrationPlugin;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.CustomDomItemProviderAdapterFactory;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.DOMAdapterFactoryLabelProvider;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.ISEIChildList;
+import org.eclipse.jst.ws.jaxws.dom.integration.navigator.IWebServiceChildList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.validation.DomValidatorFactory;
+import org.eclipse.jst.ws.jaxws.dom.runtime.validation.IDomValidator;
+import org.eclipse.jst.ws.jaxws.utils.dom.validation.DomValidationConstants;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.validation.internal.provisional.core.IProjectValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
+
+/**
+ * Registered to WST validation framework IValidator. Receives notifications for
+ * validation to be performed and calls registered DOM validators to perform the
+ * real validation.
+ *
+ * @author Georgi Vachkov
+ */
+public class DomValidationManager implements IValidatorJob
+{
+ public void cleanup(final IReporter reporter) {
+ // no resources for clean up
+ }
+
+ public void validate(final IValidationContext context, final IReporter reporter) {
+ validateInJob(context, reporter);
+ }
+
+ public IStatus validateInJob(final IValidationContext context, final IReporter reporter)
+ {
+ cleanMarkers((IProjectValidationContext) context);
+
+ IWebServiceProject wsProject;
+ for (IDomValidator validator : getValidators())
+ {
+ wsProject = (IWebServiceProject)context.loadModel("webServiceProject", new String []{validator.getSupportedDomRuntime()}); //$NON-NLS-1$
+ if (wsProject == null) {
+ continue;
+ }
+
+ validator.validate(wsProject);
+ refreshTree(wsProject);
+ }
+
+ return IValidatorJob.OK_STATUS;
+ }
+
+ public ISchedulingRule getSchedulingRule(final IValidationContext helper) {
+ return null;
+ }
+
+ protected void refreshTree(final IWebServiceProject wsProject)
+ {
+ final DOMAdapterFactoryLabelProvider labelProvider = labelProvider();
+ if (labelProvider == null) {
+ return;
+ }
+
+ Display.getDefault().asyncExec(new RefreshRunnable(labelProvider, wsProject));
+ }
+
+ protected DOMAdapterFactoryLabelProvider labelProvider()
+ {
+ return DomIntegrationPlugin.getDefault().getLabelProvider();
+ }
+
+ protected void cleanMarkers(IProjectValidationContext context)
+ {
+ try {
+ final IProject project = context.getProject();
+ if (project != null && project.isAccessible()) {
+ project.deleteMarkers(DomValidationConstants.MARKER_ID, true, IResource.DEPTH_INFINITE);
+ }
+ }
+ catch (CoreException e) {
+ (new Logger()).logError(e.getMessage(), e);
+ }
+ }
+
+ protected Collection<IDomValidator> getValidators()
+ {
+ return DomValidatorFactory.INSTANCE.getRegisteredValidators();
+ }
+
+ /**
+ * Class that fires label changed event to the label provider to apply validation
+ * results in the displayed tree - i.e. decorate images
+ *
+ * @author Georgi Vachkov
+ */
+ protected class RefreshRunnable implements Runnable
+ {
+ private final DOMAdapterFactoryLabelProvider labelProvider;
+ private final IWebServiceProject wsProject;
+
+ public RefreshRunnable(final DOMAdapterFactoryLabelProvider labelProvider, final IWebServiceProject wsProject) {
+ this.labelProvider = labelProvider;
+ this.wsProject = wsProject;
+ }
+
+ public void run()
+ {
+ labelProvider.fireLabelProviderChanged(wsProject);
+
+ fireLabelProviderChanged(ISEIChildList.class);
+ fireLabelProviderChanged(IWebServiceChildList.class);
+
+ final TreeIterator<EObject> allChilds = wsProject.eAllContents();
+ while (allChilds.hasNext()) {
+ labelProvider.fireLabelProviderChanged(allChilds.next());
+ }
+ }
+
+ private void fireLabelProviderChanged(final Class<?> adapterClass)
+ {
+ final Adapter adapter = CustomDomItemProviderAdapterFactory.INSTANCE.adapt(wsProject, adapterClass);
+ if (adapter == null) {
+ return;
+ }
+
+ labelProvider.fireLabelProviderChanged(adapter);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.classpath b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.classpath
new file mode 100755
index 0000000..2d1a430
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.project b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.project
new file mode 100755
index 0000000..7938766
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.jaxws.dom.runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..ae0484e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Jul 20 15:25:31 EEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..9c1a950
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/META-INF/MANIFEST.MF
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.ws.jaxws.dom.runtime;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin.JaxWsDomRuntimePlugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.jdt.core,
+ org.eclipse.jst.ws.jaxws.utils,
+ org.eclipse.ui,
+ org.eclipse.emf.validation,
+ org.eclipse.jface.text,
+ org.eclipse.jst.j2ee,
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.jst.common.project.facet.core
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.jst.ws.jaxws.dom.runtime,
+ org.eclipse.jst.ws.jaxws.dom.runtime.api,
+ org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;x-friends:="org.eclipse.jst.ws.jaxws.dom.runtime.tests",
+ org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin;x-friends:="org.eclipse.jst.ws.jaxws.dom.runtime.tests",
+ org.eclipse.jst.ws.jaxws.dom.runtime.internal.util;x-friends:="org.eclipse.jst.ws.jaxws.dom.runtime.tests",
+ org.eclipse.jst.ws.jaxws.dom.runtime.internal.validation.provider;x-friends:="org.eclipse.jst.ws.jaxws.dom.runtime.tests",
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence,
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation,
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation.impl,
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence.defaults,
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence.serializer,
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence.state,
+ org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync,
+ org.eclipse.jst.ws.jaxws.dom.runtime.provider,
+ org.eclipse.jst.ws.jaxws.dom.runtime.registry,
+ org.eclipse.jst.ws.jaxws.dom.runtime.util,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.impl,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.messages,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.provider,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.provider.exceptions,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.sei,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.webmethod,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.webparam,
+ org.eclipse.jst.ws.jaxws.dom.runtime.validation.webservice
+Import-Package: javax.jws
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/about.html b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/about.html
new file mode 100644
index 0000000..8410afb
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>August 15, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/build.properties b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/build.properties
new file mode 100755
index 0000000..3aae249
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2009 by SAP AG, Walldorf.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# SAP AG - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/plugin.properties b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/plugin.properties
new file mode 100755
index 0000000..e5db512
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/plugin.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2009 by SAP AG, Walldorf.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# SAP AG - initial API and implementation
+###############################################################################
+###############################################################################
+# Language File for this Plugin
+###############################################################################
+
+# Generic Label and Description
+pluginName = WS Common Runtime
+DomValidatorsExtension_Name = DOM Validator
+Bundle-Name.0 = JAX-WS DOM runtime plug-in (Incubation)
+DomRuntimesExtension_Name = DOM Runtimes
+providerName = www.example.org
+ExtensionPoint-Name.3 = JEE5 DOM contribution
+ExtensionPoint-Name.5 = JEE5 DOM validation contribution
+category.name.0 = JEE5 DOM constraint provider
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/plugin.xml b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/plugin.xml
new file mode 100755
index 0000000..dbfa195
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/plugin.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+ Copyright (c) 2009 by SAP AG, Walldorf.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ SAP AG - initial API and implementation
+ -->
+
+<plugin>
+
+ <extension-point id="domruntimes" name="%DomRuntimesExtension_Name" schema="schema/runtimes.exsd"/>
+ <extension-point id="domValidator" name="%DomValidatorsExtension_Name" schema="schema/domValidator.exsd"/>
+
+ <extension point="org.eclipse.ui.startup">
+ <startup class="org.eclipse.jst.ws.jaxws.dom.runtime.WsDomStartupParticipant"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http:///org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore"
+ class = "org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage" />
+ </extension>
+
+
+ <extension
+ id="org.eclipse.jst.ws.jaxws.dom.jee5"
+ name="%ExtensionPoint-Name.3"
+ point="org.eclipse.jst.ws.jaxws.dom.runtime.domruntimes">
+ <implementation class="org.eclipse.jst.ws.jaxws.dom.runtime.persistence.Jee5WsDomRuntimeExtension"/>
+ <project_facet id="jst.ejb" version="3.0"/>
+ <project_facet id="jst.web" version="2.5"/>
+ </extension>
+ <extension
+ id="dom"
+ name="%ExtensionPoint-Name.5"
+ point="org.eclipse.jst.ws.jaxws.dom.runtime.domValidator">
+ <implementation class="org.eclipse.jst.ws.jaxws.dom.runtime.validation.JaxWsDomValidator"/>
+ </extension>
+
+ <!-- {{{ EMF validation contribution -->
+
+ <extension
+ point="org.eclipse.emf.validation.constraintProviders">
+ <category
+ name="%category.name.0"
+ id="org.eclipse.jst.ws.jaxws.dom.jee5"/>
+ <constraintProvider
+ cache="true"
+ class="org.eclipse.jst.ws.jaxws.dom.runtime.validation.WsDynamicModelConstraintProvider">
+ <package namespaceUri="http:///org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore"/>
+ </constraintProvider>
+ </extension>
+ <extension
+ point="org.eclipse.emf.validation.constraintBindings">
+ <clientContext
+ default="false"
+ id="org.eclipse.jst.ws.jaxws.dom.jee5.domContext">
+ <enablement>
+ <or>
+ <instanceof
+ value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam">
+ </instanceof>
+ </or>
+ </enablement>
+ </clientContext>
+ <binding
+ context="org.eclipse.jst.ws.jaxws.dom.jee5.domContext"
+ category="org.eclipse.jst.ws.jaxws.dom.jee5"/>
+ </extension>
+ <extension point="org.eclipse.emf.validation.validationListeners">
+ <listener class="org.eclipse.jst.ws.jaxws.dom.runtime.validation.WsProblemsReporter">
+ <clientContext id="org.eclipse.jst.ws.jaxws.dom.jee5.domContext"/>
+ </listener>
+ </extension>
+ <!-- }}} EMF validation contribution -->
+
+</plugin>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/schema/domValidator.exsd b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/schema/domValidator.exsd
new file mode 100755
index 0000000..c354381
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/schema/domValidator.exsd
@@ -0,0 +1,107 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jst.ws.jaxws.dom.runtime" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.jst.ws.jaxws.dom.runtime" id="consumertype" name="Consumer Type Provider"/>
+ </appInfo>
+ <documentation>
+ Extension point for registering DOM validator factory that will instantiate.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="implementation"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="implementation">
+ <annotation>
+ <documentation>
+ Describes a consumertype
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jst.ws.jaxws.dom.runtime.validation.IDomValidator"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/schema/runtimes.exsd b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/schema/runtimes.exsd
new file mode 100755
index 0000000..493eb25
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/schema/runtimes.exsd
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jst.ws.jaxws.dom.runtime" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.jst.ws.jaxws.dom.runtime" id="supportedruntimes" name="Supported Runtimes"/>
+ </appInfo>
+ <documentation>
+ Use this extension point to add support for a runtime in the WS DOM Tree.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="implementation"/>
+ <element ref="project_facet" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="implementation">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDOMRuntimeExtension"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="project_facet">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="version" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/DomUtil.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/DomUtil.java
new file mode 100755
index 0000000..67d18cb
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/DomUtil.java
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.util.DomSwitch;
+
+
+public class DomUtil
+{
+ public static final DomUtil INSTANCE = new DomUtil();
+
+ private final DomSwitch<String> implSwitch;
+
+ public DomUtil() {
+ implSwitch = createImplFinderSwitch();
+ }
+
+ public void setFeatureValue(final EObject object, final int featureId, final Object value)
+ {
+ final EStructuralFeature feature = object.eClass().getEStructuralFeature(featureId);
+ object.eSet(feature, value);
+ }
+
+ public Object getFeatureValue(final EObject object, final int featureId)
+ {
+ final EStructuralFeature feature = object.eClass().getEStructuralFeature(featureId);
+ return object.eGet(feature);
+ }
+
+ public void addToCollectionFeature(final EObject object, final int featureId, final Object value)
+ {
+ @SuppressWarnings("unchecked")
+ final Collection<Object> oldValue = (Collection<Object>) getFeatureValue(object, featureId);
+ oldValue.add(value);
+ }
+
+ public IWebServiceProject findProjectByName(IDOM dom, String name)
+ {
+ for (IWebServiceProject wsProject : dom.getWebServiceProjects())
+ {
+ if (wsProject.getName().equals(name))
+ {
+ return wsProject;
+ }
+ }
+ return null;
+ }
+
+ public IWebService findWsByImplName(IWebServiceProject wsProject, String name)
+ {
+ for (IWebService ws : wsProject.getWebServices())
+ {
+ if (ws.getImplementation().equals(name))
+ {
+ return ws;
+ }
+ }
+ return null;
+ }
+
+ public IServiceEndpointInterface findSeiByImplName(IWebServiceProject wsProject, String name)
+ {
+ for (IServiceEndpointInterface sei : wsProject.getServiceEndpointInterfaces())
+ {
+ if (sei.getImplementation().equals(name))
+ {
+ return sei;
+ }
+ }
+ return null;
+ }
+
+
+ public IWebMethod findWebMethodByImpl(IServiceEndpointInterface sei, String impl)
+ {
+ for (IWebMethod wm : sei.getWebMethods())
+ {
+ if (wm.getImplementation().equals(impl))
+ {
+ return wm;
+ }
+ }
+ return null;
+ }
+
+ public IMethod findMethod(final IType seiType, final IWebMethod webMethod) throws JavaModelException
+ {
+ for (IMethod method : seiType.getMethods())
+ {
+ if (webMethod.getImplementation().equals(calcImplementation(method))) {
+ return method;
+ }
+ }
+
+ return null;
+ }
+
+ public IJavaWebServiceElement findJavaWebServiceElemByImplName(IWebServiceProject wsProject, String name)
+ {
+ final IWebService ws = findWsByImplName(wsProject, name);
+ return ws == null ? findSeiByImplName(wsProject, name) : ws;
+ }
+
+ /**
+ * Calculates the method signature to be used as implementation in {@link IWebMethod}
+ * @param method
+ * @return calculated string
+ * @throws JavaModelException
+ */
+ public String calcImplementation(final IMethod method) throws JavaModelException
+ {
+ return method.getElementName() + method.getSignature();
+ }
+
+ /**
+ * Extract {@link IWebServiceProject} out of DOM object by recursively
+ * iterating parent objects.
+ * @param eObject
+ * @return the found project or <code>null</code> in case not found
+ */
+ public IWebServiceProject findWsProject(EObject eObject)
+ {
+ EObject parent = eObject;
+ while (parent!=null)
+ {
+ if (parent instanceof IWebServiceProject) {
+ return (IWebServiceProject)parent;
+ }
+
+ parent = parent.eContainer();
+ }
+
+ return null;
+ }
+
+ /**
+ * Defines if this SEI is part of outside-in web service
+ * @param sei
+ * @return true if there is a web service with wsdlLocation set to something different than <code>null</code>
+ */
+ public boolean isOutsideInWebService(final IServiceEndpointInterface sei)
+ {
+ if (sei == null) {
+ return false;
+ }
+
+ for (IWebService webService : sei.getImplementingWebServices()) {
+ if (webService.getWsdlLocation()!=null) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Calculates unique implementation for DOM object in the scope of the resource in which
+ * they exist. Useful when you need to uniquely identify DOM object.
+ *
+ * @param eObject
+ * @return calculated implementation
+ */
+ public String calcUniqueImpl(final EObject eObject)
+ {
+ if (eObject.eClass().getClassifierID() == DomPackage.IWEB_PARAM)
+ {
+ final IWebParam wp = (IWebParam) eObject;
+ return ((IWebMethod)wp.eContainer()).getImplementation() + "[" + wp.getImplementation() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ return extractImplementation(eObject);
+ }
+
+ /**
+ * Extracts the implementation property for DOM object without casting :-D.
+ *
+ * @param eObject
+ * @return the implementation
+ */
+ public String extractImplementation(final EObject eObject) {
+ return implSwitch.doSwitch(eObject);
+ }
+
+ private DomSwitch<String> createImplFinderSwitch()
+ {
+ return new DomSwitch<String>()
+ {
+ @Override
+ public String caseIWebService(IWebService ws) {
+ return ws.getImplementation();
+ }
+
+ @Override
+ public String caseIServiceEndpointInterface(IServiceEndpointInterface sei) {
+ return sei.getImplementation();
+ }
+
+ @Override
+ public String caseIWebMethod(IWebMethod wm) {
+ return wm.getImplementation();
+ }
+
+ @Override
+ public String caseIWebParam(IWebParam wp) {
+ return wp.getImplementation();
+ }
+
+ @Override
+ public String caseIWebServiceProject(IWebServiceProject wsProject) {
+ return wsProject.getName();
+ }
+ };
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/GeneralTypesNames.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/GeneralTypesNames.java
new file mode 100755
index 0000000..0c4bdbc
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/GeneralTypesNames.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+/**
+ * Class containing constatns with names of some general types used often in validation.
+ *
+ * @author Georgi Vachkov
+ *
+ */
+
+public interface GeneralTypesNames
+{
+ /** java.lang.Object */
+ public static final String JAVA_LANG_OBJECT = "java.lang.Object"; //$NON-NLS-1$
+
+ /** java.io.Serializable */
+ public static final String JAVA_IO_SERIALIZABLE = "java.io.Serializable"; //$NON-NLS-1$
+
+ /** java.rmi.Remote */
+ public static final String JAVA_RMI_REMOTE = "java.rmi.Remote"; //$NON-NLS-1$
+
+ /** java.lang.Throwable */
+ public static final String JAVA_LANG_THROWABLE = "java.lang.Throwable"; //$NON-NLS-1$
+
+ /** java.lang.Exception */
+ public static final String JAVA_LANG_EXCEPTION = "java.lang.Exception"; //$NON-NLS-1$
+
+ /** java.lang.Cloneable */
+ public static final String JAVA_LANG_CLONEABLE = "java.lang.Cloneable"; //$NON-NLS-1$
+
+ /** java.lang.Comparable */
+ public static final String JAVA_LANG_COMPARABLE = "java.lang.Comparable"; //$NON-NLS-1$
+
+ /** java.util.Map */
+ public static final String JAVA_UTIL_MAP = "java.util.Map"; //$NON-NLS-1$
+
+ /** java.util.Collection */
+ public static final String JAVA_UTIL_COLLECTION = "java.util.Collection"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/INamedExtensionInfo.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/INamedExtensionInfo.java
new file mode 100755
index 0000000..ce509af
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/INamedExtensionInfo.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+/**
+ * Interface representig and extention.
+ */
+public interface INamedExtensionInfo
+{
+
+ /**
+ * The unique ID to identify this consumer type when calling the <code>ProxyGeneratorFactory</code>, e.g. <code>jee/jaxws</code>
+ *
+ * @return non-empty string containing the ID
+ */
+ public abstract String getId();
+
+ /**
+ * A verbose name for the type of consumer, e.g. <code>JAX-WS</code>
+ *
+ * @return localized string used for the UI
+ */
+ public abstract String getName();
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/IPropertyDefaults.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/IPropertyDefaults.java
new file mode 100755
index 0000000..6cbcd10
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/IPropertyDefaults.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * Interface that provides default values for DOM object's properties.
+ * Usually this interface should be used by clients that need to revert some
+ * property value to the default one.
+ *
+ * @author Georgi Vachkov
+ */
+public interface IPropertyDefaults
+{
+ /**
+ * Defines the default value for this <code>feature</code>.
+ *
+ * @param feature the feature representing the objects property type
+ * @return the default value. In case <code>null</code> is possible property value
+ * <code>null</code> might be returned
+ */
+ public Object getDefault(EStructuralFeature feature);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/IPropertyState.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/IPropertyState.java
new file mode 100755
index 0000000..e8c4e9b
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/IPropertyState.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * Interface for checking the state of some property for concrete DOM object.
+ * This interface should be used by DOM clients that need to know if some property
+ * can be changed - for example UI editor that needs to know if the property should
+ * be enabled for edit or disabled.
+ *
+ * @author Georgi Vachkov
+ */
+public interface IPropertyState
+{
+ /**
+ * Defines if property is changeable.
+ * @return <code>true</code> in case property can be changed
+ */
+ public boolean isChangeable(EStructuralFeature feature);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/PrimitiveTypeHandler.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/PrimitiveTypeHandler.java
new file mode 100755
index 0000000..15127b2
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/PrimitiveTypeHandler.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Utility class used for some general primitive type checks/operations.
+ *
+ * @author Georgi Vachkov
+ *
+ */
+
+public class PrimitiveTypeHandler
+{
+ private static final String ARRAY_MARK = "[]"; //$NON-NLS-1$
+
+ private static final String VOID = "void"; //$NON-NLS-1$
+
+ private static Map<String, String> primitiveTypes = new HashMap<String, String>();
+
+ static
+ {
+ primitiveTypes.put("boolean", "java.lang.Boolean"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Boolean", "java.lang.Boolean"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("byte", "java.lang.Byte"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Byte", "java.lang.Byte"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("char", "java.lang.Character"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Character", "java.lang.Character"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("double", "java.lang.Double"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Double", "java.lang.Double"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("float", "java.lang.Float"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Float", "java.lang.Float"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("int", "java.lang.Integer"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Integer", "java.lang.Integer"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.String", "java.lang.String"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("long", "java.lang.Long"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Long", "java.lang.Long"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("short", "java.lang.Short"); //$NON-NLS-1$ //$NON-NLS-2$
+ primitiveTypes.put("java.lang.Short", "java.lang.Short"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Returns the object type for primitive type. Mapping between types:
+ *
+ * <pre>
+ * "boolean, "java.lang.Boolean"
+ * "java.lang.Boolean", "java.lang.Boolean"
+ * "byte", "java.lang.Byte"
+ * "java.lang.Byte", "java.lang.Byte"
+ * "char", "java.lang.Character"
+ * "java.lang.Character", "java.lang.Character"
+ * "double", "java.lang.Double"
+ * "java.lang.Double", "java.lang.Double"
+ * "float", "java.lang.Float"
+ * "java.lang.Float", "java.lang.Float"
+ * "int", "java.lang.Integer"
+ * "java.lang.Integer", "java.lang.Integer"
+ * "java.lang.String", "java.lang.String"
+ * "long", "java.lang.Long"
+ * "java.lang.Long", "java.lang.Long"
+ * "short", "java.lang.Short"
+ * "java.lang.Short", "java.lang.Short"
+ * </pre>
+ *
+ * @param typeName
+ * @return wrapper class name for <tt>typeName</tt>.
+ */
+ public static String getObjectTypeForPrimitiveType(String typeName)
+ {
+ return primitiveTypes.get(typeName);
+ }
+
+ /**
+ * @param typeName
+ * @return true if <tt>typeName</tt> is java primitive type.
+ */
+ public static boolean isJavaPrimitiveType(String typeName)
+ {
+ return (primitiveTypes.get(typeName) != null);
+ }
+
+ /**
+ * Checks if the <tt>typeName</tt> represents an array type.
+ *
+ * @param typeName
+ * @return true if <tt>typeName</tt> is array type
+ */
+ public static boolean isArrayType(String typeName)
+ {
+ return typeName.trim().endsWith(ARRAY_MARK);
+ }
+
+ /**
+ * Checks if <tt>typeName</tt> is void.
+ *
+ * @param typeName
+ * @return true if <tt>typeName</tt> is void.
+ */
+ public static boolean isVoidType(String typeName)
+ {
+ return typeName.trim().equals(VOID);
+ }
+
+ /**
+ * Retrieves the real type name from array type. Example:
+ *
+ * <pre>
+ * For type 'int[]' returns 'int'
+ * For type 'String[][]' returns 'String'
+ * </pre>
+ *
+ * @param typeName
+ * @return real type name
+ */
+ public static String getTypeFromArrayType(String typeName)
+ {
+ String name = typeName.trim().replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ while (name.endsWith(ARRAY_MARK))
+ {
+ name = name.substring(0, name.length() - ARRAY_MARK.length());
+ }
+
+ return name;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/TypeResolver.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/TypeResolver.java
new file mode 100755
index 0000000..82418e6
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/TypeResolver.java
@@ -0,0 +1,192 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+
+/**
+ * Utility class containing logic for resolving type names from IType object.
+ *
+ * @author Georgi Vachkov
+ */
+public class TypeResolver
+{
+ private static final String DOT = "."; //$NON-NLS-1$
+
+ private static final String QUOTE = "?"; //$NON-NLS-1$
+
+ /**
+ * Resolves <tt>typeName</tt> using <tt>type</tt>. In case when <tt>typeName</tt> contains generics declaration all types used in
+ * declaraion are returned.
+ *
+ * @param typeName
+ * @param type
+ * @return list of resolved types
+ * @throws JavaModelException
+ */
+ public static List<String> resolveTypes(String typeName, IType type) throws JavaModelException
+ {
+ List<String> names = new ArrayList<String>(1);
+ String realTypeName = Signature.toString(typeName);
+
+ if (hasGenerics(realTypeName))
+ {
+ names = getTypesFromGenerics(realTypeName, type);
+ } else
+ {
+ names.add(realTypeName);
+ }
+
+ List<String> resolvedNames = new ArrayList<String>(names.size());
+ for (String name : names)
+ {
+ String resolvedName = resolveType(name, type);
+
+ if (!resolvedName.equals(QUOTE))
+ {
+ resolvedNames.add(resolvedName);
+ }
+ }
+
+ return resolvedNames;
+ }
+
+ /**
+ * Retrieves real type in case type is present by generics.
+ *
+ * @param typeName
+ * @param declaringType
+ * @return the real type of the expression if <tt>typeName</tt> is an expression otherwise <tt>typeName</tt>
+ * @throws JavaModelException
+ */
+ private static String getType(String typeName, IType declaringType) throws JavaModelException
+ {
+ if (typeName.indexOf('?') > -1)
+ {
+ int pos = typeName.trim().lastIndexOf(' ');
+ if (pos > -1)
+ {
+ return TypeResolver.resolveType(typeName.substring(pos + 1), declaringType);
+ }
+ }
+
+ return typeName;
+ }
+
+ /**
+ * Gets the types used in generics declaration.
+ * @param typeName
+ * @param type the type containing resolved type
+ * @return list of type names.
+ * @throws JavaModelException
+ */
+ public static final List<String> getTypesFromGenerics(String typeName, IType type) throws JavaModelException
+ {
+ String name = typeName;
+ List<String> names= new ArrayList<String>();
+
+ int ltPos = -1;
+ int gtPos = -1;
+ while ((ltPos = name.indexOf('<')) > -1)
+ {
+ if ((gtPos = name.lastIndexOf('>')) == -1)
+ {
+ gtPos = name.length()-2;
+ }
+
+ String firstName = name.substring(0, ltPos) + name.substring(gtPos+1);
+ name = name.substring(ltPos+1, gtPos);
+
+ addName(firstName, names, type);
+ if (name.indexOf('<') == -1)
+ {
+ addName(name, names, type);
+ }
+ }
+
+ return names;
+ }
+
+ private static final void addName(final String name, final List<String> names, final IType type) throws JavaModelException
+ {
+ int comaPos = name.indexOf(',');
+ if( comaPos > -1)
+ {
+ names.add(name.substring(0, comaPos));
+ names.add(name.substring(comaPos+1));
+ }
+ else {
+ names.add(getType(name, type));
+ }
+ }
+
+ /**
+ * Resolves type.
+ *
+ * @param typeName
+ * @param type
+ * @return the resolved type name.
+ * @throws JavaModelException
+ */
+ public static String resolveType(final String typeName, final IType type) throws JavaModelException
+ {
+ String realTypeName = typeName;
+ if (PrimitiveTypeHandler.isArrayType(typeName))
+ {
+ return resolveType(PrimitiveTypeHandler.getTypeFromArrayType(typeName), type);
+ }
+
+ if (PrimitiveTypeHandler.isJavaPrimitiveType(realTypeName) || PrimitiveTypeHandler.isVoidType(realTypeName))
+ {
+ return realTypeName;
+ }
+
+ if (realTypeName.indexOf(DOT) > -1)
+ {
+ return realTypeName;
+ }
+
+ String[][] st = type.resolveType(realTypeName);
+ if (st != null)
+ {
+ if (st[0][0].length() == 0)
+ {
+ return st[0][1];
+ }
+
+ return st[0][0] + DOT + st[0][1];
+ }
+
+ if (realTypeName.startsWith(new String(new char[] { Signature.C_UNRESOLVED })))
+ {
+ return resolveType(realTypeName.substring(1, realTypeName.length()), type);
+ }
+
+ return realTypeName;
+ }
+
+ /**
+ * Checks whether <code>typeName</code> uses generics declaration. Example: for 'java.util.List<Strng>' the method will return true.
+ *
+ * @param typeName
+ * @return true is <tt>typeName</tt> contains generics declaration.
+ */
+ private static boolean hasGenerics(String typeName)
+ {
+ return (typeName.indexOf('<') > -1);
+ }
+
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/WsDomStartupParticipant.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/WsDomStartupParticipant.java
new file mode 100755
index 0000000..2a21001
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/WsDomStartupParticipant.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMRuntimeManager;
+import org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin.JaxWsDomRuntimeMessages;
+import org.eclipse.ui.IStartup;
+
+/**
+ * Startup participant registered on IDE startup extension point
+ *
+ * @author Georgi Vachkov
+ */
+public class WsDomStartupParticipant implements IStartup
+{
+
+ /**
+ * Called by the Eclipse on workbench startup.
+ * Starts load for registered web service runtimes
+ */
+ public void earlyStartup()
+ {
+ Job job = new Job(JaxWsDomRuntimeMessages.WsDomStartupParticipant_Startup_Job_Message)
+ {
+ @Override
+ protected IStatus run(final IProgressMonitor monitor)
+ {
+ WsDOMRuntimeManager.instance().createDOMRuntimes(monitor);
+ return Status.OK_STATUS;
+ }
+ };
+
+ job.setUser(false);
+ job.setPriority(Job.LONG);
+ job.setRule(ResourcesPlugin.getWorkspace().getRoot());
+ job.schedule();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/DomFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/DomFactory.java
new file mode 100755
index 0000000..5a87613
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/DomFactory.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.ecore.EFactory;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage
+ * @generated
+ */
+public interface DomFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ DomFactory eINSTANCE = org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>IDOM</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IDOM</em>'.
+ * @generated
+ */
+ IDOM createIDOM();
+
+ /**
+ * Returns a new object of class '<em>IJava Web Service Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IJava Web Service Element</em>'.
+ * @generated
+ */
+ IJavaWebServiceElement createIJavaWebServiceElement();
+
+ /**
+ * Returns a new object of class '<em>IService Endpoint Interface</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IService Endpoint Interface</em>'.
+ * @generated
+ */
+ IServiceEndpointInterface createIServiceEndpointInterface();
+
+ /**
+ * Returns a new object of class '<em>IWeb Method</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IWeb Method</em>'.
+ * @generated
+ */
+ IWebMethod createIWebMethod();
+
+ /**
+ * Returns a new object of class '<em>IWeb Param</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IWeb Param</em>'.
+ * @generated
+ */
+ IWebParam createIWebParam();
+
+ /**
+ * Returns a new object of class '<em>IWeb Service</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IWeb Service</em>'.
+ * @generated
+ */
+ IWebService createIWebService();
+
+ /**
+ * Returns a new object of class '<em>IWeb Service Project</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IWeb Service Project</em>'.
+ * @generated
+ */
+ IWebServiceProject createIWebServiceProject();
+
+ /**
+ * Returns a new object of class '<em>IWeb Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>IWeb Type</em>'.
+ * @generated
+ */
+ IWebType createIWebType();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ DomPackage getDomPackage();
+
+} //DomFactory
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/DomPackage.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/DomPackage.java
new file mode 100755
index 0000000..d6aab07
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/DomPackage.java
@@ -0,0 +1,1372 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface DomPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "dom"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http:///org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "org.eclipse.jst.ws.jaxws.dom.runtime"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ DomPackage eINSTANCE = org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IDOMImpl <em>IDOM</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IDOMImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIDOM()
+ * @generated
+ */
+ int IDOM = 0;
+
+ /**
+ * The feature id for the '<em><b>Web Service Projects</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IDOM__WEB_SERVICE_PROJECTS = 0;
+
+ /**
+ * The number of structural features of the '<em>IDOM</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IDOM_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IJavaWebServiceElementImpl <em>IJava Web Service Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IJavaWebServiceElementImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIJavaWebServiceElement()
+ * @generated
+ */
+ int IJAVA_WEB_SERVICE_ELEMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IJAVA_WEB_SERVICE_ELEMENT__NAME = 1;
+
+ /**
+ * The number of structural features of the '<em>IJava Web Service Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl <em>IService Endpoint Interface</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIServiceEndpointInterface()
+ * @generated
+ */
+ int ISERVICE_ENDPOINT_INTERFACE = 2;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTATION = IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__NAME = IJAVA_WEB_SERVICE_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Implicit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__IMPLICIT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Implementing Web Services</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Web Methods</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Target Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Soap Binding Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Soap Binding Use</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Soap Binding Parameter Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The number of structural features of the '<em>IService Endpoint Interface</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ISERVICE_ENDPOINT_INTERFACE_FEATURE_COUNT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl <em>IWeb Method</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebMethod()
+ * @generated
+ */
+ int IWEB_METHOD = 3;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__IMPLEMENTATION = IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__NAME = IJAVA_WEB_SERVICE_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parameters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__PARAMETERS = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Excluded</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__EXCLUDED = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Soap Binding Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__SOAP_BINDING_STYLE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Soap Binding Use</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__SOAP_BINDING_USE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Soap Binding Parameter Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>IWeb Method</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_METHOD_FEATURE_COUNT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl <em>IWeb Param</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebParam()
+ * @generated
+ */
+ int IWEB_PARAM = 4;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__IMPLEMENTATION = IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__NAME = IJAVA_WEB_SERVICE_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__KIND = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Type Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__TYPE_NAME = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Part Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__PART_NAME = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Target Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__TARGET_NAMESPACE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Header</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM__HEADER = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>IWeb Param</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_PARAM_FEATURE_COUNT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl <em>IWeb Service</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebService()
+ * @generated
+ */
+ int IWEB_SERVICE = 5;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE__IMPLEMENTATION = IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE__NAME = IJAVA_WEB_SERVICE_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Service Endpoint</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE__SERVICE_ENDPOINT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Target Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE__TARGET_NAMESPACE = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Port Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE__PORT_NAME = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Wsdl Location</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE__WSDL_LOCATION = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>IWeb Service</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE_FEATURE_COUNT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl <em>IWeb Service Project</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebServiceProject()
+ * @generated
+ */
+ int IWEB_SERVICE_PROJECT = 6;
+
+ /**
+ * The feature id for the '<em><b>Web Services</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE_PROJECT__WEB_SERVICES = 0;
+
+ /**
+ * The feature id for the '<em><b>Service Endpoint Interfaces</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE_PROJECT__NAME = 2;
+
+ /**
+ * The number of structural features of the '<em>IWeb Service Project</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_SERVICE_PROJECT_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebTypeImpl <em>IWeb Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebTypeImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebType()
+ * @generated
+ */
+ int IWEB_TYPE = 7;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_TYPE__IMPLEMENTATION = IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_TYPE__NAME = IJAVA_WEB_SERVICE_ELEMENT__NAME;
+
+ /**
+ * The number of structural features of the '<em>IWeb Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IWEB_TYPE_FEATURE_COUNT = IJAVA_WEB_SERVICE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind <em>Web Param Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getWebParamKind()
+ * @generated
+ */
+ int WEB_PARAM_KIND = 8;
+
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle <em>SOAP Binding Style</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getSOAPBindingStyle()
+ * @generated
+ */
+ int SOAP_BINDING_STYLE = 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse <em>SOAP Binding Use</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getSOAPBindingUse()
+ * @generated
+ */
+ int SOAP_BINDING_USE = 10;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle <em>SOAP Binding Parameter Style</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getSOAPBindingParameterStyle()
+ * @generated
+ */
+ int SOAP_BINDING_PARAMETER_STYLE = 11;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM <em>IDOM</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IDOM</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM
+ * @generated
+ */
+ EClass getIDOM();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM#getWebServiceProjects <em>Web Service Projects</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Web Service Projects</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM#getWebServiceProjects()
+ * @see #getIDOM()
+ * @generated
+ */
+ EReference getIDOM_WebServiceProjects();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement <em>IJava Web Service Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IJava Web Service Element</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement
+ * @generated
+ */
+ EClass getIJavaWebServiceElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement#getImplementation <em>Implementation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Implementation</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement#getImplementation()
+ * @see #getIJavaWebServiceElement()
+ * @generated
+ */
+ EAttribute getIJavaWebServiceElement_Implementation();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement#getName()
+ * @see #getIJavaWebServiceElement()
+ * @generated
+ */
+ EAttribute getIJavaWebServiceElement_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface <em>IService Endpoint Interface</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IService Endpoint Interface</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface
+ * @generated
+ */
+ EClass getIServiceEndpointInterface();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#isImplicit <em>Implicit</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Implicit</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#isImplicit()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EAttribute getIServiceEndpointInterface_Implicit();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getImplementingWebServices <em>Implementing Web Services</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Implementing Web Services</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getImplementingWebServices()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EReference getIServiceEndpointInterface_ImplementingWebServices();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getWebMethods <em>Web Methods</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Web Methods</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getWebMethods()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EReference getIServiceEndpointInterface_WebMethods();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getTargetNamespace <em>Target Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Target Namespace</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getTargetNamespace()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EAttribute getIServiceEndpointInterface_TargetNamespace();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingStyle <em>Soap Binding Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Soap Binding Style</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingStyle()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EAttribute getIServiceEndpointInterface_SoapBindingStyle();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingUse <em>Soap Binding Use</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Soap Binding Use</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingUse()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EAttribute getIServiceEndpointInterface_SoapBindingUse();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingParameterStyle <em>Soap Binding Parameter Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Soap Binding Parameter Style</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingParameterStyle()
+ * @see #getIServiceEndpointInterface()
+ * @generated
+ */
+ EAttribute getIServiceEndpointInterface_SoapBindingParameterStyle();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod <em>IWeb Method</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IWeb Method</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod
+ * @generated
+ */
+ EClass getIWebMethod();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getParameters <em>Parameters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Parameters</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getParameters()
+ * @see #getIWebMethod()
+ * @generated
+ */
+ EReference getIWebMethod_Parameters();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#isExcluded <em>Excluded</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Excluded</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#isExcluded()
+ * @see #getIWebMethod()
+ * @generated
+ */
+ EAttribute getIWebMethod_Excluded();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingStyle <em>Soap Binding Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Soap Binding Style</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingStyle()
+ * @see #getIWebMethod()
+ * @generated
+ */
+ EAttribute getIWebMethod_SoapBindingStyle();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingUse <em>Soap Binding Use</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Soap Binding Use</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingUse()
+ * @see #getIWebMethod()
+ * @generated
+ */
+ EAttribute getIWebMethod_SoapBindingUse();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingParameterStyle <em>Soap Binding Parameter Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Soap Binding Parameter Style</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingParameterStyle()
+ * @see #getIWebMethod()
+ * @generated
+ */
+ EAttribute getIWebMethod_SoapBindingParameterStyle();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam <em>IWeb Param</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IWeb Param</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam
+ * @generated
+ */
+ EClass getIWebParam();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getKind <em>Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Kind</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getKind()
+ * @see #getIWebParam()
+ * @generated
+ */
+ EAttribute getIWebParam_Kind();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getTypeName <em>Type Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type Name</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getTypeName()
+ * @see #getIWebParam()
+ * @generated
+ */
+ EAttribute getIWebParam_TypeName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getPartName <em>Part Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Part Name</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getPartName()
+ * @see #getIWebParam()
+ * @generated
+ */
+ EAttribute getIWebParam_PartName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getTargetNamespace <em>Target Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Target Namespace</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getTargetNamespace()
+ * @see #getIWebParam()
+ * @generated
+ */
+ EAttribute getIWebParam_TargetNamespace();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#isHeader <em>Header</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Header</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#isHeader()
+ * @see #getIWebParam()
+ * @generated
+ */
+ EAttribute getIWebParam_Header();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService <em>IWeb Service</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IWeb Service</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService
+ * @generated
+ */
+ EClass getIWebService();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getServiceEndpoint <em>Service Endpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Service Endpoint</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getServiceEndpoint()
+ * @see #getIWebService()
+ * @generated
+ */
+ EReference getIWebService_ServiceEndpoint();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getTargetNamespace <em>Target Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Target Namespace</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getTargetNamespace()
+ * @see #getIWebService()
+ * @generated
+ */
+ EAttribute getIWebService_TargetNamespace();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getPortName <em>Port Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Port Name</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getPortName()
+ * @see #getIWebService()
+ * @generated
+ */
+ EAttribute getIWebService_PortName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getWsdlLocation <em>Wsdl Location</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Wsdl Location</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getWsdlLocation()
+ * @see #getIWebService()
+ * @generated
+ */
+ EAttribute getIWebService_WsdlLocation();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject <em>IWeb Service Project</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IWeb Service Project</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject
+ * @generated
+ */
+ EClass getIWebServiceProject();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject#getWebServices <em>Web Services</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Web Services</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject#getWebServices()
+ * @see #getIWebServiceProject()
+ * @generated
+ */
+ EReference getIWebServiceProject_WebServices();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject#getServiceEndpointInterfaces <em>Service Endpoint Interfaces</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Service Endpoint Interfaces</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject#getServiceEndpointInterfaces()
+ * @see #getIWebServiceProject()
+ * @generated
+ */
+ EReference getIWebServiceProject_ServiceEndpointInterfaces();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject#getName()
+ * @see #getIWebServiceProject()
+ * @generated
+ */
+ EAttribute getIWebServiceProject_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebType <em>IWeb Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IWeb Type</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebType
+ * @generated
+ */
+ EClass getIWebType();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind <em>Web Param Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Web Param Kind</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind
+ * @generated
+ */
+ EEnum getWebParamKind();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle <em>SOAP Binding Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>SOAP Binding Style</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @generated
+ */
+ EEnum getSOAPBindingStyle();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse <em>SOAP Binding Use</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>SOAP Binding Use</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @generated
+ */
+ EEnum getSOAPBindingUse();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle <em>SOAP Binding Parameter Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>SOAP Binding Parameter Style</em>'.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @generated
+ */
+ EEnum getSOAPBindingParameterStyle();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ DomFactory getDomFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IDOMImpl <em>IDOM</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IDOMImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIDOM()
+ * @generated
+ */
+ EClass IDOM = eINSTANCE.getIDOM();
+
+ /**
+ * The meta object literal for the '<em><b>Web Service Projects</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IDOM__WEB_SERVICE_PROJECTS = eINSTANCE.getIDOM_WebServiceProjects();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IJavaWebServiceElementImpl <em>IJava Web Service Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IJavaWebServiceElementImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIJavaWebServiceElement()
+ * @generated
+ */
+ EClass IJAVA_WEB_SERVICE_ELEMENT = eINSTANCE.getIJavaWebServiceElement();
+
+ /**
+ * The meta object literal for the '<em><b>Implementation</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION = eINSTANCE.getIJavaWebServiceElement_Implementation();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IJAVA_WEB_SERVICE_ELEMENT__NAME = eINSTANCE.getIJavaWebServiceElement_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl <em>IService Endpoint Interface</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIServiceEndpointInterface()
+ * @generated
+ */
+ EClass ISERVICE_ENDPOINT_INTERFACE = eINSTANCE.getIServiceEndpointInterface();
+
+ /**
+ * The meta object literal for the '<em><b>Implicit</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ISERVICE_ENDPOINT_INTERFACE__IMPLICIT = eINSTANCE.getIServiceEndpointInterface_Implicit();
+
+ /**
+ * The meta object literal for the '<em><b>Implementing Web Services</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES = eINSTANCE.getIServiceEndpointInterface_ImplementingWebServices();
+
+ /**
+ * The meta object literal for the '<em><b>Web Methods</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS = eINSTANCE.getIServiceEndpointInterface_WebMethods();
+
+ /**
+ * The meta object literal for the '<em><b>Target Namespace</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE = eINSTANCE.getIServiceEndpointInterface_TargetNamespace();
+
+ /**
+ * The meta object literal for the '<em><b>Soap Binding Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE = eINSTANCE.getIServiceEndpointInterface_SoapBindingStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Soap Binding Use</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE = eINSTANCE.getIServiceEndpointInterface_SoapBindingUse();
+
+ /**
+ * The meta object literal for the '<em><b>Soap Binding Parameter Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE = eINSTANCE.getIServiceEndpointInterface_SoapBindingParameterStyle();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl <em>IWeb Method</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebMethod()
+ * @generated
+ */
+ EClass IWEB_METHOD = eINSTANCE.getIWebMethod();
+
+ /**
+ * The meta object literal for the '<em><b>Parameters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IWEB_METHOD__PARAMETERS = eINSTANCE.getIWebMethod_Parameters();
+
+ /**
+ * The meta object literal for the '<em><b>Excluded</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_METHOD__EXCLUDED = eINSTANCE.getIWebMethod_Excluded();
+
+ /**
+ * The meta object literal for the '<em><b>Soap Binding Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_METHOD__SOAP_BINDING_STYLE = eINSTANCE.getIWebMethod_SoapBindingStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Soap Binding Use</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_METHOD__SOAP_BINDING_USE = eINSTANCE.getIWebMethod_SoapBindingUse();
+
+ /**
+ * The meta object literal for the '<em><b>Soap Binding Parameter Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE = eINSTANCE.getIWebMethod_SoapBindingParameterStyle();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl <em>IWeb Param</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebParam()
+ * @generated
+ */
+ EClass IWEB_PARAM = eINSTANCE.getIWebParam();
+
+ /**
+ * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_PARAM__KIND = eINSTANCE.getIWebParam_Kind();
+
+ /**
+ * The meta object literal for the '<em><b>Type Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_PARAM__TYPE_NAME = eINSTANCE.getIWebParam_TypeName();
+
+ /**
+ * The meta object literal for the '<em><b>Part Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_PARAM__PART_NAME = eINSTANCE.getIWebParam_PartName();
+
+ /**
+ * The meta object literal for the '<em><b>Target Namespace</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_PARAM__TARGET_NAMESPACE = eINSTANCE.getIWebParam_TargetNamespace();
+
+ /**
+ * The meta object literal for the '<em><b>Header</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_PARAM__HEADER = eINSTANCE.getIWebParam_Header();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl <em>IWeb Service</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebService()
+ * @generated
+ */
+ EClass IWEB_SERVICE = eINSTANCE.getIWebService();
+
+ /**
+ * The meta object literal for the '<em><b>Service Endpoint</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IWEB_SERVICE__SERVICE_ENDPOINT = eINSTANCE.getIWebService_ServiceEndpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Target Namespace</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_SERVICE__TARGET_NAMESPACE = eINSTANCE.getIWebService_TargetNamespace();
+
+ /**
+ * The meta object literal for the '<em><b>Port Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_SERVICE__PORT_NAME = eINSTANCE.getIWebService_PortName();
+
+ /**
+ * The meta object literal for the '<em><b>Wsdl Location</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_SERVICE__WSDL_LOCATION = eINSTANCE.getIWebService_WsdlLocation();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl <em>IWeb Service Project</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebServiceProject()
+ * @generated
+ */
+ EClass IWEB_SERVICE_PROJECT = eINSTANCE.getIWebServiceProject();
+
+ /**
+ * The meta object literal for the '<em><b>Web Services</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IWEB_SERVICE_PROJECT__WEB_SERVICES = eINSTANCE.getIWebServiceProject_WebServices();
+
+ /**
+ * The meta object literal for the '<em><b>Service Endpoint Interfaces</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES = eINSTANCE.getIWebServiceProject_ServiceEndpointInterfaces();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IWEB_SERVICE_PROJECT__NAME = eINSTANCE.getIWebServiceProject_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebTypeImpl <em>IWeb Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebTypeImpl
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getIWebType()
+ * @generated
+ */
+ EClass IWEB_TYPE = eINSTANCE.getIWebType();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind <em>Web Param Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getWebParamKind()
+ * @generated
+ */
+ EEnum WEB_PARAM_KIND = eINSTANCE.getWebParamKind();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle <em>SOAP Binding Style</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getSOAPBindingStyle()
+ * @generated
+ */
+ EEnum SOAP_BINDING_STYLE = eINSTANCE.getSOAPBindingStyle();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse <em>SOAP Binding Use</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getSOAPBindingUse()
+ * @generated
+ */
+ EEnum SOAP_BINDING_USE = eINSTANCE.getSOAPBindingUse();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle <em>SOAP Binding Parameter Style</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.DomPackageImpl#getSOAPBindingParameterStyle()
+ * @generated
+ */
+ EEnum SOAP_BINDING_PARAMETER_STYLE = eINSTANCE.getSOAPBindingParameterStyle();
+
+ }
+
+} //DomPackage
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IDOM.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IDOM.java
new file mode 100755
index 0000000..e94a88b
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IDOM.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>IDOM</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM#getWebServiceProjects <em>Web Service Projects</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIDOM()
+ * @model
+ * @generated
+ */
+public interface IDOM extends EObject {
+ /**
+ * Returns the value of the '<em><b>Web Service Projects</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Web Service Projects</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Web Service Projects</em>' containment reference list.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIDOM_WebServiceProjects()
+ * @model containment="true" suppressedSetVisibility="true"
+ * @generated
+ */
+ EList<IWebServiceProject> getWebServiceProjects();
+
+} // IDOM
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IJavaWebServiceElement.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IJavaWebServiceElement.java
new file mode 100755
index 0000000..21200fa
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IJavaWebServiceElement.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * @model
+ * * @author Hristo Sabev
+ *
+ */
+public interface IJavaWebServiceElement extends EObject
+{
+ /**
+ * @model changeable="true" suppressedSetVisibility="true" required="true"
+ * @return
+ */
+ public String getImplementation();
+
+ /**
+ * @model changeable="true" required="true"
+ * @return
+ */
+ public String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IServiceEndpointInterface.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IServiceEndpointInterface.java
new file mode 100755
index 0000000..3589d11
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IServiceEndpointInterface.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * @model
+ * @author Hristo Sabev
+ *
+ */
+public interface IServiceEndpointInterface extends IJavaWebServiceElement
+{
+ /**
+ * @model changeable="true" suppressedSetVisibility="true" required="true"
+ * @return
+ */
+ public boolean isImplicit();
+
+ /**
+ * @model changeable="true" suppressedSetVisibility="true" required="true" containment="false" many="true" type="IWebService" opposite="serviceEndpoint"
+ * @return
+ */
+ public EList<IWebService> getImplementingWebServices();
+
+ /**
+ * @model changeable="true" suppressedSetVisibility="true" required="true" containment="true" many="true" type="IWebMethod"
+ * @return
+ */
+ public EList<IWebMethod> getWebMethods();
+
+ /**
+ * @model changeable="true" required="true"
+ */
+ public String getTargetNamespace();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getTargetNamespace <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target Namespace</em>' attribute.
+ * @see #getTargetNamespace()
+ * @generated
+ */
+ void setTargetNamespace(String value);
+
+ /**
+ * Returns the value of the '<em><b>Soap Binding Style</b></em>' attribute.
+ * The default value is <code>"DOCUMENT"</code>.
+ * The literals are from the enumeration {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Soap Binding Style</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Soap Binding Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @see #setSoapBindingStyle(SOAPBindingStyle)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIServiceEndpointInterface_SoapBindingStyle()
+ * @model default="DOCUMENT" required="true"
+ * @generated
+ */
+ SOAPBindingStyle getSoapBindingStyle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingStyle <em>Soap Binding Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Soap Binding Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @see #getSoapBindingStyle()
+ * @generated
+ */
+ void setSoapBindingStyle(SOAPBindingStyle value);
+
+ /**
+ * Returns the value of the '<em><b>Soap Binding Use</b></em>' attribute.
+ * The default value is <code>"LITERAL"</code>.
+ * The literals are from the enumeration {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Soap Binding Use</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Soap Binding Use</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @see #setSoapBindingUse(SOAPBindingUse)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIServiceEndpointInterface_SoapBindingUse()
+ * @model default="LITERAL" required="true"
+ * @generated
+ */
+ SOAPBindingUse getSoapBindingUse();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingUse <em>Soap Binding Use</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Soap Binding Use</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @see #getSoapBindingUse()
+ * @generated
+ */
+ void setSoapBindingUse(SOAPBindingUse value);
+
+ /**
+ * Returns the value of the '<em><b>Soap Binding Parameter Style</b></em>' attribute.
+ * The default value is <code>"WRAPPED"</code>.
+ * The literals are from the enumeration {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Soap Binding Parameter Style</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Soap Binding Parameter Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @see #setSoapBindingParameterStyle(SOAPBindingParameterStyle)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIServiceEndpointInterface_SoapBindingParameterStyle()
+ * @model default="WRAPPED" required="true"
+ * @generated
+ */
+ SOAPBindingParameterStyle getSoapBindingParameterStyle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface#getSoapBindingParameterStyle <em>Soap Binding Parameter Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Soap Binding Parameter Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @see #getSoapBindingParameterStyle()
+ * @generated
+ */
+ void setSoapBindingParameterStyle(SOAPBindingParameterStyle value);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWSDOMRuntimeManager.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWSDOMRuntimeManager.java
new file mode 100755
index 0000000..ca39cb9
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWSDOMRuntimeManager.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+
+public interface IWSDOMRuntimeManager
+{
+ /**
+ * Instantiates the DOM Runtimes if not already.
+ * @param progress monitor to track progress
+ */
+ public void createDOMRuntimes(IProgressMonitor monitor);
+
+ /**
+ * This method should return the DOM runtime instance corresponding to the runtime id
+ * and instantiate such DOM runtime instance if non existent at the
+ * moment of invocation of this method.
+ *
+ * @param runtimeId - string identifier of the runtime
+ * @return the DOM runtime instance. Null if runtime with such id is not registered
+ */
+ public IWsDOMRuntimeExtension getDOMRuntime(String runtimeId);
+
+ /**
+ *
+ * @return a list of all DOM Runtimes currently instantiated
+ */
+ public Collection<IWsDOMRuntimeExtension> getDOMRuntimes();
+
+ /**
+ * This method should reload all instances of DOM Runtimes.
+ *
+ */
+ public void reloadDOMRuntimes(IProgressMonitor monitor);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebMethod.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebMethod.java
new file mode 100755
index 0000000..070d385
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebMethod.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * @model
+ * @author Hristo Sabev
+ */
+public interface IWebMethod extends IJavaWebServiceElement
+{
+ /**
+ * @model type="IWebParam" suppressedSetVisibility="true" many="true" containment="true" required="true"
+ * @return
+ */
+ EList<IWebParam> getParameters();
+
+ /**
+ * @model type="boolean" many="false" changeable="true" required="true"
+ */
+ boolean isExcluded();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#isExcluded <em>Excluded</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Excluded</em>' attribute.
+ * @see #isExcluded()
+ * @generated
+ */
+ void setExcluded(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Soap Binding Style</b></em>' attribute.
+ * The default value is <code>"DOCUMENT"</code>.
+ * The literals are from the enumeration {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Soap Binding Style</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Soap Binding Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @see #setSoapBindingStyle(SOAPBindingStyle)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIWebMethod_SoapBindingStyle()
+ * @model default="DOCUMENT" required="true"
+ * @generated
+ */
+ SOAPBindingStyle getSoapBindingStyle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingStyle <em>Soap Binding Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Soap Binding Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle
+ * @see #getSoapBindingStyle()
+ * @generated
+ */
+ void setSoapBindingStyle(SOAPBindingStyle value);
+
+ /**
+ * Returns the value of the '<em><b>Soap Binding Use</b></em>' attribute.
+ * The default value is <code>"LITERAL"</code>.
+ * The literals are from the enumeration {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Soap Binding Use</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Soap Binding Use</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @see #setSoapBindingUse(SOAPBindingUse)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIWebMethod_SoapBindingUse()
+ * @model default="LITERAL" required="true"
+ * @generated
+ */
+ SOAPBindingUse getSoapBindingUse();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingUse <em>Soap Binding Use</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Soap Binding Use</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse
+ * @see #getSoapBindingUse()
+ * @generated
+ */
+ void setSoapBindingUse(SOAPBindingUse value);
+
+ /**
+ * Returns the value of the '<em><b>Soap Binding Parameter Style</b></em>' attribute.
+ * The default value is <code>"WRAPPED"</code>.
+ * The literals are from the enumeration {@link org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Soap Binding Parameter Style</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Soap Binding Parameter Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @see #setSoapBindingParameterStyle(SOAPBindingParameterStyle)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIWebMethod_SoapBindingParameterStyle()
+ * @model default="WRAPPED" required="true"
+ * @generated
+ */
+ SOAPBindingParameterStyle getSoapBindingParameterStyle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod#getSoapBindingParameterStyle <em>Soap Binding Parameter Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Soap Binding Parameter Style</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle
+ * @see #getSoapBindingParameterStyle()
+ * @generated
+ */
+ void setSoapBindingParameterStyle(SOAPBindingParameterStyle value);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebParam.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebParam.java
new file mode 100755
index 0000000..f7696e5
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebParam.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+
+/**
+ *
+ * @author Hristo Sabev
+ *
+ * @model
+ */
+public interface IWebParam extends IJavaWebServiceElement
+{
+ /**
+ * @model required="true" many="false" suppressedSetVisibility="true"
+ * @return
+ */
+ String getTypeName();
+
+ /**
+ * Returns the value of the '<em><b>Part Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Part Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Part Name</em>' attribute.
+ * @see #setPartName(String)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIWebParam_PartName()
+ * @model required="true"
+ * @generated
+ */
+ String getPartName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getPartName <em>Part Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Part Name</em>' attribute.
+ * @see #getPartName()
+ * @generated
+ */
+ void setPartName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Target Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target Namespace</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target Namespace</em>' attribute.
+ * @see #setTargetNamespace(String)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIWebParam_TargetNamespace()
+ * @model required="true"
+ * @generated
+ */
+ String getTargetNamespace();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getTargetNamespace <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target Namespace</em>' attribute.
+ * @see #getTargetNamespace()
+ * @generated
+ */
+ void setTargetNamespace(String value);
+
+ /**
+ * Returns the value of the '<em><b>Header</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Header</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Header</em>' attribute.
+ * @see #setHeader(boolean)
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getIWebParam_Header()
+ * @model default="false" required="true"
+ * @generated
+ */
+ boolean isHeader();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#isHeader <em>Header</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Header</em>' attribute.
+ * @see #isHeader()
+ * @generated
+ */
+ void setHeader(boolean value);
+
+ /**
+ * @model type="WebParamKind" required="true" many="false"
+ */
+ WebParamKind getKind();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam#getKind <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Kind</em>' attribute.
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind
+ * @see #getKind()
+ * @generated
+ */
+ void setKind(WebParamKind value);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebService.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebService.java
new file mode 100755
index 0000000..6011fe3
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebService.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+
+/**
+ * @model
+ * @author Hristo Sabev
+ *
+ */
+public interface IWebService extends IJavaWebServiceElement
+{
+ /**
+ * @model suppressedSetVisibility="true" opposite="implementingWebServices" type="IServiceEndpointInterface"
+ * @return
+ */
+ public IServiceEndpointInterface getServiceEndpoint();
+
+ /**
+ * @model changeable="true" required="true"
+ */
+ public String getTargetNamespace();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getTargetNamespace <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target Namespace</em>' attribute.
+ * @see #getTargetNamespace()
+ * @generated
+ */
+ void setTargetNamespace(String value);
+
+ /**
+ * @model changeable="true" required="true"
+ */
+ public String getPortName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getPortName <em>Port Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Port Name</em>' attribute.
+ * @see #getPortName()
+ * @generated
+ */
+ void setPortName(String value);
+
+ /**
+ * @model changeable="true" suppressedSetVisibility="true"
+ */
+ public String getWsdlLocation();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService#getWsdlLocation <em>Wsdl Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Wsdl Location</em>' attribute.
+ * @see #getWsdlLocation()
+ * @generated
+ */
+ void setWsdlLocation(String value);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebServiceProject.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebServiceProject.java
new file mode 100755
index 0000000..b41d5ee
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebServiceProject.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * @model
+ * @author Hristo Sabev
+ */
+public interface IWebServiceProject extends EObject
+{
+ /**
+ * @model type="IWebService" suppressedSetVisibility="true" many="true" containment="true"
+ * @return
+ */
+ public EList<IWebService> getWebServices();
+
+
+ /**
+ * @model type="IServiceEndpointInterface" suppressedSetVisibility="true" many="true" containment="true"
+ */
+ public EList<IServiceEndpointInterface> getServiceEndpointInterfaces();
+
+ /**
+ * @model suppressedSetVisibility="true" required="true"
+ */
+ public String getName();
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebType.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebType.java
new file mode 100755
index 0000000..734da97
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWebType.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+
+/**
+ * @model
+ * @author Hristo Sabev
+ */
+public interface IWebType extends IJavaWebServiceElement {
+
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWsDOMRuntimeExtension.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWsDOMRuntimeExtension.java
new file mode 100755
index 0000000..f2b8050
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWsDOMRuntimeExtension.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+
+/**
+ * This interface should be implemented by all runtime which want to have DOM Tree
+ * representation on top of them.
+ *
+ * @author Georgi Hristov I036201
+ */
+public interface IWsDOMRuntimeExtension
+{
+ /**
+ * This method should instantiate the DOM instance for the runtime and loads the
+ * data into it. The method locks the workspace root during execution. If you call this
+ * method during loading (i.e. somebody already called it in different thread) the method
+ * will block until the load finishes instead of triggering DOM reload.
+ *
+ * @param monitor progress monitor to be used during loading, cancelling the load via monitor is supported
+ * @throws IOException in case the DOM loading is not able to read required data
+ * @throws WsDOMLoadCanceledException in case the loading was cancelled via provided
+ * <code>monitor</code>.
+ */
+ public void createDOM(IProgressMonitor monitor) throws IOException, WsDOMLoadCanceledException;
+
+ /**
+ * Adds a load listener to be notified in load events. In case the loading has already been started
+ * this listener's methods are called depending on the current state of the load.
+ * {@link IWsDomLoadListener#finished()} method is called in any case regardless of whether loading
+ * has been cancelled or not.
+ * @param listener
+ */
+ public void addLoadListener(IWsDomLoadListener listener);
+
+ /**
+ * Removes the listener from DOM loading listeners list
+ *
+ * @param listener
+ */
+ public void removeLoadListener(IWsDomLoadListener listener);
+
+ /**
+ * To get a handle to the DOM instance available for this runtime.
+ *
+ * @return the DOM instance or <code>null</code> in case the loading was not started yet or
+ * is not finished yet.
+ * @throws WsDOMLoadCanceledException in case loading has been called already but the load
+ * has been cancelled
+ */
+ public IDOM getDOM() throws WsDOMLoadCanceledException;
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWsDomLoadListener.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWsDomLoadListener.java
new file mode 100755
index 0000000..879b046
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/IWsDomLoadListener.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+
+
+/**
+ * Interface to be implemented by interested in DOM load process. Implementors can be added to
+ * the {@link IWsDOMRuntimeExtension} to receive notifications on load startup/finish
+ *
+ * @author Georgi Vachkov
+ */
+public interface IWsDomLoadListener
+{
+ /**
+ * Called by {@link IWsDOMRuntimeExtension} just before the DOM load start
+ */
+ public void started();
+
+ /**
+ * Called by {@link IWsDOMRuntimeExtension} when the DOM load has finished
+ */
+ public void finished();
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingParameterStyle.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingParameterStyle.java
new file mode 100755
index 0000000..956855f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingParameterStyle.java
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>SOAP Binding Parameter Style</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getSOAPBindingParameterStyle()
+ * @model
+ * @generated
+ */
+public enum SOAPBindingParameterStyle implements Enumerator {
+ /**
+ * The '<em><b>WRAPPED</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #WRAPPED_VALUE
+ * @generated
+ * @ordered
+ */
+ WRAPPED(0, "WRAPPED", "WRAPPED"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>BARE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #BARE_VALUE
+ * @generated
+ * @ordered
+ */
+ BARE(1, "BARE", "BARE"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>WRAPPED</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>WRAPPED</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #WRAPPED
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int WRAPPED_VALUE = 0;
+
+ /**
+ * The '<em><b>BARE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>BARE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #BARE
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int BARE_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>SOAP Binding Parameter Style</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final SOAPBindingParameterStyle[] VALUES_ARRAY =
+ new SOAPBindingParameterStyle[]
+ {
+ WRAPPED,
+ BARE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>SOAP Binding Parameter Style</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<SOAPBindingParameterStyle> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>SOAP Binding Parameter Style</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingParameterStyle get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ SOAPBindingParameterStyle result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SOAP Binding Parameter Style</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingParameterStyle getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ SOAPBindingParameterStyle result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SOAP Binding Parameter Style</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingParameterStyle get(int value) {
+ switch (value)
+ {
+ case WRAPPED_VALUE: return WRAPPED;
+ case BARE_VALUE: return BARE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private SOAPBindingParameterStyle(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //SOAPBindingParameterStyle
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingStyle.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingStyle.java
new file mode 100755
index 0000000..6082254
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingStyle.java
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>SOAP Binding Style</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getSOAPBindingStyle()
+ * @model
+ * @generated
+ */
+public enum SOAPBindingStyle implements Enumerator {
+ /**
+ * The '<em><b>DOCUMENT</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #DOCUMENT_VALUE
+ * @generated
+ * @ordered
+ */
+ DOCUMENT(0, "DOCUMENT", "DOCUMENT"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>RPC</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #RPC_VALUE
+ * @generated
+ * @ordered
+ */
+ RPC(1, "RPC", "RPC"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>DOCUMENT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>DOCUMENT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #DOCUMENT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_VALUE = 0;
+
+ /**
+ * The '<em><b>RPC</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>RPC</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #RPC
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int RPC_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>SOAP Binding Style</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final SOAPBindingStyle[] VALUES_ARRAY =
+ new SOAPBindingStyle[]
+ {
+ DOCUMENT,
+ RPC,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>SOAP Binding Style</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<SOAPBindingStyle> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>SOAP Binding Style</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingStyle get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ SOAPBindingStyle result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SOAP Binding Style</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingStyle getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ SOAPBindingStyle result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SOAP Binding Style</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingStyle get(int value) {
+ switch (value)
+ {
+ case DOCUMENT_VALUE: return DOCUMENT;
+ case RPC_VALUE: return RPC;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private SOAPBindingStyle(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //SOAPBindingStyle
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingUse.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingUse.java
new file mode 100755
index 0000000..b35b180
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/SOAPBindingUse.java
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>SOAP Binding Use</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#getSOAPBindingUse()
+ * @model
+ * @generated
+ */
+public enum SOAPBindingUse implements Enumerator {
+ /**
+ * The '<em><b>LITERAL</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #LITERAL_VALUE
+ * @generated
+ * @ordered
+ */
+ LITERAL(0, "LITERAL", "LITERAL"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>ENCODED</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ENCODED_VALUE
+ * @generated
+ * @ordered
+ */
+ ENCODED(1, "ENCODED", "ENCODED"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>LITERAL</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>LITERAL</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int LITERAL_VALUE = 0;
+
+ /**
+ * The '<em><b>ENCODED</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ENCODED</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ENCODED
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int ENCODED_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>SOAP Binding Use</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final SOAPBindingUse[] VALUES_ARRAY =
+ new SOAPBindingUse[]
+ {
+ LITERAL,
+ ENCODED,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>SOAP Binding Use</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<SOAPBindingUse> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>SOAP Binding Use</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingUse get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ SOAPBindingUse result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SOAP Binding Use</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingUse getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ SOAPBindingUse result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>SOAP Binding Use</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SOAPBindingUse get(int value) {
+ switch (value)
+ {
+ case LITERAL_VALUE: return LITERAL;
+ case ENCODED_VALUE: return ENCODED;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private SOAPBindingUse(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //SOAPBindingUse
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WebParamKind.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WebParamKind.java
new file mode 100755
index 0000000..092643c
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WebParamKind.java
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * @model
+ * @author Hristo Sabev
+ *
+ */
+public enum WebParamKind implements Enumerator {/**@model*/IN(0, "IN", "IN"), /**@model*/INOUT(1, "INOUT", "INOUT"), /**@model*/OUT(2, "OUT", "OUT"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+
+/**
+ * The '<em><b>IN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>IN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #IN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int IN_VALUE = 0;
+/**
+ * The '<em><b>INOUT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>INOUT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #INOUT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int INOUT_VALUE = 1;
+/**
+ * The '<em><b>OUT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>OUT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #OUT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int OUT_VALUE = 2;
+/**
+ * An array of all the '<em><b>Web Param Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final WebParamKind[] VALUES_ARRAY =
+ new WebParamKind[]
+ {
+ IN,
+ INOUT,
+ OUT,
+ };
+/**
+ * A public read-only list of all the '<em><b>Web Param Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<WebParamKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+/**
+ * Returns the '<em><b>Web Param Kind</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static WebParamKind get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ WebParamKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+/**
+ * Returns the '<em><b>Web Param Kind</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static WebParamKind getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ WebParamKind result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+/**
+ * Returns the '<em><b>Web Param Kind</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static WebParamKind get(int value) {
+ switch (value)
+ {
+ case IN_VALUE: return IN;
+ case INOUT_VALUE: return INOUT;
+ case OUT_VALUE: return OUT;
+ }
+ return null;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+/**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private WebParamKind(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+/**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WsDOMLoadCanceledException.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WsDOMLoadCanceledException.java
new file mode 100755
index 0000000..671047b
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WsDOMLoadCanceledException.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+
+
+/**
+ * Exception thrown in case the loading of WS DOM has been cancelled
+ *
+ * @author Georgi Vachkov
+ */
+public class WsDOMLoadCanceledException extends Exception
+{
+ private static final long serialVersionUID = 1L;
+ private final String localizedMessage;
+
+ /**
+ * Constructs exception with ability to provide localized message
+ * @param message - the detail message (which is saved for later retrieval
+ * by the {@link #getMessage()} method)
+ * @param localizedMessage - the localized message (which is saved for later retrieval
+ * by the {@link #getLocalizedMessage()} method)
+ *
+ * @throws NullPointerException - in case localised message is null
+ * */
+ public WsDOMLoadCanceledException(final String message, final String localizedMessage) {
+ super(message);
+ ContractChecker.nullCheckParam(localizedMessage, "localizedMessage"); //$NON-NLS-1$
+ this.localizedMessage = localizedMessage;
+ }
+
+ /**
+ * Returns localized message with which the exception was constructed.*/
+ @Override
+ public String getLocalizedMessage() {
+ return localizedMessage;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WsDOMRuntimeManager.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WsDOMRuntimeManager.java
new file mode 100755
index 0000000..06d4a6f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/api/WsDOMRuntimeManager.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.api;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.ws.jaxws.dom.runtime.registry.IWsDOMRuntimeInfo;
+import org.eclipse.jst.ws.jaxws.dom.runtime.registry.WsDOMRuntimeRegistry;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+
+/**
+ * Factory class for instantiating DOM Runtimes and managing those instances.
+ *
+ * @author Georgi Hristov
+ *
+ */
+public class WsDOMRuntimeManager implements IWSDOMRuntimeManager
+{
+ private static WsDOMRuntimeManager instance = new WsDOMRuntimeManager();
+
+ private Map<String,IWsDOMRuntimeExtension> domRuntimes = new HashMap<String,IWsDOMRuntimeExtension>();
+
+ protected WsDOMRuntimeManager()
+ {
+ // singleton
+ }
+
+ public static IWSDOMRuntimeManager instance()
+ {
+ return instance;
+ }
+
+ /**
+ * Instantiates the DOM Runtimes if not already.
+ *
+ */
+ public synchronized void createDOMRuntimes(final IProgressMonitor monitor)
+ {
+ for (IWsDOMRuntimeInfo runtimeInfo : WsDOMRuntimeRegistry.getRegisteredRuntimesInfo()) {
+ createDOMRuntime(runtimeInfo, monitor);
+ }
+ }
+
+ protected IWsDOMRuntimeExtension createDOMRuntime(final IWsDOMRuntimeInfo runtimeInfo, final IProgressMonitor monitor)
+ {
+ final IWsDOMRuntimeExtension domRuntime = getDOMRuntime(runtimeInfo);
+ if (domRuntime == null) {
+ return null;
+ }
+
+ try {
+ domRuntime.createDOM(monitor);
+ }
+ catch (Exception unexpected) {
+ logger().logError("Unexpected Exception! Dom from runtime " + runtimeInfo.getName() + " will not be processed!", unexpected); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ return domRuntime;
+ }
+
+ /**
+ * This method should return the DOM runtime instance corresponding to the descriptor object
+ * of type IRuntimeInfo and instantiate such DOM runtime instance if non existent at the
+ * moment of invocation of this method.
+ *
+ * @param runtimeInfo - descriptor of the DOM runtime to be instantiated and returned
+ * @return the DOM runtime instance
+ */
+ public IWsDOMRuntimeExtension getDOMRuntime(final IWsDOMRuntimeInfo runtimeInfo)
+ {
+ if (runtimeInfo == null) {
+ return null;
+ }
+
+ IWsDOMRuntimeExtension domRuntime = domRuntimes.get(runtimeInfo.getId());
+ if (domRuntime == null)
+ {
+ domRuntime = WsDOMRuntimeRegistry.instantiateRuntime(runtimeInfo);
+ if (domRuntime != null) {
+ synchronized(domRuntimes) {
+ domRuntimes.put(runtimeInfo.getId(), domRuntime);
+ }
+ }
+ }
+
+ return domRuntime;
+ }
+
+ /**
+ * This method should return the DOM runtime instance corresponding to the runtime id
+ * and instantiate such DOM runtime instance if non existent at the
+ * moment of invocation of this method.
+ *
+ * @param runtimeId - string identifier of the runtime
+ * @return the DOM runtime instance
+ */
+ public IWsDOMRuntimeExtension getDOMRuntime(final String runtimeId)
+ {
+ return getDOMRuntime(WsDOMRuntimeRegistry.getRuntimeInfo(runtimeId));
+ }
+
+ /**
+ *
+ * @return a list of all instantiated DOM Runtimes
+ */
+ public Collection<IWsDOMRuntimeExtension> getDOMRuntimes()
+ {
+ if (domRuntimes.size() == 0)
+ {
+ final Collection<IWsDOMRuntimeInfo> rtInfos = WsDOMRuntimeRegistry.getRegisteredRuntimesInfo();
+ for (IWsDOMRuntimeInfo runtimeInfo : rtInfos) {
+ getDOMRuntime(runtimeInfo);
+ }
+ }
+
+ return domRuntimes.values();
+ }
+
+ /**
+ * This method should reload all instances of DOM Runtimes.
+ *
+ */
+ public synchronized void reloadDOMRuntimes(final IProgressMonitor monitor)
+ {
+ synchronized(domRuntimes) {
+ domRuntimes = new HashMap<String,IWsDOMRuntimeExtension>();
+ }
+
+ createDOMRuntimes(monitor);
+ }
+
+ private ILogger logger() {
+ return new Logger();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore
new file mode 100755
index 0000000..0041eda
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="dom"
+ nsURI="http:///org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore" nsPrefix="org.eclipse.jst.ws.jaxws.dom.runtime">
+ <eClassifiers xsi:type="ecore:EClass" name="IDOM">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="webServiceProjects" upperBound="-1"
+ eType="#//IWebServiceProject" containment="true" resolveProxies="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IJavaWebServiceElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="implementation" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IServiceEndpointInterface" eSuperTypes="#//IJavaWebServiceElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="implicit" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="implementingWebServices"
+ lowerBound="1" upperBound="-1" eType="#//IWebService" eOpposite="#//IWebService/serviceEndpoint">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="webMethods" lowerBound="1"
+ upperBound="-1" eType="#//IWebMethod" containment="true" resolveProxies="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetNamespace" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="soapBindingStyle" lowerBound="1"
+ eType="#//SOAPBindingStyle" defaultValueLiteral="DOCUMENT"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="soapBindingUse" lowerBound="1"
+ eType="#//SOAPBindingUse" defaultValueLiteral="LITERAL"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="soapBindingParameterStyle"
+ lowerBound="1" eType="#//SOAPBindingParameterStyle" defaultValueLiteral="WRAPPED"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IWebMethod" eSuperTypes="#//IJavaWebServiceElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" lowerBound="1"
+ upperBound="-1" eType="#//IWebParam" containment="true" resolveProxies="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="excluded" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="soapBindingStyle" lowerBound="1"
+ eType="#//SOAPBindingStyle" defaultValueLiteral="DOCUMENT"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="soapBindingUse" lowerBound="1"
+ eType="#//SOAPBindingUse" defaultValueLiteral="LITERAL"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="soapBindingParameterStyle"
+ lowerBound="1" eType="#//SOAPBindingParameterStyle" defaultValueLiteral="WRAPPED"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IWebParam" eSuperTypes="#//IJavaWebServiceElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" eType="#//WebParamKind"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="typeName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="partName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetNamespace" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="header" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IWebService" eSuperTypes="#//IJavaWebServiceElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="serviceEndpoint" eType="#//IServiceEndpointInterface"
+ eOpposite="#//IServiceEndpointInterface/implementingWebServices">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetNamespace" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="portName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="wsdlLocation" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IWebServiceProject">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="webServices" upperBound="-1"
+ eType="#//IWebService" containment="true" resolveProxies="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="serviceEndpointInterfaces"
+ upperBound="-1" eType="#//IServiceEndpointInterface" containment="true" resolveProxies="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="suppressedSetVisibility" value="true"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="IWebType" eSuperTypes="#//IJavaWebServiceElement"/>
+ <eClassifiers xsi:type="ecore:EEnum" name="WebParamKind">
+ <eLiterals name="IN"/>
+ <eLiterals name="INOUT" value="1"/>
+ <eLiterals name="OUT" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="SOAPBindingStyle">
+ <eLiterals name="DOCUMENT" literal="DOCUMENT"/>
+ <eLiterals name="RPC" value="1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="SOAPBindingUse">
+ <eLiterals name="LITERAL"/>
+ <eLiterals name="ENCODED" value="1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="SOAPBindingParameterStyle">
+ <eLiterals name="WRAPPED"/>
+ <eLiterals name="BARE" value="1"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/dom.ws.genmodel b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/dom.ws.genmodel
new file mode 100755
index 0000000..b4269ab
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/dom.ws.genmodel
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="org.eclipse.jst.ws.jaxws.dom.runtime/src"
+ editDirectory="org.eclipse.jst.ws.jaxws.dom.ui/src" editorDirectory="org.eclipse.jst.ws.jaxws.dom.runtime.editor/src"
+ modelPluginID="org.eclipse.jst.ws.jaxws.dom.runtime" modelName="Dom" editPluginClass="org.eclipse.jst.ws.jaxws.dom.ui.internal.plugin.DomUi"
+ editorPluginClass="org.eclipse.jst.ws.jaxws.dom.ui.navigator.generated.DomEditorPlugin"
+ nonNLSMarkers="true" testsDirectory="org.eclipse.jst.ws.jaxws.dom.runtime.tests/src"
+ importerID="org.eclipse.emf.importer.java" complianceLevel="5.0" copyrightFields="false"
+ providerRootExtendsClass="">
+ <foreignModel>@model</foreignModel>
+ <genPackages prefix="Dom" basePackage="org.eclipse.jst.ws.jaxws" disposableProviderFactory="true"
+ interfacePackageSuffix="runtime.api" metaDataPackageSuffix="runtime.api" classPackageSuffix="runtime.internal.impl"
+ utilityPackageSuffix="runtime.util" providerPackageSuffix="ui" generateExampleClass="false"
+ ecorePackage="dom.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="dom.ecore#//WebParamKind">
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//WebParamKind/IN"/>
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//WebParamKind/INOUT"/>
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//WebParamKind/OUT"/>
+ </genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="dom.ecore#//SOAPBindingStyle">
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//SOAPBindingStyle/DOCUMENT"/>
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//SOAPBindingStyle/RPC"/>
+ </genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="dom.ecore#//SOAPBindingUse">
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//SOAPBindingUse/LITERAL"/>
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//SOAPBindingUse/ENCODED"/>
+ </genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="dom.ecore#//SOAPBindingParameterStyle">
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//SOAPBindingParameterStyle/WRAPPED"/>
+ <genEnumLiterals ecoreEnumLiteral="dom.ecore#//SOAPBindingParameterStyle/BARE"/>
+ </genEnums>
+ <genClasses ecoreClass="dom.ecore#//IDOM">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dom.ecore#//IDOM/webServiceProjects"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IJavaWebServiceElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IJavaWebServiceElement/implementation"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IJavaWebServiceElement/name"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IServiceEndpointInterface">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IServiceEndpointInterface/implicit"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference dom.ecore#//IServiceEndpointInterface/implementingWebServices"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dom.ecore#//IServiceEndpointInterface/webMethods"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IServiceEndpointInterface/targetNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IServiceEndpointInterface/soapBindingStyle"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IServiceEndpointInterface/soapBindingUse"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IServiceEndpointInterface/soapBindingParameterStyle"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IWebMethod">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dom.ecore#//IWebMethod/parameters"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebMethod/excluded"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebMethod/soapBindingStyle"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebMethod/soapBindingUse"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebMethod/soapBindingParameterStyle"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IWebParam">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebParam/kind"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebParam/typeName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebParam/partName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebParam/targetNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebParam/header"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IWebService">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference dom.ecore#//IWebService/serviceEndpoint"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebService/targetNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebService/portName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebService/wsdlLocation"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IWebServiceProject">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dom.ecore#//IWebServiceProject/webServices"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference dom.ecore#//IWebServiceProject/serviceEndpointInterfaces"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute dom.ecore#//IWebServiceProject/name"/>
+ </genClasses>
+ <genClasses ecoreClass="dom.ecore#//IWebType"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/DomFactoryImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/DomFactoryImpl.java
new file mode 100755
index 0000000..91d3a74
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/DomFactoryImpl.java
@@ -0,0 +1,320 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomFactory;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebType;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DomFactoryImpl extends EFactoryImpl implements DomFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static DomFactory init() {
+ try
+ {
+ DomFactory theDomFactory = (DomFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/jst/ws/jaxws/dom/runtime/dom.ecore"); //$NON-NLS-1$
+ if (theDomFactory != null)
+ {
+ return theDomFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new DomFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID())
+ {
+ case DomPackage.IDOM: return createIDOM();
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT: return createIJavaWebServiceElement();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE: return createIServiceEndpointInterface();
+ case DomPackage.IWEB_METHOD: return createIWebMethod();
+ case DomPackage.IWEB_PARAM: return createIWebParam();
+ case DomPackage.IWEB_SERVICE: return createIWebService();
+ case DomPackage.IWEB_SERVICE_PROJECT: return createIWebServiceProject();
+ case DomPackage.IWEB_TYPE: return createIWebType();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID())
+ {
+ case DomPackage.WEB_PARAM_KIND:
+ return createWebParamKindFromString(eDataType, initialValue);
+ case DomPackage.SOAP_BINDING_STYLE:
+ return createSOAPBindingStyleFromString(eDataType, initialValue);
+ case DomPackage.SOAP_BINDING_USE:
+ return createSOAPBindingUseFromString(eDataType, initialValue);
+ case DomPackage.SOAP_BINDING_PARAMETER_STYLE:
+ return createSOAPBindingParameterStyleFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID())
+ {
+ case DomPackage.WEB_PARAM_KIND:
+ return convertWebParamKindToString(eDataType, instanceValue);
+ case DomPackage.SOAP_BINDING_STYLE:
+ return convertSOAPBindingStyleToString(eDataType, instanceValue);
+ case DomPackage.SOAP_BINDING_USE:
+ return convertSOAPBindingUseToString(eDataType, instanceValue);
+ case DomPackage.SOAP_BINDING_PARAMETER_STYLE:
+ return convertSOAPBindingParameterStyleToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IDOM createIDOM() {
+ IDOMImpl idom = new IDOMImpl();
+ return idom;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IJavaWebServiceElement createIJavaWebServiceElement() {
+ IJavaWebServiceElementImpl iJavaWebServiceElement = new IJavaWebServiceElementImpl();
+ return iJavaWebServiceElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IServiceEndpointInterface createIServiceEndpointInterface() {
+ IServiceEndpointInterfaceImpl iServiceEndpointInterface = new IServiceEndpointInterfaceImpl();
+ return iServiceEndpointInterface;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IWebMethod createIWebMethod() {
+ IWebMethodImpl iWebMethod = new IWebMethodImpl();
+ return iWebMethod;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IWebParam createIWebParam() {
+ IWebParamImpl iWebParam = new IWebParamImpl();
+ return iWebParam;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IWebService createIWebService() {
+ IWebServiceImpl iWebService = new IWebServiceImpl();
+ return iWebService;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IWebServiceProject createIWebServiceProject() {
+ IWebServiceProjectImpl iWebServiceProject = new IWebServiceProjectImpl();
+ return iWebServiceProject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IWebType createIWebType() {
+ IWebTypeImpl iWebType = new IWebTypeImpl();
+ return iWebType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WebParamKind createWebParamKindFromString(EDataType eDataType, String initialValue) {
+ WebParamKind result = WebParamKind.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertWebParamKindToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingStyle createSOAPBindingStyleFromString(EDataType eDataType, String initialValue) {
+ SOAPBindingStyle result = SOAPBindingStyle.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertSOAPBindingStyleToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingUse createSOAPBindingUseFromString(EDataType eDataType, String initialValue) {
+ SOAPBindingUse result = SOAPBindingUse.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertSOAPBindingUseToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingParameterStyle createSOAPBindingParameterStyleFromString(EDataType eDataType, String initialValue) {
+ SOAPBindingParameterStyle result = SOAPBindingParameterStyle.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertSOAPBindingParameterStyleToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomPackage getDomPackage() {
+ return (DomPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static DomPackage getPackage() {
+ return DomPackage.eINSTANCE;
+ }
+
+} //DomFactoryImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/DomPackageImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/DomPackageImpl.java
new file mode 100755
index 0000000..79588a7
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/DomPackageImpl.java
@@ -0,0 +1,722 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomFactory;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebType;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DomPackageImpl extends EPackageImpl implements DomPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass idomEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iJavaWebServiceElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iServiceEndpointInterfaceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iWebMethodEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iWebParamEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iWebServiceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iWebServiceProjectEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iWebTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum webParamKindEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum soapBindingStyleEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum soapBindingUseEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum soapBindingParameterStyleEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private DomPackageImpl() {
+ super(eNS_URI, DomFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static DomPackage init() {
+ if (isInited) return (DomPackage)EPackage.Registry.INSTANCE.getEPackage(DomPackage.eNS_URI);
+
+ // Obtain or create and register package
+ DomPackageImpl theDomPackage = (DomPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof DomPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new DomPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theDomPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theDomPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theDomPackage.freeze();
+
+ return theDomPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIDOM() {
+ return idomEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIDOM_WebServiceProjects() {
+ return (EReference)idomEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIJavaWebServiceElement() {
+ return iJavaWebServiceElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIJavaWebServiceElement_Implementation() {
+ return (EAttribute)iJavaWebServiceElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIJavaWebServiceElement_Name() {
+ return (EAttribute)iJavaWebServiceElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIServiceEndpointInterface() {
+ return iServiceEndpointInterfaceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIServiceEndpointInterface_Implicit() {
+ return (EAttribute)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIServiceEndpointInterface_ImplementingWebServices() {
+ return (EReference)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIServiceEndpointInterface_WebMethods() {
+ return (EReference)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIServiceEndpointInterface_TargetNamespace() {
+ return (EAttribute)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIServiceEndpointInterface_SoapBindingStyle() {
+ return (EAttribute)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIServiceEndpointInterface_SoapBindingUse() {
+ return (EAttribute)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIServiceEndpointInterface_SoapBindingParameterStyle() {
+ return (EAttribute)iServiceEndpointInterfaceEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIWebMethod() {
+ return iWebMethodEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIWebMethod_Parameters() {
+ return (EReference)iWebMethodEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebMethod_Excluded() {
+ return (EAttribute)iWebMethodEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebMethod_SoapBindingStyle() {
+ return (EAttribute)iWebMethodEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebMethod_SoapBindingUse() {
+ return (EAttribute)iWebMethodEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebMethod_SoapBindingParameterStyle() {
+ return (EAttribute)iWebMethodEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIWebParam() {
+ return iWebParamEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebParam_Kind() {
+ return (EAttribute)iWebParamEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebParam_TypeName() {
+ return (EAttribute)iWebParamEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebParam_PartName() {
+ return (EAttribute)iWebParamEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebParam_TargetNamespace() {
+ return (EAttribute)iWebParamEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebParam_Header() {
+ return (EAttribute)iWebParamEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIWebService() {
+ return iWebServiceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIWebService_ServiceEndpoint() {
+ return (EReference)iWebServiceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebService_TargetNamespace() {
+ return (EAttribute)iWebServiceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebService_PortName() {
+ return (EAttribute)iWebServiceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebService_WsdlLocation() {
+ return (EAttribute)iWebServiceEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIWebServiceProject() {
+ return iWebServiceProjectEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIWebServiceProject_WebServices() {
+ return (EReference)iWebServiceProjectEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIWebServiceProject_ServiceEndpointInterfaces() {
+ return (EReference)iWebServiceProjectEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getIWebServiceProject_Name() {
+ return (EAttribute)iWebServiceProjectEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIWebType() {
+ return iWebTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getWebParamKind() {
+ return webParamKindEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getSOAPBindingStyle() {
+ return soapBindingStyleEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getSOAPBindingUse() {
+ return soapBindingUseEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getSOAPBindingParameterStyle() {
+ return soapBindingParameterStyleEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomFactory getDomFactory() {
+ return (DomFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ idomEClass = createEClass(IDOM);
+ createEReference(idomEClass, IDOM__WEB_SERVICE_PROJECTS);
+
+ iJavaWebServiceElementEClass = createEClass(IJAVA_WEB_SERVICE_ELEMENT);
+ createEAttribute(iJavaWebServiceElementEClass, IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION);
+ createEAttribute(iJavaWebServiceElementEClass, IJAVA_WEB_SERVICE_ELEMENT__NAME);
+
+ iServiceEndpointInterfaceEClass = createEClass(ISERVICE_ENDPOINT_INTERFACE);
+ createEAttribute(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__IMPLICIT);
+ createEReference(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES);
+ createEReference(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS);
+ createEAttribute(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE);
+ createEAttribute(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE);
+ createEAttribute(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE);
+ createEAttribute(iServiceEndpointInterfaceEClass, ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE);
+
+ iWebMethodEClass = createEClass(IWEB_METHOD);
+ createEReference(iWebMethodEClass, IWEB_METHOD__PARAMETERS);
+ createEAttribute(iWebMethodEClass, IWEB_METHOD__EXCLUDED);
+ createEAttribute(iWebMethodEClass, IWEB_METHOD__SOAP_BINDING_STYLE);
+ createEAttribute(iWebMethodEClass, IWEB_METHOD__SOAP_BINDING_USE);
+ createEAttribute(iWebMethodEClass, IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE);
+
+ iWebParamEClass = createEClass(IWEB_PARAM);
+ createEAttribute(iWebParamEClass, IWEB_PARAM__KIND);
+ createEAttribute(iWebParamEClass, IWEB_PARAM__TYPE_NAME);
+ createEAttribute(iWebParamEClass, IWEB_PARAM__PART_NAME);
+ createEAttribute(iWebParamEClass, IWEB_PARAM__TARGET_NAMESPACE);
+ createEAttribute(iWebParamEClass, IWEB_PARAM__HEADER);
+
+ iWebServiceEClass = createEClass(IWEB_SERVICE);
+ createEReference(iWebServiceEClass, IWEB_SERVICE__SERVICE_ENDPOINT);
+ createEAttribute(iWebServiceEClass, IWEB_SERVICE__TARGET_NAMESPACE);
+ createEAttribute(iWebServiceEClass, IWEB_SERVICE__PORT_NAME);
+ createEAttribute(iWebServiceEClass, IWEB_SERVICE__WSDL_LOCATION);
+
+ iWebServiceProjectEClass = createEClass(IWEB_SERVICE_PROJECT);
+ createEReference(iWebServiceProjectEClass, IWEB_SERVICE_PROJECT__WEB_SERVICES);
+ createEReference(iWebServiceProjectEClass, IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES);
+ createEAttribute(iWebServiceProjectEClass, IWEB_SERVICE_PROJECT__NAME);
+
+ iWebTypeEClass = createEClass(IWEB_TYPE);
+
+ // Create enums
+ webParamKindEEnum = createEEnum(WEB_PARAM_KIND);
+ soapBindingStyleEEnum = createEEnum(SOAP_BINDING_STYLE);
+ soapBindingUseEEnum = createEEnum(SOAP_BINDING_USE);
+ soapBindingParameterStyleEEnum = createEEnum(SOAP_BINDING_PARAMETER_STYLE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ iServiceEndpointInterfaceEClass.getESuperTypes().add(this.getIJavaWebServiceElement());
+ iWebMethodEClass.getESuperTypes().add(this.getIJavaWebServiceElement());
+ iWebParamEClass.getESuperTypes().add(this.getIJavaWebServiceElement());
+ iWebServiceEClass.getESuperTypes().add(this.getIJavaWebServiceElement());
+ iWebTypeEClass.getESuperTypes().add(this.getIJavaWebServiceElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(idomEClass, org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM.class, "IDOM", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getIDOM_WebServiceProjects(), this.getIWebServiceProject(), null, "webServiceProjects", null, 0, -1, org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iJavaWebServiceElementEClass, IJavaWebServiceElement.class, "IJavaWebServiceElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getIJavaWebServiceElement_Implementation(), ecorePackage.getEString(), "implementation", null, 1, 1, IJavaWebServiceElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIJavaWebServiceElement_Name(), ecorePackage.getEString(), "name", null, 1, 1, IJavaWebServiceElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iServiceEndpointInterfaceEClass, IServiceEndpointInterface.class, "IServiceEndpointInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getIServiceEndpointInterface_Implicit(), ecorePackage.getEBoolean(), "implicit", null, 1, 1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getIServiceEndpointInterface_ImplementingWebServices(), this.getIWebService(), this.getIWebService_ServiceEndpoint(), "implementingWebServices", null, 1, -1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getIServiceEndpointInterface_WebMethods(), this.getIWebMethod(), null, "webMethods", null, 1, -1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIServiceEndpointInterface_TargetNamespace(), ecorePackage.getEString(), "targetNamespace", null, 1, 1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIServiceEndpointInterface_SoapBindingStyle(), this.getSOAPBindingStyle(), "soapBindingStyle", "DOCUMENT", 1, 1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getIServiceEndpointInterface_SoapBindingUse(), this.getSOAPBindingUse(), "soapBindingUse", "LITERAL", 1, 1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getIServiceEndpointInterface_SoapBindingParameterStyle(), this.getSOAPBindingParameterStyle(), "soapBindingParameterStyle", "WRAPPED", 1, 1, IServiceEndpointInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+
+ initEClass(iWebMethodEClass, IWebMethod.class, "IWebMethod", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getIWebMethod_Parameters(), this.getIWebParam(), null, "parameters", null, 1, -1, IWebMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebMethod_Excluded(), ecorePackage.getEBoolean(), "excluded", null, 1, 1, IWebMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebMethod_SoapBindingStyle(), this.getSOAPBindingStyle(), "soapBindingStyle", "DOCUMENT", 1, 1, IWebMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getIWebMethod_SoapBindingUse(), this.getSOAPBindingUse(), "soapBindingUse", "LITERAL", 1, 1, IWebMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getIWebMethod_SoapBindingParameterStyle(), this.getSOAPBindingParameterStyle(), "soapBindingParameterStyle", "WRAPPED", 1, 1, IWebMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+
+ initEClass(iWebParamEClass, IWebParam.class, "IWebParam", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getIWebParam_Kind(), this.getWebParamKind(), "kind", null, 1, 1, IWebParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebParam_TypeName(), ecorePackage.getEString(), "typeName", null, 1, 1, IWebParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebParam_PartName(), ecorePackage.getEString(), "partName", null, 1, 1, IWebParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebParam_TargetNamespace(), ecorePackage.getEString(), "targetNamespace", null, 1, 1, IWebParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebParam_Header(), ecorePackage.getEBoolean(), "header", "false", 1, 1, IWebParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+
+ initEClass(iWebServiceEClass, IWebService.class, "IWebService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getIWebService_ServiceEndpoint(), this.getIServiceEndpointInterface(), this.getIServiceEndpointInterface_ImplementingWebServices(), "serviceEndpoint", null, 0, 1, IWebService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebService_TargetNamespace(), ecorePackage.getEString(), "targetNamespace", null, 1, 1, IWebService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebService_PortName(), ecorePackage.getEString(), "portName", null, 1, 1, IWebService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebService_WsdlLocation(), ecorePackage.getEString(), "wsdlLocation", null, 0, 1, IWebService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iWebServiceProjectEClass, IWebServiceProject.class, "IWebServiceProject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getIWebServiceProject_WebServices(), this.getIWebService(), null, "webServices", null, 0, -1, IWebServiceProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getIWebServiceProject_ServiceEndpointInterfaces(), this.getIServiceEndpointInterface(), null, "serviceEndpointInterfaces", null, 0, -1, IWebServiceProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIWebServiceProject_Name(), ecorePackage.getEString(), "name", null, 1, 1, IWebServiceProject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iWebTypeEClass, IWebType.class, "IWebType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(webParamKindEEnum, WebParamKind.class, "WebParamKind"); //$NON-NLS-1$
+ addEEnumLiteral(webParamKindEEnum, WebParamKind.IN);
+ addEEnumLiteral(webParamKindEEnum, WebParamKind.INOUT);
+ addEEnumLiteral(webParamKindEEnum, WebParamKind.OUT);
+
+ initEEnum(soapBindingStyleEEnum, SOAPBindingStyle.class, "SOAPBindingStyle"); //$NON-NLS-1$
+ addEEnumLiteral(soapBindingStyleEEnum, SOAPBindingStyle.DOCUMENT);
+ addEEnumLiteral(soapBindingStyleEEnum, SOAPBindingStyle.RPC);
+
+ initEEnum(soapBindingUseEEnum, SOAPBindingUse.class, "SOAPBindingUse"); //$NON-NLS-1$
+ addEEnumLiteral(soapBindingUseEEnum, SOAPBindingUse.LITERAL);
+ addEEnumLiteral(soapBindingUseEEnum, SOAPBindingUse.ENCODED);
+
+ initEEnum(soapBindingParameterStyleEEnum, SOAPBindingParameterStyle.class, "SOAPBindingParameterStyle"); //$NON-NLS-1$
+ addEEnumLiteral(soapBindingParameterStyleEEnum, SOAPBindingParameterStyle.WRAPPED);
+ addEEnumLiteral(soapBindingParameterStyleEEnum, SOAPBindingParameterStyle.BARE);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //DomPackageImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IDOMImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IDOMImpl.java
new file mode 100755
index 0000000..8ae867c
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IDOMImpl.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IDOM</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IDOMImpl#getWebServiceProjects <em>Web Service Projects</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IDOMImpl extends EObjectImpl implements IDOM {
+ /**
+ * The cached value of the '{@link #getWebServiceProjects() <em>Web Service Projects</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getWebServiceProjects()
+ * @generated
+ * @ordered
+ */
+ protected EList<IWebServiceProject> webServiceProjects;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IDOMImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IDOM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<IWebServiceProject> getWebServiceProjects() {
+ if (webServiceProjects == null)
+ {
+ webServiceProjects = new EObjectContainmentEList<IWebServiceProject>(IWebServiceProject.class, this, DomPackage.IDOM__WEB_SERVICE_PROJECTS);
+ }
+ return webServiceProjects;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.IDOM__WEB_SERVICE_PROJECTS:
+ return ((InternalEList<?>)getWebServiceProjects()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.IDOM__WEB_SERVICE_PROJECTS:
+ return getWebServiceProjects();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.IDOM__WEB_SERVICE_PROJECTS:
+ getWebServiceProjects().clear();
+ getWebServiceProjects().addAll((Collection<? extends IWebServiceProject>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IDOM__WEB_SERVICE_PROJECTS:
+ getWebServiceProjects().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IDOM__WEB_SERVICE_PROJECTS:
+ return webServiceProjects != null && !webServiceProjects.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //IDOMImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IJavaWebServiceElementImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IJavaWebServiceElementImpl.java
new file mode 100755
index 0000000..d80c124
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IJavaWebServiceElementImpl.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IJavaWebServiceElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IJava Web Service Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IJavaWebServiceElementImpl#getImplementation <em>Implementation</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IJavaWebServiceElementImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IJavaWebServiceElementImpl extends EObjectImpl implements IJavaWebServiceElement {
+ /**
+ * The default value of the '{@link #getImplementation() <em>Implementation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImplementation()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMPLEMENTATION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getImplementation() <em>Implementation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImplementation()
+ * @generated
+ * @ordered
+ */
+ protected String implementation = IMPLEMENTATION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IJavaWebServiceElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IJAVA_WEB_SERVICE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImplementation() {
+ return implementation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImplementation(String newImplementation) {
+ String oldImplementation = implementation;
+ implementation = newImplementation;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION, oldImplementation, implementation));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IJAVA_WEB_SERVICE_ELEMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION:
+ return getImplementation();
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION:
+ setImplementation((String)newValue);
+ return;
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION:
+ setImplementation(IMPLEMENTATION_EDEFAULT);
+ return;
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__IMPLEMENTATION:
+ return IMPLEMENTATION_EDEFAULT == null ? implementation != null : !IMPLEMENTATION_EDEFAULT.equals(implementation);
+ case DomPackage.IJAVA_WEB_SERVICE_ELEMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (implementation: "); //$NON-NLS-1$
+ result.append(implementation);
+ result.append(", name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //IJavaWebServiceElementImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IServiceEndpointInterfaceImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IServiceEndpointInterfaceImpl.java
new file mode 100755
index 0000000..8d0e51f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IServiceEndpointInterfaceImpl.java
@@ -0,0 +1,522 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IService Endpoint Interface</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#isImplicit <em>Implicit</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#getImplementingWebServices <em>Implementing Web Services</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#getWebMethods <em>Web Methods</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#getTargetNamespace <em>Target Namespace</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#getSoapBindingStyle <em>Soap Binding Style</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#getSoapBindingUse <em>Soap Binding Use</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IServiceEndpointInterfaceImpl#getSoapBindingParameterStyle <em>Soap Binding Parameter Style</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IServiceEndpointInterfaceImpl extends IJavaWebServiceElementImpl implements IServiceEndpointInterface {
+ /**
+ * The default value of the '{@link #isImplicit() <em>Implicit</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isImplicit()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IMPLICIT_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isImplicit() <em>Implicit</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isImplicit()
+ * @generated
+ * @ordered
+ */
+ protected boolean implicit = IMPLICIT_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getImplementingWebServices() <em>Implementing Web Services</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImplementingWebServices()
+ * @generated
+ * @ordered
+ */
+ protected EList<IWebService> implementingWebServices;
+
+ /**
+ * The cached value of the '{@link #getWebMethods() <em>Web Methods</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getWebMethods()
+ * @generated
+ * @ordered
+ */
+ protected EList<IWebMethod> webMethods;
+
+ /**
+ * The default value of the '{@link #getTargetNamespace() <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetNamespace()
+ * @generated
+ * @ordered
+ */
+ protected static final String TARGET_NAMESPACE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTargetNamespace() <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetNamespace()
+ * @generated
+ * @ordered
+ */
+ protected String targetNamespace = TARGET_NAMESPACE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSoapBindingStyle() <em>Soap Binding Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingStyle()
+ * @generated
+ * @ordered
+ */
+ protected static final SOAPBindingStyle SOAP_BINDING_STYLE_EDEFAULT = SOAPBindingStyle.DOCUMENT;
+
+ /**
+ * The cached value of the '{@link #getSoapBindingStyle() <em>Soap Binding Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingStyle()
+ * @generated
+ * @ordered
+ */
+ protected SOAPBindingStyle soapBindingStyle = SOAP_BINDING_STYLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSoapBindingUse() <em>Soap Binding Use</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingUse()
+ * @generated
+ * @ordered
+ */
+ protected static final SOAPBindingUse SOAP_BINDING_USE_EDEFAULT = SOAPBindingUse.LITERAL;
+
+ /**
+ * The cached value of the '{@link #getSoapBindingUse() <em>Soap Binding Use</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingUse()
+ * @generated
+ * @ordered
+ */
+ protected SOAPBindingUse soapBindingUse = SOAP_BINDING_USE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSoapBindingParameterStyle() <em>Soap Binding Parameter Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingParameterStyle()
+ * @generated
+ * @ordered
+ */
+ protected static final SOAPBindingParameterStyle SOAP_BINDING_PARAMETER_STYLE_EDEFAULT = SOAPBindingParameterStyle.WRAPPED;
+
+ /**
+ * The cached value of the '{@link #getSoapBindingParameterStyle() <em>Soap Binding Parameter Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingParameterStyle()
+ * @generated
+ * @ordered
+ */
+ protected SOAPBindingParameterStyle soapBindingParameterStyle = SOAP_BINDING_PARAMETER_STYLE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IServiceEndpointInterfaceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.ISERVICE_ENDPOINT_INTERFACE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isImplicit() {
+ return implicit;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImplicit(boolean newImplicit) {
+ boolean oldImplicit = implicit;
+ implicit = newImplicit;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLICIT, oldImplicit, implicit));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<IWebService> getImplementingWebServices() {
+ if (implementingWebServices == null)
+ {
+ implementingWebServices = new EObjectWithInverseResolvingEList<IWebService>(IWebService.class, this, DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES, DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT);
+ }
+ return implementingWebServices;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<IWebMethod> getWebMethods() {
+ if (webMethods == null)
+ {
+ webMethods = new EObjectContainmentEList<IWebMethod>(IWebMethod.class, this, DomPackage.ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS);
+ }
+ return webMethods;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTargetNamespace() {
+ return targetNamespace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTargetNamespace(String newTargetNamespace) {
+ String oldTargetNamespace = targetNamespace;
+ targetNamespace = newTargetNamespace;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE, oldTargetNamespace, targetNamespace));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingStyle getSoapBindingStyle() {
+ return soapBindingStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSoapBindingStyle(SOAPBindingStyle newSoapBindingStyle) {
+ SOAPBindingStyle oldSoapBindingStyle = soapBindingStyle;
+ soapBindingStyle = newSoapBindingStyle == null ? SOAP_BINDING_STYLE_EDEFAULT : newSoapBindingStyle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE, oldSoapBindingStyle, soapBindingStyle));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingUse getSoapBindingUse() {
+ return soapBindingUse;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSoapBindingUse(SOAPBindingUse newSoapBindingUse) {
+ SOAPBindingUse oldSoapBindingUse = soapBindingUse;
+ soapBindingUse = newSoapBindingUse == null ? SOAP_BINDING_USE_EDEFAULT : newSoapBindingUse;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE, oldSoapBindingUse, soapBindingUse));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingParameterStyle getSoapBindingParameterStyle() {
+ return soapBindingParameterStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSoapBindingParameterStyle(SOAPBindingParameterStyle newSoapBindingParameterStyle) {
+ SOAPBindingParameterStyle oldSoapBindingParameterStyle = soapBindingParameterStyle;
+ soapBindingParameterStyle = newSoapBindingParameterStyle == null ? SOAP_BINDING_PARAMETER_STYLE_EDEFAULT : newSoapBindingParameterStyle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE, oldSoapBindingParameterStyle, soapBindingParameterStyle));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getImplementingWebServices()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES:
+ return ((InternalEList<?>)getImplementingWebServices()).basicRemove(otherEnd, msgs);
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS:
+ return ((InternalEList<?>)getWebMethods()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLICIT:
+ return isImplicit();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES:
+ return getImplementingWebServices();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS:
+ return getWebMethods();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE:
+ return getTargetNamespace();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE:
+ return getSoapBindingStyle();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE:
+ return getSoapBindingUse();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE:
+ return getSoapBindingParameterStyle();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLICIT:
+ setImplicit((Boolean)newValue);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES:
+ getImplementingWebServices().clear();
+ getImplementingWebServices().addAll((Collection<? extends IWebService>)newValue);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS:
+ getWebMethods().clear();
+ getWebMethods().addAll((Collection<? extends IWebMethod>)newValue);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE:
+ setTargetNamespace((String)newValue);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE:
+ setSoapBindingStyle((SOAPBindingStyle)newValue);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE:
+ setSoapBindingUse((SOAPBindingUse)newValue);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE:
+ setSoapBindingParameterStyle((SOAPBindingParameterStyle)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLICIT:
+ setImplicit(IMPLICIT_EDEFAULT);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES:
+ getImplementingWebServices().clear();
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS:
+ getWebMethods().clear();
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE:
+ setTargetNamespace(TARGET_NAMESPACE_EDEFAULT);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE:
+ setSoapBindingStyle(SOAP_BINDING_STYLE_EDEFAULT);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE:
+ setSoapBindingUse(SOAP_BINDING_USE_EDEFAULT);
+ return;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE:
+ setSoapBindingParameterStyle(SOAP_BINDING_PARAMETER_STYLE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLICIT:
+ return implicit != IMPLICIT_EDEFAULT;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES:
+ return implementingWebServices != null && !implementingWebServices.isEmpty();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__WEB_METHODS:
+ return webMethods != null && !webMethods.isEmpty();
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE:
+ return TARGET_NAMESPACE_EDEFAULT == null ? targetNamespace != null : !TARGET_NAMESPACE_EDEFAULT.equals(targetNamespace);
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_STYLE:
+ return soapBindingStyle != SOAP_BINDING_STYLE_EDEFAULT;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_USE:
+ return soapBindingUse != SOAP_BINDING_USE_EDEFAULT;
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__SOAP_BINDING_PARAMETER_STYLE:
+ return soapBindingParameterStyle != SOAP_BINDING_PARAMETER_STYLE_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (implicit: "); //$NON-NLS-1$
+ result.append(implicit);
+ result.append(", targetNamespace: "); //$NON-NLS-1$
+ result.append(targetNamespace);
+ result.append(", soapBindingStyle: "); //$NON-NLS-1$
+ result.append(soapBindingStyle);
+ result.append(", soapBindingUse: "); //$NON-NLS-1$
+ result.append(soapBindingUse);
+ result.append(", soapBindingParameterStyle: "); //$NON-NLS-1$
+ result.append(soapBindingParameterStyle);
+ result.append(')');
+ return result.toString();
+ }
+
+ @Override
+ public EObject eContainer()
+ {
+ if (super.eContainer()!=null) {
+ return super.eContainer();
+ }
+
+ for (IWebService ws : getImplementingWebServices()) {
+ if (ws.eContainer()!=null) {
+ return ws.eContainer();
+ }
+ }
+
+ return null;
+ }
+
+} //IServiceEndpointInterfaceImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebMethodImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebMethodImpl.java
new file mode 100755
index 0000000..6bba49a
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebMethodImpl.java
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IWeb Method</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl#getParameters <em>Parameters</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl#isExcluded <em>Excluded</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl#getSoapBindingStyle <em>Soap Binding Style</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl#getSoapBindingUse <em>Soap Binding Use</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebMethodImpl#getSoapBindingParameterStyle <em>Soap Binding Parameter Style</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IWebMethodImpl extends IJavaWebServiceElementImpl implements IWebMethod {
+ /**
+ * The cached value of the '{@link #getParameters() <em>Parameters</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParameters()
+ * @generated
+ * @ordered
+ */
+ protected EList<IWebParam> parameters;
+
+ /**
+ * The default value of the '{@link #isExcluded() <em>Excluded</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isExcluded()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean EXCLUDED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isExcluded() <em>Excluded</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isExcluded()
+ * @generated
+ * @ordered
+ */
+ protected boolean excluded = EXCLUDED_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSoapBindingStyle() <em>Soap Binding Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingStyle()
+ * @generated
+ * @ordered
+ */
+ protected static final SOAPBindingStyle SOAP_BINDING_STYLE_EDEFAULT = SOAPBindingStyle.DOCUMENT;
+
+ /**
+ * The cached value of the '{@link #getSoapBindingStyle() <em>Soap Binding Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingStyle()
+ * @generated
+ * @ordered
+ */
+ protected SOAPBindingStyle soapBindingStyle = SOAP_BINDING_STYLE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSoapBindingUse() <em>Soap Binding Use</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingUse()
+ * @generated
+ * @ordered
+ */
+ protected static final SOAPBindingUse SOAP_BINDING_USE_EDEFAULT = SOAPBindingUse.LITERAL;
+
+ /**
+ * The cached value of the '{@link #getSoapBindingUse() <em>Soap Binding Use</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingUse()
+ * @generated
+ * @ordered
+ */
+ protected SOAPBindingUse soapBindingUse = SOAP_BINDING_USE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSoapBindingParameterStyle() <em>Soap Binding Parameter Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingParameterStyle()
+ * @generated
+ * @ordered
+ */
+ protected static final SOAPBindingParameterStyle SOAP_BINDING_PARAMETER_STYLE_EDEFAULT = SOAPBindingParameterStyle.WRAPPED;
+
+ /**
+ * The cached value of the '{@link #getSoapBindingParameterStyle() <em>Soap Binding Parameter Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSoapBindingParameterStyle()
+ * @generated
+ * @ordered
+ */
+ protected SOAPBindingParameterStyle soapBindingParameterStyle = SOAP_BINDING_PARAMETER_STYLE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWebMethodImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IWEB_METHOD;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<IWebParam> getParameters() {
+ if (parameters == null)
+ {
+ parameters = new EObjectContainmentEList<IWebParam>(IWebParam.class, this, DomPackage.IWEB_METHOD__PARAMETERS);
+ }
+ return parameters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isExcluded() {
+ return excluded;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExcluded(boolean newExcluded) {
+ boolean oldExcluded = excluded;
+ excluded = newExcluded;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_METHOD__EXCLUDED, oldExcluded, excluded));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingStyle getSoapBindingStyle() {
+ return soapBindingStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSoapBindingStyle(SOAPBindingStyle newSoapBindingStyle) {
+ SOAPBindingStyle oldSoapBindingStyle = soapBindingStyle;
+ soapBindingStyle = newSoapBindingStyle == null ? SOAP_BINDING_STYLE_EDEFAULT : newSoapBindingStyle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_METHOD__SOAP_BINDING_STYLE, oldSoapBindingStyle, soapBindingStyle));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingUse getSoapBindingUse() {
+ return soapBindingUse;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSoapBindingUse(SOAPBindingUse newSoapBindingUse) {
+ SOAPBindingUse oldSoapBindingUse = soapBindingUse;
+ soapBindingUse = newSoapBindingUse == null ? SOAP_BINDING_USE_EDEFAULT : newSoapBindingUse;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_METHOD__SOAP_BINDING_USE, oldSoapBindingUse, soapBindingUse));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SOAPBindingParameterStyle getSoapBindingParameterStyle() {
+ return soapBindingParameterStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSoapBindingParameterStyle(SOAPBindingParameterStyle newSoapBindingParameterStyle) {
+ SOAPBindingParameterStyle oldSoapBindingParameterStyle = soapBindingParameterStyle;
+ soapBindingParameterStyle = newSoapBindingParameterStyle == null ? SOAP_BINDING_PARAMETER_STYLE_EDEFAULT : newSoapBindingParameterStyle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE, oldSoapBindingParameterStyle, soapBindingParameterStyle));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_METHOD__PARAMETERS:
+ return ((InternalEList<?>)getParameters()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_METHOD__PARAMETERS:
+ return getParameters();
+ case DomPackage.IWEB_METHOD__EXCLUDED:
+ return isExcluded();
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_STYLE:
+ return getSoapBindingStyle();
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_USE:
+ return getSoapBindingUse();
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE:
+ return getSoapBindingParameterStyle();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_METHOD__PARAMETERS:
+ getParameters().clear();
+ getParameters().addAll((Collection<? extends IWebParam>)newValue);
+ return;
+ case DomPackage.IWEB_METHOD__EXCLUDED:
+ setExcluded((Boolean)newValue);
+ return;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_STYLE:
+ setSoapBindingStyle((SOAPBindingStyle)newValue);
+ return;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_USE:
+ setSoapBindingUse((SOAPBindingUse)newValue);
+ return;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE:
+ setSoapBindingParameterStyle((SOAPBindingParameterStyle)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_METHOD__PARAMETERS:
+ getParameters().clear();
+ return;
+ case DomPackage.IWEB_METHOD__EXCLUDED:
+ setExcluded(EXCLUDED_EDEFAULT);
+ return;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_STYLE:
+ setSoapBindingStyle(SOAP_BINDING_STYLE_EDEFAULT);
+ return;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_USE:
+ setSoapBindingUse(SOAP_BINDING_USE_EDEFAULT);
+ return;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE:
+ setSoapBindingParameterStyle(SOAP_BINDING_PARAMETER_STYLE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_METHOD__PARAMETERS:
+ return parameters != null && !parameters.isEmpty();
+ case DomPackage.IWEB_METHOD__EXCLUDED:
+ return excluded != EXCLUDED_EDEFAULT;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_STYLE:
+ return soapBindingStyle != SOAP_BINDING_STYLE_EDEFAULT;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_USE:
+ return soapBindingUse != SOAP_BINDING_USE_EDEFAULT;
+ case DomPackage.IWEB_METHOD__SOAP_BINDING_PARAMETER_STYLE:
+ return soapBindingParameterStyle != SOAP_BINDING_PARAMETER_STYLE_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (excluded: "); //$NON-NLS-1$
+ result.append(excluded);
+ result.append(", soapBindingStyle: "); //$NON-NLS-1$
+ result.append(soapBindingStyle);
+ result.append(", soapBindingUse: "); //$NON-NLS-1$
+ result.append(soapBindingUse);
+ result.append(", soapBindingParameterStyle: "); //$NON-NLS-1$
+ result.append(soapBindingParameterStyle);
+ result.append(')');
+ return result.toString();
+ }
+
+} //IWebMethodImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebParamImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebParamImpl.java
new file mode 100755
index 0000000..61504e9
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebParamImpl.java
@@ -0,0 +1,389 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IWeb Param</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl#getTypeName <em>Type Name</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl#getPartName <em>Part Name</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl#getTargetNamespace <em>Target Namespace</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebParamImpl#isHeader <em>Header</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IWebParamImpl extends IJavaWebServiceElementImpl implements IWebParam {
+ /**
+ * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getKind()
+ * @generated
+ * @ordered
+ */
+ protected static final WebParamKind KIND_EDEFAULT = WebParamKind.IN;
+
+ /**
+ * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getKind()
+ * @generated
+ * @ordered
+ */
+ protected WebParamKind kind = KIND_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getTypeName() <em>Type Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypeName()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypeName() <em>Type Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypeName()
+ * @generated
+ * @ordered
+ */
+ protected String typeName = TYPE_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPartName() <em>Part Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPartName()
+ * @generated
+ * @ordered
+ */
+ protected static final String PART_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPartName() <em>Part Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPartName()
+ * @generated
+ * @ordered
+ */
+ protected String partName = PART_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getTargetNamespace() <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetNamespace()
+ * @generated
+ * @ordered
+ */
+ protected static final String TARGET_NAMESPACE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTargetNamespace() <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetNamespace()
+ * @generated
+ * @ordered
+ */
+ protected String targetNamespace = TARGET_NAMESPACE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isHeader() <em>Header</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isHeader()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean HEADER_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isHeader() <em>Header</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isHeader()
+ * @generated
+ * @ordered
+ */
+ protected boolean header = HEADER_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWebParamImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IWEB_PARAM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WebParamKind getKind() {
+ return kind;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setKind(WebParamKind newKind) {
+ WebParamKind oldKind = kind;
+ kind = newKind == null ? KIND_EDEFAULT : newKind;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_PARAM__KIND, oldKind, kind));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTypeName() {
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypeName(String newTypeName) {
+ String oldTypeName = typeName;
+ typeName = newTypeName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_PARAM__TYPE_NAME, oldTypeName, typeName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPartName() {
+ return partName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPartName(String newPartName) {
+ String oldPartName = partName;
+ partName = newPartName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_PARAM__PART_NAME, oldPartName, partName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTargetNamespace() {
+ return targetNamespace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTargetNamespace(String newTargetNamespace) {
+ String oldTargetNamespace = targetNamespace;
+ targetNamespace = newTargetNamespace;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_PARAM__TARGET_NAMESPACE, oldTargetNamespace, targetNamespace));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isHeader() {
+ return header;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHeader(boolean newHeader) {
+ boolean oldHeader = header;
+ header = newHeader;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_PARAM__HEADER, oldHeader, header));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_PARAM__KIND:
+ return getKind();
+ case DomPackage.IWEB_PARAM__TYPE_NAME:
+ return getTypeName();
+ case DomPackage.IWEB_PARAM__PART_NAME:
+ return getPartName();
+ case DomPackage.IWEB_PARAM__TARGET_NAMESPACE:
+ return getTargetNamespace();
+ case DomPackage.IWEB_PARAM__HEADER:
+ return isHeader();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_PARAM__KIND:
+ setKind((WebParamKind)newValue);
+ return;
+ case DomPackage.IWEB_PARAM__TYPE_NAME:
+ setTypeName((String)newValue);
+ return;
+ case DomPackage.IWEB_PARAM__PART_NAME:
+ setPartName((String)newValue);
+ return;
+ case DomPackage.IWEB_PARAM__TARGET_NAMESPACE:
+ setTargetNamespace((String)newValue);
+ return;
+ case DomPackage.IWEB_PARAM__HEADER:
+ setHeader((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_PARAM__KIND:
+ setKind(KIND_EDEFAULT);
+ return;
+ case DomPackage.IWEB_PARAM__TYPE_NAME:
+ setTypeName(TYPE_NAME_EDEFAULT);
+ return;
+ case DomPackage.IWEB_PARAM__PART_NAME:
+ setPartName(PART_NAME_EDEFAULT);
+ return;
+ case DomPackage.IWEB_PARAM__TARGET_NAMESPACE:
+ setTargetNamespace(TARGET_NAMESPACE_EDEFAULT);
+ return;
+ case DomPackage.IWEB_PARAM__HEADER:
+ setHeader(HEADER_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_PARAM__KIND:
+ return kind != KIND_EDEFAULT;
+ case DomPackage.IWEB_PARAM__TYPE_NAME:
+ return TYPE_NAME_EDEFAULT == null ? typeName != null : !TYPE_NAME_EDEFAULT.equals(typeName);
+ case DomPackage.IWEB_PARAM__PART_NAME:
+ return PART_NAME_EDEFAULT == null ? partName != null : !PART_NAME_EDEFAULT.equals(partName);
+ case DomPackage.IWEB_PARAM__TARGET_NAMESPACE:
+ return TARGET_NAMESPACE_EDEFAULT == null ? targetNamespace != null : !TARGET_NAMESPACE_EDEFAULT.equals(targetNamespace);
+ case DomPackage.IWEB_PARAM__HEADER:
+ return header != HEADER_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (kind: "); //$NON-NLS-1$
+ result.append(kind);
+ result.append(", typeName: "); //$NON-NLS-1$
+ result.append(typeName);
+ result.append(", partName: "); //$NON-NLS-1$
+ result.append(partName);
+ result.append(", targetNamespace: "); //$NON-NLS-1$
+ result.append(targetNamespace);
+ result.append(", header: "); //$NON-NLS-1$
+ result.append(header);
+ result.append(')');
+ return result.toString();
+ }
+
+} //IWebParamImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebServiceImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebServiceImpl.java
new file mode 100755
index 0000000..4e845e1
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebServiceImpl.java
@@ -0,0 +1,396 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IWeb Service</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl#getServiceEndpoint <em>Service Endpoint</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl#getTargetNamespace <em>Target Namespace</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl#getPortName <em>Port Name</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceImpl#getWsdlLocation <em>Wsdl Location</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IWebServiceImpl extends IJavaWebServiceElementImpl implements IWebService {
+ /**
+ * The cached value of the '{@link #getServiceEndpoint() <em>Service Endpoint</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getServiceEndpoint()
+ * @generated
+ * @ordered
+ */
+ protected IServiceEndpointInterface serviceEndpoint;
+
+ /**
+ * The default value of the '{@link #getTargetNamespace() <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetNamespace()
+ * @generated
+ * @ordered
+ */
+ protected static final String TARGET_NAMESPACE_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getTargetNamespace() <em>Target Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetNamespace()
+ * @generated
+ * @ordered
+ */
+ protected String targetNamespace = TARGET_NAMESPACE_EDEFAULT;
+ /**
+ * The default value of the '{@link #getPortName() <em>Port Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPortName()
+ * @generated
+ * @ordered
+ */
+ protected static final String PORT_NAME_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getPortName() <em>Port Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPortName()
+ * @generated
+ * @ordered
+ */
+ protected String portName = PORT_NAME_EDEFAULT;
+ /**
+ * The default value of the '{@link #getWsdlLocation() <em>Wsdl Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getWsdlLocation()
+ * @generated
+ * @ordered
+ */
+ protected static final String WSDL_LOCATION_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getWsdlLocation() <em>Wsdl Location</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getWsdlLocation()
+ * @generated
+ * @ordered
+ */
+ protected String wsdlLocation = WSDL_LOCATION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWebServiceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IWEB_SERVICE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IServiceEndpointInterface getServiceEndpoint() {
+ if (serviceEndpoint != null && serviceEndpoint.eIsProxy())
+ {
+ InternalEObject oldServiceEndpoint = (InternalEObject)serviceEndpoint;
+ serviceEndpoint = (IServiceEndpointInterface)eResolveProxy(oldServiceEndpoint);
+ if (serviceEndpoint != oldServiceEndpoint)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint));
+ }
+ }
+ return serviceEndpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IServiceEndpointInterface basicGetServiceEndpoint() {
+ return serviceEndpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetServiceEndpoint(IServiceEndpointInterface newServiceEndpoint, NotificationChain msgs) {
+ IServiceEndpointInterface oldServiceEndpoint = serviceEndpoint;
+ serviceEndpoint = newServiceEndpoint;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT, oldServiceEndpoint, newServiceEndpoint);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setServiceEndpoint(IServiceEndpointInterface newServiceEndpoint) {
+ if (newServiceEndpoint != serviceEndpoint)
+ {
+ NotificationChain msgs = null;
+ if (serviceEndpoint != null)
+ msgs = ((InternalEObject)serviceEndpoint).eInverseRemove(this, DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES, IServiceEndpointInterface.class, msgs);
+ if (newServiceEndpoint != null)
+ msgs = ((InternalEObject)newServiceEndpoint).eInverseAdd(this, DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES, IServiceEndpointInterface.class, msgs);
+ msgs = basicSetServiceEndpoint(newServiceEndpoint, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT, newServiceEndpoint, newServiceEndpoint));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTargetNamespace() {
+ return targetNamespace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTargetNamespace(String newTargetNamespace) {
+ String oldTargetNamespace = targetNamespace;
+ targetNamespace = newTargetNamespace;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_SERVICE__TARGET_NAMESPACE, oldTargetNamespace, targetNamespace));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPortName() {
+ return portName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPortName(String newPortName) {
+ String oldPortName = portName;
+ portName = newPortName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_SERVICE__PORT_NAME, oldPortName, portName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getWsdlLocation() {
+ return wsdlLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setWsdlLocation(String newWsdlLocation) {
+ String oldWsdlLocation = wsdlLocation;
+ wsdlLocation = newWsdlLocation;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_SERVICE__WSDL_LOCATION, oldWsdlLocation, wsdlLocation));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT:
+ if (serviceEndpoint != null)
+ msgs = ((InternalEObject)serviceEndpoint).eInverseRemove(this, DomPackage.ISERVICE_ENDPOINT_INTERFACE__IMPLEMENTING_WEB_SERVICES, IServiceEndpointInterface.class, msgs);
+ return basicSetServiceEndpoint((IServiceEndpointInterface)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT:
+ return basicSetServiceEndpoint(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT:
+ if (resolve) return getServiceEndpoint();
+ return basicGetServiceEndpoint();
+ case DomPackage.IWEB_SERVICE__TARGET_NAMESPACE:
+ return getTargetNamespace();
+ case DomPackage.IWEB_SERVICE__PORT_NAME:
+ return getPortName();
+ case DomPackage.IWEB_SERVICE__WSDL_LOCATION:
+ return getWsdlLocation();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT:
+ setServiceEndpoint((IServiceEndpointInterface)newValue);
+ return;
+ case DomPackage.IWEB_SERVICE__TARGET_NAMESPACE:
+ setTargetNamespace((String)newValue);
+ return;
+ case DomPackage.IWEB_SERVICE__PORT_NAME:
+ setPortName((String)newValue);
+ return;
+ case DomPackage.IWEB_SERVICE__WSDL_LOCATION:
+ setWsdlLocation((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT:
+ setServiceEndpoint((IServiceEndpointInterface)null);
+ return;
+ case DomPackage.IWEB_SERVICE__TARGET_NAMESPACE:
+ setTargetNamespace(TARGET_NAMESPACE_EDEFAULT);
+ return;
+ case DomPackage.IWEB_SERVICE__PORT_NAME:
+ setPortName(PORT_NAME_EDEFAULT);
+ return;
+ case DomPackage.IWEB_SERVICE__WSDL_LOCATION:
+ setWsdlLocation(WSDL_LOCATION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE__SERVICE_ENDPOINT:
+ return serviceEndpoint != null;
+ case DomPackage.IWEB_SERVICE__TARGET_NAMESPACE:
+ return TARGET_NAMESPACE_EDEFAULT == null ? targetNamespace != null : !TARGET_NAMESPACE_EDEFAULT.equals(targetNamespace);
+ case DomPackage.IWEB_SERVICE__PORT_NAME:
+ return PORT_NAME_EDEFAULT == null ? portName != null : !PORT_NAME_EDEFAULT.equals(portName);
+ case DomPackage.IWEB_SERVICE__WSDL_LOCATION:
+ return WSDL_LOCATION_EDEFAULT == null ? wsdlLocation != null : !WSDL_LOCATION_EDEFAULT.equals(wsdlLocation);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (targetNamespace: "); //$NON-NLS-1$
+ result.append(targetNamespace);
+ result.append(", portName: "); //$NON-NLS-1$
+ result.append(portName);
+ result.append(", wsdlLocation: "); //$NON-NLS-1$
+ result.append(wsdlLocation);
+ result.append(')');
+ return result.toString();
+ }
+
+} //IWebServiceImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebServiceProjectImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebServiceProjectImpl.java
new file mode 100755
index 0000000..9b13f3e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebServiceProjectImpl.java
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IWeb Service Project</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl#getWebServices <em>Web Services</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl#getServiceEndpointInterfaces <em>Service Endpoint Interfaces</em>}</li>
+ * <li>{@link org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl.IWebServiceProjectImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IWebServiceProjectImpl extends EObjectImpl implements IWebServiceProject {
+ /**
+ * The cached value of the '{@link #getWebServices() <em>Web Services</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getWebServices()
+ * @generated
+ * @ordered
+ */
+ protected EList<IWebService> webServices;
+
+ /**
+ * The cached value of the '{@link #getServiceEndpointInterfaces() <em>Service Endpoint Interfaces</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getServiceEndpointInterfaces()
+ * @generated
+ * @ordered
+ */
+ protected EList<IServiceEndpointInterface> serviceEndpointInterfaces;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWebServiceProjectImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IWEB_SERVICE_PROJECT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<IWebService> getWebServices() {
+ if (webServices == null)
+ {
+ webServices = new EObjectContainmentEList<IWebService>(IWebService.class, this, DomPackage.IWEB_SERVICE_PROJECT__WEB_SERVICES);
+ }
+ return webServices;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<IServiceEndpointInterface> getServiceEndpointInterfaces() {
+ if (serviceEndpointInterfaces == null)
+ {
+ serviceEndpointInterfaces = new EObjectContainmentEList<IServiceEndpointInterface>(IServiceEndpointInterface.class, this, DomPackage.IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES);
+ }
+ return serviceEndpointInterfaces;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IWEB_SERVICE_PROJECT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE_PROJECT__WEB_SERVICES:
+ return ((InternalEList<?>)getWebServices()).basicRemove(otherEnd, msgs);
+ case DomPackage.IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES:
+ return ((InternalEList<?>)getServiceEndpointInterfaces()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE_PROJECT__WEB_SERVICES:
+ return getWebServices();
+ case DomPackage.IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES:
+ return getServiceEndpointInterfaces();
+ case DomPackage.IWEB_SERVICE_PROJECT__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE_PROJECT__WEB_SERVICES:
+ getWebServices().clear();
+ getWebServices().addAll((Collection<? extends IWebService>)newValue);
+ return;
+ case DomPackage.IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES:
+ getServiceEndpointInterfaces().clear();
+ getServiceEndpointInterfaces().addAll((Collection<? extends IServiceEndpointInterface>)newValue);
+ return;
+ case DomPackage.IWEB_SERVICE_PROJECT__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE_PROJECT__WEB_SERVICES:
+ getWebServices().clear();
+ return;
+ case DomPackage.IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES:
+ getServiceEndpointInterfaces().clear();
+ return;
+ case DomPackage.IWEB_SERVICE_PROJECT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID)
+ {
+ case DomPackage.IWEB_SERVICE_PROJECT__WEB_SERVICES:
+ return webServices != null && !webServices.isEmpty();
+ case DomPackage.IWEB_SERVICE_PROJECT__SERVICE_ENDPOINT_INTERFACES:
+ return serviceEndpointInterfaces != null && !serviceEndpointInterfaces.isEmpty();
+ case DomPackage.IWEB_SERVICE_PROJECT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //IWebServiceProjectImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebTypeImpl.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebTypeImpl.java
new file mode 100755
index 0000000..51c598e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/impl/IWebTypeImpl.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.impl;
+
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>IWeb Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class IWebTypeImpl extends IJavaWebServiceElementImpl implements IWebType {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWebTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomPackage.Literals.IWEB_TYPE;
+ }
+
+} //IWebTypeImpl
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/JaxWsDomRuntimeMessages.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/JaxWsDomRuntimeMessages.java
new file mode 100755
index 0000000..89af113
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/JaxWsDomRuntimeMessages.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin;
+
+import org.eclipse.osgi.util.NLS;
+
+public class JaxWsDomRuntimeMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin.messages"; //$NON-NLS-1$
+
+ public static String AbstractClassNotImplementedException_Error_Message;
+ public static String ConstructorNotExposableException_Error_Message;
+ public static String EndpointTypeValidator_ERR_MSG_BINARYCLASS;
+ public static String EndpointTypeValidator_ERR_MSG_NOTCLASS;
+ public static String EndpointTypeValidator_ERR_MSG_ABSTRACT;
+ public static String EndpointTypeValidator_ERR_MSG_CONSTRUCTOR;
+ public static String EndpointTypeValidator_ERR_MSG_NOTPUBLIC;
+ public static String EndpointTypeValidator_ERR_MSG_FINAL;
+ public static String EndpointTypeValidator_ERR_MSG_HASFINALYZE;
+ public static String HasInadmisableInnerTypesException_Error_Message;
+ public static String InheritanceAndImplementationExecption_Error_Message;
+ public static String InterfacesNotSupportedException_Error_Message;
+ public static String MethodNotPublicException_Error_Message;
+ public static String MultipleImplementationException_Error_Message;
+ public static String RemoteObjectException_Error_Message;
+ public static String WsDomStartupParticipant_Startup_Job_Message;
+ public static String WorkspaceCUFinder_LOADING_CANCELED;
+ public static String JAXWS_DOM_LOADING;
+
+ public static String SeiImplementationValidator_METHOD_NOT_FOUND;
+ public static String SeiImplementationValidator_METHOD_HASDIFFERENT_EXCEPTIONS;
+ public static String SeiImplementationValidator_METHOD_NOT_PUBLIC;
+
+ public static String SeiValidator_NOT_COMPILATIONUNIT_MSG;
+ public static String SeiValidator_NOT_INTERFACE_MSG;
+ public static String SeiValidator_NOT_OUTER_MSG;
+ public static String SeiValidator_NOT_PUBLIC_MSG;
+ public static String TypeNotFoundException_Error_Message;
+ public static String TargetNsValidUriConstraint_URI_SYNTAX_ERROR;
+
+ public static String DomValidationConstraintDescriptor_WS_DOM_VALIDATION_CONSTRAINT;
+
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, JaxWsDomRuntimeMessages.class);
+ }
+
+ private JaxWsDomRuntimeMessages() {
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/JaxWsDomRuntimePlugin.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/JaxWsDomRuntimePlugin.java
new file mode 100755
index 0000000..a9f8fd8
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/JaxWsDomRuntimePlugin.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class JaxWsDomRuntimePlugin extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.jaxws.dom.runtime";
+
+ // The shared instance
+ private static JaxWsDomRuntimePlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public JaxWsDomRuntimePlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static JaxWsDomRuntimePlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/messages.properties b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/messages.properties
new file mode 100755
index 0000000..d51975e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/plugin/messages.properties
@@ -0,0 +1,43 @@
+###############################################################################
+# Copyright (c) 2009 by SAP AG, Walldorf.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# SAP AG - initial API and implementation
+###############################################################################
+AbstractClassNotImplementedException_Error_Message=Abstract class {0} cannot be used as runtime class because it is not extended by non abstract class which is suitable for a runtime class
+ConstructorNotExposableException_Error_Message=Constructor {0} cannot be exposed as web service operation
+EndpointTypeValidator_ERR_MSG_BINARYCLASS = Class {0} is binary class and cannot be annotated
+EndpointTypeValidator_ERR_MSG_NOTCLASS = {0} is not a class
+EndpointTypeValidator_ERR_MSG_ABSTRACT = Class {0} is abstract
+EndpointTypeValidator_ERR_MSG_CONSTRUCTOR = Class {0} does not have a default constructor
+EndpointTypeValidator_ERR_MSG_NOTPUBLIC = Class {0} is not public and cannot be used as web service endpoint
+EndpointTypeValidator_ERR_MSG_FINAL = Class {0} is final and cannot be used as web service endpoint
+EndpointTypeValidator_ERR_MSG_HASFINALYZE = Class {0} contains finalize() method and cannot be used as web service endpoint
+HasInadmisableInnerTypesException_Error_Message=Class {0} has inner types that are not public and static
+InheritanceAndImplementationExecption_Error_Message=Class {0} extends {1} and implements custom interface (multiple inheritance is not allowed)
+InterfacesNotSupportedException_Error_Message={0} is a interface, and JAXB cannot handle interfaces
+MethodNotPublicException_Error_Message=Method {0} is not public and cannot be exposed as a web service operation
+MultipleImplementationException_Error_Message=Class {0} implements both interface {1} and interface {2} (multiple inheritance is not allowed)
+RemoteObjectException_Error_Message=Class {0} is a remote Object
+
+
+WsDomStartupParticipant_Startup_Job_Message =Loading Web Service DOM...
+WorkspaceCUFinder_LOADING_CANCELED=JAX-WS DOM loading canceled
+JAXWS_DOM_LOADING=Loading DOM for JAX-WS Web Services
+SeiImplementationValidator_METHOD_NOT_FOUND = Method {0} cannot be found in the implementation bean {1}. It is required that the bean implements all the methods of the specified service endpoint interface
+SeiImplementationValidator_METHOD_HASDIFFERENT_EXCEPTIONS = Method {0} in the implementation bean {1} is declared to throw exceptions that differ from exceptions thrown by the same method in the service endpoint interface
+SeiImplementationValidator_METHOD_NOT_PUBLIC= Method {0} in the implementation bean {1} is not public and therefore cannot be exposed as a web service operation
+
+
+SeiValidator_NOT_COMPILATIONUNIT_MSG = {0} is a binary interface and cannot annotated as a service endpoint interface
+SeiValidator_NOT_INTERFACE_MSG = {0} is not a interface and cannot be used as a service endpoint interface
+SeiValidator_NOT_OUTER_MSG = {0} is not a outer interface and cannot be used as a service endpoint interface
+SeiValidator_NOT_PUBLIC_MSG = {0} is not a public interface and cannot be used as a service endpoint interface
+TypeNotFoundException_Error_Message=Class {0} cannot be found
+
+DomValidationConstraintDescriptor_WS_DOM_VALIDATION_CONSTRAINT=WebService DOM validation constraint
+TargetNsValidUriConstraint_URI_SYNTAX_ERROR=URI syntax error at index {0} of input String ''{1}''. Reason: {2}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/util/NamedExtensionInfo.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/util/NamedExtensionInfo.java
new file mode 100755
index 0000000..97ca51f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/util/NamedExtensionInfo.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.util;
+
+import org.eclipse.jst.ws.jaxws.dom.runtime.INamedExtensionInfo;
+
+/**
+ * Implementation class for {@link INamedExtensionInfo}.
+ */
+public class NamedExtensionInfo implements INamedExtensionInfo
+{
+ private final String id;
+
+ private final String name;
+
+ protected NamedExtensionInfo(final String pId, final String pLabel)
+ {
+ this.id = pId;
+ this.name = pLabel;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/util/XpUtil.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/util/XpUtil.java
new file mode 100755
index 0000000..46422b1
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/util/XpUtil.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.util;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+
+
+/**
+ * Utility class for working with extendion points.
+ */
+public final class XpUtil
+{
+ private static final String EXTENSION_NOT_PROPERLY_REGISTERED = "ConsumerType extension not properly registered (error in plugin.xml)"; //$NON-NLS-1$
+
+ /** */
+ public static final String XP_IMPLEMENTATION_ELEMENT = "implementation"; //$NON-NLS-1$
+
+ /** */
+ public static final String XP_IMPLEMENTATION_ELEMENT_CLASS_ATTR = "class"; //$NON-NLS-1$
+
+ /**
+ * Creates and returns a new instance of the executable extension.
+ *
+ * @param ext
+ * @return instance of extention implementation
+ */
+ public static Object instantiateImplementation(final IExtension ext)
+ {
+ for (IConfigurationElement el : ext.getConfigurationElements())
+ {
+ if (el.getName().equals(XP_IMPLEMENTATION_ELEMENT))
+ {
+ try
+ {
+ return el.createExecutableExtension(XP_IMPLEMENTATION_ELEMENT_CLASS_ATTR);
+ } catch (final CoreException e)
+ {
+ logger().logError("Unable to create extension", e); //$NON-NLS-1$
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ logger().logError(EXTENSION_NOT_PROPERLY_REGISTERED);
+ throw new RuntimeException(EXTENSION_NOT_PROPERLY_REGISTERED);
+ }
+
+ private static ILogger logger()
+ {
+ return new Logger();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeAdapter.java
new file mode 100755
index 0000000..66dc247
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeAdapter.java
@@ -0,0 +1,313 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.validation.provider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.GeneralTypesNames;
+import org.eclipse.jst.ws.jaxws.dom.runtime.TypeResolver;
+import org.eclipse.jst.ws.jaxws.dom.runtime.validation.provider.exceptions.TypeNotFoundException;
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+
+/**
+ * TypeProxy represents a type in a way convienient for type checking.
+ *
+ * @author Georgi Vachkov
+ */
+public class TypeAdapter
+{
+ private final IType type;
+
+ private String superClassName;
+
+ /**
+ * Constructor.
+ *
+ * @param type
+ * @throws NullPointerException -
+ * in case <code>type</code> is null.
+ */
+ public TypeAdapter(IType type)
+ {
+ ContractChecker.nullCheckParam(type, "type");
+ this.type = type;
+ }
+
+ /**
+ * Checks for default constructor in analysed class.
+ *
+ * @return true if public constructor without paramethers exists or class does not have any constructor.
+ * @throws JavaModelException
+ */
+ public boolean hasDefaultConstructor() throws JavaModelException
+ {
+ boolean hasConstructor = false;
+ boolean isPublic = false;
+
+ for (IMethod method : type.getMethods())
+ {
+ isPublic = Flags.isPublic(method.getFlags());
+ if (method.isConstructor())
+ {
+ hasConstructor = true;
+ }
+
+ if (method.isConstructor() && isPublic && method.getParameterNames().length == 0)
+ {
+ return true;
+ }
+ }
+
+ return !hasConstructor;
+ }
+
+ /**
+ * Retrieves the direct super interfaces fully qualified names.
+ *
+ * @return list of interface names - in case no interfaces are implemented an empty array is returned
+ * @throws JavaModelException
+ */
+ public final List<String> getInterfaceNames() throws JavaModelException
+ {
+ String[] iNames = type.getSuperInterfaceNames();
+ List<String> interfaceNames = new ArrayList<String>(iNames.length);
+ for (String name : iNames)
+ {
+ String resolvedName = TypeResolver.resolveType(name, type);
+ interfaceNames.add(resolvedName);
+ }
+
+ return interfaceNames;
+ }
+
+ /**
+ * Checks if the class contains non static and non public inner classes.
+ *
+ * @return true if contains such
+ * @throws JavaModelException
+ */
+ public boolean hasNonStaticOrNonPublicInnerTypes() throws JavaModelException
+ {
+ for (IType t : type.getTypes())
+ {
+ int typeFlags = t.getFlags();
+ if (!Flags.isStatic(typeFlags) || !Flags.isPublic(typeFlags))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Retrieves the name of it's superclass
+ *
+ * @return returnes resolved super class name or null if not present
+ * @throws JavaModelException
+ */
+ public final String getSuperClassName() throws JavaModelException
+ {
+ if (type.getSuperclassName() != null && superClassName == null)
+ {
+ superClassName = TypeResolver.resolveType(type.getSuperclassName(), type);
+ }
+
+ return superClassName;
+ }
+
+ /**
+ * Resolves and creates an instance of TypeProxy for super class.
+ *
+ * @return returns instance of {@link TypeAdapter} for super class or null if not present
+ * @throws JavaModelException
+ * @throws TypeNotFoundException
+ */
+ public final TypeAdapter getSuperClassType() throws TypeNotFoundException, JavaModelException
+ {
+ if (getSuperClassName() == null)
+ return null;
+
+ return new TypeAdapter(TypeFactory.create(getSuperClassName(), getType()));
+ }
+
+ /**
+ * Defines if this class extends <tt>baseClassType</tt>
+ *
+ * @param baseClassType
+ * @return check if this class type extends <tt>baseClassType</tt>
+ * @throws TypeNotFoundException
+ * @throws JavaModelException
+ */
+ public boolean isExtending(String baseClassType) throws TypeNotFoundException, JavaModelException
+ {
+ String typeName = this.getQualifiedName();
+
+ // if we have arrived at object in the hierarchy, the type cannot be an exception
+ if (typeName.equals(GeneralTypesNames.JAVA_LANG_OBJECT))
+ {
+ return false;
+ }
+ // All exceptions inherit from Throwable
+ if (typeName.equals(baseClassType))
+ {
+ return true;
+ }
+
+ TypeAdapter parentType = getSuperClassType();
+ if (parentType != null)
+ {
+ return parentType.isExtending(baseClassType);
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if <code>type</code> implements interface <code>checkedInterfaceName</code>. Recursive check over the implemented interfaces is
+ * done which defines if some of the implemented in <code>type</code> interface is extending the specified interface.
+ *
+ * @param interfaceName
+ * @return true is this class type implements <tt>interfaceName</tt>
+ * @throws TypeNotFoundException
+ * @throws JavaModelException
+ */
+ public boolean isImplementing(final String interfaceName) throws TypeNotFoundException, JavaModelException
+ {
+ return isImplementing(this, interfaceName);
+ }
+
+ private boolean isImplementing(final TypeAdapter checkedType, final String checkedInterfaceName) throws TypeNotFoundException, JavaModelException
+
+ {
+ if (checkedType.getQualifiedName().equals(checkedInterfaceName))
+ return true;
+
+ for (String interfaceName : checkedType.getInterfaceNames())
+ {
+ TypeAdapter ta = new TypeAdapter(TypeFactory.create(interfaceName, checkedType.getType()));
+ if (isImplementing(ta, checkedInterfaceName))
+ {
+ return true;
+ }
+ }
+
+ // here use ep checker as seriablizable is not required in supertype
+ if (checkedType.getSuperClassName() != null)
+ {
+ TypeAdapter superClass = new TypeAdapter(TypeFactory.create(checkedType.getSuperClassName(), checkedType.getType()));
+ return isImplementing(superClass, checkedInterfaceName);
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the type fully qualified name
+ *
+ * @return not <tt>null</tt> string
+ */
+ public final String getQualifiedName()
+ {
+ return type.getFullyQualifiedName();
+ }
+
+ /**
+ * Returns the project name in which the type resides.
+ *
+ * @return not <tt>null</tt> string
+ */
+ public final String getProjectName()
+ {
+ return type.getJavaProject().getProject().getName();
+ }
+
+ /**
+ * Returns wrapped IType.
+ *
+ * @return IType instance
+ */
+ public final IType getType()
+ {
+ return type;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return type.getFullyQualifiedName().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj == null)
+ {
+ return false;
+ }
+
+ if (obj.getClass() == TypeAdapter.class)
+ {
+ return (getQualifiedName().equals(((TypeAdapter) obj).getQualifiedName()));
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if the type is public.
+ *
+ * @return <tt>true</tt> if the class is public
+ * @throws JavaModelException
+ */
+ public boolean isPublic() throws JavaModelException
+ {
+ return Flags.isPublic(type.getFlags());
+ }
+
+ /**
+ * Checks if the type is final.
+ *
+ * @return <tt>true</tt> if the class is final
+ * @throws JavaModelException
+ */
+ public boolean isFinal() throws JavaModelException
+ {
+ return Flags.isFinal(type.getFlags());
+ }
+
+ /**
+ * Checks if the type is abstract.
+ *
+ * @return <tt>true</tt> if the class is abstract
+ * @throws JavaModelException
+ */
+ public boolean isAbstract() throws JavaModelException
+ {
+ return Flags.isAbstract(type.getFlags());
+ }
+
+ /**
+ * Checks if the type is an interface.
+ *
+ * @return <tt>true</tt> if the class is interface
+ * @throws JavaModelException
+ */
+ public boolean isInterface() throws JavaModelException
+ {
+ return type.isInterface();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeFactory.java
new file mode 100755
index 0000000..af4689b
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeFactory.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.validation.provider;
+
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.PrimitiveTypeHandler;
+import org.eclipse.jst.ws.jaxws.dom.runtime.validation.provider.exceptions.TypeNotFoundException;
+
+/**
+ * Factory for IType objects. Contains cache with already found types per project this way minimizing the time needed to obtain an IType instance for
+ * concreate type. Registers ResourceChangedListener to listen for changes in projects. If some resource in some projects has been changed the cache
+ * for this project is cleaned.
+ *
+ * @author Georgi Vachkov
+ */
+public class TypeFactory
+{
+ /**
+ * Analysed types cache.
+ */
+ private static Hashtable<String, Map<String, IType>> typesCache = new Hashtable<String, Map<String, IType>>();
+
+ private static TypeCache cache = null;
+
+ /**
+ * Creates TypeProxy instance for <code>qualifiedName</code> for the project with name <code>projectName</code>.
+ *
+ * @param projectName
+ * @param qualifiedName
+ * @return instance of IType in case type has been found
+ * @throws TypeNotFoundException
+ * if type with fully qualified name <tt>qualifiedName</tt> is not found
+ * @throws JavaModelException
+ */
+ public static IType create(String projectName, String qualifiedName) throws TypeNotFoundException, JavaModelException
+ {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+
+ return create(JavaCore.create(project), qualifiedName);
+ }
+
+ /**
+ * Finds IType object for <code>qualifiedName</code> for the project in which <code>type</code> resides.
+ *
+ * @param qualifiedName
+ * @param type
+ * @return instance of IType in case type has been found
+ * @throws TypeNotFoundException
+ * if type with fully qualified name <tt>qualifiedName</tt> is not found
+ * @throws JavaModelException
+ */
+ public static IType create(String qualifiedName, IType type) throws TypeNotFoundException, JavaModelException
+ {
+ return create(type.getJavaProject(), qualifiedName);
+ }
+
+ /**
+ * Finds IType object for <code>qualifiedName</code> type in <code>javaProject</code> project. On first steps tries to find this type in cache
+ * and if not found new instance is created.
+ *
+ * @param javaProject
+ * @param qualifiedName
+ * @return instance of IType in case type has been found
+ * @throws TypeNotFoundException
+ * if type with fully qualified name <tt>qualifiedName</tt> is not found
+ * @throws JavaModelException
+ */
+ private static IType create(IJavaProject javaProject, String qualifiedName) throws TypeNotFoundException, JavaModelException
+ {
+ String localQualifiedName = qualifiedName;
+
+ if (PrimitiveTypeHandler.isArrayType(localQualifiedName))
+ {
+ localQualifiedName = PrimitiveTypeHandler.getTypeFromArrayType(localQualifiedName);
+ }
+
+ if (PrimitiveTypeHandler.isJavaPrimitiveType(localQualifiedName))
+ {
+ localQualifiedName = PrimitiveTypeHandler.getObjectTypeForPrimitiveType(localQualifiedName);
+ }
+
+ if (cache == null)
+ {
+ cache = new TypeCache();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(cache);
+ }
+
+ IType type = cache.findType(localQualifiedName, javaProject);
+ if (type != null)
+ {
+ return type;
+ }
+
+ type = javaProject.findType(localQualifiedName);
+ if (type == null)
+ {
+ throw new TypeNotFoundException(localQualifiedName);
+ }
+
+ cache.addType(localQualifiedName, type, javaProject);
+
+ return type;
+ }
+
+ /**
+ * Caching functionality. All types that have been retrieved are cached. Caching is per project. Search is executen in followin way:<br>
+ * 1. Search for chache for the project. If cache is not found an empty cache is created.<br>
+ * 2. Type is searched in the projects cache and is returned. If a type is not found <code>null</code> is returned.
+ *
+ * @author Georgi Vachkov
+ */
+ private static class TypeCache implements IResourceChangeListener
+ {
+ public void resourceChanged(IResourceChangeEvent event)
+ {
+ if (event != null && event.getDelta() != null)
+ {
+ for (IResourceDelta children : event.getDelta().getAffectedChildren())
+ {
+ IResourceDelta rDelta = (IResourceDelta) children.getAdapter(IResourceDelta.class);
+ if (rDelta.getResource() != null && rDelta.getResource() instanceof IProject)
+ {
+ removeMapForProject(rDelta.getResource().getName());
+ }
+ }
+ }
+ }
+
+ protected IType findType(String qualifiedName, IJavaProject javaProject)
+ {
+ return getMapForProject(javaProject).get(qualifiedName);
+ }
+
+ protected void addType(String qualifiedName, IType type, IJavaProject javaProject)
+ {
+ getMapForProject(javaProject).put(qualifiedName, type);
+ }
+
+ private void removeMapForProject(String projectName)
+ {
+ typesCache.remove(projectName);
+ }
+
+ private Map<String, IType> getMapForProject(IJavaProject javaProject)
+ {
+ String projectName = javaProject.getProject().getName();
+ Map<String, IType> projectTypes = typesCache.get(projectName);
+ if (projectTypes == null)
+ {
+ projectTypes = new HashMap<String, IType>();
+ typesCache.put(projectName, projectTypes);
+ }
+
+ return projectTypes;
+ }
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeKey.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeKey.java
new file mode 100755
index 0000000..3d2aa47
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/internal/validation/provider/TypeKey.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.internal.validation.provider;
+
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+
+/**
+ * Type key - represents type in context of project. Overrides hashCode() for usage in maps.
+ *
+ * @author Georgi Vachkov
+ *
+ */
+public class TypeKey
+{
+ private final String projectName;
+
+ private final String qualifiedTypeName;
+
+ /**
+ * Constructor.
+ *
+ * @param projectName
+ * @param qualifiedTypeName
+ * @throws NullPointerException
+ * in case some of the params is null.
+ */
+ public TypeKey(String projectName, String qualifiedTypeName)
+ {
+ ContractChecker.nullCheckParam(projectName, "projectName");
+ ContractChecker.nullCheckParam(qualifiedTypeName, "qualifiedTypeName");
+
+ this.projectName = projectName;
+ this.qualifiedTypeName = qualifiedTypeName;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return projectName.hashCode() + qualifiedTypeName.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (o instanceof TypeKey)
+ {
+ return ((TypeKey) o).hashCode() == hashCode();
+ }
+
+ return false;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IAnnotationSerializer.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IAnnotationSerializer.java
new file mode 100755
index 0000000..ac8eeee
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IAnnotationSerializer.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.emf.common.notify.Notification;
+
+/**
+ * This interface should be implemented by classes that intend to do serialization for
+ * DOM objects.
+ *
+ * @author Georgi Vachkov
+ */
+public interface IAnnotationSerializer
+{
+ public void save(final Notification msg);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/ICompilationUnitFinder.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/ICompilationUnitFinder.java
new file mode 100755
index 0000000..3d6690e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/ICompilationUnitFinder.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+
+/**
+ * Implements a visitor pattern for traversing compilation unit. This interface does not define what set of compilation
+ * units will be traveresed. This could be a single java project, the whole workspace or just a given package. The set of
+ * traversed compilation units is left up to the implementation. Nevertheless as these compilation units are always contained
+ * inside a java project, the </c>ICompilationUnitHandler.handleProject(IJavaProject)</c> has to be called exactly once to
+ * notify the handler for each project being processed. The compilation unit handler will be first notified that the processing
+ * of given project has began and immediately after this it will be notified for all annotations in this project discovered by
+ * the given implementation.
+ * @author Hristo Sabev
+ *
+ */
+public interface ICompilationUnitFinder
+{
+ /**
+ * Starts the traversal of compilation units
+ * @param monitor - the progress monitor to be used for the traversal.
+ * @param cuHandler - compilation unit handler to be notified for a given project
+ * @throws CoreException - thrown if unexpected problem occurred while traversing annotations
+ */
+ public void find(IProgressMonitor monitor, ICompilationUnitHandler cuHandler) throws CoreException, WsDOMLoadCanceledException;
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/ICompilationUnitHandler.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/ICompilationUnitHandler.java
new file mode 100755
index 0000000..93a315c
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/ICompilationUnitHandler.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+
+/**
+ * A listener for events isseud by an <c>ICompilationUnitFinder</c> instance during compilation unit traversals
+ *
+ * @author Hristo Sabev
+ *
+ */
+public interface ICompilationUnitHandler
+{
+ /**
+ * called by the <c>{@link ICompilationUnitFinder}</c> instance when it has started to traverse the annotation set. All calls to <c>handle(...)</c>
+ * methods is inside a started-finished block.
+ */
+ public void started();
+
+ /**
+ * called by the <c>{@link ICompilationUnitFinder}</c> instance when it has finished to traverse the annotation set.
+ */
+ public void finished();
+
+ /**
+ * Called when the <c>{@link ICompilationUnitFinder}</c> instance found a compilation unit. This method is awlays called after a call to <c>{@link #handle(JavaProject) handle(JavaProject)}</c>.
+ * The reported compilation unit is guaranteed to be found inside the <c>JavaProject</c> reported by the last call to <c>{@link#handle(JavaProject) handle(JavaProject)}</c>.
+ * This method will be called exactly once for each compilation unit
+ *
+ * @param cu -
+ * the compilation unit found by the finder
+ */
+ public void handle(ICompilationUnit cu);
+
+ /**
+ * Called when the <c>{@link ICompilationUnitFinder}</c> instance found a java project. This method is always called before the <c>{@link #handle(ICompilationUnit)}</c>
+ * for any compilation unit found in this project. This method will be called exactly once for each found project.
+ *
+ * @param jprj -
+ * the java project found by the finder
+ */
+ public void handle(IJavaProject jprj);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IModelElementSynchronizer.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IModelElementSynchronizer.java
new file mode 100755
index 0000000..e00fc5f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IModelElementSynchronizer.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jst.ws.jaxws.dom.runtime.DomUtil;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomFactory;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.JaxWsWorkspaceResource.ServiceModelData;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+
+public interface IModelElementSynchronizer
+{
+ public DomUtil util();
+ public ServiceModelData serviceData();
+ public ILogger logger();
+ public IDOM getDomBeingLoaded();
+ public DomFactory domFactory();
+ public IJavaModel javaModel();
+ public JaxWsWorkspaceResource resource();
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IProjectSelector.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IProjectSelector.java
new file mode 100755
index 0000000..b5ad5fd
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/IProjectSelector.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.jdt.core.IJavaProject;
+
+/**
+ * Specifies what java projects will be traversed by a given <c>ICompilationUnitFinder</c> instance. If any of the registered
+ * selectors approved the project i.e. <c>IProjectSelector.approve(IJavaProject)</c> returned true, then this project will
+ * be traversed. I.e. the project needs to be rejected by all the selectors in order not to be traversed.
+ *
+ * An implementation of this interface should reject a project that it has no knowledge about.
+ * @author Hristo Sabev
+ *
+ */
+public interface IProjectSelector
+{
+ /**
+ * Approves the specified project for traversal
+ * @param prj - the project to approve or reject
+ * @return - true if the project should be traversed according to this selector, false otherwise.
+ */
+ public boolean approve(IJavaProject prj);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/JaxWsDefaultsCalculator.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/JaxWsDefaultsCalculator.java
new file mode 100755
index 0000000..db9d77e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/JaxWsDefaultsCalculator.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingParameterStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingStyle;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.SOAPBindingUse;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WebParamKind;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotation;
+
+/**
+ * Contains utility methods for calculating default values of some attributes/properties in
+ * annotations and DOM objects.
+ *
+ * @author Georgi Vachkov
+ */
+public class JaxWsDefaultsCalculator
+{
+ private static final String ARG = "arg"; //$NON-NLS-1$
+ private static final String RETURN = "return"; //$NON-NLS-1$
+ private static final String RESPONSE = "Response"; //$NON-NLS-1$
+
+ /**
+ * Defines the SOAPBindingStyle. If there is a value for style attribute in <code>sbAnnotation</code> returns that value
+ * otherwise returns the default value for this attribute.
+ * @param sbAnnotation
+ * @return the style
+ */
+ public SOAPBindingStyle defineSBStyle(final IAnnotation<? extends IJavaElement> sbAnnotation)
+ {
+ final String value = sbAnnotation!=null ? sbAnnotation.getPropertyValue(SBAnnotationFeatures.STYLE_ATTRIBUTE) : null;
+ if (value!=null && SBAnnotationFeatures.SB_STYLE_RPC.endsWith(value.trim())) {
+ return SOAPBindingStyle.RPC;
+ }
+
+ return SOAPBindingStyle.DOCUMENT;
+ }
+
+ /**
+ * Defines the SOAPBindingUse. If there is a value for use attribute in <code>sbAnnotation</code> returns that value
+ * otherwise returns the default value for this attribute.
+ * @param sbAnnotation
+ * @return the style
+ */
+ public SOAPBindingUse defineSBUse(final IAnnotation<? extends IJavaElement> sbAnnotation) {
+ final String value = sbAnnotation!=null ? sbAnnotation.getPropertyValue(SBAnnotationFeatures.USE_ATTRIBUTE) : null;
+ if(value!=null && SBAnnotationFeatures.SB_USE_ENCODED.endsWith(value.trim())) {
+ return SOAPBindingUse.ENCODED;
+ }
+
+ return SOAPBindingUse.LITERAL;
+ }
+
+ /**
+ * Defines the SOAPBindingUse. If there is a value for parameterStyle attribute in <code>sbAnnotation</code>
+ * returns that value otherwise returns the default value for this attribute.
+ * @param sbAnnotation
+ * @return the style
+ */
+ public SOAPBindingParameterStyle defineSBParameterStyle(final IAnnotation<? extends IJavaElement> sbAnnotation)
+ {
+ final String value = sbAnnotation!=null ? sbAnnotation.getPropertyValue(SBAnnotationFeatures.PARAMETER_STYLE_ATTRIBUTE) : null;
+ if (value!=null && SBAnnotationFeatures.SB_PARAMETER_STYLE_BARE.endsWith(value.trim())) {
+ return SOAPBindingParameterStyle.BARE;
+ }
+
+ return SOAPBindingParameterStyle.WRAPPED;
+ }
+
+ /**
+ * Defines the default operation parameter name according to JSR-181 point 4.4 - WebParam name
+ * attribute
+ * @param webMethod the method holding the parameter
+ * @param paramPosition the parameter position in method arguments list starting with 0
+ * @return calculated name
+ */
+ public String calcWebParamDefaultName(final IWebMethod webMethod, final int paramPosition)
+ {
+ if(webMethod.getSoapBindingStyle()==SOAPBindingStyle.DOCUMENT &&
+ webMethod.getSoapBindingParameterStyle()==SOAPBindingParameterStyle.BARE)
+ {
+ return webMethod.getName();
+ }
+
+ return ARG + paramPosition;
+ }
+
+ /**
+ * Defines the default operation parameter name according to JSR-181 point 4.4 - WebParam name
+ * attribute
+ * @param webParam
+ * @return
+ */
+ public String calcWebParamDefaultName(final IWebParam webParam)
+ {
+ final IWebMethod webMethod = (IWebMethod)webParam.eContainer();
+ return calcWebParamDefaultName(webMethod, getParamPosition(webMethod, webParam));
+ }
+
+ /**
+ * Calculates the position of <code>param</code> in <code>method</code> signature starting from 0
+ * @param webMethod
+ * @param param
+ * @return the param position
+ * @throws IllegalArgumentException in case <code>webMethod</code> does not contain <code>param</code>
+ */
+ protected int getParamPosition(final IWebMethod webMethod, final IWebParam param)
+ {
+ int position = 0;
+ for (IWebParam webParam : webMethod.getParameters())
+ {
+ if (webParam.getImplementation().equals("return")) {//$NON-NLS-1$
+ continue;
+ }
+
+ if (webParam==param) {
+ return position;
+ }
+
+ position++;
+ }
+
+ throw new IllegalStateException("Parameter[" + param.getImplementation() + "] was not found in method [" + webMethod.getImplementation() + "]");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ }
+
+ /**
+ * Defines the default operation parameter name according to JSR-181 point 4.4 - WebParam target NS.
+ * @param webMethod the method holding the parameter
+ * @param webParam
+ * @return calculated NS
+ */
+ public String calcWebParamDefaultTargetNS(final IWebMethod webMethod, final IWebParam webParam)
+ {
+ if(webMethod.getSoapBindingStyle()==SOAPBindingStyle.DOCUMENT &&
+ webMethod.getSoapBindingParameterStyle()==SOAPBindingParameterStyle.WRAPPED &&
+ !webParam.isHeader())
+ {
+ return "";//$NON-NLS-1$
+ }
+
+ return ((IServiceEndpointInterface)webMethod.eContainer()).getTargetNamespace();
+ }
+
+ /**
+ * @return the default kind for web parameters - returns {@link WebParamKind#IN}
+ */
+ public WebParamKind getDefaultParamKind() {
+ return WebParamKind.IN;
+ }
+
+ /**
+ * @return false because the default value for WebParam(header) is false
+ */
+ public boolean getDefaultParamInHedaer() {
+ return false;
+ }
+
+ /**
+ * Defines the default operation parameter name according to JSR-181 point 4.5 - WebResult name.
+ * @param webMethod the method holding the parameter
+ * @return calculated name
+ */
+ public String calcWebResultDefaultName(final IWebMethod webMethod)
+ {
+ if(webMethod.getSoapBindingStyle()==SOAPBindingStyle.DOCUMENT &&
+ webMethod.getSoapBindingParameterStyle()==SOAPBindingParameterStyle.BARE)
+ {
+ return webMethod.getName() + RESPONSE;
+ }
+
+ return RETURN;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/JaxWsWorkspaceResource.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/JaxWsWorkspaceResource.java
new file mode 100755
index 0000000..1095cde
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/JaxWsWorkspaceResource.java
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.serializer.SerializerAdapterFactory;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.InitialModelSynchronizer;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync.OnEventModelSynchronizer;
+import org.eclipse.jst.ws.jaxws.utils.annotations.AnnotationFactory;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotationInspector;
+import org.eclipse.jst.ws.jaxws.utils.facets.FacetUtils;
+import org.eclipse.jst.ws.jaxws.utils.facets.IFacetUtils;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+
+/**
+ * Represents the resource for JAX-WS web service DOM model. This class is responsible for loading the
+ * model. It is capable to use {@link IProgressMonitor} to track progress and cancel requests.
+ *
+ * @author
+ */
+public class JaxWsWorkspaceResource extends NonStreamResource
+{
+ private final IJavaModel javaModel;
+ private final ServiceModelData serviceData;
+ private final OnEventModelSynchronizer modelSynchronizer;
+ private final SerializerAdapterFactory serializerFactory;
+
+ private IProgressMonitor monitor;
+
+ private boolean saveEnabled;
+ private boolean loadCnaceled;
+
+ /**
+ * Constructor
+ * @param javaModel
+ */
+ public JaxWsWorkspaceResource(final IJavaModel javaModel)
+ {
+ this.javaModel = javaModel;
+ serviceData = new ServiceModelData();
+ modelSynchronizer = new OnEventModelSynchronizer(this, serviceData);
+ saveEnabled = true;
+ serializerFactory = new SerializerAdapterFactory(this);
+ }
+
+ /**
+ * Set progress monitor in case the processing progress should be tracked and
+ * also in case it is expected that the processing can be canceled
+ * @param pm the monitor - can be <code>null</code>
+ */
+ public void setProgressMonitor(IProgressMonitor pm)
+ {
+ this.monitor = pm;
+ }
+
+ /**
+ * @return the loaded DOM in case it is successfully loaded. This method will return <code>null</code>
+ * in case loading has not been started at all or in case loading has been canceled. To check if the
+ * loading has been canceled call isLoadingCanceled().
+ */
+ public IDOM getDOM()
+ {
+ if (getContents().size() == 0) {
+ return null;
+ }
+
+ return (IDOM) getContents().get(0);
+ }
+
+ /**
+ * Adds listener for changes to Java elements in order to keep the model in sync
+ * with these changes
+ */
+ public void startSynchronizing()
+ {
+ JavaCore.addElementChangedListener(modelSynchronizer, ElementChangedEvent.POST_RECONCILE | ElementChangedEvent.POST_CHANGE);
+ }
+
+ /**
+ * Removes listener for changes to Java elements. Keep in mind that after calling
+ * this method changes in java elements will not be reflected in DOM model
+ */
+ public void stopSynchronizing()
+ {
+ JavaCore.removeElementChangedListener(modelSynchronizer);
+ }
+
+ /**
+ * @return the logger to use when some event needs to be logged
+ */
+ public ILogger logger()
+ {
+ return new Logger();
+ }
+
+ /**
+ * @return the java model
+ */
+ public IJavaModel javaModel()
+ {
+ return javaModel;
+ }
+
+ @Override
+ protected void doLoad(final Map<?, ?> options) throws IOException
+ {
+ loadCnaceled = false;
+ getContents().clear();
+
+ final IWorkspaceRunnable runnable = new IWorkspaceRunnable()
+ {
+ public void run(final IProgressMonitor subMonitor) throws CoreException
+ {
+ try
+ {
+ new InitialModelSynchronizer(JaxWsWorkspaceResource.this, serviceData).load(options, subMonitor);
+ }
+ catch (WsDOMLoadCanceledException e) {
+ loadCnaceled = true;
+ logger().logError("JAX WS Web Services DOM loading has been canceled by the user, some JAX WS Web Services functionalities won't be available", e); //$NON-NLS-1$
+ }
+ }
+ };
+
+ try {
+ javaModel().getWorkspace().run(runnable, monitor);
+ }
+ catch (CoreException ce) {
+ throw new IOWrappedException(ce);
+ }
+ }
+
+ @Override
+ protected void doSave(Map<?, ?> options) throws IOException {
+ // no processing needed
+ }
+
+ protected IElementChangedListener getSynchronizingListener() {
+ return modelSynchronizer;
+ }
+
+ /**
+ * Creates compilation unit finder that crawls through javaModel and calls
+ * compilation unit handler to process available CU's
+ * @param jModel
+ * @param projectSelectors
+ * @return non <code>null</code> {@link ICompilationUnitFinder} instance
+ */
+ public ICompilationUnitFinder newCompilationUnitFinder(final IJavaModel jModel, final IProjectSelector[] projectSelectors)
+ {
+ return new WorkspaceCUFinder(jModel, projectSelectors);
+ }
+
+ /**
+ * Approves that <code>prj</code> is JAX-WS web service enabled
+ * @param prj
+ * @return <code>true</code> in case this project might contain JAX-WS web services
+ */
+ public boolean approveProject(final IJavaProject prj)
+ {
+ final IFacetUtils facetUtils = new FacetUtils();
+ try {
+ return facetUtils.hasFacetWithVersion(prj.getProject(), FacetUtils.EJB_30_FACET_VERSION, FacetUtils.EJB_30_FACET_ID, true)
+ || facetUtils.hasFacetWithVersion(prj.getProject(), FacetUtils.WEB_25_FACET_VERSION, FacetUtils.WEB_25_FACET_ID, true);
+ } catch (CoreException ce)
+ {
+ logger().logError("Unable to read facet on project " + prj.getElementName() + ". Any Web Service elements in this project will not be shown in the navigation tree", ce); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ }
+
+ /**
+ * Creates new instance of {@link IAnnotationInspector} for <code>type</code>
+ * @param type
+ * @return non <code>null</code> inspector
+ */
+ public IAnnotationInspector newAnnotationInspector(final IType type)
+ {
+ return AnnotationFactory.createAnnotationInspector(type);
+ }
+
+ /**
+ * @return non empty array of projects selectors responsible for filtering processed projects
+ */
+ public IProjectSelector[] getProjectSelectors()
+ {
+ return new IProjectSelector[] { new IProjectSelector()
+ {
+ public boolean approve(IJavaProject prj)
+ {
+ return approveProject(prj);
+ }
+ } };
+ }
+
+ /**
+ * @return the serializer factory used to adapt DOM objects with serializer adapters
+ */
+ public SerializerAdapterFactory getSerializerFactory() {
+ return serializerFactory;
+ }
+
+ /**
+ * @return <code>true</code> if the saving is enabled
+ */
+ public boolean isSaveEnabled() {
+ return saveEnabled;
+ }
+
+ /**
+ * call this method to enable saving of model objects to underlying resources
+ */
+ synchronized public void enableSaving() {
+ this.saveEnabled = true;
+ }
+
+ /**
+ * call this method to disable saving of model objects to underlying resources
+ */
+ synchronized public void disableSaving() {
+ this.saveEnabled = false;
+ }
+
+ /**
+ * @return <code>true</code> in case the load of DOM model has been canceled
+ */
+ public boolean isLoadCnaceled() {
+ return loadCnaceled;
+ }
+
+ /**
+ * Holds model data helpful in model processing
+ */
+ public class ServiceModelData
+ {
+ private Map<IWebService, String> ws2sei = new HashMap<IWebService, String>();
+
+ private Map<String, Collection<IWebService>> sei2ws = new HashMap<String, Collection<IWebService>>();
+
+ private Map<String, Collection<ICompilationUnit>> type2inherited = new HashMap<String, Collection<ICompilationUnit>>();
+
+ public void map(IWebService ws, String seiImpl)
+ {
+ ws2sei.put(ws, seiImpl);
+ getImplementingWs(seiImpl).add(ws);
+ }
+
+ String getSeiImpl(IWebService ws)
+ {
+ return ws2sei.get(ws);
+ }
+
+ public Collection<IWebService> getImplementingWs(String seiIml)
+ {
+ Collection<IWebService> wss = sei2ws.get(seiIml);
+ if (wss == null)
+ {
+ wss = new ArrayList<IWebService>();
+ sei2ws.put(seiIml, wss);
+ }
+ return wss;
+ }
+
+ public void unmap(IWebService ws)
+ {
+ final String sei = ws2sei.remove(ws);
+ final Collection<IWebService> implementingWebServices = getImplementingWs(sei);
+ implementingWebServices.remove(ws);
+ if (implementingWebServices.size() == 0)
+ {
+ sei2ws.remove(sei);
+ }
+ }
+
+ public void recordHierarchy(String fqName, Collection<ICompilationUnit> inheritedTypes)
+ {
+ type2inherited.put(fqName, inheritedTypes);
+ }
+
+ /**
+ * @param fqName the fully qualified class name
+ * @return collection of classes that are super for class <code>fqName</code>
+ */
+ public Collection<ICompilationUnit> getHierarchy(String fqName)
+ {
+ return type2inherited.get(fqName);
+ }
+
+ /**
+ * Clears recorder hierarchy for class with FQName <code>fqName</code>
+ * @param fqName
+ */
+ public void clearHierarchy(String fqName)
+ {
+ type2inherited.remove(fqName);
+ }
+
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/Jee5WsDomRuntimeExtension.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/Jee5WsDomRuntimeExtension.java
new file mode 100755
index 0000000..8f12d2c
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/Jee5WsDomRuntimeExtension.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IDOM;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDOMRuntimeExtension;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWsDomLoadListener;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin.JaxWsDomRuntimeMessages;
+
+import static org.eclipse.jst.ws.jaxws.utils.ContractChecker.nullCheckParam;
+
+public class Jee5WsDomRuntimeExtension implements IWsDOMRuntimeExtension
+{
+ public static final String ID = "org.eclipse.jst.ws.jaxws.dom.jee5";//$NON-NLS-1$
+
+ private List<IWsDomLoadListener> listeners = new ArrayList<IWsDomLoadListener>();
+ private JaxWsWorkspaceResource workspaceResource;
+ private boolean finished;
+ private boolean started;
+
+ public void createDOM(final IProgressMonitor monitor) throws IOException, WsDOMLoadCanceledException
+ {
+ Job.getJobManager().beginRule(ResourcesPlugin.getWorkspace().getRoot(), monitor);
+ try {
+ if (workspaceResource == null || workspaceResource.isLoadCnaceled()) {
+ performLoad(monitor);
+ }
+ } finally {
+ Job.getJobManager().endRule(ResourcesPlugin.getWorkspace().getRoot());
+ }
+ }
+
+ private void performLoad(final IProgressMonitor monitor) throws IOException, WsDOMLoadCanceledException
+ {
+ workspaceResource = createResource();
+ workspaceResource.setProgressMonitor(monitor);
+ try {
+ started();
+ workspaceResource.load(null);
+ if (workspaceResource.isLoadCnaceled()) {
+ throw createCanceledException();
+ }
+ } finally {
+ finished();
+ }
+
+ workspaceResource.startSynchronizing();
+ }
+
+ public IDOM getDOM() throws WsDOMLoadCanceledException
+ {
+ if (workspaceResource == null) {
+ return null;
+ }
+
+ if (workspaceResource.isLoadCnaceled()) {
+ throw createCanceledException();
+ }
+
+ return workspaceResource.getDOM();
+ }
+
+ public void addLoadListener(IWsDomLoadListener listener)
+ {
+ nullCheckParam(listener, "listener");//$NON-NLS-1$
+
+ synchronized (listeners) {
+ listeners.add(listener);
+ }
+
+ if (started) {
+ listener.started();
+ }
+
+ if (finished) {
+ listener.finished();
+ }
+ }
+
+ public void removeLoadListener(IWsDomLoadListener listener)
+ {
+ nullCheckParam(listener, "listener");//$NON-NLS-1$
+
+ synchronized (listeners) {
+ listeners.remove(listener);
+ }
+ }
+
+ protected IJavaModel javaModel() {
+ return JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
+ }
+
+ protected JaxWsWorkspaceResource createResource() {
+ return new JaxWsWorkspaceResource(javaModel());
+ }
+
+ protected void finished()
+ {
+ finished = true;
+ for (IWsDomLoadListener listener : listeners) {
+ listener.finished();
+ }
+ }
+
+ protected void started()
+ {
+ started = true;
+ finished = false;
+ for (IWsDomLoadListener listener : listeners) {
+ listener.started();
+ }
+ }
+
+ private WsDOMLoadCanceledException createCanceledException() {
+ return new WsDOMLoadCanceledException("JAX-WS DOM loading canceled", JaxWsDomRuntimeMessages.WorkspaceCUFinder_LOADING_CANCELED); //$NON-NLS-1$
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/NonStreamResource.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/NonStreamResource.java
new file mode 100755
index 0000000..8f6a5ae
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/NonStreamResource.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+
+public abstract class NonStreamResource extends ResourceImpl {
+
+ /**
+ * Since this Resource is not stream based, this method should never be called.
+ * If called it will throw <c>UnsupportedException</c>
+ * @param arg0 - ignorred
+ */
+ @Override
+ protected final void doLoad(InputStream inputStream, Map<?,?> options) throws IOException {
+ super.doLoad(inputStream, options);
+ }
+
+ /**
+ * Since this Resource is not stream based, this method should never be called.
+ * If called it will throw <c>UnsupportedException</c>
+ * @param arg0 - ignorred
+ */
+ @Override
+ protected final void doSave(OutputStream arg0, Map<?,?> arg1) throws IOException {
+ super.doSave(arg0, arg1);
+ }
+
+ /**
+ * Allwasy throws <c>UnsupportedOperationException</c>. Streams are not supported by this resource.
+ * @return nothing. this method allways throws <c>UnsupportedOperationException</c>
+ */
+ @Override
+ protected final boolean isContentZipEntry(ZipEntry arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Since this resource doesn't support streams this method should never be called. Allwasy throws <c>UnsupportedOperationException</c>.
+ * @return nothing. this method allways throws <c>UnsupportedOperationException</c>
+ */
+ @Override
+ protected final ZipEntry newContentZipEntry() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Since this resource doesn't support streams this method should never be called. Allwasy throws <c>UnsupportedOperationException</c>.
+ * @return nothing. this method allways throws <c>UnsupportedOperationException</c>
+ */
+ @Override
+ protected final boolean useZip() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public final void load(Map<?,?> options) throws IOException {
+
+ if (!isLoaded()) {
+ Notification notification = setLoaded(true);
+ isLoading = true;
+ if (errors != null) {
+ errors.clear();
+ }
+ if (warnings != null) {
+ warnings.clear();
+ }
+ try {
+ Map<?,?> mergedOptions = mergeMaps(options, defaultLoadOptions);
+ doLoad(mergedOptions);
+ } finally {
+
+ isLoading = false;
+ if (notification != null) {
+ eNotify(notification);
+ }
+ setModified(false);
+ }
+ }
+ }
+
+ /**
+ * Called to load the resource using no streams.
+ *
+ * @param options - options supplied by the caller. This metod will ignore any options that it doesn't recognize. The keys and the values can be arbitrary objects.
+ * @throws IOException - thrown if error occurred while loading the content of this resource
+ */
+ abstract protected void doLoad(Map<?,?> options) throws IOException;
+
+ @Override
+ public final void save(Map<?,?> options) throws IOException {
+ if (errors != null)
+ {
+ errors.clear();
+ }
+ if (warnings != null)
+ {
+ warnings.clear();
+ }
+ Map<?,?> mergedOptions = mergeMaps(options, defaultSaveOptions);
+ doSave(mergedOptions);
+ setModified(false);
+ }
+
+ /**
+ * Called to save the resource using no streams.
+ * @param options - options supplied by the caller. This metod will ignore any options that it doesn't recognize. The keys and the values can be arbitrary objects.
+ * @throws IOException - if problem during the saving occurred.
+ */
+ protected abstract void doSave(Map<?,?> options) throws IOException;
+
+
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/SBAnnotationFeatures.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/SBAnnotationFeatures.java
new file mode 100755
index 0000000..3a81fb7
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/SBAnnotationFeatures.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+/**
+ * Contains SOAPBinding annotation name, attributes and possible values
+ *
+ * @author Georgi Vachkov
+ */
+public class SBAnnotationFeatures
+{
+ public static final String SB_ANNOTATION = "javax.jws.soap.SOAPBinding";//$NON-NLS-1$
+ public static final String STYLE_ATTRIBUTE = "style";//$NON-NLS-1$
+ public static final String USE_ATTRIBUTE = "use";//$NON-NLS-1$
+ public static final String PARAMETER_STYLE_ATTRIBUTE = "parameterStyle";//$NON-NLS-1$
+
+ public static final String SB_STYLE_DOCUMENT = SB_ANNOTATION + ".Style.DOCUMENT";//$NON-NLS-1$
+ public static final String SB_STYLE_RPC = SB_ANNOTATION + ".SOAPBinding.Style.RPC";//$NON-NLS-1$
+
+ public static final String SB_USE_LITERAL = SB_ANNOTATION + ".Use.LITERAL";//$NON-NLS-1$
+ public static final String SB_USE_ENCODED = SB_ANNOTATION + ".Use.ENCODED";//$NON-NLS-1$
+
+ public static final String SB_PARAMETER_STYLE_BARE = SB_ANNOTATION + ".ParameterStyle.BARE";//$NON-NLS-1$
+ public static final String SB_PARAMETER_STYLE_WRAPPED = SB_ANNOTATION + ".ParameterStyle.WRAPPED";//$NON-NLS-1$
+
+
+ private SBAnnotationFeatures() {
+ // no instance of this class allowed
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WMAnnotationFeatures.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WMAnnotationFeatures.java
new file mode 100755
index 0000000..14989cf
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WMAnnotationFeatures.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+public final class WMAnnotationFeatures
+{
+
+ public static final String WM_ANNOTATION = "javax.jws.WebMethod";//$NON-NLS-1$
+
+ public static final String WM_NAME_ATTRIBUTE = "operationName";//$NON-NLS-1$
+
+ public static final String WM_EXCLUDED_ATTRIBUTE = "exclude";//$NON-NLS-1$
+
+ private WMAnnotationFeatures()
+ {
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WPAnnotationFeatures.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WPAnnotationFeatures.java
new file mode 100755
index 0000000..47c32f7
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WPAnnotationFeatures.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+
+/**
+ * Class that holds information on javax.jws.WebParam annotation name and attribute names.
+ *
+ * @author Georgi Vachkov
+ */
+final public class WPAnnotationFeatures
+{
+ public static final String WP_ANNOTATION = "javax.jws.WebParam";//$NON-NLS-1$
+ public static final String NAME_ATTRIBUTE = "name";//$NON-NLS-1$
+ public static final String PART_NAME_ATTRIBUTE = "partName";//$NON-NLS-1$
+ public static final String TARGET_NAMESPACE_ATTRIBUTE = "targetNamespace";//$NON-NLS-1$
+ public static final String MODE_ATTRIBUTE = "mode";//$NON-NLS-1$
+ public static final String HEADER_ATTRIBUTE = "header";//$NON-NLS-1$
+
+ public static final String WEB_PARAM_MODE = "javax.jws.WebParam.Mode";//$NON-NLS-1$
+ public static final String WEB_PARAM_MODE_IN = WEB_PARAM_MODE + ".IN";//$NON-NLS-1$
+ public static final String WEB_PARAM_MODE_OUT = WEB_PARAM_MODE + ".OUT";//$NON-NLS-1$
+ public static final String WEB_PARAM_MODE_INOUT = WEB_PARAM_MODE + ".INOUT";//$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WSAnnotationFeatures.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WSAnnotationFeatures.java
new file mode 100755
index 0000000..09f15f0
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WSAnnotationFeatures.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+final public class WSAnnotationFeatures
+{
+ private WSAnnotationFeatures()
+ {
+ }
+ public static final String WS_ANNOTATION = "javax.jws.WebService";//$NON-NLS-1$
+ public static final String NAME_ATTRIBUTE = "name";//$NON-NLS-1$
+ public static final String ENDPOINT_INTERFACE_ATTRIBUTE = "endpointInterface";//$NON-NLS-1$
+ public static final String SERVICE_NAME_ATTRIBUTE = "serviceName";//$NON-NLS-1$
+ public static final String WSDL_LOCATION_ATTRIBUTE = "wsdlLocation";//$NON-NLS-1$
+ public static final String TARGET_NAMESPACE_ATTRIBUTE = "targetNamespace";//$NON-NLS-1$
+ public static final String PORT_NAME_ATTRIBUTE = "portName"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WorkspaceCUFinder.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WorkspaceCUFinder.java
new file mode 100755
index 0000000..9dc8f36
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/WorkspaceCUFinder.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.WsDOMLoadCanceledException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.internal.plugin.JaxWsDomRuntimeMessages;
+
+public class WorkspaceCUFinder implements ICompilationUnitFinder
+{
+ private final IJavaModel javaModel;
+ private final IProjectSelector[] selectors;
+
+ public WorkspaceCUFinder(IJavaModel javaModel, IProjectSelector[] selectors) {
+ if (javaModel == null) {
+ throw new NullPointerException("javaModel");//$NON-NLS-1$
+ }
+ this.javaModel = javaModel;
+ if (selectors == null) {
+ throw new NullPointerException("selector");//$NON-NLS-1$
+ }
+ this.selectors = selectors;
+ }
+
+ public void find(final IProgressMonitor monitor, final ICompilationUnitHandler cuHandler) throws CoreException, WsDOMLoadCanceledException
+ {
+ cuHandler.started();
+ if (monitor != null) {
+ monitor.beginTask(JaxWsDomRuntimeMessages.JAXWS_DOM_LOADING, assumeWork());
+ }
+ try {
+ for (IJavaProject prj : javaModel.getJavaProjects())
+ {
+ if (monitor!=null && monitor.isCanceled()) {
+ throw new WsDOMLoadCanceledException("JAX-WS DOM loading canceled", JaxWsDomRuntimeMessages.WorkspaceCUFinder_LOADING_CANCELED); //$NON-NLS-1$
+ }
+
+ if (approve(prj))
+ {
+ cuHandler.handle(prj);
+ parseProject(prj, monitor, cuHandler);
+ }
+ }
+ cuHandler.finished();
+ } finally {
+ if (monitor != null) {
+ monitor.done();
+ }
+ }
+ }
+
+ protected int assumeWork() throws CoreException, WsDOMLoadCanceledException
+ {
+ final CountingCUHandler countingHandler = new CountingCUHandler();
+ for (IJavaProject prj : javaModel.getJavaProjects()) {
+ if (approve(prj)) {
+ parseProject(prj, new NullProgressMonitor(), countingHandler);
+ }
+ }
+
+ return countingHandler.count;
+ }
+
+ private void parseProject(final IJavaProject prj, final IProgressMonitor monitor, final ICompilationUnitHandler cuHandler) throws JavaModelException, WsDOMLoadCanceledException
+ {
+ for (IPackageFragment packageFragment : prj.getPackageFragments())
+ {
+ if (packageFragment.getKind() != IPackageFragmentRoot.K_SOURCE) {
+ continue;
+ }
+
+ for (ICompilationUnit cu : packageFragment.getCompilationUnits())
+ {
+ if (monitor!=null && monitor.isCanceled()) {
+ throw new WsDOMLoadCanceledException("JAX-WS DOM loading canceled",JaxWsDomRuntimeMessages.WorkspaceCUFinder_LOADING_CANCELED); //$NON-NLS-1$
+ }
+
+ cuHandler.handle(cu);
+
+ if (monitor != null) {
+ monitor.worked(1);
+ }
+ }
+ }
+ }
+
+ private boolean approve(IJavaProject prj) {
+ for (IProjectSelector selector : selectors) {
+ if (selector.approve(prj)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * This handler counts the compilation units
+ *
+ * @author Georgi Vachkov
+ */
+ protected class CountingCUHandler implements ICompilationUnitHandler
+ {
+ private int count;
+
+ public void started() {
+ count = 0;
+ }
+
+ public void handle(ICompilationUnit cu) {
+ count++;
+ }
+
+ public void finished() { /* no processing needed */ }
+ public void handle(IJavaProject jprj) { /* no processing needed */ }
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/AnnotationAdapterFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/AnnotationAdapterFactory.java
new file mode 100755
index 0000000..feafaf3
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/AnnotationAdapterFactory.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation.impl.AnnotationAdapter;
+
+/**
+ * Factory that adapts DOM objects to {@link IAnnotationAdapter} interface.
+ *
+ * @author Georgi Vachkov
+ */
+public class AnnotationAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * Singleton - use this static instance to adapt objects
+ */
+ public static final AnnotationAdapterFactory INSTANCE = new AnnotationAdapterFactory();
+
+ private AnnotationAdapterFactory() {
+ // singleton
+ }
+
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return type == IAnnotationAdapter.class;
+ }
+
+ @Override
+ protected Adapter createAdapter(Notifier target)
+ {
+ return new AnnotationAdapter();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/IAnnotationAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/IAnnotationAdapter.java
new file mode 100755
index 0000000..df42752
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/IAnnotationAdapter.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotation;
+
+/**
+ * Adapter that holds location information for the annotations applied on the
+ * java artifact/s which is represent by the DOM object adapted to this interface.
+ *
+ * @author Georgi Vachkov
+ */
+public interface IAnnotationAdapter
+{
+ /**
+ * Provides the {@link IAnnotation} for annotation with <code>annFQName</code>.
+ * @param annFQName the fully qualified name of the annotation
+ * @return locator instance or <code>null</code> if not existing
+ */
+ public IAnnotation<? extends IJavaElement> getAnnotation(String annFQName);
+
+ /**
+ * Adds annotation to the list of used annotations.
+ * <code>annotation</code> can be <code>null</code> then the locator for this annotation
+ * is removed.
+ * @param annFQName the fully qualified name of the annotation
+ * @param annotation th annotation instance
+ */
+ public void addAnnotation(String annFQName, IAnnotation<? extends IJavaElement> annotation);
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/impl/AnnotationAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/impl/AnnotationAdapter.java
new file mode 100755
index 0000000..9d6fbb8
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/annotation/impl/AnnotationAdapter.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.annotation.IAnnotationAdapter;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotation;
+
+import static org.eclipse.jst.ws.jaxws.utils.ContractChecker.nullCheckParam;
+
+/**
+ * Implementation of {@link ILocatorAdapter}.
+ *
+ * @author Georgi Vachkov
+ */
+public class AnnotationAdapter extends AdapterImpl implements IAnnotationAdapter
+{
+ private final Map<String, IAnnotation<? extends IJavaElement>> annotationLocators;
+
+ /**
+ * Constructor
+ */
+ public AnnotationAdapter() {
+ annotationLocators = new HashMap<String, IAnnotation<? extends IJavaElement>>();
+ }
+
+ public IAnnotation<? extends IJavaElement> getAnnotation(final String annotationFQName)
+ {
+ nullCheckParam(annotationFQName, "annotationFQName");//$NON-NLS-1$
+ return annotationLocators.get(annotationFQName);
+ }
+
+ public void addAnnotation(final String annFQName, final IAnnotation<? extends IJavaElement> annotation)
+ {
+ nullCheckParam(annFQName, "annFQName");//$NON-NLS-1$
+ annotationLocators.put(annFQName, annotation);
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return IAnnotationAdapter.class == type;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/MethodPropertyDefaultsAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/MethodPropertyDefaultsAdapter.java
new file mode 100755
index 0000000..f3b74b9
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/MethodPropertyDefaultsAdapter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.defaults;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jst.ws.jaxws.dom.runtime.IPropertyDefaults;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+
+/**
+ * Adapter that gives default values for {@link IWebMethod} objects
+ *
+ * @author Georgi Vachkov
+ */
+public class MethodPropertyDefaultsAdapter extends AdapterImpl implements IPropertyDefaults
+{
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return IPropertyDefaults.class == type;
+ }
+
+ public Object getDefault(final EStructuralFeature feature)
+ {
+ final IWebMethod webMethod = (IWebMethod)getTarget();
+ switch(feature.getFeatureID())
+ {
+ case DomPackage.IWEB_METHOD__NAME:
+ return getMethodName(webMethod);
+ }
+
+ return webMethod.eGet(feature);
+ }
+
+ private String getMethodName(final IWebMethod webMethod)
+ {
+ int pos = webMethod.getImplementation().indexOf('(');
+ if (pos > -1) {
+ return webMethod.getImplementation().substring(0, pos);
+ }
+
+ return webMethod.getImplementation();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/ParameterPropertyDefaultsAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/ParameterPropertyDefaultsAdapter.java
new file mode 100755
index 0000000..cbb9e1a
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/ParameterPropertyDefaultsAdapter.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.defaults;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jst.ws.jaxws.dom.runtime.IPropertyDefaults;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebParam;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.JaxWsDefaultsCalculator;
+
+/**
+ * Class that defines which properties for {@link IWebParam} are editable
+ *
+ * @author Georgi Vachkov
+ */
+public class ParameterPropertyDefaultsAdapter extends AdapterImpl implements IPropertyDefaults
+{
+ private final JaxWsDefaultsCalculator defCalc = new JaxWsDefaultsCalculator();
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return IPropertyDefaults.class == type;
+ }
+
+ public Object getDefault(EStructuralFeature feature)
+ {
+ assert getTarget() instanceof IWebParam;
+
+ final IWebParam webParam = (IWebParam)getTarget();
+
+ switch(feature.getFeatureID())
+ {
+ case DomPackage.IWEB_PARAM__NAME:
+ return defCalc().calcWebParamDefaultName(webParam);
+ case DomPackage.IWEB_PARAM__PART_NAME:
+ return defCalc().calcWebParamDefaultName(webParam);
+ case DomPackage.IWEB_PARAM__TARGET_NAMESPACE:
+ return defCalc().calcWebParamDefaultTargetNS((IWebMethod)webParam.eContainer(), webParam);
+ case DomPackage.IWEB_PARAM__HEADER:
+ return defCalc().getDefaultParamInHedaer();
+ case DomPackage.IWEB_PARAM__KIND:
+ return defCalc().getDefaultParamKind();
+ }
+
+ return webParam.eGet(feature);
+ }
+
+ protected JaxWsDefaultsCalculator defCalc() {
+ return defCalc;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/PropertyDefaultsAdapterFactory.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/PropertyDefaultsAdapterFactory.java
new file mode 100755
index 0000000..c82be5f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/PropertyDefaultsAdapterFactory.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.defaults;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.jst.ws.jaxws.dom.runtime.IPropertyDefaults;
+import org.eclipse.jst.ws.jaxws.dom.runtime.IPropertyState;
+import org.eclipse.jst.ws.jaxws.dom.runtime.util.DomAdapterFactory;
+
+/**
+ * Adapter factory for adapters implementing {@link IPropertyState} interface.
+ *
+ * @author Georgi Vachkov
+ */
+public class PropertyDefaultsAdapterFactory extends DomAdapterFactory
+{
+ /**
+ * Singleton instance for this adapter factory
+ */
+ public static final PropertyDefaultsAdapterFactory INSTANCE = new PropertyDefaultsAdapterFactory();
+
+ @Override
+ public boolean isFactoryForType(Object object) {
+ return IPropertyDefaults.class == object;
+ }
+
+ @Override
+ public Adapter createIWebServiceAdapter() {
+ return new WsPropertyDefaultsAdapter();
+ }
+
+ @Override
+ public Adapter createIServiceEndpointInterfaceAdapter() {
+ return new SeiPropertyDefaultsAdapter();
+ }
+
+ @Override
+ public Adapter createIWebMethodAdapter() {
+ return new MethodPropertyDefaultsAdapter();
+ }
+
+ @Override
+ public Adapter createIWebParamAdapter(){
+ return new ParameterPropertyDefaultsAdapter();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/SeiPropertyDefaultsAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/SeiPropertyDefaultsAdapter.java
new file mode 100755
index 0000000..29cca7a
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/SeiPropertyDefaultsAdapter.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.defaults;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jst.ws.jaxws.dom.runtime.IPropertyDefaults;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.utils.JaxWsUtils;
+
+/**
+ * Adapter that provides default values for {@link IServiceEndpointInterface} properties
+ *
+ * @author Georgi Vachkov
+ */
+public class SeiPropertyDefaultsAdapter extends AdapterImpl implements IPropertyDefaults
+{
+ public Object getDefault(EStructuralFeature feature)
+ {
+ final IServiceEndpointInterface sei = (IServiceEndpointInterface)getTarget();
+
+ switch(feature.getFeatureID())
+ {
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__NAME:
+ return JaxWsUtils.getDefaultPorttypeName(sei.getImplementation());
+ case DomPackage.ISERVICE_ENDPOINT_INTERFACE__TARGET_NAMESPACE:
+ return JaxWsUtils.composeJaxWsTargetNamespaceByFQName(sei.getImplementation());
+ }
+
+ return sei.eGet(feature);
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return IPropertyDefaults.class == type;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/WsPropertyDefaultsAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/WsPropertyDefaultsAdapter.java
new file mode 100755
index 0000000..07ac941
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/defaults/WsPropertyDefaultsAdapter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.defaults;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jst.ws.jaxws.dom.runtime.IPropertyDefaults;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebService;
+import org.eclipse.jst.ws.jaxws.utils.JaxWsUtils;
+
+public class WsPropertyDefaultsAdapter extends AdapterImpl implements IPropertyDefaults
+{
+ public Object getDefault(EStructuralFeature feature)
+ {
+ final IWebService ws = (IWebService)getTarget();
+
+ switch(feature.getFeatureID())
+ {
+ case DomPackage.IWEB_SERVICE__NAME:
+ return JaxWsUtils.getDefaultServiceName(ws.getImplementation());
+ case DomPackage.IWEB_SERVICE__PORT_NAME:
+ return JaxWsUtils.getDefaultPortName(ws.getImplementation());
+ case DomPackage.IWEB_SERVICE__TARGET_NAMESPACE:
+ return JaxWsUtils.composeJaxWsTargetNamespaceByFQName(ws.getImplementation());
+ }
+
+ return ws.eGet(feature);
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return IPropertyDefaults.class == type;
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/serializer/AbstractSerializerAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/serializer/AbstractSerializerAdapter.java
new file mode 100755
index 0000000..3016816
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/serializer/AbstractSerializerAdapter.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.serializer;
+
+import java.util.TreeSet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.DomUtil;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebServiceProject;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.IAnnotationSerializer;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.JaxWsDefaultsCalculator;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.JaxWsWorkspaceResource;
+import org.eclipse.jst.ws.jaxws.dom.runtime.util.ParamValueComparator;
+import org.eclipse.jst.ws.jaxws.utils.ContractChecker;
+import org.eclipse.jst.ws.jaxws.utils.annotations.AnnotationFactory;
+import org.eclipse.jst.ws.jaxws.utils.annotations.AnnotationGeneratorException;
+import org.eclipse.jst.ws.jaxws.utils.annotations.AnnotationWriter;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotation;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IParamValuePair;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IValue;
+import org.eclipse.jst.ws.jaxws.utils.logging.ILogger;
+import org.eclipse.jst.ws.jaxws.utils.logging.Logger;
+
+/**
+ * Base class for DOM adapters that listen to changes in DOM objects and applies it
+ * to the underlying java class. Extenders should implement <code>getAnnotation()</code>
+ * method to provide the {@link IAnnotation} instance to be saved to java class.
+ *
+ * @author Georgi Vachkov
+ */
+public abstract class AbstractSerializerAdapter extends AdapterImpl implements IAnnotationSerializer
+{
+ private final JaxWsWorkspaceResource resource;
+ private final DomUtil util = new DomUtil();
+ private final JaxWsDefaultsCalculator defCalc = new JaxWsDefaultsCalculator();
+
+ /**
+ * Constructor
+ * @param resource
+ * @throws NullPointerException in case <code>resource</code> is <code>null</code>
+ */
+ public AbstractSerializerAdapter(final JaxWsWorkspaceResource resource)
+ {
+ ContractChecker.nullCheckParam(resource, "resource");//$NON-NLS-1$
+
+ this.resource = resource;
+ }
+
+ @Override
+ public void notifyChanged(final Notification msg)
+ {
+ if (!resource.isSaveEnabled() || msg.isTouch()) {
+ return;
+ }
+
+ if (msg.getEventType() != Notification.SET && msg.getEventType() != Notification.UNSET) {
+ return;
+ }
+
+ if (checkValue(msg)) {
+ save(msg);
+ }
+ }
+
+ /**
+ * Default value check - works only for String values, trims the
+ * new value checks for <code>null</code> and if it is not null puts the
+ * value to the object and returns <code>true</code> otherwise <code>false</code>
+ * @param msg
+ * @return <code>true</code> in case the value is valid
+ */
+ protected boolean checkValue(final Notification msg)
+ {
+ EObject obj = (EObject)getTarget();
+ final String newValue = getNewStringValue(msg);
+ if (newValue==null) {
+ return revertValue(obj, msg);
+ }
+
+ // this call is needed cause newValue might be trimmed
+ putValue(obj, (EStructuralFeature)msg.getFeature(), newValue);
+ return true;
+ }
+
+ public void save(final Notification msg)
+ {
+ boolean processed = false;
+ try {
+ final IAnnotation<? extends IJavaElement> annotation = getAnnotation();
+ if (annotation == null) {
+ return;
+ }
+
+ if (annotation.getParamValuePairs().size()==0 && !isAnnotationRequired()) {
+ getAnnotationWriter().remove(annotation);
+ } else {
+ getAnnotationWriter().update(annotation);
+ }
+ processed = true;
+ }
+ catch (AnnotationGeneratorException e) {
+ logger().logError(e.getMessage(), e);
+ }
+ catch (CoreException e) {
+ logger().logError(e.getMessage(), e);
+ }
+ finally {
+ if(!processed) {
+ revertValue((EObject)getTarget(), msg);
+ }
+ }
+ }
+
+ protected abstract IAnnotation<? extends IJavaElement> getAnnotation() throws JavaModelException;
+ protected abstract boolean isAnnotationRequired();
+
+ @Override
+ public boolean isAdapterForType(Object type)
+ {
+ return IAnnotationSerializer.class==type;
+ }
+
+ protected JaxWsWorkspaceResource resource() {
+ return resource;
+ }
+
+ protected DomUtil util() {
+ return util;
+ }
+
+ protected JaxWsDefaultsCalculator defCalc() {
+ return defCalc;
+ }
+
+ protected AnnotationWriter getAnnotationWriter()
+ {
+ return AnnotationWriter.getInstance();
+ }
+
+ protected IParamValuePair createParamValue(String param, String value)
+ {
+ final IValue iValue = AnnotationFactory.createStringValue(value);
+ return AnnotationFactory.createParamValuePairValue(param, iValue);
+ }
+
+ protected IParamValuePair createParamValue(String param, boolean value)
+ {
+ final IValue iValue = AnnotationFactory.createBooleanValue(value);
+ return AnnotationFactory.createParamValuePairValue(param, iValue);
+ }
+
+ protected IType findType(final EObject object, final String typeFQName) throws JavaModelException
+ {
+ EObject webProject = object.eContainer();
+ while(!(webProject instanceof IWebServiceProject) && webProject!=null) {
+ webProject = webProject.eContainer();
+ }
+
+ if (webProject==null) {
+ return null;
+ }
+
+ final String projectName = ((IWebServiceProject)webProject).getName();
+ final IJavaProject javaProject = resource.javaModel().getJavaProject(projectName);
+ return javaProject.findType(typeFQName);
+ }
+
+ /**
+ * Reads the new string value from <code>msg</code>.
+ * @param msg
+ * @return <code>null</code> if the value is empty string or <code>null</code>, otherwise the trimmed string value.
+ */
+ protected String getNewStringValue(final Notification msg)
+ {
+ final String newValue = (msg.getNewStringValue() == null) ? null : msg.getNewStringValue().trim();
+ if (newValue != null && newValue.length() > 0) {
+ return newValue;
+ }
+
+ return null;
+ }
+
+ /**
+ * Reverts the current value for the changed feature to the old value and returns <code>false</code>
+ * @param obj the object to be reverted
+ * @param msg the message
+ * @return always returns false
+ */
+ protected boolean revertValue(final EObject obj, final Notification msg)
+ {
+ putValue(obj, (EStructuralFeature)msg.getFeature(), msg.getOldValue());
+ return false;
+ }
+
+ /**
+ * Puts the <code>newValue</code> to the changed feature.
+ * @param obj the object to be updated
+ * @param msg the notification message
+ * @param newValue the new value to be put
+ */
+ protected void putValue(final EObject obj, final EStructuralFeature feature, final Object newValue)
+ {
+ try {
+ obj.eSetDeliver(false);
+ obj.eSet(feature, newValue);
+ } finally {
+ obj.eSetDeliver(true);
+ }
+ }
+
+ protected TreeSet<IParamValuePair> createParamValueSortedTreeSet()
+ {
+ return new TreeSet<IParamValuePair>(new ParamValueComparator());
+ }
+
+ private ILogger logger()
+ {
+ return new Logger();
+ }
+}
diff --git a/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/serializer/MethodSerializerAdapter.java b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/serializer/MethodSerializerAdapter.java
new file mode 100755
index 0000000..2875f7f
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.jaxws.dom.runtime/src/org/eclipse/jst/ws/jaxws/dom/runtime/persistence/serializer/MethodSerializerAdapter.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.serializer;
+
+import java.util.Set;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.DomPackage;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IServiceEndpointInterface;
+import org.eclipse.jst.ws.jaxws.dom.runtime.api.IWebMethod;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.JaxWsWorkspaceResource;
+import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.WMAnnotationFeatures;
+import org.eclipse.jst.ws.jaxws.utils.annotations.AnnotationFactory;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotation;
+import org.eclipse.jst.ws.jaxws.utils.annotations.IParamValuePair;
+
+/**
+ * Adapter for {@link IWebMethod} serialization. Listens for property change notifications and
+ * serializes the new object content to the underlying java class.
+ *
+ * @author Georgi Vachkov
+ */
+public class MethodSerializerAdapter extends AbstractSerializerAdapter
+{
+ /**
+ * Constructor
+ * @param resource the DOM resource
+ */
+ public MethodSerializerAdapter(JaxWsWorkspaceResource resource) {
+ super(resource);
+ }
+
+ @Override
+ protected boolean isAnnotationRequired() {
+ return false;
+ }
+
+ @Override
+ protected IAnnotation<? extends IJavaElement> getAnnotation() throws JavaModelException
+ {
+ assert getTarget() instanceof IWebMethod;
+
+ final IWebMethod webMethod = (IWebMethod)getTarget();
+ final IServiceEndpointInterface sei = (IServiceEndpointInterface)webMethod.eContainer();
+ if (sei == null) {
+ return null;
+ }
+ final IType seiType = findType(sei, sei.getImplementation());
+ final IMethod method = util().findMethod(seiType, webMethod);
+ if (method==null) {
+ throw new IllegalStateException("IMethod for DOM method was not found");//$NON-NLS-1$