### Eclipse Workspace Patch 1.0 #P org.eclipse.jst.ws.consumption.ui Index: src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java,v retrieving revision 1.22 diff -u -r1.22 ConsumptionUIMessages.java --- src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java 31 Oct 2007 17:40:08 -0000 1.22 +++ src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java 5 Mar 2008 21:13:34 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 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 @@ -26,6 +26,7 @@ * 20060509 119296 pmoogk@ca.ibm.com - Peter Moogk * 20060719 139977 kathy@ca.ibm.com - Kathy Chan * 20071031 140518 joan@ca.ibm.com - Joan Haggarty + * 20080305 215084 gilberta@ca.ibm.com - Gilbert Andrews *******************************************************************************/ package org.eclipse.jst.ws.internal.consumption.ui; @@ -125,6 +126,7 @@ public static String MSG_MODULE; public static String MSG_MODULE_NAME_AND_PROJECT_NAME_NOT_THE_SAME; public static String MSG_SERVICE_RUNTIME_DOES_NOT_SUPPORT_PROJECT; + public static String MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_JAVAPROJECT; public static String MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_PROJECT; public static String MSG_SERVICE_RUNTIME_DOES_NOT_SUPPORT_TEMPLATE; public static String MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_TEMPLATE; Index: src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties,v retrieving revision 1.27 diff -u -r1.27 ConsumptionUI.properties --- src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties 31 Oct 2007 17:40:08 -0000 1.27 +++ src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties 5 Mar 2008 21:13:34 -0000 @@ -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 @@ -27,6 +27,7 @@ # 20060602 145054 kathy@ca.ibm.com - Kathy Chan # 20070427 177360 pmoogk@ca.ibm.com - Peter Moogk # 20071031 140518 joan@ca.ibm.com - Joan Haggarty +# 20080305 215084 gilberta@ca.ibm.com - Gilbert Andrews ############################################################################### # @@ -196,7 +197,8 @@ MSG_MODULE_NAME_AND_PROJECT_NAME_NOT_THE_SAME=The flexible project preference is off. Therefore, project names and module names must be the same for new modules. MSG_SERVICE_RUNTIME_DOES_NOT_SUPPORT_PROJECT=The {0} Web service runtime does not support the service project {1}. -MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_PROJECT=The {0} server does not support the service project {1}. +MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_PROJECT=The {0} server does not support the service project {1}. +MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_JAVAPROJECT The {0} server does not support the java project {1}. MSG_SERVICE_RUNTIME_DOES_NOT_SUPPORT_TEMPLATE=The {0} Web service runtime does not support the service project type {1}. MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_TEMPLATE=The {0} server does not support the service project type {1}. Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/WebServiceClientTypeWidget.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/WebServiceClientTypeWidget.java,v retrieving revision 1.41 diff -u -r1.41 WebServiceClientTypeWidget.java --- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/WebServiceClientTypeWidget.java 5 Feb 2008 20:35:30 -0000 1.41 +++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/WebServiceClientTypeWidget.java 5 Mar 2008 21:13:34 -0000 @@ -34,6 +34,7 @@ * 20070126 138484 kathy@ca.ibm.com - Kathy Chan * 20071130 203826 kathy@ca.ibm.com - Kathy Chan * 20080205 170141 kathy@ca.ibm.com - Kathy Chan + * 20080305 215084 gilberta@ca.ibm.com - Gilbert Andrews *******************************************************************************/ package org.eclipse.jst.ws.internal.consumption.ui.widgets; @@ -975,7 +976,7 @@ String earProjectName = getClientEarProjectName(); String projectTypeId = getClientComponentType(); IStatus possibleErrorStatus = valUtils.checkErrorStatus(validationState_, typeId, runtimeId, serverId, - serverInstanceId, projectName, needEar, earProjectName, projectTypeId, true); + serverInstanceId, projectName,"", needEar, earProjectName, projectTypeId, true); return possibleErrorStatus; } Index: src/org/eclipse/jst/ws/internal/consumption/ui/common/ValidationUtils.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ValidationUtils.java,v retrieving revision 1.34 diff -u -r1.34 ValidationUtils.java --- src/org/eclipse/jst/ws/internal/consumption/ui/common/ValidationUtils.java 5 Feb 2008 20:35:31 -0000 1.34 +++ src/org/eclipse/jst/ws/internal/consumption/ui/common/ValidationUtils.java 5 Mar 2008 21:13:34 -0000 @@ -23,6 +23,7 @@ * 20071107 203826 kathy@ca.ibm.com - Kathy Chan * 20071130 203826 kathy@ca.ibm.com - Kathy Chan * 20080205 170141 kathy@ca.ibm.com - Kathy Chan + * 20080305 215084 gilberta@ca.ibm.com - Gilbert Andrews *******************************************************************************/ package org.eclipse.jst.ws.internal.consumption.ui.common; @@ -79,9 +80,9 @@ import org.eclipse.wst.common.project.facet.core.VersionFormatException; import org.eclipse.wst.server.core.IRuntime; import org.eclipse.wst.server.core.IRuntimeType; +import org.eclipse.wst.server.core.IServer; import org.eclipse.wst.server.core.IServerType; import org.eclipse.wst.server.core.ServerCore; -import org.eclipse.wst.server.core.ServerUtil; import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; import org.eclipse.wst.ws.internal.wsrt.IWebServiceRuntimeChecker; import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario; @@ -271,7 +272,7 @@ * IStatus with severity IStatus.ERROR otherwise. */ public IStatus checkErrorStatus(int validationState, String typeId, String runtimeId, String serverId, - String serverInstanceId, String projectName, boolean needEar, String earProjectName, String projectTypeId, + String serverInstanceId, String projectName, String javaProjectName, boolean needEar, String earProjectName, String projectTypeId, boolean isClient) { // Ensure server, Web service runtime, and Web service type are @@ -468,7 +469,23 @@ } } - + if (validationState == VALIDATE_ALL || validationState == VALIDATE_SERVER_RUNTIME_CHANGES + || validationState == VALIDATE_PROJECT_CHANGES) { + if (serverInstanceId != null && serverInstanceId.length()>0 && !javaProjectName.equals("projectName")) + { + IServer server = ServerCore.findServer(serverInstanceId); + IRuntime sRuntime = server.getRuntime(); + org.eclipse.wst.common.project.facet.core.runtime.IRuntime facetRuntime = FacetUtil.getRuntime(sRuntime); + Set javaSet = FacetUtils.getFacetsForProject(javaProjectName); + if(!FacetUtils.doesRuntimeSupportFacets(facetRuntime, javaSet)){ + return StatusUtils.errorStatus(NLS.bind( + ConsumptionUIMessages.MSG_SERVICE_SERVER_DOES_NOT_SUPPORT_JAVAPROJECT, + new String[] { serverLabel, javaProjectName })); + } + + } + + } return Status.OK_STATUS; } #P org.eclipse.jst.ws.creation.ui Index: src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java,v retrieving revision 1.59 diff -u -r1.59 ServerWidgetBinding.java --- src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java 18 Dec 2007 22:34:05 -0000 1.59 +++ src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java 5 Mar 2008 21:13:34 -0000 @@ -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 @@ -29,6 +29,7 @@ * 20070502 180304 gilberta@ca.ibm.com - Gilbert Andrews * 20071031 140518 joan@ca.ibm.com - Joan Haggarty * 20071218 200193 gilberta@ca.ibm.com - Gilbert Andrews + * 20080305 215084 gilberta@ca.ibm.com - Gilbert Andrews *******************************************************************************/ package org.eclipse.jst.ws.internal.creation.ui.widgets.binding; @@ -153,6 +154,8 @@ dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "DeployClient", ServerWizardWidget.class); dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "StartClient", ServerWizardWidget.class); dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "TestClient", ServerWizardWidget.class); + dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "InitialProject", ServerWizardWidget.class); + // After ServerWizardWidget Index: src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java,v retrieving revision 1.61 diff -u -r1.61 ServerWizardWidget.java --- src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java 1 Mar 2008 13:30:12 -0000 1.61 +++ src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java 5 Mar 2008 21:13:34 -0000 @@ -51,6 +51,7 @@ * 20080205 170141 kathy@ca.ibm.com - Kathy Chan * 20080215 216337 pmoogk@ca.ibm.com - Peter Moogk * 20080301 221034 kathy@ca.ibm.com - Kathy Chan + * 20080305 215084 gilberta@ca.ibm.com - Gilbert Andrews *******************************************************************************/ package org.eclipse.jst.ws.internal.creation.ui.widgets; @@ -162,6 +163,7 @@ private TypeRuntimeServer ids_; private LabelsAndIds labelIds_; private String serviceProjectName_; + private IProject initialProject_; private String serviceEarProjectName_; private String serviceComponentType_; private WebServicesParser parser_; @@ -1180,7 +1182,7 @@ String earProjectName = getServiceEarProjectName(); String projectTypeId = getServiceComponentType(); IStatus serviceSideErrorStatus = valUtils.checkErrorStatus(validationState_, typeId, runtimeId, serverId, - serverInstanceId, projectName, needEar, earProjectName, projectTypeId, false); + serverInstanceId, projectName, initialProject_.getName(), needEar, earProjectName, projectTypeId, false); if (serviceSideErrorStatus.getSeverity() == IStatus.ERROR) { return serviceSideErrorStatus; } @@ -1295,6 +1297,11 @@ packSelf(); } + public void setInitialProject(IProject project) + { + initialProject_ = project; + } + public void setServiceEarProjectName(String name) { serviceEarProjectName_ = name;