This commit was manufactured by cvs2svn to create tag 'R2_0_2'.
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF
index bcb378f..65314e3 100644
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws.axis.consumption.ui; singleton:=true
-Bundle-Version: 1.0.203.qualifier
+Bundle-Version: 1.0.204.qualifier
Bundle-Activator: org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java
index b1c5ec0..12c5ec3 100644
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java
+++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
* 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
@@ -11,10 +11,10 @@
* -------- -------- -----------------------------------------------------------
* 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
* 20060503 126819 rsinha@ca.ibm.com - Rupam Kuehner
+ * 20080122 215866 trungha@ca.ibm.com - Trung Ha
*******************************************************************************/
package org.eclipse.jst.ws.internal.axis.consumption.ui.command;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
@@ -76,18 +76,14 @@
IPath javaOutput = ResourceUtils.findResource( new Path( outputFolder_ )).getLocation();
javaWSDLParam_.setJavaOutput(javaOutput.toString());
- IFolder webModuleContainer = ResourceUtils.getWebComponentServerRoot(proxyProject_);
- if (webModuleContainer != null)
- {
- IPath webModulePath = webModuleContainer.getFullPath();
- // output = PlatformUtils.getPlatformURL(webModulePath);
- IResource res = ResourceUtils.findResource(webModulePath);
- if (res != null)
- {
- output = res.getLocation().toString();
- }
- javaWSDLParam_.setOutput(output);
+
+ IPath webModulePath = ResourceUtils.getWebComponentServerRootPath(proxyProject_);
+ // output = PlatformUtils.getPlatformURL(webModulePath);
+ IResource res = ResourceUtils.findResource(webModulePath);
+ if (res != null) {
+ output = res.getLocation().toString();
}
+ javaWSDLParam_.setOutput(output);
}
else
{
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java
index ae7c18b..793b11e 100644
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java
+++ b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java
@@ -15,6 +15,7 @@
* 20060828 155439 mahutch@ca.ibm.com - Mark Hutchinson
* 20070501 184505 kathy@ca.ibm.com - Kathy Chan
* 20070502 184505 kathy@ca.ibm.com - Kathy Chan, Update JAR sizes
+ * 20071102 208620 kathy@ca.ibm.com - Kathy Chan, Update JAR sizes
*******************************************************************************/
package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
@@ -68,12 +69,12 @@
public static String JAVAX_WSDL_JAR = "wsdl4j-1.5.1.jar"; //$NON-NLS-1$
public static String COMMON_LOGGING_PLUGIN_ID = "org.apache.commons.logging"; //$NON-NLS-1$
public static String COMMON_LOGGING_JAR = "commons-logging.jar"; //$NON-NLS-1$
- private static long AXIS_JAR_SIZE = 1586943L;
- private static long COMMON_DISCOVERY_JAR_SIZE = 71105L;
- private static long JAVAX_XML_RPC_JAR_SIZE = 32141L;
- private static long JAVAX_XML_SOAP_JAR_SIZE = 19506L;
- private static long JAVAX_WSDL_JAR_SIZE = 126775L;
- private static long COMMON_LOGGING_JAR_SIZE = 38895L;
+ private static long AXIS_JAR_SIZE = 1588063L;
+ private static long COMMON_DISCOVERY_JAR_SIZE = 71451L;
+ private static long JAVAX_XML_RPC_JAR_SIZE = 32361L;
+ private static long JAVAX_XML_SOAP_JAR_SIZE = 19582L;
+ private static long JAVAX_WSDL_JAR_SIZE = 127175L;
+ private static long COMMON_LOGGING_JAR_SIZE = 39353L;
// Web Services Jars Used in previous Versions of WTP but now obsolete
private static String[] OBSOLETE_JARS = new String[]{"commons-discovery.jar", "commons-logging-1.0.4.jar", "log4j-1.2.4.jar", "log4j-1.2.8.jar", "wsdl4j.jar", "axis-ant.jar"};
diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.jst.ws.axis.creation.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..5c6dd85
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Sep 26 06:28:27 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF
index de01575..47236a4 100644
--- a/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws.axis.creation.ui; singleton:=true
-Bundle-Version: 1.0.205.qualifier
+Bundle-Version: 1.0.206.qualifier
Bundle-Activator: org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BackupSkelImplCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BackupSkelImplCommand.java
index 19a6c90..e706321 100644
--- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BackupSkelImplCommand.java
+++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BackupSkelImplCommand.java
@@ -14,12 +14,11 @@
* 20060524 127343 mahutch@ca.ibm.com - Mark Hutchinson
* 20070116 169138 mahutch@ca.ibm.com - Mark Hutchinson
* 20070815 188999 pmoogk@ca.ibm.com - Peter Moogk
+ * 20071113 209075 kathy@ca.ibm.com - Kathy Chan
*******************************************************************************/
package org.eclipse.jst.ws.internal.axis.creation.ui.task;
-import java.io.FileInputStream;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -41,14 +40,9 @@
import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils;
import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils;
-import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
-import org.eclipse.wst.command.internal.env.eclipse.BaseEclipseEnvironment;
import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.environment.IStatusHandler;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser;
import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
@@ -57,7 +51,6 @@
{
private final String IMPL = "Impl"; //$NON-NLS-1$
private final String DOT = "."; //$NON-NLS-1$
- private final String BAK_EXT = "bak"; //$NON-NLS-1$
private final String JAVA = "java"; //$NON-NLS-1$
private WebServicesParser webServicesParser;
private JavaWSDLParameter javaWSDLParam;
@@ -130,13 +123,7 @@
String beanNameString = beanName.toString();
javaWSDLParam.setBeanName(beanNameString);
- // Check if the skeleton implementation bean already exist or not.
- // If it does, then back it up as xxx.java.bak before proceeding to call the Axis emitter
-
- FileInputStream finStream = null;
-
- ResourceContext context = ((BaseEclipseEnvironment)environment).getResourceContext();
- IStatusHandler statusHandler = environment.getStatusHandler();
+ // Defect 209075 - Do not back up anymore since skeleton merge is defaulted to on.
String beanNamePathString = beanNameString.replace('.',IPath.SEPARATOR);
IPath skelImplPath = new Path (javaWSDLParam.getJavaOutput()).append(new Path (beanNamePathString)).addFileExtension(JAVA);
@@ -150,29 +137,6 @@
}
implURLList.add( implURLString );
- if (skelImplPath.toFile().exists()) {
-
- IPath targetPath = skelImplPath.addFileExtension(BAK_EXT);
- try {
- finStream = new FileInputStream(skelImplPath.toString());
- if (finStream != null) {
- FileResourceUtils.createFileAtLocation(context, targetPath.makeAbsolute(), finStream,
- monitor, statusHandler);
- finStream.close();
- }
- } catch (Exception e) {
- status = StatusUtils.errorStatus(NLS.bind(AxisConsumptionCoreMessages.MSG_ERROR_MOVE_RESOURCE,new String[]{e.getLocalizedMessage()}), e);
- environment.getStatusHandler().reportError(status);
- } finally {
- try {
- if (finStream != null) {
- finStream.close();
- }
- } catch (IOException e) {
- }
- }
- }
-
String[] implURLArray = new String[implURLList.size()];
webServiceInfo.setImplURLs( (String[]) (implURLList.toArray(implURLArray)));
diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java
index 8af44fa..d7cdc29 100644
--- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java
+++ b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
* 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
@@ -12,14 +12,14 @@
* 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner
* 20060330 124667 kathy@ca.ibm.com - Kathy Chan
* 20060517 134104 kathy@ca.ibm.com - Kathy Chan
+ * 20071030 128419 kelvinhc@ca.ibm.com - Kelvin H. Cheung
*******************************************************************************/
package org.eclipse.jst.ws.internal.axis.creation.ui.task;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.io.InputStream;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
@@ -34,7 +34,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.ws.internal.axis.consumption.core.AxisConsumptionCoreMessages;
import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
@@ -47,7 +46,6 @@
import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
import org.eclipse.wst.common.environment.IEnvironment;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.ws.internal.common.BundleUtils;
public class UpdateAxisWSDDFileTask extends AbstractDataModelOperation {
@@ -95,7 +93,6 @@
.append(DEPLOY_BAK)
.toString();
FileUtil.createTargetFile(wsdd_deploy, deployBackup, true);
- String deployXSL = getPluginFilePath(DEPLOY_XSL).toString();
TransformerFactory tFactory = TransformerFactory.newInstance();
@@ -103,7 +100,7 @@
// the stylesheet you specify. This method call also processes the stylesheet
// into a compiled Templates object.
Transformer transformer =
- tFactory.newTransformer(new StreamSource(deployXSL));
+ tFactory.newTransformer(new StreamSource(getPluginFileAsInputStream(DEPLOY_XSL)));
transformer.setParameter(CLASSNAME_PARAM, javaWSDLParam_.getBeanName());
// Use the Transformer to apply the associated Templates object to an XML document
@@ -137,23 +134,12 @@
return status;
}
-
- private IPath getPluginFilePath(String pluginfileName)
- throws CoreException {
+
+ private InputStream getPluginFileAsInputStream(String pluginfileName) throws CoreException {
try {
-
- URL localURL =
- Platform.asLocalURL(
- BundleUtils.getURLFromBundle( WebServiceAxisCreationUIPlugin.ID, pluginfileName));
- return new Path(localURL.getFile());
- } catch (MalformedURLException e) {
- throw new CoreException(
- new org.eclipse.core.runtime.Status(
- IStatus.WARNING,
- WebServiceAxisCreationUIPlugin.ID,
- 0,
- AxisCreationUIMessages.MSG_PLUGIN_FILE_URL,
- e));
+ InputStream is = WebServiceAxisCreationUIPlugin.getInstance().getBundle().getEntry(pluginfileName).openStream();
+
+ return is;
} catch (IOException e) {
throw new CoreException(
new org.eclipse.core.runtime.Status(
@@ -165,7 +151,6 @@
}
}
-
/**
* Sets the javaWSDLParam.
* @param javaWSDLParam The javaWSDLParam to set
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/.classpath b/bundles/org.eclipse.jst.ws.consumption.ui/.classpath
index 52165ec..196d49a 100644
--- a/bundles/org.eclipse.jst.ws.consumption.ui/.classpath
+++ b/bundles/org.eclipse.jst.ws.consumption.ui/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <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="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.ws.consumption.ui/.settings/org.eclipse.jdt.core.prefs
index 160fd76..285e5c9 100644
--- a/bundles/org.eclipse.jst.ws.consumption.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.jst.ws.consumption.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,21 +1,21 @@
-#Mon Jan 30 10:36:02 EST 2006
+#Wed Oct 03 17:03:59 EDT 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -54,4 +54,4 @@
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.consumption.ui/META-INF/MANIFEST.MF
index 23dc451..82c313f 100644
--- a/bundles/org.eclipse.jst.ws.consumption.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.consumption.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws.consumption.ui; singleton:=true
-Bundle-Version: 1.0.205.qualifier
+Bundle-Version: 1.0.206.qualifier
Bundle-Activator: org.eclipse.jst.ws.internal.consumption.ui.plugin.WebServiceConsumptionUIPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
@@ -76,4 +76,4 @@
com.ibm.icu;bundle-version="[3.4.4,4.0.0)",
org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)"
Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/test/wssample/AddModuleDependenciesCommand.java b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/test/wssample/AddModuleDependenciesCommand.java
index 3c6638f..8f444ae 100644
--- a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/test/wssample/AddModuleDependenciesCommand.java
+++ b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/test/wssample/AddModuleDependenciesCommand.java
@@ -12,29 +12,20 @@
* 20060324 122799 rsinha@ca.ibm.com - Rupam Kuehner
* 20060503 138478 rsinha@ca.ibm.com - Rupam Kuehner
* 20060510 141115 rsinha@ca.ibm.com - Rupam Kuehner
+ * 20071212 200193 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample;
import java.io.IOException;
-import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJavaProjectMigrationDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.JavaProjectMigrationDataModelProvider;
import org.eclipse.jst.ws.internal.common.J2EEUtils;
import org.eclipse.jst.ws.internal.consumption.command.common.AddModuleToServerCommand;
import org.eclipse.jst.ws.internal.consumption.command.common.AssociateModuleWithEARCommand;
@@ -45,15 +36,8 @@
import org.eclipse.jst.ws.internal.consumption.ui.common.ValidationUtils;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.environment.IEnvironment;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.ws.internal.wsrt.TestInfo;
public class AddModuleDependenciesCommand extends AbstractDataModelOperation
@@ -203,14 +187,14 @@
if (clientIProject != null && !J2EEUtils.isWebComponent(clientIProject)) {
if (J2EEUtils.isJavaComponent(clientIProject)) {
- addJavaProjectAsUtilityJar(clientIProject, sampleEARIProject, monitor);
- addJavaProjectAsUtilityJar(clientIProject, sampleIProject,monitor);
+ J2EEUtils.addJavaProjectAsUtilityJar(clientIProject, sampleEARIProject, monitor);
+ J2EEUtils.addJavaProjectAsUtilityJar(clientIProject, sampleIProject,monitor);
}
try
{
String uri = clientIProject.getName() + ".jar";
- addJAROrModuleDependency(sampleIProject, uri);
+ J2EEUtils.addJAROrModuleDependency(sampleIProject, uri);
} catch (CoreException ce)
{
String errorMessage = NLS.bind(ConsumptionUIMessages.MSG_ERROR_MODULE_DEPENDENCY, new String[]{sampleIProject.getName(), clientIProject.getName()});
@@ -223,70 +207,15 @@
env.getStatusHandler().reportError(errorStatus);
}
- try {
- addBuildPath(sampleIProject, clientIProject);
- } catch (JavaModelException jme) {
- // Do nothing in this catch block. The worst that
- // will happen is that the sample Web project
- // will show some compile errors. The sample will
- // likely still launch successfully on the server
- // and the user will be able to use it.
- }
+
}
return Status.OK_STATUS;
}
- private void addJAROrModuleDependency(IProject project, String uri) throws IOException, CoreException
- {
- if (J2EEUtils.isWebComponent(project))
- {
- ArchiveManifest manifest = J2EEProjectUtilities.readManifest(project);
- manifest.mergeClassPath(new String[]{uri});
- J2EEProjectUtilities.writeManifest(project, manifest);
- }
- }
-
- private void addJavaProjectAsUtilityJar(IProject javaProject, IProject earProject,IProgressMonitor monitor)
- {
- try {
- IDataModel migrationdm = DataModelFactory.createDataModel(new JavaProjectMigrationDataModelProvider());
- migrationdm.setProperty(IJavaProjectMigrationDataModelProperties.PROJECT_NAME, javaProject.getName());
- migrationdm.getDefaultOperation().execute(monitor, null);
-
-
- IDataModel refdm = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- List targetCompList = (List) refdm.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
-
- IVirtualComponent targetcomponent = ComponentCore.createComponent(javaProject);
- IVirtualComponent sourcecomponent = ComponentUtilities.getComponent(earProject.getName());
- targetCompList.add(targetcomponent);
-
- refdm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT,sourcecomponent );
- refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, targetCompList);
- refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, "/WEB-INF/lib");
- refdm.getDefaultOperation().execute(monitor, null);
- }catch (Exception e) {
-
- }
- }
-
-
- private void addBuildPath(IProject referencingProject, IProject referencedProject) throws JavaModelException
- {
- IJavaProject javaProject = JavaCore.create(referencingProject);
- if (javaProject != null)
- {
- IClasspathEntry[] oldCp = javaProject.getRawClasspath();
- IClasspathEntry[] newCp = new IClasspathEntry[oldCp.length + 1];
- for (int i = 0; i < oldCp.length; i++)
- newCp[i] = oldCp[i];
- newCp[newCp.length - 1] = JavaCore.newProjectEntry(referencedProject.getFullPath());
- javaProject.setRawClasspath(newCp, new NullProgressMonitor());
- }
- }
+
public static final String DEFAULT_SAMPLE_EAR_PROJECT_EXT = "EAR";
}
diff --git a/bundles/org.eclipse.jst.ws.consumption/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.consumption/META-INF/MANIFEST.MF
index a9c9877..a1dd9d9 100644
--- a/bundles/org.eclipse.jst.ws.consumption/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.consumption/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws.consumption; singleton:=true
-Bundle-Version: 1.0.203.qualifier
+Bundle-Version: 1.0.205.qualifier
Bundle-ClassPath: wsc.jar,
webserviceutils.jar
Bundle-Activator: org.eclipse.jst.ws.internal.consumption.plugin.WebServiceConsumptionPlugin
diff --git a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/ArrayType.java b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/ArrayType.java
index fe6cb2d..a125104 100644
--- a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/ArrayType.java
+++ b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/ArrayType.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* 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:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20071122 210692 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.datamodel.beanmodel;
@@ -50,9 +53,12 @@
public String TypeConversion(String name)
{
- String nonBean = Generator.DOUBLE_TAB + "java.util.List list" + getUniqueName() + "= java.util.Arrays.asList(" + name + ");" +StringUtils.NEWLINE
- + Generator.DOUBLE_TAB + "String temp"+ getUniqueName() +" = list" + getUniqueName() + ".toString();" + StringUtils.NEWLINE
- + Generator.DOUBLE_TAB + "%>" + StringUtils.NEWLINE
+ String nonBean = Generator.DOUBLE_TAB + "String temp"+ getUniqueName() + " = null;" + StringUtils.NEWLINE
+ + Generator.DOUBLE_TAB + "if(" + name + " != null){" + StringUtils.NEWLINE
+ + Generator.DOUBLE_TAB + "java.util.List list" + getUniqueName() + "= java.util.Arrays.asList(" + name + ");" +StringUtils.NEWLINE
+ + Generator.DOUBLE_TAB + "temp"+ getUniqueName() +" = list" + getUniqueName() + ".toString();" + StringUtils.NEWLINE
+ + Generator.DOUBLE_TAB + "}" + StringUtils.NEWLINE
+ + Generator.DOUBLE_TAB + "%>" + StringUtils.NEWLINE
+ Generator.DOUBLE_TAB + "<%=temp"+ getUniqueName() +"%>" + StringUtils.NEWLINE
+ Generator.DOUBLE_TAB + "<%"+ StringUtils.NEWLINE;
diff --git a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/DateType.java b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/DateType.java
index 6a83989..95a9c44 100644
--- a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/DateType.java
+++ b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/DateType.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* 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:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20071110 209087 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.datamodel.beanmodel;
@@ -74,7 +77,7 @@
public String stringConversion(String typeName, String nodeName, String attributeName)
{
String conversion = Generator.DOUBLE_TAB + "java.text.DateFormat dateFormat" + getUniqueName()+ " = java.text.DateFormat.getDateInstance();"
- + StringUtils.NEWLINE + Generator.DOUBLE_TAB + "java.util.Date " + nodeName + "= dateFormat" + getUniqueName()+ ".parse(" + attributeName + ");"
+ + StringUtils.NEWLINE + Generator.DOUBLE_TAB + nodeName + "= dateFormat" + getUniqueName()+ ".parse(" + attributeName + ");"
+ "" + StringUtils.NEWLINE;
return conversion;
}
diff --git a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/GregorianCalendarType.java b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/GregorianCalendarType.java
index d7cfbf9..3a9d9d1 100644
--- a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/GregorianCalendarType.java
+++ b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/GregorianCalendarType.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* 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:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20071110 209087 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.datamodel.beanmodel;
@@ -76,7 +79,7 @@
{
String conversion = Generator.DOUBLE_TAB + "java.text.DateFormat dateFormat" + getUniqueName()+ " = java.text.DateFormat.getDateInstance();"
+ StringUtils.NEWLINE + Generator.DOUBLE_TAB + "java.util.Date dateTemp" + getUniqueName()+ " = dateFormat" + getUniqueName()+ ".parse(" + attributeName + ");"
- + StringUtils.NEWLINE + Generator.DOUBLE_TAB + "java.util.GregorianCalendar" + Generator.SPACE + nodeName + " = " + "new java.util.GregorianCalendar();"
+ + StringUtils.NEWLINE + Generator.DOUBLE_TAB + Generator.SPACE + nodeName + " = " + "new java.util.GregorianCalendar();"
+ StringUtils.NEWLINE + Generator.DOUBLE_TAB + nodeName + ".setTime(dateTemp" + getUniqueName()+ ");"
+ "" + StringUtils.NEWLINE;
return conversion;
diff --git a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/PrimitiveType.java b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/PrimitiveType.java
index 4b51767..43106b8 100644
--- a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/PrimitiveType.java
+++ b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/PrimitiveType.java
@@ -1,16 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* 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:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20071110 209087 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.datamodel.beanmodel;
+import org.eclipse.jst.ws.internal.common.StringUtils;
+import org.eclipse.jst.ws.internal.consumption.codegen.Generator;
+
/**
* objects of this class represent a type
*
@@ -37,6 +43,14 @@
* @param String the name of string after the request call
* @return String the actual conversion string containing the name.
*/
+ public String stringConversion(String typeName, String nodeName, String attributeName)
+ {
+ String conversion = Generator.DOUBLE_TAB + typeName + Generator.SPACE + nodeName
+ + Generator.SPACE + " = " + StringToType(attributeName)
+ + "" + StringUtils.NEWLINE;
+ return conversion;
+ }
+
public String TypeToString(String name)
{
return "String.valueOf(" + name + ")";
diff --git a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/SimpleType.java b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/SimpleType.java
index e819482..116ede9 100644
--- a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/SimpleType.java
+++ b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/datamodel/beanmodel/SimpleType.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* 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:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20071110 209087 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.datamodel.beanmodel;
@@ -79,7 +82,7 @@
*/
public String stringConversion(String typeName, String nodeName, String attributeName)
{
- String conversion = Generator.DOUBLE_TAB + typeName + Generator.SPACE + nodeName
+ String conversion = Generator.DOUBLE_TAB + Generator.SPACE + nodeName
+ Generator.SPACE + " = " + StringToType(attributeName)
+ "" + StringUtils.NEWLINE;
return conversion;
diff --git a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/sampleapp/codegen/ResultFileTypeGenerator.java b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/sampleapp/codegen/ResultFileTypeGenerator.java
index dea6887..d60d897 100644
--- a/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/sampleapp/codegen/ResultFileTypeGenerator.java
+++ b/bundles/org.eclipse.jst.ws.consumption/src/org/eclipse/jst/ws/internal/consumption/sampleapp/codegen/ResultFileTypeGenerator.java
@@ -4,12 +4,13 @@
* 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:
* IBM Corporation - initial API and implementation
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20070410 180952 makandre@ca.ibm.com - Andrew Mak, Sample JSP generator chokes on interfaces and abstract classes
+ * 20071110 209087 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.sampleapp.codegen;
@@ -62,7 +63,15 @@
DataType dataType = TypeFactory.createType(type.getName(),type.getOwningElement().getMUID());
String nodeName = getTypeOwnerId()+ "Temp";
- fbuffer.append(dataType.stringConversion(type.getName(),nodeName,getTypeOwnerId()));
+ if(!type.isPrimitive()){
+
+ fbuffer.append(Generator.DOUBLE_TAB + Generator.TAB + type.getName() + " " + nodeName + " = null;" + StringUtils.NEWLINE);
+ fbuffer.append(Generator.DOUBLE_TAB + "if(!" + getTypeOwnerId() + ".equals(\"\")){" + StringUtils.NEWLINE);
+ fbuffer.append(dataType.stringConversion("",nodeName,getTypeOwnerId()));
+ fbuffer.append(Generator.DOUBLE_TAB + "}" + StringUtils.NEWLINE);
+ }
+ else
+ fbuffer.append(dataType.stringConversion(type.getName(),nodeName,getTypeOwnerId()));
putResidentVector(nodeName);
}
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.creation.ui/META-INF/MANIFEST.MF
index a6d3427..73f191c 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.creation.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws.creation.ui; singleton:=true
-Bundle-Version: 1.0.205.qualifier
+Bundle-Version: 1.0.206.qualifier
Bundle-Activator: org.eclipse.jst.ws.internal.creation.ui.plugin.WebServiceCreationUIPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceAssembleCommand.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceAssembleCommand.java
index aba2f16..a43c816 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceAssembleCommand.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceAssembleCommand.java
@@ -14,18 +14,30 @@
* 20060524 141925 kathy@ca.ibm.com - Kathy Chan
* 20060529 141422 kathy@ca.ibm.com - Kathy Chan
* 20070509 182274 kathy@ca.ibm.com - Kathy Chan
+ * 20071218 200193 gilberta@ca.ibm.com - Gilbert Andrews
+ * 20071220 213640 kathy@ca.ibm.com - Kathy Chan
*******************************************************************************/
package org.eclipse.jst.ws.internal.creation.ui.extension;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
import org.eclipse.jst.ws.internal.consumption.command.common.AssociateModuleWithEARCommand;
import org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand;
+import org.eclipse.jst.ws.internal.consumption.common.FacetUtils;
import org.eclipse.jst.ws.internal.consumption.common.RequiredFacetVersion;
+import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
import org.eclipse.wst.common.environment.IEnvironment;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.eclipse.wst.ws.internal.plugin.WSPlugin;
@@ -43,6 +55,7 @@
private String earProject_;
private String ear_;
private IContext context_;
+ private IProject initialProject_;
public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
{
@@ -106,10 +119,27 @@
environment.getStatusHandler().reportError(status);
}
+ //make sure the ear file has been created.
+
+ if(initialProject_ != null && FacetUtils.isJavaProject(initialProject_)) {
+ IProject earProject = ResourcesPlugin.getWorkspace().getRoot().getProject(earProject_);
+ J2EEUtils.addJavaProjectAsUtilityJar(initialProject_, earProject, monitor);
+ }
+
}
return status;
}
+ public void setInitialProject(IProject initialProject)
+ {
+ initialProject_ = initialProject;
+ }
+
+ public IProject getInitialProject()
+ {
+ return initialProject_;
+ }
+
public void setProject( String project )
{
project_ = project;
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceDevelopCommand.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceDevelopCommand.java
index eb0b089..75c2d7e 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceDevelopCommand.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/PreServiceDevelopCommand.java
@@ -16,22 +16,31 @@
* 20070123 167487 makandre@ca.ibm.com - Andrew Mak
* 20070403 173654 kathy@ca.ibm.com - Kathy Chan
* 20070509 182274 kathy@ca.ibm.com - Kathy Chan
+ * 20071212 200193 gilberta@ca.ibm.com - Gilbert Andrews
+ * 20071220 213640 kathy@ca.ibm.com - Kathy Chan
*******************************************************************************/
package org.eclipse.jst.ws.internal.creation.ui.extension;
+import java.io.IOException;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
import org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand;
import org.eclipse.jst.ws.internal.consumption.common.FacetUtils;
import org.eclipse.jst.ws.internal.consumption.common.RequiredFacetVersion;
+import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ServiceRuntimeDescriptor;
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
import org.eclipse.wst.common.environment.IEnvironment;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
@@ -57,6 +66,7 @@
private String moduleType_;
private String earProject_;
private String ear_;
+ private IProject initialProject_;
private IWebService webService_;
private String j2eeLevel_;
@@ -166,7 +176,24 @@
}
}
}
- }
+
+
+ if(initialProject_ != null && FacetUtils.isJavaProject(initialProject_)){
+ J2EEUtils.addJavaProjectAsUtilityJar(initialProject_, project, monitor);
+ try{
+ String uri = initialProject_.getName() + ".jar";
+ J2EEUtils.addJAROrModuleDependency(project, uri);
+ } catch (CoreException ce){
+ String errorMessage = NLS.bind(ConsumptionUIMessages.MSG_ERROR_MODULE_DEPENDENCY, new String[]{project.getName(), initialProject_.getName()});
+ IStatus errorStatus = StatusUtils.errorStatus(errorMessage);
+ environment.getStatusHandler().reportError(errorStatus);
+ } catch (IOException ioe){
+ String errorMessage = NLS.bind(ConsumptionUIMessages.MSG_ERROR_MODULE_DEPENDENCY, new String[]{project.getName(), initialProject_.getName()});
+ IStatus errorStatus = StatusUtils.errorStatus(errorMessage);
+ environment.getStatusHandler().reportError(errorStatus);
+ }
+ }
+ }
return status;
}
@@ -288,5 +315,14 @@
client_ = genProxy;
}
+ public void setInitialProject(IProject initialProject)
+ {
+ initialProject_ = initialProject;
+ }
+
+ public IProject getInitialProject()
+ {
+ return initialProject_;
+ }
}
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/ServiceRootFragment.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/ServiceRootFragment.java
index 2ab439a..c382ebd 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/ServiceRootFragment.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/extension/ServiceRootFragment.java
@@ -12,6 +12,7 @@
* 20060131 121071 rsinha@ca.ibm.com - Rupam Kuehner
* 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner
* 20060331 128827 kathy@ca.ibm.com - Kathy Chan
+ * 20071212 200193 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.creation.ui.extension;
@@ -98,10 +99,11 @@
//Mappings from framework to framework commands
registry.addMapping( PreServiceDevelopCommand.class, "WebService", PreServiceAssembleCommand.class );
- registry.addMapping( PreServiceDevelopCommand.class, "Project", PreServiceAssembleCommand.class );
+ registry.addMapping( PreServiceDevelopCommand.class, "Project", PreServiceAssembleCommand.class );
registry.addMapping( PreServiceDevelopCommand.class, "Module", PreServiceAssembleCommand.class );
- registry.addMapping( PreServiceDevelopCommand.class, "EarProject", PreServiceAssembleCommand.class );
+ registry.addMapping( PreServiceDevelopCommand.class, "EarProject", PreServiceAssembleCommand.class );
registry.addMapping( PreServiceDevelopCommand.class, "Ear", PreServiceAssembleCommand.class );
+ registry.addMapping( PreServiceDevelopCommand.class, "InitialProject", PreServiceAssembleCommand.class );
registry.addMapping( PreServiceDevelopCommand.class, "Context", PreServiceAssembleCommand.class );
registry.addMapping( PreServiceDevelopCommand.class, "Context", PreServiceDeployCommand.class );
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java
index 7841cab..d56e5a1 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java
@@ -524,6 +524,7 @@
dataRegistry.addMapping(ServerRuntimeSelectionWidgetDefaultingCommand.class, "GenerateProxy", ClientFragment.class);
dataRegistry.addMapping(ServerRuntimeSelectionWidgetDefaultingCommand.class, "GenerateProxy", ClientExtensionDefaultingCommand.class);
dataRegistry.addMapping(ServerRuntimeSelectionWidgetDefaultingCommand.class, "ServiceNeedEAR", ServerExtensionDefaultingCommand.class);
+ dataRegistry.addMapping(ServerRuntimeSelectionWidgetDefaultingCommand.class, "InitialProject", PreServiceDevelopCommand.class );
dataRegistry.addMapping(ServerRuntimeSelectionWidgetDefaultingCommand.class, "ClientNeedEAR", ClientExtensionDefaultingCommand.class);
dataRegistry.addMapping( ServerWizardWidgetOutputCommand.class, "InstallService", ServerExtensionDefaultingCommand.class);
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/runtime/ServerRuntimeSelectionWidgetDefaultingCommand.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/runtime/ServerRuntimeSelectionWidgetDefaultingCommand.java
index 7a2eaca..e1c50b6 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/runtime/ServerRuntimeSelectionWidgetDefaultingCommand.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/runtime/ServerRuntimeSelectionWidgetDefaultingCommand.java
@@ -20,6 +20,7 @@
* 20060525 143843 joan@ca.ibm.com - Joan Haggarty
* 20060905 156230 kathy@ca.ibm.com - Kathy Chan, Handling projects with no target runtime
* 20070319 159458 mahutch@ca.ibm.com - Mark Hutchinson added in some null checks
+ * 20071212 200193 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.jst.ws.internal.creation.ui.widgets.runtime;
@@ -295,7 +296,10 @@
{
//Choose an existing server the module is already associated with if possible
IProject serviceProject = ResourcesPlugin.getWorkspace().getRoot().getProject(serviceProjectName_);
- IServer[] configuredServers = ServerUtil.getServersByModule(ServerUtils.getModule(serviceProject), null);
+ IServer[] configuredServers = null;
+ if(serviceProject.exists())
+ configuredServers = ServerUtil.getServersByModule(ServerUtils.getModule(serviceProject), null);
+
if (configuredServers!=null && configuredServers.length>0)
{
serviceIds_.setServerId(configuredServers[0].getServerType().getId());
@@ -552,6 +556,11 @@
initialProject_ = initialProject;
}
+ public IProject getInitialProject()
+ {
+ return initialProject_;
+ }
+
public void setInitialComponentName(String name)
{
//TODO This method and any mappings to it
diff --git a/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF
index 99867ab..10cd142 100644
--- a/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws
-Bundle-Version: 1.0.204.qualifier
+Bundle-Version: 1.0.205.qualifier
Bundle-Activator: org.eclipse.jst.ws.internal.plugin.WebServicePlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java b/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java
index a20bf41..a533c00 100644
--- a/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java
+++ b/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java
@@ -14,11 +14,16 @@
* 20060503 126819 rsinha@ca.ibm.com - Rupam Kuehner
* 20060524 131132 mahutch@ca.ibm.com - Mark Hutchinson
* 20070723 194434 kathy@ca.ibm.com - Kathy Chan, Check for non-existing EAR with content not deleted
+ * 20071218 200193 gilberta@ca.ibm.com - Gilbert Andrews
+ * 20071221 213726 kathy@ca.ibm.com - Kathy Chan
*******************************************************************************/
package org.eclipse.jst.ws.internal.common;
+import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -33,6 +38,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -40,6 +46,7 @@
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
+import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
import org.eclipse.jst.j2ee.ejb.EJBJar;
import org.eclipse.jst.j2ee.ejb.EJBResource;
import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
@@ -48,12 +55,17 @@
import org.eclipse.jst.j2ee.ejb.componentcore.util.EJBArtifactEdit;
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.jst.j2ee.project.facet.IJavaProjectMigrationDataModelProperties;
+import org.eclipse.jst.j2ee.project.facet.JavaProjectMigrationDataModelProvider;
import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
+import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
+import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
@@ -1419,4 +1431,51 @@
return status;
}
+
+ public static void addJAROrModuleDependency(IProject project, String uri) throws IOException, CoreException
+ {
+ if (J2EEUtils.isWebComponent(project))
+ {
+ ArchiveManifest manifest = J2EEProjectUtilities.readManifest(project);
+ manifest.mergeClassPath(new String[]{uri});
+ J2EEProjectUtilities.writeManifest(project, manifest);
+ forceClasspathUpdate(project);
+ }
+ }
+
+ public static void addJavaProjectAsUtilityJar(IProject javaProject, IProject earProject,IProgressMonitor monitor)
+ {
+ try {
+ IDataModel migrationdm = DataModelFactory.createDataModel(new JavaProjectMigrationDataModelProvider());
+ migrationdm.setProperty(IJavaProjectMigrationDataModelProperties.PROJECT_NAME, javaProject.getName());
+ migrationdm.setProperty(IJavaProjectMigrationDataModelProperties.ADD_TO_EAR, Boolean.FALSE);
+ migrationdm.getDefaultOperation().execute(monitor, null);
+
+
+ IDataModel refdm = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
+ List targetCompList = (List) refdm.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
+
+ IVirtualComponent targetcomponent = ComponentCore.createComponent(javaProject);
+ IVirtualComponent sourcecomponent = ComponentUtilities.getComponent(earProject.getName());
+ targetCompList.add(targetcomponent);
+
+ refdm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT,sourcecomponent );
+ refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, targetCompList);
+ refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, "/WEB-INF/lib");
+ refdm.getDefaultOperation().execute(monitor, null);
+
+ forceClasspathUpdate(earProject);
+
+ }catch (Exception e) {
+
+ }
+ }
+
+ //Forcing classpath update
+ public static void forceClasspathUpdate (IProject project) {
+ J2EEComponentClasspathUpdater classpathUpdater = J2EEComponentClasspathUpdater.getInstance();
+ Collection projCollection = Collections.singleton(project);
+ classpathUpdater.forceUpdate(projCollection, false);
+ }
+
}
diff --git a/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/ResourceUtils.java b/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/ResourceUtils.java
index 650af5a..bd7660d 100644
--- a/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/ResourceUtils.java
+++ b/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/ResourceUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
* 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
@@ -13,6 +13,7 @@
* 20060421 136761 rsinha@ca.ibm.com - Rupam Kuehner
* 20060424 115690 sengpl@ca.ibm.com - Seng Phung-Lu
* 20060503 126819 rsinha@ca.ibm.com - Rupam Kuehner
+ * 20080122 215866 trungha@ca.ibm.com - Trung Ha
*******************************************************************************/
package org.eclipse.jst.ws.internal.common;
@@ -28,6 +29,7 @@
import java.util.List;
import java.util.Vector;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -825,6 +827,26 @@
return webModuleServerRoot;
}
+
+ /**
+ *
+ * @param project
+ * @return
+ */
+ public static IPath getWebComponentServerRootPath(IProject project){
+
+ IContainer webModuleServerRoot = null;
+ IVirtualComponent vc = ComponentCore.createComponent(project);
+ if (vc != null && vc.exists()){
+ IContainer[] containers = J2EEProjectUtilities.getOutputContainers(project.getProject());
+ if (containers.length > 0)
+ webModuleServerRoot = containers[0];
+ }
+
+ if (webModuleServerRoot != null)
+ return webModuleServerRoot.getFullPath();
+ return null;
+ }
/**
* Returns the URL string corresponding to the web server module root of the
diff --git a/bundles/org.eclipse.wst.command.env.ui/src/org/eclipse/wst/command/internal/env/ui/widgets/WizardPageManager.java b/bundles/org.eclipse.wst.command.env.ui/src/org/eclipse/wst/command/internal/env/ui/widgets/WizardPageManager.java
index 5abed45..068ed7d 100644
--- a/bundles/org.eclipse.wst.command.env.ui/src/org/eclipse/wst/command/internal/env/ui/widgets/WizardPageManager.java
+++ b/bundles/org.eclipse.wst.command.env.ui/src/org/eclipse/wst/command/internal/env/ui/widgets/WizardPageManager.java
@@ -20,7 +20,6 @@
import java.util.Hashtable;
import java.util.Stack;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardContainer;
diff --git a/bundles/org.eclipse.wst.command.env/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.command.env/META-INF/MANIFEST.MF
index c496e27..89fff19 100644
--- a/bundles/org.eclipse.wst.command.env/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.command.env/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.command.env; singleton:=true
-Bundle-Version: 1.0.204.qualifier
+Bundle-Version: 1.0.205.qualifier
Bundle-Activator: org.eclipse.wst.command.internal.env.plugin.EnvPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.command.env/ant/wsant.bat b/bundles/org.eclipse.wst.command.env/ant/wsant.bat
index 71929b3..e9a4269 100644
--- a/bundles/org.eclipse.wst.command.env/ant/wsant.bat
+++ b/bundles/org.eclipse.wst.command.env/ant/wsant.bat
@@ -14,11 +14,11 @@
REM *********** Local envars ***************************
REM The JRE java.exe to be used by Ant. Note: for WTP 2.0 the JDK needs to be 1.5 or higher.
-set JAVAEXE="C:\j2sdk1.4.2_07\jre\bin\java.exe"
+set JAVAEXE="C:\jdk1.5.0\jre\bin\java.exe"
REM The Eclipse install directory. Some Eclipse based products may refer to this directory
REM as the non shared directory.
-set INSTALL_DIRECTORY=d:\wtp\eclipse
+set INSTALL_DIRECTORY=d:\productdirectory\eclipse
REM The shared Eclipse features directory. Some Eclipse based products may split their
REM directory structure into shared and non shared folders. The variable below should be
@@ -31,7 +31,7 @@
set LAUNCHER_JAR="%SHARED_DIRECTORY%\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar"
REM The location of your workspace
-set WORKSPACE=D:\builds\wtp_20_ga\eclipse\workspace
+set WORKSPACE=C:\workspace
REM ****************************************************
diff --git a/bundles/org.eclipse.wst.command.env/ant/wsant.sh b/bundles/org.eclipse.wst.command.env/ant/wsant.sh
index 301c186..82c9fe5 100644
--- a/bundles/org.eclipse.wst.command.env/ant/wsant.sh
+++ b/bundles/org.eclipse.wst.command.env/ant/wsant.sh
@@ -16,12 +16,12 @@
echo "Setting environment variables"
# The JRE java.exe to be used by Ant. Note: for WTP 2.0 the JDK needs to be 1.5 or higher.
-JAVAEXE=/home/tester/sunjdk/j2sdk1.5.0/bin/java
+JAVAEXE=/home/tester/jdk1.5.0/jre/bin/java
# The Eclipse install directory. Some Eclipse based products may refer to this directory
# as the non shared directory.
-INSTALL_DIRECTORY=/wtp/eclipse
+INSTALL_DIRECTORY=/productdirectory/eclipse
# The shared Eclipse features directory. Some Eclipse based products may split their
# directory structure into shared and non shared folders. The variable below should be
@@ -35,7 +35,7 @@
# The location of your workspace
-WORKSPACE=/home/tester/workspace_1116b
+WORKSPACE=/home/tester/workspace
run() {
set -v
diff --git a/bundles/org.eclipse.wst.ws.explorer/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.ws.explorer/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..a4a40b2
--- /dev/null
+++ b/bundles/org.eclipse.wst.ws.explorer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Sep 26 05:47:31 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.wst.ws.explorer/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.ws.explorer/META-INF/MANIFEST.MF
index 843d9f6..6e5fc82 100644
--- a/bundles/org.eclipse.wst.ws.explorer/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.ws.explorer/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.ws.explorer; singleton:=true
-Bundle-Version: 1.0.304.qualifier
+Bundle-Version: 1.0.206.qualifier
Bundle-ClassPath: explorer.jar,
wsexplorer-properties.jar
Bundle-Activator: org.eclipse.wst.ws.internal.explorer.plugin.ExplorerPlugin
diff --git a/bundles/org.eclipse.wst.ws.explorer/icons/registry.gif b/bundles/org.eclipse.wst.ws.explorer/icons/launchWSE.gif
similarity index 100%
rename from bundles/org.eclipse.wst.ws.explorer/icons/registry.gif
rename to bundles/org.eclipse.wst.ws.explorer/icons/launchWSE.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.ws.explorer/plugin.xml b/bundles/org.eclipse.wst.ws.explorer/plugin.xml
index 3b9aa0f..141ad31 100644
--- a/bundles/org.eclipse.wst.ws.explorer/plugin.xml
+++ b/bundles/org.eclipse.wst.ws.explorer/plugin.xml
@@ -71,7 +71,7 @@
</menu>
<action
label="%COMMAND_LAUNCH_WS_EXPLORER"
- icon="icons/registry.gif"
+ icon="icons/launchWSE.gif"
tooltip="%TOOLTIP_LAUNCH_WS_EXPLORER"
class="org.eclipse.wst.ws.internal.explorer.action.LaunchWSEAction"
menubarPath="org.eclipse.ui.run/explorer"
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLElement.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLElement.java
index 7530a43..a27ea80 100644
--- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLElement.java
+++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLElement.java
@@ -11,6 +11,7 @@
* -------- -------- -----------------------------------------------------------
* 20060717 146707 mahutch@ca.ibm.com - Mark Hutchinson
* 20070124 167487 gilberta@ca.ibm.com - Gilbert Andrews
+ * 20080115 214955 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
package org.eclipse.wst.ws.internal.explorer.platform.wsdl.datamodel;
@@ -213,26 +214,22 @@
schemaList_.addElement(xsdSchema);
gatherSchemaDirective(xsdSchema, definitionURL);
}
- }
- }
- else if (obj instanceof XSDSchemaExtensibilityElementImpl)
- {
- XSDSchemaExtensibilityElementImpl schemaElement = (XSDSchemaExtensibilityElementImpl)obj;
- xsdSchema = XSDSchemaImpl.createSchema(schemaElement.getElement());
- if(!checkSchemaURI(definitionURL)){
- schemaList_.addElement(xsdSchema);
- gatherSchemaDirective(xsdSchema, definitionURL);
- }
- }
-
- if (xsdSchema != null)
- {
- //We need to add the schema to a Resource in a Resource set for proper validation
+ //We need to add the schema to a Resource in a Resource set for proper validation
org.eclipse.emf.common.util.URI uri = org.eclipse.emf.common.util.URI.createURI(definitionURL);
Resource resource = resourceSet.createResource(uri);
//Add the Schema to the resource
resource.getContents().add(xsdSchema);
- }
+ }
+ }
+ else if (obj instanceof XSDSchemaExtensibilityElementImpl)
+ {
+ XSDSchemaExtensibilityElementImpl schemaElement = (XSDSchemaExtensibilityElementImpl)obj;
+ xsdSchema = schemaElement.getSchema();
+ if(!schemaList_.contains(xsdSchema)){
+ schemaList_.addElement(xsdSchema);
+ gatherSchemaDirective(xsdSchema, definitionURL);
+ }
+ }
}
}
}
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java
index 94282ac..97088de 100644
--- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java
+++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java
@@ -86,6 +86,8 @@
{
soapOperation = (SOAPOperation)e;
soapAction_ = soapOperation.getSoapActionURI();
+ if(soapAction_ == null) soapAction_ = "";
+
String style = soapOperation.getStyle();
if (style != null)
isDocumentStyle_ = style.equals("document");
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/fragment/XSDComplexRangeWFragmentJSP.jsp b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/fragment/XSDComplexRangeWFragmentJSP.jsp
index 2c17d15..827f19e 100644
--- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/fragment/XSDComplexRangeWFragmentJSP.jsp
+++ b/bundles/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/fragment/XSDComplexRangeWFragmentJSP.jsp
@@ -8,6 +8,9 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20080201 197865 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*,
@@ -61,7 +64,7 @@
<a href="javascript:createInstance('<%=tableContainerID%>', <%=xsdConfig.getMaxOccurs()%>, '<%=fragID%>', '<%=nameAnchorID%>')"><%=wsdlPerspective.getMessage("FORM_LINK_ADD")%></a>
</td>
<td class="labels" height=25 valign="bottom" align="left" nowrap>
- <a href="javascript:checkMinOccursAndRemoveSelectedRowsAttribute('<%=tableContainerID%>', <%=xsdConfig.getMinOccurs()%>)"><%=wsdlPerspective.getMessage("FORM_LINK_REMOVE")%></a>
+ <a href="javascript:checkMinOccursAndRemoveSelectedRows('<%=tableContainerID%>', <%=xsdConfig.getMinOccurs()%>)"><%=wsdlPerspective.getMessage("FORM_LINK_REMOVE")%></a>
</td>
<td nowrap width="90%"> </td>
</tr>
diff --git a/bundles/org.eclipse.wst.ws/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.ws/META-INF/MANIFEST.MF
index a3944c7..5869493 100644
--- a/bundles/org.eclipse.wst.ws/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.ws/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.ws; singleton:=true
-Bundle-Version: 1.0.203.qualifier
+Bundle-Version: 1.0.204.qualifier
Bundle-Activator: org.eclipse.wst.ws.internal.plugin.WSPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/preferences/MergeDefaults.java b/bundles/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/preferences/MergeDefaults.java
index 2364a8c..9625998 100644
--- a/bundles/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/preferences/MergeDefaults.java
+++ b/bundles/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/preferences/MergeDefaults.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
* 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
@@ -10,12 +10,13 @@
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20060403 128827 kathy@ca.ibm.com - Kathy Chan
+ * 20071109 209075 kathy@ca.ibm.com - Kathy Chan
*******************************************************************************/
package org.eclipse.wst.ws.internal.preferences;
public class MergeDefaults
{
- private static final boolean PREFERENCE_SKELETON_MERGE_DEFAULT = false;
+ private static final boolean PREFERENCE_SKELETON_MERGE_DEFAULT = true;
/**
*
diff --git a/bundles/org.eclipse.wst.wsdl.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.wsdl.ui/META-INF/MANIFEST.MF
index f95d72f..f81c845 100644
--- a/bundles/org.eclipse.wst.wsdl.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.wsdl.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %_UI_PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.wsdl.ui; singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.2.qualifier
Bundle-Activator: org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java
index 9c67dee..4834699 100644
--- a/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java
+++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/InternalWSDLMultiPageEditor.java
@@ -14,6 +14,7 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
@@ -25,6 +26,7 @@
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.gef.ui.actions.GEFActionConstants;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.IPostSelectionProvider;
import org.eclipse.jface.viewers.ISelection;
@@ -34,11 +36,14 @@
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.search.ui.text.ISearchEditorAccess;
+import org.eclipse.search.ui.text.Match;
import org.eclipse.swt.SWT;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
@@ -236,6 +241,33 @@
else if (type == IOpenExternalEditorHelper.class) {
return new W11OpenExternalEditorHelper(((IFileEditorInput) getEditorInput()).getFile());
}
+ else if (type == ISearchEditorAccess.class)
+ {
+ return new ISearchEditorAccess()
+ {
+ public IDocument getDocument(Match match)
+ {
+ IDocument document = null;
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor != null)
+ {
+ document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+ }
+ return document;
+ }
+
+ public IAnnotationModel getAnnotationModel(Match match)
+ {
+ IAnnotationModel annoModel = null;
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor != null)
+ {
+ annoModel = textEditor.getDocumentProvider().getAnnotationModel(textEditor.getEditorInput());
+ }
+ return annoModel;
+ }
+ };
+ }
return super.getAdapter(type);
}
diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java
index 33bb044..0b1eaab 100644
--- a/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java
+++ b/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/actions/SmartRenameAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2007 IBM Corporation and others.
* 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
@@ -10,10 +10,13 @@
*******************************************************************************/
package org.eclipse.wst.wsdl.ui.internal.actions;
+import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Vector;
+import javax.wsdl.BindingOperation;
import javax.xml.namespace.QName;
import org.eclipse.wst.wsdl.Binding;
@@ -28,6 +31,7 @@
import org.eclipse.wst.wsdl.Port;
import org.eclipse.wst.wsdl.PortType;
import org.eclipse.wst.wsdl.WSDLElement;
+import org.eclipse.wst.wsdl.binding.soap.SOAPOperation;
import org.eclipse.wst.wsdl.ui.internal.Messages;
import org.eclipse.wst.wsdl.ui.internal.commands.AddBaseParameterCommand;
import org.eclipse.wst.wsdl.ui.internal.util.WSDLEditorUtil;
@@ -112,6 +116,56 @@
}
*/
+
+ //
+ WSDLElement wsdlElement = operation.getContainer();
+ if (wsdlElement instanceof PortType) {
+ PortType portType = (PortType) wsdlElement;
+ Map bindings = portType.getEnclosingDefinition().getBindings();
+ Collection values = bindings.values();
+ Iterator iterator = values.iterator();
+ while (iterator.hasNext()) {
+ Binding binding = (Binding) iterator.next();
+
+ // Find only Bindings which reference the modified PortType-->Operation
+ if (binding.getPortType().equals(portType)) {
+ String operationInputName = null;
+ String operationOutputName = null;
+ if(operation.getInput() != null) {
+ operationInputName = operation.getInput().getName();
+ }
+ if(operation.getOutput() != null) {
+ operationOutputName = operation.getOutput().getName();
+ }
+
+ BindingOperation bindingOperation = binding.getBindingOperation(operation.getName(), operationInputName , operationOutputName);
+ // There may be no binding content in which case bindingOperation would be null
+ if (bindingOperation != null) {
+ List extensibilityElements = bindingOperation.getExtensibilityElements();
+ Iterator extensibilityElementsIterator = extensibilityElements.iterator();
+ while (extensibilityElementsIterator.hasNext()) {
+ Object object = extensibilityElementsIterator.next();
+ if(object instanceof SOAPOperation) {
+ SOAPOperation soapOperation = (SOAPOperation) object;
+ String soapActionURI = soapOperation.getSoapActionURI();
+
+ // Check if the old soapActionURI is a generated String. If it's not
+ // generated, leave it. It means a user has edited and we shouldn't touch it.
+ String tns = operation.getEnclosingDefinition().getTargetNamespace();
+ if (computeSOAPActionURI(tns, oldName).equals(soapActionURI)) {
+ // Chop off the Operation name at the end and append the new name.
+ String newSOAPActionURI = soapActionURI.substring(0, soapActionURI.length() - oldName.length());
+ newSOAPActionURI = newSOAPActionURI + newName;
+ soapOperation.setSoapActionURI(newSOAPActionURI);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
// Rename Messages and Parts
Message msg;
@@ -322,6 +376,13 @@
endRecording();
}
+ private String computeSOAPActionURI(String tns, String operationName) {
+ // We need more investigation here. We should take a look at how this SOAPActionURI
+ // is generated in the first place. One issue I see here is the trailing slash of the
+ // targetnamespace. More specifically, the lack of one. If there is no trailing slash,
+ // does it add one?
+ return tns + operationName;
+ }
// boolean isInputOutput should be set to true if the part is an Input or Output.
// Set false if the part is a Fault.
private void renamePartsHelper(List partsList, String oldSubString, String newSubString, boolean isInputOutput) {
diff --git a/bundles/org.eclipse.wst.wsdl/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.wsdl/META-INF/MANIFEST.MF
index 38bbc19..1555303 100644
--- a/bundles/org.eclipse.wst.wsdl/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.wsdl/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.wsdl; singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.101.qualifier
Bundle-Activator: org.eclipse.wst.wsdl.WSDLPluginImplementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/WSDLElementImpl.java b/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/WSDLElementImpl.java
index a60a27b..d2888af 100644
--- a/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/WSDLElementImpl.java
+++ b/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/WSDLElementImpl.java
@@ -1586,13 +1586,36 @@
protected String getNamespace(Element element)
{
String name = element.getTagName();
- int index = name.indexOf(":");
- if (index == -1)
- return null;
- else if (getEnclosingDefinition() != null)
- return getEnclosingDefinition().getNamespace(name.substring(0, index));
+ int index = name.indexOf(":"); //$NON-NLS-1$
+ String nsPrefix = null;
+ if (index != -1)
+ {
+ nsPrefix = name.substring(0, index);
+ }
else
- return null;
+ {
+ nsPrefix = "xmlns"; //$NON-NLS-1$
+ }
+
+ String namespaceURI = null;
+
+ // First try to locate the namespace URI in the definition's prefix to namespace map.
+ // This will provide backward compatibility for existing clients.
+
+ Definition enclosingDefinition = getEnclosingDefinition();
+ if (enclosingDefinition != null)
+ {
+ namespaceURI = enclosingDefinition.getNamespace(nsPrefix);
+ }
+
+ // We did not find it at the top level, try to find a locally defined namespace prefix.
+
+ if (namespaceURI == null)
+ {
+ namespaceURI = getNamespaceURIFromPrefix(element, nsPrefix);
+ }
+
+ return namespaceURI;
}
protected String getLocalName(Element element)
diff --git a/docs/org.eclipse.jst.ws.infopop/META-INF/MANIFEST.MF b/docs/org.eclipse.jst.ws.infopop/META-INF/MANIFEST.MF
index b5016c5..c29c76a 100644
--- a/docs/org.eclipse.jst.ws.infopop/META-INF/MANIFEST.MF
+++ b/docs/org.eclipse.jst.ws.infopop/META-INF/MANIFEST.MF
@@ -2,6 +2,6 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.jst.ws.infopop; singleton:=true
-Bundle-Version: 1.0.202.qualifier
+Bundle-Version: 1.0.203.qualifier
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
diff --git a/docs/org.eclipse.jst.ws.infopop/build.properties b/docs/org.eclipse.jst.ws.infopop/build.properties
index e30e471..27bfb4e 100644
--- a/docs/org.eclipse.jst.ws.infopop/build.properties
+++ b/docs/org.eclipse.jst.ws.infopop/build.properties
@@ -1,5 +1,5 @@
bin.includes = plugin.xml,\
webserviceui-f1Contexts.xml,\
about.html,\
- META-INF/
-src.includes = build.properties
+ META-INF/,\
+ plugin.properties
diff --git a/features/org.eclipse.wst.ws_core.feature/feature.xml b/features/org.eclipse.wst.ws_core.feature/feature.xml
index af32fc1..2d83bfe 100644
--- a/features/org.eclipse.wst.ws_core.feature/feature.xml
+++ b/features/org.eclipse.wst.ws_core.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.ws_core.feature"
label="%featureName"
- version="2.0.0.qualifier"
+ version="2.0.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/features/org.eclipse.wst.ws_core.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.ws_core.feature/sourceTemplateFeature/feature.xml
index b847664..e200f04 100644
--- a/features/org.eclipse.wst.ws_core.feature/sourceTemplateFeature/feature.xml
+++ b/features/org.eclipse.wst.ws_core.feature/sourceTemplateFeature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.ws_core.feature.source"
label="%featureName"
- version="2.0.0.qualifier"
+ version="2.0.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/features/org.eclipse.wst.ws_sdk.feature/feature.xml b/features/org.eclipse.wst.ws_sdk.feature/feature.xml
index 7e27625..7c40d1e 100644
--- a/features/org.eclipse.wst.ws_sdk.feature/feature.xml
+++ b/features/org.eclipse.wst.ws_sdk.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.ws_sdk.feature"
label="%featureName"
- version="2.0.0.qualifier"
+ version="2.0.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/features/org.eclipse.wst.ws_tests.feature/feature.xml b/features/org.eclipse.wst.ws_tests.feature/feature.xml
index ac9654d..a40a7ce 100644
--- a/features/org.eclipse.wst.ws_tests.feature/feature.xml
+++ b/features/org.eclipse.wst.ws_tests.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.ws_tests.feature"
label="%featureName"
- version="2.0.0.qualifier"
+ version="2.0.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/features/org.eclipse.wst.ws_ui.feature/feature.xml b/features/org.eclipse.wst.ws_ui.feature/feature.xml
index 77609c6..b210693 100644
--- a/features/org.eclipse.wst.ws_ui.feature/feature.xml
+++ b/features/org.eclipse.wst.ws_ui.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.ws_ui.feature"
label="%featureName"
- version="2.0.0.qualifier"
+ version="2.0.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/features/org.eclipse.wst.ws_ui.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.ws_ui.feature/sourceTemplateFeature/feature.xml
index 131fa9e..9264789 100644
--- a/features/org.eclipse.wst.ws_ui.feature/sourceTemplateFeature/feature.xml
+++ b/features/org.eclipse.wst.ws_ui.feature/sourceTemplateFeature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.ws_ui.feature.source"
label="%featureName"
- version="2.0.0.qualifier"
+ version="2.0.2.qualifier"
provider-name="%featureProvider">
<description>
diff --git a/tests/org.eclipse.jst.ws.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.ws.tests/META-INF/MANIFEST.MF
index 4116de7..7fb93e7 100644
--- a/tests/org.eclipse.jst.ws.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.ws.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.jst.ws.tests;singleton:=true
-Bundle-Version: 1.0.201.qualifier
+Bundle-Version: 1.0.202.qualifier
Bundle-ClassPath: tests.jar
Bundle-Activator: org.eclipse.jst.ws.tests.plugin.TestsPlugin
Bundle-Vendor: %PLUGIN_PROVIDER
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/WSWizardTest.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/WSWizardTest.java
index 9442269..98dbeda 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/WSWizardTest.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/WSWizardTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
* 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
@@ -10,15 +10,21 @@
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 2007104 114835 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071217 187280 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080207 217346 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests;
import junit.framework.TestCase;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jst.ws.tests.plugin.TestsPlugin;
import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
import org.eclipse.jst.ws.tests.util.JUnitUtils;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.wst.command.internal.env.context.PersistentResourceContext;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
import org.eclipse.wst.command.internal.env.eclipse.EclipseEnvironment;
import org.eclipse.wst.command.internal.env.ui.eclipse.EclipseStatusHandler;
import org.eclipse.wst.common.environment.IEnvironment;
@@ -205,4 +211,36 @@
url.append(path);
return url.toString();
}
+
+ protected void logBadStatus(IStatus status)
+ {
+ TestsPlugin.getDefault().getLog().log(StatusUtils.infoStatus("*** JST.WS JUNIT ERROR (START) ***"));
+ TestsPlugin.getDefault().getLog().log(status);
+ TestsPlugin.getDefault().getLog().log(StatusUtils.infoStatus("*** JST.WS JUNIT ERROR (END) ***"));
+ }
+
+ /**
+ * Spin the event loop for awhile to give background activity a chance to
+ * die down. This decreases the chance that unrelated background work will
+ * affect results for the scenario being tested.
+ *
+ * @param duration
+ * The time in milliseconds to spin the event loop.
+ */
+ protected void runEventLoop(final int duration) {
+ final Display display = Display.getDefault();
+ Runnable update = new Runnable() {
+ public void run() {
+ long start = System.currentTimeMillis();
+ while (System.currentTimeMillis() - start < duration) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ }
+ };
+ if (Display.getCurrent() == null)
+ display.syncExec(update);
+ else
+ update.run();
+ }
}
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/AllWSJUnitTests.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/AllWSJUnitTests.java
index 426dc9e..31f52d0 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/AllWSJUnitTests.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/AllWSJUnitTests.java
@@ -10,7 +10,10 @@
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 2007104 114835 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070314 176886 pmoogk@ca.ibm.com - Peter Moogk
+ * 20070314 176886 pmoogk@ca.ibm.com - Peter Moogk
+ * 20071030 208124 kathy@ca.ibm.com - Kathy Chan
+ * 20071031 208124 kathy@ca.ibm.com - Kathy Chan
+ * 20071116 208124 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests.unittest;
@@ -78,10 +81,10 @@
// Tests which require a Tomcat server
String s = System.getProperty("org.eclipse.jst.server.tomcat.50");
if (s != null && s.length() > 0) {
- testSuite.addTest( ServerCreationTests.suite());
testSuite.addTest( BUJavaAxisTC50.suite() );
testSuite.addTest( TDJavaAxisTC50.suite() );
testSuite.addTest( ClientAxisTC50.suite() );
+ testSuite.addTest( ServerCreationTests.suite());
}
testSuite.addTest( ResourceUtilsTests.suite() );
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/BUJavaAxisTC50.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/BUJavaAxisTC50.java
index cf96d45..af368e2 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/BUJavaAxisTC50.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/BUJavaAxisTC50.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
* 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
@@ -11,6 +11,9 @@
* -------- -------- -----------------------------------------------------------
* 20070104 114835 sengpl@ca.ibm.com - Seng Phung-Lu
* 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071116 208124 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071217 187280 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080207 217346 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests.unittest;
@@ -99,7 +102,8 @@
protected void initJ2EEWSRuntimeServerDefaults() throws Exception
{
// Set default preferences for Axis and Tomcat 5.0
- JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
+ JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
+ JUnitUtils.setServiceScenarioDefault();
}
/**
@@ -136,19 +140,30 @@
IFolder webContentFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
IFolder wsdlFolder = webContentFolder.getFolder("wsdl");
+ if (!wsdlFolder.exists()){
+ runEventLoop(3000);
+ System.out.println("Running event loop..");
+ }
assertTrue(wsdlFolder.exists());
+ System.out.println("BU wsdl folder exists? = "+wsdlFolder.exists());
+
+ if (!(wsdlFolder.members().length > 0)){
+ runEventLoop(3000);
+ System.out.println("Running event loop..");
+ }
assertTrue(wsdlFolder.members().length > 0);
- assertTrue(webContentFolder.getFolder("wsdl").members().length > 0);
+ System.out.println("BU wsdl file exists? = " + (wsdlFolder.members().length > 0));
AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
IStatus[] s = statusHandler.getErrorReports();
//
if (s.length > 0){
for (int i=0;i<s.length;i++){
+ logBadStatus(s[i]);
System.out.println("Error message for report #"+i+": "+s[i].getMessage());
}
}
- assertTrue(s.length == 0);
+ assertEquals("BU Unexpected number of client error reports", 0, s.length);
}
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/ClientAxisTC50.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/ClientAxisTC50.java
index 204e42e..72b64b3 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/ClientAxisTC50.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/ClientAxisTC50.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
* 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
@@ -11,6 +11,9 @@
* -------- -------- -----------------------------------------------------------
* 20070104 114835 sengpl@ca.ibm.com - Seng Phung-Lu
* 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071116 208124 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071217 187280 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080207 217346 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests.unittest;
@@ -91,6 +94,7 @@
protected void initJ2EEWSRuntimeServerDefaults() throws Exception {
// Set default preferences for Axis and Tomcat 5.0
JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
+ JUnitUtils.setClientScenarioDefault();
}
/**
@@ -118,7 +122,7 @@
}
/**
- * Verify the scenario completed succesfully
+ * Verify the scenario completed successfully
* @throws Exception
*/
private final void verifyOutput(IStatus[] status) throws Exception {
@@ -129,7 +133,18 @@
//IFolder srcFolder = JUnitUtils.getSourceFolderForWebProject(CLIENT_PROJECT_NAME);
IFolder folder = srcFolder.getFolder("foo");
+ if (!folder.exists()){
+ runEventLoop(3000);
+ System.out.println("Running event loop..");
+ }
assertTrue(folder.exists());
+ System.out.println("Client java package exists? = "+folder.exists());
+
+ if (!(folder.members().length > 0)){
+ runEventLoop(3000);
+ System.out.println("Running event loop..");
+ }
+ System.out.println("Client Java files exists? = "+(folder.members().length > 0));
assertTrue(folder.members().length > 0);
// Check status handler for errors
@@ -137,10 +152,11 @@
IStatus[] s = statusHandler.getErrorReports();
if (s.length > 0){
for (int i=0;i<s.length;i++){
+ logBadStatus(s[i]);
System.out.println("Error message for report #"+i+": "+s[i].getMessage());
}
}
- assertTrue(s.length == 0);
+ assertEquals("Client Unexpected number of client error reports", 0, s.length);
}
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/TDJavaAxisTC50.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/TDJavaAxisTC50.java
index c26eac2..9da86d9 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/TDJavaAxisTC50.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/TDJavaAxisTC50.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
* 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
@@ -11,6 +11,9 @@
* -------- -------- -----------------------------------------------------------
* 20070104 114835 sengpl@ca.ibm.com - Seng Phung-Lu
* 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071116 208124 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071217 187280 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080207 217346 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests.unittest;
@@ -89,7 +92,8 @@
*/
protected void initJ2EEWSRuntimeServerDefaults() throws Exception {
// Set default preferences for Axis and Tomcat v5.0 server
- JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
+ JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC50);
+ JUnitUtils.setServiceScenarioDefault();
}
/**
@@ -122,8 +126,19 @@
IFolder wsdlFolder = webContentFolder.getFolder("wsdl");
+ if (!wsdlFolder.exists()){
+ runEventLoop(3000);
+ System.out.println("Running event loop..");
+ }
assertTrue(wsdlFolder.exists());
+ System.out.println("TD wsdl folder exists? = "+wsdlFolder.exists());
+
+ if (!(wsdlFolder.members().length > 0)){
+ runEventLoop(3000);
+ System.out.println("Running event loop..");
+ }
assertTrue(wsdlFolder.members().length > 0);
+ System.out.println("TD wsdl file exists? = " + (wsdlFolder.members().length > 0));
// Check status handler for errors
AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
@@ -131,10 +146,11 @@
//
if (s.length > 0){
for (int i=0;i<s.length;i++){
+ logBadStatus(s[i]);
System.out.println("Error message for report #"+i+": "+s[i].getMessage());
}
}
- assertTrue(s.length == 0);
+ assertEquals("TD Unexpected number of client error reports", 0, s.length);
}
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/WSJUnitConstants.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/WSJUnitConstants.java
index dad9f4d..c7624ba 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/WSJUnitConstants.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/unittest/WSJUnitConstants.java
@@ -10,6 +10,7 @@
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071116 208124 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests.unittest;
@@ -21,7 +22,7 @@
public final String SERVER_INSTALL_PATH = System.getProperty("org.eclipse.jst.server.tomcat.50");
public final String RUNTIMETYPEID_TC50 = "org.eclipse.jst.server.tomcat.runtime.50";
- public final String WS_RUNTIMEID_AXIS = "org.eclipse.jst.ws.runtime.axis11";
+ public final String WS_RUNTIMEID_AXIS = "org.eclipse.jst.ws.axis.creation.axisWebServiceRT";
public final String WS_RUNTIMEID_AXIS2 = "org.eclipse.jst.ws.runtime.axis2";
public final String WS_AXIS2_RUNTIME = "org.eclipse.jst.ws.axis2.creation.axis2WebServiceRT";
diff --git a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/util/JUnitUtils.java b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/util/JUnitUtils.java
index 52e771d..8c2aca9 100644
--- a/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/util/JUnitUtils.java
+++ b/tests/org.eclipse.jst.ws.tests/tests/org/eclipse/jst/ws/tests/util/JUnitUtils.java
@@ -14,6 +14,7 @@
* 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
* 20070509 180567 sengpl@ca.ibm.com - Seng Phung-Lu
* 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20071116 208124 sengpl@ca.ibm.com - Seng Phung-Lu
*******************************************************************************/
package org.eclipse.jst.ws.tests.util;
@@ -22,10 +23,7 @@
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -40,6 +38,7 @@
import org.eclipse.jst.ws.internal.consumption.command.common.CreateModuleCommand;
import org.eclipse.jst.ws.internal.consumption.ui.plugin.WebServiceConsumptionUIPlugin;
import org.eclipse.jst.ws.internal.consumption.ui.preferences.PersistentServerRuntimeContext;
+import org.eclipse.jst.ws.internal.context.PersistentScenarioContext;
import org.eclipse.jst.ws.internal.context.ScenarioContext;
import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
import org.eclipse.jst.ws.tests.plugin.TestsPlugin;
@@ -62,9 +61,6 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.validation.internal.ConfigurationManager;
-import org.eclipse.wst.validation.internal.GlobalConfiguration;
-import org.eclipse.wst.validation.internal.ValidatorMetaData;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
import org.eclipse.wst.ws.internal.plugin.WSPlugin;
import org.eclipse.wst.ws.internal.preferences.PersistentWSIContext;
@@ -383,4 +379,28 @@
return true;
}
+ public static void setServiceScenarioDefault() {
+ PersistentScenarioContext context = (PersistentScenarioContext)WebServicePlugin.getInstance().getScenarioContext();
+ context.setGenerateProxy( false );
+ context.setLaunchWebServiceExplorer( false );
+ context.setInstallWebService( false );
+ context.setInstallClient( false );
+ context.setStartWebService( false );
+ context.setTestWebService( false );
+ context.setMonitorWebService(false);
+ context.setGenerateWebService(ScenarioContext.WS_DEVELOP);
+ }
+
+ public static void setClientScenarioDefault() {
+ PersistentScenarioContext context = (PersistentScenarioContext)WebServicePlugin.getInstance().getScenarioContext();
+ context.setGenerateProxy( true );
+ context.setLaunchWebServiceExplorer( false );
+ context.setInstallWebService( false );
+ context.setInstallClient( false );
+ context.setStartWebService( false );
+ context.setTestWebService( false );
+ context.setMonitorWebService(false);
+ context.setGenerateClient(ScenarioContext.WS_DEVELOP);
+ }
+
}
diff --git a/tests/org.eclipse.wst.wsdl.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.wsdl.tests/META-INF/MANIFEST.MF
index 34b128d..dc8b1fa 100644
--- a/tests/org.eclipse.wst.wsdl.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.wsdl.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.wsdl.tests; singleton:=true
-Bundle-Version: 1.0.3.qualifier
+Bundle-Version: 1.0.4.qualifier
Bundle-Activator: org.eclipse.wst.wsdl.tests.WSDLTestsPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/tests/org.eclipse.wst.wsdl.tests/samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl b/tests/org.eclipse.wst.wsdl.tests/samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl
new file mode 100644
index 0000000..30b2ee3
--- /dev/null
+++ b/tests/org.eclipse.wst.wsdl.tests/samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:tns="http://www.example.org/example/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="example"
+ targetNamespace="http://www.example.org/example/">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.example.org/example/">
+ <xsd:element name="NewOperation">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="in" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="NewOperationResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="out" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="NewOperationRequest">
+ <wsdl:part element="tns:NewOperation" name="parameters" />
+ </wsdl:message>
+ <wsdl:message name="NewOperationResponse">
+ <wsdl:part element="tns:NewOperationResponse" name="parameters" />
+ </wsdl:message>
+ <wsdl:portType name="example">
+ <wsdl:operation name="NewOperation">
+ <wsdl:input message="tns:NewOperationRequest" />
+ <wsdl:output message="tns:NewOperationResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ name="exampleSOAP" type="tns:example">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="NewOperation">
+ <soap:operation
+ soapAction="http://www.example.org/example/NewOperation" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="example">
+ <wsdl:port xmlns="http://schemas.xmlsoap.org/wsdl/soap/"
+ binding="tns:exampleSOAP" name="exampleSOAP">
+ <address location="http://www.example.org/" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.wsdl.tests/src/org/eclipse/wst/wsdl/tests/BugFixesTest.java b/tests/org.eclipse.wst.wsdl.tests/src/org/eclipse/wst/wsdl/tests/BugFixesTest.java
index d92d085..7757d2e 100644
--- a/tests/org.eclipse.wst.wsdl.tests/src/org/eclipse/wst/wsdl/tests/BugFixesTest.java
+++ b/tests/org.eclipse.wst.wsdl.tests/src/org/eclipse/wst/wsdl/tests/BugFixesTest.java
@@ -18,7 +18,10 @@
import java.util.List;
import javax.wsdl.OperationType;
+import javax.wsdl.Port;
+import javax.wsdl.WSDLException;
import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
@@ -47,6 +50,7 @@
import org.eclipse.wst.wsdl.Types;
import org.eclipse.wst.wsdl.WSDLFactory;
import org.eclipse.wst.wsdl.WSDLPackage;
+import org.eclipse.wst.wsdl.WSDLPlugin;
import org.eclipse.wst.wsdl.XSDSchemaExtensibilityElement;
import org.eclipse.wst.wsdl.binding.mime.MIMEContent;
import org.eclipse.wst.wsdl.binding.mime.MIMEFactory;
@@ -221,6 +225,14 @@
}
});
+ suite.addTest(new BugFixesTest("SupportsLocalNSForExtensibilityElements") //$NON-NLS-1$
+ {
+ protected void runTest()
+ {
+ testSupportsLocalNSForExtensibilityElements();
+ }
+ });
+
return suite;
}
@@ -1062,6 +1074,61 @@
Assert.fail("Test failed due to an exception: " + e.getLocalizedMessage());
}
}
+
+ /**
+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=198390
+ */
+ public void testSupportsLocalNSForExtensibilityElements()
+ {
+ try
+ {
+ String uri = PLUGIN_ABSOLUTE_PATH + "samples/BugFixes/LocalNamespace/LocalNamespace2.wsdl"; //$NON-NLS-1$
+ javax.wsdl.factory.WSDLFactory factory = WSDLPlugin.INSTANCE.createWSDL4JFactory();
+ WSDLReader wsdlReader = factory.newWSDLReader();
+ javax.wsdl.Definition definition = wsdlReader.readWSDL(uri);
+
+ String targetNamespace = "http://www.example.org/example/"; //$NON-NLS-1$
+
+ // Test a local SOAP namespace prefix declaration.
+
+ QName bindingQName = new QName(targetNamespace, "exampleSOAP"); //$NON-NLS-1$
+ javax.wsdl.Binding binding = definition.getBinding(bindingQName);
+ assertNotNull(binding);
+ List extensibilityElements = binding.getExtensibilityElements();
+ assertEquals(1, extensibilityElements.size());
+ ExtensibilityElement soapBinding = (ExtensibilityElement)extensibilityElements.get(0);
+ assertNotNull(soapBinding);
+ QName bindingElementType = soapBinding.getElementType();
+ assertNotNull(bindingElementType);
+ String localPart = bindingElementType.getLocalPart();
+ assertEquals(SOAPConstants.BINDING_ELEMENT_TAG, localPart);
+ String namespaceURI = bindingElementType.getNamespaceURI();
+ assertEquals(SOAPConstants.SOAP_NAMESPACE_URI, namespaceURI);
+ assertTrue(soapBinding instanceof javax.wsdl.extensions.soap.SOAPBinding);
+
+ // Test a default SOAP namespace declaration at the port level.
+
+ QName serviceQName = new QName(targetNamespace, "example"); //$NON-NLS-1$
+ javax.wsdl.Service service = definition.getService(serviceQName);
+ Port port = service.getPort("exampleSOAP");
+ extensibilityElements = port.getExtensibilityElements();
+ assertEquals(1, extensibilityElements.size());
+ ExtensibilityElement soapAddress = (ExtensibilityElement)extensibilityElements.get(0);
+ assertNotNull(soapAddress);
+ QName portElementType = soapAddress.getElementType();
+ assertNotNull(portElementType);
+ localPart = portElementType.getLocalPart();
+ assertEquals(SOAPConstants.ADDRESS_ELEMENT_TAG, localPart);
+ namespaceURI = portElementType.getNamespaceURI();
+ assertEquals(SOAPConstants.SOAP_NAMESPACE_URI, namespaceURI);
+ assertTrue(soapAddress instanceof javax.wsdl.extensions.soap.SOAPAddress);
+ }
+ catch (WSDLException e)
+ {
+ e.printStackTrace();
+ fail();
+ }
+ }
private Element getNextElement(Element anElement)
{