Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 35111 Details for
Bug 119111
Exception with web service wizards when no server runtime installed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
apply to org.eclipse.jst.ws.consumption.ui
patch119111_o.e.jst.ws.consumption.ui.txt (text/plain), 66.24 KB, created by
Rupam Kuehner
on 2006-02-21 19:25:39 EST
(
hide
)
Description:
apply to org.eclipse.jst.ws.consumption.ui
Filename:
MIME Type:
Creator:
Rupam Kuehner
Created:
2006-02-21 19:25:39 EST
Size:
66.24 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.ws.consumption.ui >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/binding/ClientWidgetBinding.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/binding/ClientWidgetBinding.java,v >retrieving revision 1.26 >diff -u -r1.26 ClientWidgetBinding.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/binding/ClientWidgetBinding.java 6 Feb 2006 19:42:44 -0000 1.26 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/binding/ClientWidgetBinding.java 22 Feb 2006 00:24:17 -0000 >@@ -1,16 +1,17 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner > * 20060204 121605 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.binding; > >@@ -311,6 +312,7 @@ > dataRegistry.addMapping(WSDLSelectionOutputCommand.class, "WebServicesParser", CheckForServiceProjectCommand.class); > > // Setup the PreClientDevelopCommand. >+ dataRegistry.addMapping( ClientExtensionDefaultingCommand.class, "DeployClient", PreClientDevelopCommand.class); > dataRegistry.addMapping( ClientExtensionDefaultingCommand.class, "InstallClient", PreClientDevelopCommand.class); > > //Always start the client if it is installed. >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java,v >retrieving revision 1.34 >diff -u -r1.34 ProjectSelectionWidget.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java 6 Feb 2006 19:42:44 -0000 1.34 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java 22 Feb 2006 00:24:19 -0000 >@@ -1,15 +1,16 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124143 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 122661 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime; > >@@ -114,19 +115,15 @@ > > if (isClient_) > { >- projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_CLIENT_TYPE, INFOPOP_PWRS_COMBO_CLIENT_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER); >- moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >- //module_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_MODULE", ConsumptionUIMessages.LABEL_CLIENT_MODULE", INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >+ moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >+ projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_CLIENT_TYPE, INFOPOP_PWRS_COMBO_CLIENT_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER); > earProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_EAR_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_EAR_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >- //earModule_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_EAR_MODULE", ConsumptionUIMessages.LABEL_CLIENT_EAR_MODULE", INFOPOP_PWRS_COMBO_EAR, SWT.SINGLE | SWT.BORDER ); > } > else >- { >- projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_SERVICE_TYPE, INFOPOP_PWRS_COMBO_SERVICE_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER); >+ { > moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_PROJECT, ConsumptionUIMessages.LABEL_SERVICE_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >- //module_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_MODULE", ConsumptionUIMessages.LABEL_SERVICE_MODULE", INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >+ projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_SERVICE_TYPE, INFOPOP_PWRS_COMBO_SERVICE_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER); > earProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_EAR_PROJECT, ConsumptionUIMessages.LABEL_SERVICE_EAR_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER ); >- //earModule_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_EAR_MODULE, ConsumptionUIMessages.LABEL_SERVICE_EAR_MODULE, INFOPOP_PWRS_COMBO_EAR, SWT.SINGLE | SWT.BORDER ); > } > > //Temporarily remove the listeners >@@ -757,4 +754,4 @@ > > return finalStatus; > } >-} >\ No newline at end of file >+} >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java,v >retrieving revision 1.45 >diff -u -r1.45 ClientRuntimeSelectionWidgetDefaultingCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java 6 Feb 2006 19:15:34 -0000 1.45 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java 22 Feb 2006 00:24:18 -0000 >@@ -1,16 +1,17 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060131 121071 rsinha@ca.ibm.com - Rupam Kuehner > * 20060206 126408 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime; > >@@ -43,8 +44,8 @@ > import org.eclipse.jst.ws.internal.consumption.ui.preferences.ProjectTopologyContext; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ClientRuntimeDescriptor; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.FacetMatchCache; >+import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ServiceRuntimeDescriptor; >-import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; > import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; > import org.eclipse.osgi.util.NLS; >@@ -339,11 +340,18 @@ > return Status.OK_STATUS; > } > >- //No suitable server was found. Popup an error. >- String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(clientIds_.getRuntimeId()); >- String serverLabels = getServerLabels(clientRuntimeId_); >- IStatus status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[]{runtimeLabel, serverLabels}) ); >- return status; >+ // No suitable server was found. Popup an error if the default Web service >+ // runtime requires a server. >+ RuntimeDescriptor runtimeDescriptor = WebServiceRuntimeExtensionUtils2.getRuntimeById(clientIds_.getRuntimeId()); >+ if (runtimeDescriptor.getServerRequired()) >+ { >+ String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(clientIds_.getRuntimeId()); >+ IStatus status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[] { >+ runtimeLabel})); >+ return status; >+ } >+ >+ return Status.OK_STATUS; > } > > private IServer getServerFromClientRuntimeId() >@@ -1030,26 +1038,7 @@ > return ResourceUtils.getDefaultClientEARProjectName(); > } > } >- >- >- private String getServerLabels(String clientRuntimeId) >- { >- String[] validServerFactoryIds = WebServiceRuntimeExtensionUtils2.getServerFactoryIdsByClientRuntime(clientRuntimeId); >- //String[] validServerLabels = new String[validServerFactoryIds.length]; >- StringBuffer validServerLabels = new StringBuffer(); >- for (int i=0; i<validServerFactoryIds.length; i++) >- { >- if (i>0) >- { >- validServerLabels.append(", "); >- } >- validServerLabels.append(WebServiceRuntimeExtensionUtils.getServerLabelById(validServerFactoryIds[i])); >- >- } >- return validServerLabels.toString(); >- } >- >- >+ > /* > * Update the client project, client project type and clientRuntime as needed. > * Used by ServerRuntimeSelectionWidgetDefaultingCommand to update client side >@@ -1271,4 +1260,4 @@ > this.runtimeId_ = runtimeId_; > } > } >-} >\ No newline at end of file >+} >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidget.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidget.java,v >retrieving revision 1.15 >diff -u -r1.15 ClientRuntimeSelectionWidget.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidget.java 6 Feb 2006 19:42:44 -0000 1.15 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidget.java 22 Feb 2006 00:24:17 -0000 >@@ -1,15 +1,16 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime; > >@@ -221,35 +222,45 @@ > } > else > { >- //Look at the project type to ensure that it is suitable for the selected runtime >- //and server. >- >- String templateId = getClientComponentType(); >- >- if (templateId != null && templateId.length()>0) >+ //Non-existing project is only permitted if there is a server selected. >+ if (serverFactoryId==null || serverFactoryId.length()==0) > { >- //Check if the runtime supports it. >- if (!WebServiceRuntimeExtensionUtils2.doesClientTypeAndRuntimeSupportTemplate(typeId, runtimeId, templateId)) >- { >- String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >- String templateLabel = FacetUtils.getTemplateLabelById(templateId); >- finalStatus = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_CLIENT_RUNTIME_DOES_NOT_SUPPORT_TEMPLATE, new String[]{runtimeLabel, templateLabel})); >- } >- >- //Check if the server supports it. >- if (serverFactoryId!=null && serverFactoryId.length()>0) >+ finalStatus = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_PROJECT_MUST_EXIST, new String[]{projectName})); >+ } >+ else >+ { >+ // Look at the project type to ensure that it is suitable for the >+ // selected runtime and server. >+ String templateId = getClientComponentType(); >+ >+ if (templateId != null && templateId.length() > 0) > { >- if (!valUtils.doesServerSupportTemplate(serverFactoryId, templateId)) >+ // Check if the runtime supports it. >+ if (!WebServiceRuntimeExtensionUtils2.doesClientTypeAndRuntimeSupportTemplate(typeId, runtimeId, templateId)) > { >- String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId); >+ String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); > String templateLabel = FacetUtils.getTemplateLabelById(templateId); >- finalStatus = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_CLIENT_SERVER_DOES_NOT_SUPPORT_TEMPLATE, new String[]{serverLabel, templateLabel})); >+ finalStatus = StatusUtils.errorStatus(NLS.bind( >+ ConsumptionUIMessages.MSG_CLIENT_RUNTIME_DOES_NOT_SUPPORT_TEMPLATE, new String[] { runtimeLabel, >+ templateLabel })); >+ } >+ >+ // Check if the server supports it. >+ if (serverFactoryId != null && serverFactoryId.length() > 0) >+ { >+ if (!valUtils.doesServerSupportTemplate(serverFactoryId, templateId)) >+ { >+ String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId); >+ String templateLabel = FacetUtils.getTemplateLabelById(templateId); >+ finalStatus = StatusUtils.errorStatus(NLS.bind( >+ ConsumptionUIMessages.MSG_CLIENT_SERVER_DOES_NOT_SUPPORT_TEMPLATE, new String[] { serverLabel, >+ templateLabel })); >+ } > } > } > } > > >- > } > } > >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java,v >retrieving revision 1.13 >diff -u -r1.13 RuntimeServerSelectionWidget.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java 6 Feb 2006 19:42:44 -0000 1.13 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java 22 Feb 2006 00:24:19 -0000 >@@ -1,15 +1,16 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime; > >@@ -19,6 +20,7 @@ > import org.eclipse.jst.ws.internal.common.ServerUtils; > import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; > import org.eclipse.jst.ws.internal.consumption.ui.wizard.RuntimeServerSelectionDialog; >+import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; > import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; > import org.eclipse.jst.ws.internal.ui.common.UIUtils; >@@ -194,10 +196,14 @@ > if( ids_.getRuntimeId() == null || runtimeLabel == null || runtimeLabel.equals("" )) > { > status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_RUNTIME, new String[]{ scenario } ) ); >- } >+ } > else if( ids_.getServerId() == null || serverLabel.equals( "" )) > { >- status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) ); >+ RuntimeDescriptor desc = WebServiceRuntimeExtensionUtils2.getRuntimeById(ids_.getRuntimeId()); >+ if (desc.getServerRequired()) >+ { >+ status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) ); >+ } > } > > // >@@ -223,23 +229,39 @@ > > } > >+ //If no errors for detected, check for warnings > if (status.getSeverity() != Status.ERROR) > { >- // Check if only stub runtime is available for the selected server type >- >+ >+ // Check if server type is null and the user opted to install on page 1. > String serverFactoryId = ids_.getServerId(); >- // >- IServerType serverType = ServerCore.findServerType(serverFactoryId); >- if (serverType != null) >+ if (serverFactoryId == null || serverFactoryId.length() == 0) > { >+ if (isClientContext_) >+ { >+ status = StatusUtils.warningStatus(NLS.bind(ConsumptionUIMessages.MSG_WARN_NO_CLIENT_SERVER, new String[0])); >+ } else >+ { >+ status = StatusUtils.warningStatus(NLS.bind(ConsumptionUIMessages.MSG_WARN_NO_SERVICE_SERVER, new String[0])); >+ } > >- // Find a Runtime which is not a stub >- IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverFactoryId); >- if (install_ && nonStubRuntime == null) >+ } >+ else >+ { >+ >+ // Check if only stub runtime is available for the selected server type >+ IServerType serverType = ServerCore.findServerType(serverFactoryId); >+ if (serverType != null) > { >- String servertypeLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId); >- status = StatusUtils.warningStatus(NLS >- .bind(ConsumptionUIMessages.MSG_WARN_STUB_ONLY, new String[] { servertypeLabel })); >+ >+ // Find a Runtime which is not a stub >+ IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverFactoryId); >+ if (install_ && nonStubRuntime == null) >+ { >+ String servertypeLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId); >+ status = StatusUtils.warningStatus(NLS.bind(ConsumptionUIMessages.MSG_WARN_STUB_ONLY, >+ new String[] { servertypeLabel })); >+ } > } > } > } >Index: src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/WebServiceRuntimeExtensionUtils2.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/WebServiceRuntimeExtensionUtils2.java,v >retrieving revision 1.13 >diff -u -r1.13 WebServiceRuntimeExtensionUtils2.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/WebServiceRuntimeExtensionUtils2.java 2 Feb 2006 19:04:37 -0000 1.13 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/WebServiceRuntimeExtensionUtils2.java 22 Feb 2006 00:24:21 -0000 >@@ -1,15 +1,16 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060131 121071 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > > package org.eclipse.jst.ws.internal.consumption.ui.wsrt; >@@ -186,17 +187,21 @@ > > public static String getServiceRuntimeId(TypeRuntimeServer trs, String projectName, String templateId) > { >- //Find the first client runtime that supports the implementation type, runtime, server, and project >+ boolean serverSelected = (trs.getServerId() != null) && (trs.getServerId().length() > 0); >+ //Find the first service runtime that supports the implementation type, runtime, server, and project > String[] descs = getServiceRuntimesByServiceType(trs.getTypeId()); > for (int i=0; i<descs.length; i++) > { > ServiceRuntimeDescriptor desc = getServiceRuntimeDescriptorById(descs[i]); > if (desc.getRuntime().getId().equals(trs.getRuntimeId())) > { >- boolean supportsServer = doesServiceRuntimeSupportServer(desc.getId(), trs.getServerId()); >- if (!supportsServer) >+ if (serverSelected) > { >- continue; >+ boolean supportsServer = doesServiceRuntimeSupportServer(desc.getId(), trs.getServerId()); >+ if (!supportsServer) >+ { >+ continue; >+ } > } > > IProject project = ProjectUtilities.getProject(projectName); >@@ -505,7 +510,7 @@ > public static String getDefaultServerValueFor(String typeId) > { > String[] fIds = getServerFactoryIdsByServiceType(typeId); >- if (fIds==null) >+ if (fIds==null || fIds.length==0) > return null; > > return fIds[0]; >@@ -783,6 +788,7 @@ > > public static String getClientRuntimeId(TypeRuntimeServer trs, String projectName, String templateId) > { >+ boolean serverSelected = (trs.getServerId()!=null) && (trs.getServerId().length()>0); > //Find the first client runtime that supports the implementation type, runtime, server, and project > String[] descs = getClientRuntimesByType(trs.getTypeId()); > for (int i=0; i<descs.length; i++) >@@ -790,10 +796,13 @@ > ClientRuntimeDescriptor desc = getClientRuntimeDescriptorById(descs[i]); > if (desc.getRuntime().getId().equals(trs.getRuntimeId())) > { >- boolean supportsServer = doesClientRuntimeSupportServer(desc.getId(), trs.getServerId()); >- if (!supportsServer) >+ if (serverSelected) > { >- continue; >+ boolean supportsServer = doesClientRuntimeSupportServer(desc.getId(), trs.getServerId()); >+ if (!supportsServer) >+ { >+ continue; >+ } > } > > IProject project = ProjectUtilities.getProject(projectName); >@@ -873,7 +882,10 @@ > //Check if this serviceRuntime supports the implementation type > if (desc.getClientImplementationType().getId().equals(clientImplId)) > { >- runtimeIds.add(desc.getRuntime().getId()); >+ if (!runtimeIds.contains(desc.getRuntime().getId())) >+ { >+ runtimeIds.add(desc.getRuntime().getId()); >+ } > } > } > >Index: src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/RuntimeDescriptor.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/RuntimeDescriptor.java,v >retrieving revision 1.2 >diff -u -r1.2 RuntimeDescriptor.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/RuntimeDescriptor.java 29 Oct 2005 04:47:16 -0000 1.2 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/RuntimeDescriptor.java 22 Feb 2006 00:24:20 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2006 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > > package org.eclipse.jst.ws.internal.consumption.ui.wsrt; >@@ -19,6 +22,8 @@ > private IConfigurationElement elem; > private String id; > private String label; >+ private String serverRequiredString; >+ private boolean serverRequired; > > > public RuntimeDescriptor(IConfigurationElement elem) >@@ -49,4 +54,21 @@ > return new String[]{"13", "14"}; > } > >+ public boolean getServerRequired() >+ { >+ if (serverRequiredString == null) >+ { >+ //Defaults to true if the extension omits this attribute >+ serverRequired = true; >+ >+ serverRequiredString = elem.getAttribute("serverRequired"); >+ if (serverRequiredString != null) >+ { >+ serverRequired = Boolean.valueOf(serverRequiredString).booleanValue(); >+ } >+ >+ } >+ return serverRequired; >+ } >+ > } >Index: src/org/eclipse/jst/ws/internal/consumption/ui/command/AntDefaultingOperation.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/AntDefaultingOperation.java,v >retrieving revision 1.1 >diff -u -r1.1 AntDefaultingOperation.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/command/AntDefaultingOperation.java 5 Dec 2005 01:50:51 -0000 1.1 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/command/AntDefaultingOperation.java 22 Feb 2006 00:24:15 -0000 >@@ -1,3 +1,16 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 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 >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner >+ *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.command; > > import org.eclipse.core.commands.ExecutionException; >@@ -33,4 +46,14 @@ > { > return false; > } >+ >+ public boolean getDeployService() >+ { >+ return true; >+ } >+ >+ public boolean getDeployClient() >+ { >+ return true; >+ } > } >Index: src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties,v >retrieving revision 1.8 >diff -u -r1.8 ConsumptionUI.properties >--- src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties 6 Feb 2006 19:42:44 -0000 1.8 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties 22 Feb 2006 00:24:15 -0000 >@@ -1,16 +1,17 @@ > ############################################################################### >-# Copyright (c) 2004 IBM Corporation and others. >+# Copyright (c) 2004, 2006 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 >-# yyyymmdd bug Email and other contact information >-# -------- -------- ----------------------------------------------------------- >+# IBM Corporation - initial API and implementation >+# yyyymmdd bug Email and other contact information >+# -------- -------- ----------------------------------------------------------- > # 20060204 124143 rsinha@ca.ibm.com - Rupam Kuehner > # 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner >+# 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > ############################################################################### > > # >@@ -58,7 +59,7 @@ > # General messages. > # > MSG_ERROR_TASK_EXCEPTED=IWAB0234E An internal error occurred. Details: {0} >-MSG_ERROR_NO_SERVER_RUNTIME=No suitable server can be found for the {0} Web service runtime. Go to Window > Preferences. Select Server > Installed Runtimes and configure one of the following: {1} >+MSG_ERROR_NO_SERVER_RUNTIME=No suitable server can be found for the {0} Web service runtime. Go to Window > Preferences. Select Server > Installed Runtimes and configure a server runtime. > > > # >@@ -148,6 +149,8 @@ > MSG_NO_SERVER=No server specified for the {0} scenario. > MSG_ERROR_STUB_ONLY={0} has only stub runtimes associated with it. Choose a different server or configure a non-stub runtime in the server preferences. > MSG_WARN_STUB_ONLY={0} has only stub runtimes associated with it so the server will not be created or started. >+MSG_WARN_NO_SERVICE_SERVER=No server has been selected. The Web service will not be deployed, installed, or run. >+MSG_WARN_NO_CLIENT_SERVER=No server has been selected. The Web service client will not be deployed, installed, or run. > > MSG_SERVER_TARGET_MISMATCH=The project, {0}, has a server target which is not compatible with the selected server type > MSG_J2EE_MISMATCH=The project, {0}, has a different J2EE level from the selected J2EE level >@@ -189,6 +192,9 @@ > MSG_CLIENT_CANNOT_ASSOCIATE=The client project, {0}, cannot be associated with the EAR, {1}. Choose an EAR with a J2EE level of {2} or higher. > MSG_SERVICE_CANNOT_ASSOCIATE=The service project, {0}, cannot be associated with the EAR, {1}. Choose an EAR with a J2EE level of {2} or higher. > >+MSG_PROJECT_MUST_EXIST=No server can be found and {0} does not exist. Choose an existing project or use the preferences to configure a server runtime. >+ >+ > # WebServiceClientRuntimeSelectionPage > PAGE_TITLE_WS_CLIENT_RUNTIME_SELECTION=Client Environment Configuration > PAGE_DESC_WS_CLIENT_RUNTIME_SELECTION=Choose from the list of supported runtimes and servers for the client environment, or use the default settings. >Index: src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java,v >retrieving revision 1.6 >diff -u -r1.6 ConsumptionUIMessages.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java 6 Feb 2006 19:42:44 -0000 1.6 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java 22 Feb 2006 00:24:15 -0000 >@@ -1,16 +1,17 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2005 IBM Corporation and others. >+ * Copyright (c) 2000, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124143 rsinha@ca.ibm.com - Rupam Kuehner > * 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui; > >@@ -85,6 +86,8 @@ > public static String MSG_NO_SERVER; > public static String MSG_ERROR_STUB_ONLY; > public static String MSG_WARN_STUB_ONLY; >+ public static String MSG_WARN_NO_SERVICE_SERVER; >+ public static String MSG_WARN_NO_CLIENT_SERVER; > public static String MSG_SERVER_TARGET_MISMATCH; > public static String MSG_J2EE_MISMATCH; > public static String MSG_SERVICE_PROJECT_EMPTY; >@@ -327,8 +330,10 @@ > public static String MSG_ERROR_WSDD_NOT_FOUND; > public static String MSG_CLIENT_CANNOT_ASSOCIATE; > public static String MSG_SERVICE_CANNOT_ASSOCIATE; >+ public static String MSG_PROJECT_MUST_EXIST; >+ > > static { > NLS.initializeMessages(BUNDLE_NAME, ConsumptionUIMessages.class); > } >-} >\ No newline at end of file >+} >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ClientExtensionDefaultingCommand.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ClientExtensionDefaultingCommand.java,v >retrieving revision 1.18 >diff -u -r1.18 ClientExtensionDefaultingCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ClientExtensionDefaultingCommand.java 6 Feb 2006 19:42:44 -0000 1.18 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ClientExtensionDefaultingCommand.java 22 Feb 2006 00:24:17 -0000 >@@ -1,25 +1,29 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions; > > import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.resources.IProject; > 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.jem.util.emf.workbench.ProjectUtilities; > import org.eclipse.jst.ws.internal.common.ServerUtils; > import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; >+import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; > import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; > import org.eclipse.osgi.util.NLS; >@@ -38,6 +42,7 @@ > private TypeRuntimeServer clientIds_; > private String clientRuntimeId_; > private Boolean testService; >+ private Boolean deployClient; > private Boolean installClient; > private ResourceContext resourceContext; > >@@ -280,6 +285,14 @@ > } > > /** >+ * @return Returns the deployService. >+ */ >+ public Boolean getDeployClient() >+ { >+ return deployClient; >+ } >+ >+ /** > * @return Returns the installClient. > */ > public Boolean getInstallClient() >@@ -469,6 +482,11 @@ > //when the user clicks Finish prior to page 3 of the wizard. > > IStatus status = Status.OK_STATUS; >+ >+ //default deployClient to true. It will get set to false later if there is no >+ //server type selected. >+ deployClient = Boolean.TRUE; >+ > String scenario = ConsumptionUIMessages.MSG_CLIENT_SUB; > > //Ensure server and runtime are non-null >@@ -484,30 +502,60 @@ > > if( serverId == null || serverId.length()==0) > { >- status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) ); >- env.getStatusHandler().reportError(status); >- } >- >- //ensure the server, runtime, and type are compatible >- if (!WebServiceRuntimeExtensionUtils2.isServerClientRuntimeTypeSupported(serverId, runtimeId, typeId)) >- { >- String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId); >- String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >- status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[]{ serverLabel, runtimeLabel } ) ); >- env.getStatusHandler().reportError(status); >+ //Popup and error if the selected client project does not exist. >+ IProject clientProject = ProjectUtilities.getProject(clientProjectName_); >+ if (!clientProject.exists()) >+ { >+ String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >+ status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[]{runtimeLabel } ) ); >+ env.getStatusHandler().reportError(status); >+ } >+ else >+ { >+ RuntimeDescriptor desc = WebServiceRuntimeExtensionUtils2.getRuntimeById(runtimeId); >+ >+ if (desc.getServerRequired()) >+ { >+ status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[] { scenario })); >+ env.getStatusHandler().reportError(status); >+ } >+ else >+ { >+ // No server has been selected and the selected Web service runtime >+ // does not >+ // require a server. Set deploy, install, run, and test to false. >+ deployClient = Boolean.FALSE; >+ installClient = Boolean.FALSE; >+ testService = Boolean.FALSE; >+ } >+ } > } > >- //Determine if the selected server type has only stub runtimes associated with it. >- //If so, set install and test to false in the context. >- IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId); >- if (nonStubRuntime == null) >+ //If the server is non-null, ensure the server, runtime, and type are compatible >+ if (serverId != null && serverId.length() > 0) > { >- installClient = Boolean.FALSE; >- testService = Boolean.FALSE; >+ if (!WebServiceRuntimeExtensionUtils2.isServerClientRuntimeTypeSupported(serverId, runtimeId, typeId)) >+ { >+ String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId); >+ String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >+ status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[] { serverLabel, >+ runtimeLabel })); >+ env.getStatusHandler().reportError(status); >+ } >+ >+ // Determine if the selected server type has only stub runtimes associated >+ // with it. >+ // If so, set install and test to false in the context. >+ IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId); >+ if (nonStubRuntime == null) >+ { >+ installClient = Boolean.FALSE; >+ testService = Boolean.FALSE; >+ } > } > > return status; > } > > >-} >\ No newline at end of file >+} >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ServerExtensionDefaultingCommand.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ServerExtensionDefaultingCommand.java,v >retrieving revision 1.18 >diff -u -r1.18 ServerExtensionDefaultingCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ServerExtensionDefaultingCommand.java 6 Feb 2006 19:42:44 -0000 1.18 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ServerExtensionDefaultingCommand.java 22 Feb 2006 00:24:17 -0000 >@@ -1,25 +1,29 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions; > > import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.resources.IProject; > 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.jem.util.emf.workbench.ProjectUtilities; > import org.eclipse.jst.ws.internal.common.ServerUtils; > import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; >+import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor; > import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2; > import org.eclipse.jst.ws.internal.data.TypeRuntimeServer; > import org.eclipse.osgi.util.NLS; >@@ -33,6 +37,7 @@ > > public class ServerExtensionDefaultingCommand extends AbstractDataModelOperation > { >+ private Boolean deployService; > private Boolean installService; > private Boolean startService; > private Boolean testService; >@@ -171,6 +176,14 @@ > } > > /** >+ * @return Returns the deployService. >+ */ >+ public Boolean getDeployService() >+ { >+ return deployService; >+ } >+ >+ /** > * @return Returns the installService. > */ > public Boolean getInstallService() >@@ -296,6 +309,11 @@ > //when the user clicks Finish prior to page 3 of the wizard. > > IStatus status = Status.OK_STATUS; >+ >+ //default deployService to true. It will get set to false later if there is no >+ //server type selected. >+ deployService = Boolean.TRUE; >+ > String scenario = ConsumptionUIMessages.MSG_SERVICE_SUB; > > //Ensure server and runtime are non-null >@@ -311,28 +329,59 @@ > > if( serverId == null || serverId.length()==0) > { >- status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) ); >- env.getStatusHandler().reportError(status); >- } >- >- //ensure the server, runtime, and type are compatible >- if (!WebServiceRuntimeExtensionUtils2.isServerRuntimeTypeSupported(serverId, runtimeId, typeId)) >- { >- String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId); >- String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >- status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[]{ serverLabel, runtimeLabel } ) ); >- env.getStatusHandler().reportError(status); >+ //Popup and error if the selected service project does not exist. >+ IProject serviceProject = ProjectUtilities.getProject(serviceProjectName_); >+ if (!serviceProject.exists()) >+ { >+ String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >+ status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[]{ runtimeLabel } ) ); >+ env.getStatusHandler().reportError(status); >+ } >+ else >+ { >+ >+ RuntimeDescriptor desc = WebServiceRuntimeExtensionUtils2.getRuntimeById(runtimeId); >+ if (desc.getServerRequired()) >+ { >+ status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[] { scenario })); >+ env.getStatusHandler().reportError(status); >+ } >+ else >+ { >+ // No server has been selected and the selected Web service runtime >+ // does not require a server. Set deploy, install, run, and test to false. >+ deployService = Boolean.FALSE; >+ installService = Boolean.FALSE; >+ startService = Boolean.FALSE; >+ testService = Boolean.FALSE; >+ } >+ } > } > >- //Determine if the selected server type has only stub runtimes associated with it. >- //If so, set install, run, and test to false in the context. >- IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId); >- if (nonStubRuntime == null) >+ //If the server is non-null, ensure the server, runtime, and type are compatible >+ if (serverId != null && serverId.length() > 0) > { >- installService = Boolean.FALSE; >- startService = Boolean.FALSE; >- testService = Boolean.FALSE; >+ if (!WebServiceRuntimeExtensionUtils2.isServerRuntimeTypeSupported(serverId, runtimeId, typeId)) >+ { >+ String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId); >+ String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId); >+ status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[] { serverLabel, >+ runtimeLabel })); >+ env.getStatusHandler().reportError(status); >+ } >+ >+ // Determine if the selected server type has only stub runtimes associated >+ // with it. >+ // If so, set install, run, and test to false in the context. >+ IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId); >+ if (nonStubRuntime == null) >+ { >+ installService = Boolean.FALSE; >+ startService = Boolean.FALSE; >+ testService = Boolean.FALSE; >+ } > } >+ > return status; > } >-} >\ No newline at end of file >+} >Index: src/org/eclipse/jst/ws/internal/consumption/ui/extension/ClientRootFragment.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/extension/ClientRootFragment.java,v >retrieving revision 1.8 >diff -u -r1.8 ClientRootFragment.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/extension/ClientRootFragment.java 2 Feb 2006 19:04:37 -0000 1.8 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/extension/ClientRootFragment.java 22 Feb 2006 00:24:16 -0000 >@@ -1,15 +1,16 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060131 121071 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > > package org.eclipse.jst.ws.internal.consumption.ui.extension; >@@ -92,6 +93,8 @@ > registry.addMapping( PreClientDevelopCommand.class, "Ear", RunClientFragment.class ); > > //Mappings from framework to framework commands >+ registry.addMapping( PreClientDevelopCommand.class, "Context", PreClientDeployCommand.class ); >+ > registry.addMapping( PreClientDevelopCommand.class, "WebService", PreClientAssembleCommand.class ); > registry.addMapping( PreClientDevelopCommand.class, "Project", PreClientAssembleCommand.class ); > registry.addMapping( PreClientDevelopCommand.class, "Module", PreClientAssembleCommand.class ); >Index: src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDevelopCommand.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDevelopCommand.java,v >retrieving revision 1.28 >diff -u -r1.28 PreClientDevelopCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDevelopCommand.java 2 Feb 2006 19:04:37 -0000 1.28 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDevelopCommand.java 22 Feb 2006 00:24:16 -0000 >@@ -1,15 +1,16 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2006 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 > * -------- -------- ----------------------------------------------------------- > * 20060131 121071 rsinha@ca.ibm.com - Rupam Kuehner >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > > package org.eclipse.jst.ws.internal.consumption.ui.extension; >@@ -53,6 +54,7 @@ > private IWebServiceClient webServiceClient_; > private String j2eeLevel_; > private ResourceContext resourceContext_; >+ private boolean deploy_; > private boolean test_; > private boolean install_; > private boolean run_; >@@ -91,7 +93,7 @@ > > webServiceClient_ = wsrt.getWebServiceClient(wsInfo); > WebServiceScenario scenario = WebServiceScenario.CLIENT_LITERAL; >- context_ = new SimpleContext(true, true, true, install_, run_, true, test_, >+ context_ = new SimpleContext(true, true, deploy_, install_, run_, true, test_, > false, scenario, resourceContext_.isOverwriteFilesEnabled(), > resourceContext_.isCreateFoldersEnabled(), resourceContext_ > .isCheckoutFilesEnabled()); >@@ -212,6 +214,11 @@ > { > ear_ = ear; > } >+ >+ public void setDeployClient(boolean deployClient) >+ { >+ deploy_ = deployClient; >+ } > > public void setInstallClient(boolean installClient) > { >Index: src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDeployCommand.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDeployCommand.java,v >retrieving revision 1.5 >diff -u -r1.5 PreClientDeployCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDeployCommand.java 11 Oct 2005 15:52:15 -0000 1.5 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDeployCommand.java 22 Feb 2006 00:24:16 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2006 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > > package org.eclipse.jst.ws.internal.consumption.ui.extension; >@@ -16,11 +19,25 @@ > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; > import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; >+import org.eclipse.wst.ws.internal.wsrt.IContext; > > public class PreClientDeployCommand extends AbstractDataModelOperation > { >+ private IContext context_; >+ > public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) > { >+ if (context_.getDeploy()) >+ { >+ //If and when there are framework specific deploy things to be done, >+ //do them here. >+ } >+ > return Status.OK_STATUS; > } >+ >+ public void setContext(IContext context) >+ { >+ context_=context; >+ } > } >Index: src/org/eclipse/jst/ws/internal/consumption/ui/widgets/ClientWizardWidgetDefaultingCommand.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/ClientWizardWidgetDefaultingCommand.java,v >retrieving revision 1.11 >diff -u -r1.11 ClientWizardWidgetDefaultingCommand.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/widgets/ClientWizardWidgetDefaultingCommand.java 1 Dec 2005 17:40:48 -0000 1.11 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/widgets/ClientWizardWidgetDefaultingCommand.java 22 Feb 2006 00:24:16 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.widgets; > >@@ -62,7 +65,12 @@ > //String runtime = registry.getAllClientRuntimes()[0]; > String runtime = WebServiceRuntimeExtensionUtils2.getAllRuntimesForClientSide()[0]; > //String server = registry.getAllClientServerFactoryIds()[0]; >- String server = WebServiceRuntimeExtensionUtils2.getAllClientServerFactoryIds()[0]; >+ String[] servers = WebServiceRuntimeExtensionUtils2.getAllClientServerFactoryIds(); >+ String server = null; >+ if (servers != null && servers.length>0) >+ { >+ server = servers[0]; >+ } > TypeRuntimeServer result = new TypeRuntimeServer(); > // rskreg > >@@ -77,4 +85,4 @@ > { > return Status.OK_STATUS; > } >-} >\ No newline at end of file >+} >Index: src/org/eclipse/jst/ws/internal/consumption/ui/wizard/RuntimeServerSelectionDialog.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wizard/RuntimeServerSelectionDialog.java,v >retrieving revision 1.13 >diff -u -r1.13 RuntimeServerSelectionDialog.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/wizard/RuntimeServerSelectionDialog.java 10 Nov 2005 18:48:41 -0000 1.13 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/wizard/RuntimeServerSelectionDialog.java 22 Feb 2006 00:24:20 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2006 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.wizard; > >@@ -473,7 +476,7 @@ > runtimes = WebServiceRuntimeExtensionUtils2.getRuntimesByServiceType(typeId_); > } > else { >- runtimes = WebServiceRuntimeExtensionUtils2.getAllRuntimesForClientSide(); >+ runtimes = WebServiceRuntimeExtensionUtils2.getRuntimesByClientType(typeId_); > } > > TreeItem[] runtimeName = new TreeItem[runtimes.length]; >Index: src/org/eclipse/jst/ws/internal/consumption/ui/ant/AntClientRootCommandFragment.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/ant/AntClientRootCommandFragment.java,v >retrieving revision 1.5 >diff -u -r1.5 AntClientRootCommandFragment.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/ant/AntClientRootCommandFragment.java 5 Dec 2005 01:50:51 -0000 1.5 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/ant/AntClientRootCommandFragment.java 22 Feb 2006 00:24:15 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2006 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.ant; > >@@ -112,6 +115,7 @@ > dataRegistry.addMapping(AntDefaultingOperation.class, "ClientIdsFixed", ClientRuntimeSelectionWidgetDefaultingCommand.class); > dataRegistry.addMapping(AntDefaultingOperation.class, "StartService", PreClientDevelopCommand.class); > dataRegistry.addMapping(AntDefaultingOperation.class, "InstallClient", PreClientDevelopCommand.class); >+ dataRegistry.addMapping(AntDefaultingOperation.class, "DeployClient", PreClientDevelopCommand.class); > > // Map WSDLSelectionWidgetDefaultingCommand command. > dataRegistry.addMapping(WSDLSelectionWidgetDefaultingCommand.class, "GenWSIL", ClientExtensionDefaultingCommand.class); >Index: src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ProjectName2IProjectTransformer.java >=================================================================== >RCS file: /cvsroot/webtools/jst/components/ws/plugins/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ProjectName2IProjectTransformer.java,v >retrieving revision 1.4 >diff -u -r1.4 ProjectName2IProjectTransformer.java >--- src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ProjectName2IProjectTransformer.java 26 Oct 2005 23:05:55 -0000 1.4 >+++ src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ProjectName2IProjectTransformer.java 22 Feb 2006 00:24:15 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2006 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20060221 124302 rsinha@ca.ibm.com - Rupam Kuehner > *******************************************************************************/ > package org.eclipse.jst.ws.internal.consumption.ui.command.data; > >@@ -17,15 +20,21 @@ > { > public Object transform(Object value) > { >- String project = (String)value; >- int slashIndex = project.indexOf( '/' ); >- String projectName = project; >- >- if( slashIndex != -1 ) >- { >- projectName = project.substring( 0, slashIndex ); >- } >- >- return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); >+ if (value != null) >+ { >+ String project = (String) value; >+ int slashIndex = project.indexOf('/'); >+ String projectName = project; >+ >+ if (slashIndex != -1) >+ { >+ projectName = project.substring(0, slashIndex); >+ } >+ >+ return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); >+ } else >+ { >+ return null; >+ } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 119111
:
35109
|
35110
| 35111 |
35112
|
35113