Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 119111 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/binding/ClientWidgetBinding.java (-3 / +5 lines)
Lines 1-16 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124408    rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124408    rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060204 121605    rsinha@ca.ibm.com - Rupam Kuehner
13
 * 20060204 121605    rsinha@ca.ibm.com - Rupam Kuehner
14
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
14
 *******************************************************************************/
15
 *******************************************************************************/
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.binding;
16
package org.eclipse.jst.ws.internal.consumption.ui.widgets.binding;
16
17
Lines 311-316 Link Here
311
      dataRegistry.addMapping(WSDLSelectionOutputCommand.class, "WebServicesParser", CheckForServiceProjectCommand.class);      
312
      dataRegistry.addMapping(WSDLSelectionOutputCommand.class, "WebServicesParser", CheckForServiceProjectCommand.class);      
312
	  
313
	  
313
	  // Setup the PreClientDevelopCommand.
314
	  // Setup the PreClientDevelopCommand.
315
      dataRegistry.addMapping( ClientExtensionDefaultingCommand.class, "DeployClient", PreClientDevelopCommand.class);
314
      dataRegistry.addMapping( ClientExtensionDefaultingCommand.class, "InstallClient", PreClientDevelopCommand.class);
316
      dataRegistry.addMapping( ClientExtensionDefaultingCommand.class, "InstallClient", PreClientDevelopCommand.class);
315
      
317
      
316
      //Always start the client if it is installed.      
318
      //Always start the client if it is installed.      
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java (-12 / +9 lines)
Lines 1-15 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124143   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124143   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060221   122661 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
15
16
Lines 114-132 Link Here
114
		
115
		
115
    if (isClient_)
116
    if (isClient_)
116
	{
117
	{
117
      projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_CLIENT_TYPE, INFOPOP_PWRS_COMBO_CLIENT_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER);
118
	  moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
118
	  moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );            
119
      projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_CLIENT_TYPE, INFOPOP_PWRS_COMBO_CLIENT_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER);      
119
      //module_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_MODULE", ConsumptionUIMessages.LABEL_CLIENT_MODULE", INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
120
	  earProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_EAR_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_EAR_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
120
	  earProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_EAR_PROJECT, ConsumptionUIMessages.LABEL_CLIENT_EAR_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
121
	  //earModule_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_CLIENT_EAR_MODULE", ConsumptionUIMessages.LABEL_CLIENT_EAR_MODULE", INFOPOP_PWRS_COMBO_EAR, SWT.SINGLE | SWT.BORDER );
122
    }
121
    }
123
    else 
122
    else 
124
	{
123
	{      
125
      projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_SERVICE_TYPE, INFOPOP_PWRS_COMBO_SERVICE_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER);      
126
	  moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_PROJECT, ConsumptionUIMessages.LABEL_SERVICE_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
124
	  moduleProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_PROJECT, ConsumptionUIMessages.LABEL_SERVICE_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
127
      //module_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_MODULE", ConsumptionUIMessages.LABEL_SERVICE_MODULE", INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
125
      projectType_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_TYPE, ConsumptionUIMessages.TOOLTIP_PWCR_COMBO_SERVICE_TYPE, INFOPOP_PWRS_COMBO_SERVICE_PROJECT_TYPE, SWT.SINGLE | SWT.BORDER);      
128
	  earProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_EAR_PROJECT, ConsumptionUIMessages.LABEL_SERVICE_EAR_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
126
	  earProject_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_EAR_PROJECT, ConsumptionUIMessages.LABEL_SERVICE_EAR_PROJECT, INFOPOP_PWRS_COMBO_PROJECT, SWT.SINGLE | SWT.BORDER );
129
	  //earModule_ = uiUtils.createCombo(parent, ConsumptionUIMessages.LABEL_SERVICE_EAR_MODULE, ConsumptionUIMessages.LABEL_SERVICE_EAR_MODULE, INFOPOP_PWRS_COMBO_EAR, SWT.SINGLE | SWT.BORDER );
130
    }
127
    }
131
    
128
    
132
    //Temporarily remove the listeners
129
    //Temporarily remove the listeners
Lines 757-760 Link Here
757
    
754
    
758
    return finalStatus;
755
    return finalStatus;
759
  }
756
  }
760
}
757
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java (-30 / +19 lines)
Lines 1-16 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner
13
 * 20060206 126408   rsinha@ca.ibm.com - Rupam Kuehner
13
 * 20060206 126408   rsinha@ca.ibm.com - Rupam Kuehner
14
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
14
 *******************************************************************************/
15
 *******************************************************************************/
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
16
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
16
17
Lines 43-50 Link Here
43
import org.eclipse.jst.ws.internal.consumption.ui.preferences.ProjectTopologyContext;
44
import org.eclipse.jst.ws.internal.consumption.ui.preferences.ProjectTopologyContext;
44
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ClientRuntimeDescriptor;
45
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ClientRuntimeDescriptor;
45
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.FacetMatchCache;
46
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.FacetMatchCache;
47
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor;
46
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ServiceRuntimeDescriptor;
48
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.ServiceRuntimeDescriptor;
47
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils;
48
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
49
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
49
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
50
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
50
import org.eclipse.osgi.util.NLS;
51
import org.eclipse.osgi.util.NLS;
Lines 339-349 Link Here
339
      return Status.OK_STATUS;
340
      return Status.OK_STATUS;
340
    }    
341
    }    
341
    
342
    
342
    //No suitable server was found. Popup an error.
343
    // No suitable server was found. Popup an error if the default Web service
343
    String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(clientIds_.getRuntimeId());
344
    // runtime requires a server.
344
    String serverLabels = getServerLabels(clientRuntimeId_);    
345
    RuntimeDescriptor runtimeDescriptor = WebServiceRuntimeExtensionUtils2.getRuntimeById(clientIds_.getRuntimeId());
345
    IStatus status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[]{runtimeLabel, serverLabels}) );
346
    if (runtimeDescriptor.getServerRequired())
346
    return status;
347
    {
348
      String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(clientIds_.getRuntimeId());
349
      IStatus status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[] {
350
          runtimeLabel}));
351
      return status;
352
    }
353
    
354
    return Status.OK_STATUS;
347
  }
355
  }
348
  
356
  
349
  private IServer getServerFromClientRuntimeId()
357
  private IServer getServerFromClientRuntimeId()
Lines 1030-1055 Link Here
1030
      return ResourceUtils.getDefaultClientEARProjectName();
1038
      return ResourceUtils.getDefaultClientEARProjectName();
1031
    }    
1039
    }    
1032
  }
1040
  }
1033
    
1041
      
1034
    
1035
  private String getServerLabels(String clientRuntimeId)
1036
  {
1037
        String[] validServerFactoryIds = WebServiceRuntimeExtensionUtils2.getServerFactoryIdsByClientRuntime(clientRuntimeId);
1038
	    //String[] validServerLabels = new String[validServerFactoryIds.length];
1039
	    StringBuffer validServerLabels = new StringBuffer(); 
1040
	    for (int i=0; i<validServerFactoryIds.length; i++)
1041
	    {
1042
	    	if (i>0)
1043
	    	{
1044
	    		validServerLabels.append(", ");
1045
	    	}
1046
	    	validServerLabels.append(WebServiceRuntimeExtensionUtils.getServerLabelById(validServerFactoryIds[i]));
1047
	    	
1048
	    }
1049
	    return validServerLabels.toString();
1050
  }
1051
  
1052
  
1053
  /*
1042
  /*
1054
   * Update the client project, client project type and clientRuntime as needed.
1043
   * Update the client project, client project type and clientRuntime as needed.
1055
   * Used by ServerRuntimeSelectionWidgetDefaultingCommand to update client side
1044
   * Used by ServerRuntimeSelectionWidgetDefaultingCommand to update client side
Lines 1271-1274 Link Here
1271
      this.runtimeId_ = runtimeId_;
1260
      this.runtimeId_ = runtimeId_;
1272
    }        
1261
    }        
1273
  }
1262
  }
1274
}
1263
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidget.java (-23 / +34 lines)
Lines 1-15 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
15
16
Lines 221-255 Link Here
221
        }
222
        }
222
        else
223
        else
223
        {
224
        {
224
          //Look at the project type to ensure that it is suitable for the selected runtime
225
          //Non-existing project is only permitted if there is a server selected.
225
          //and server.
226
          if (serverFactoryId==null || serverFactoryId.length()==0)
226
          
227
          String templateId = getClientComponentType();
228
229
          if (templateId != null && templateId.length()>0)
230
          {
227
          {
231
            //Check if the runtime supports it.            
228
            finalStatus = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_PROJECT_MUST_EXIST, new String[]{projectName}));
232
            if (!WebServiceRuntimeExtensionUtils2.doesClientTypeAndRuntimeSupportTemplate(typeId, runtimeId, templateId))
229
          }
233
            {
230
          else
234
              String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
231
          {
235
              String templateLabel = FacetUtils.getTemplateLabelById(templateId);
232
            // Look at the project type to ensure that it is suitable for the
236
              finalStatus = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_CLIENT_RUNTIME_DOES_NOT_SUPPORT_TEMPLATE, new String[]{runtimeLabel, templateLabel}));
233
            // selected runtime and server.
237
            }
234
            String templateId = getClientComponentType();
238
            
235
239
            //Check if the server supports it.
236
            if (templateId != null && templateId.length() > 0)
240
            if (serverFactoryId!=null && serverFactoryId.length()>0)
241
            {
237
            {
242
              if (!valUtils.doesServerSupportTemplate(serverFactoryId, templateId))
238
              // Check if the runtime supports it.
239
              if (!WebServiceRuntimeExtensionUtils2.doesClientTypeAndRuntimeSupportTemplate(typeId, runtimeId, templateId))
243
              {
240
              {
244
                String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId);
241
                String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
245
                String templateLabel = FacetUtils.getTemplateLabelById(templateId);
242
                String templateLabel = FacetUtils.getTemplateLabelById(templateId);
246
                finalStatus = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_CLIENT_SERVER_DOES_NOT_SUPPORT_TEMPLATE, new String[]{serverLabel, templateLabel}));
243
                finalStatus = StatusUtils.errorStatus(NLS.bind(
244
                    ConsumptionUIMessages.MSG_CLIENT_RUNTIME_DOES_NOT_SUPPORT_TEMPLATE, new String[] { runtimeLabel,
245
                        templateLabel }));
246
              }
247
248
              // Check if the server supports it.
249
              if (serverFactoryId != null && serverFactoryId.length() > 0)
250
              {
251
                if (!valUtils.doesServerSupportTemplate(serverFactoryId, templateId))
252
                {
253
                  String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId);
254
                  String templateLabel = FacetUtils.getTemplateLabelById(templateId);
255
                  finalStatus = StatusUtils.errorStatus(NLS.bind(
256
                      ConsumptionUIMessages.MSG_CLIENT_SERVER_DOES_NOT_SUPPORT_TEMPLATE, new String[] { serverLabel,
257
                          templateLabel }));
258
                }
247
              }
259
              }
248
            }
260
            }
249
          }
261
          }
250
          
262
          
251
          
263
          
252
          
253
        }
264
        }
254
      }
265
      }
255
      
266
      
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java (-16 / +38 lines)
Lines 1-15 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.runtime;
15
16
Lines 19-24 Link Here
19
import org.eclipse.jst.ws.internal.common.ServerUtils;
20
import org.eclipse.jst.ws.internal.common.ServerUtils;
20
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
21
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
21
import org.eclipse.jst.ws.internal.consumption.ui.wizard.RuntimeServerSelectionDialog;
22
import org.eclipse.jst.ws.internal.consumption.ui.wizard.RuntimeServerSelectionDialog;
23
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor;
22
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
24
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
23
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
25
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
24
import org.eclipse.jst.ws.internal.ui.common.UIUtils;
26
import org.eclipse.jst.ws.internal.ui.common.UIUtils;
Lines 194-203 Link Here
194
    if( ids_.getRuntimeId() == null || runtimeLabel == null || runtimeLabel.equals("" ))
196
    if( ids_.getRuntimeId() == null || runtimeLabel == null || runtimeLabel.equals("" ))
195
    {
197
    {
196
      status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_RUNTIME, new String[]{ scenario } ) );
198
      status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_RUNTIME, new String[]{ scenario } ) );
197
    }
199
    }    
198
    else if( ids_.getServerId() == null || serverLabel.equals( "" ))
200
    else if( ids_.getServerId() == null || serverLabel.equals( "" ))
199
    {
201
    {
200
      status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) );      
202
      RuntimeDescriptor desc = WebServiceRuntimeExtensionUtils2.getRuntimeById(ids_.getRuntimeId());
203
      if (desc.getServerRequired())
204
      {
205
        status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) );
206
      }
201
    }
207
    }
202
    
208
    
203
    //
209
    //
Lines 223-245 Link Here
223
229
224
    }
230
    }
225
231
232
    //If no errors for detected, check for warnings    
226
    if (status.getSeverity() != Status.ERROR)
233
    if (status.getSeverity() != Status.ERROR)
227
    {
234
    {
228
      // Check if only stub runtime is available for the selected server type
235
      
229
236
      // Check if server type is null and the user opted to install on page 1.
230
      String serverFactoryId = ids_.getServerId();
237
      String serverFactoryId = ids_.getServerId();
231
      //
238
      if (serverFactoryId == null || serverFactoryId.length() == 0)
232
      IServerType serverType = ServerCore.findServerType(serverFactoryId);
233
      if (serverType != null)
234
      {
239
      {
240
        if (isClientContext_)
241
        {
242
          status = StatusUtils.warningStatus(NLS.bind(ConsumptionUIMessages.MSG_WARN_NO_CLIENT_SERVER, new String[0]));
243
        } else
244
        {
245
          status = StatusUtils.warningStatus(NLS.bind(ConsumptionUIMessages.MSG_WARN_NO_SERVICE_SERVER, new String[0]));
246
        }
235
247
236
        // Find a Runtime which is not a stub
248
      }
237
        IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverFactoryId);
249
      else
238
        if (install_ && nonStubRuntime == null)
250
      {
251
252
        // Check if only stub runtime is available for the selected server type
253
        IServerType serverType = ServerCore.findServerType(serverFactoryId);
254
        if (serverType != null)
239
        {
255
        {
240
          String servertypeLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId);
256
241
          status = StatusUtils.warningStatus(NLS
257
          // Find a Runtime which is not a stub
242
              .bind(ConsumptionUIMessages.MSG_WARN_STUB_ONLY, new String[] { servertypeLabel }));
258
          IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverFactoryId);
259
          if (install_ && nonStubRuntime == null)
260
          {
261
            String servertypeLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverFactoryId);
262
            status = StatusUtils.warningStatus(NLS.bind(ConsumptionUIMessages.MSG_WARN_STUB_ONLY,
263
                new String[] { servertypeLabel }));
264
          }
243
        }
265
        }
244
      }
266
      }
245
    }
267
    }
(-)src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/WebServiceRuntimeExtensionUtils2.java (-12 / +24 lines)
Lines 1-15 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner     
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner     
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
15
15
package org.eclipse.jst.ws.internal.consumption.ui.wsrt;
16
package org.eclipse.jst.ws.internal.consumption.ui.wsrt;
Lines 186-202 Link Here
186
  
187
  
187
  public static String getServiceRuntimeId(TypeRuntimeServer trs, String projectName, String templateId)
188
  public static String getServiceRuntimeId(TypeRuntimeServer trs, String projectName, String templateId)
188
  {
189
  {
189
    //Find the first client runtime that supports the implementation type, runtime, server, and project
190
    boolean serverSelected = (trs.getServerId() != null) && (trs.getServerId().length() > 0); 
191
    //Find the first service runtime that supports the implementation type, runtime, server, and project
190
    String[] descs = getServiceRuntimesByServiceType(trs.getTypeId());
192
    String[] descs = getServiceRuntimesByServiceType(trs.getTypeId());
191
    for (int i=0; i<descs.length; i++)
193
    for (int i=0; i<descs.length; i++)
192
    {
194
    {
193
      ServiceRuntimeDescriptor desc = getServiceRuntimeDescriptorById(descs[i]);      
195
      ServiceRuntimeDescriptor desc = getServiceRuntimeDescriptorById(descs[i]);      
194
      if (desc.getRuntime().getId().equals(trs.getRuntimeId()))
196
      if (desc.getRuntime().getId().equals(trs.getRuntimeId()))
195
      {
197
      {
196
        boolean supportsServer = doesServiceRuntimeSupportServer(desc.getId(), trs.getServerId());
198
        if (serverSelected)
197
        if (!supportsServer)
198
        {
199
        {
199
          continue;
200
          boolean supportsServer = doesServiceRuntimeSupportServer(desc.getId(), trs.getServerId());
201
          if (!supportsServer)
202
          {
203
            continue;
204
          }
200
        }
205
        }
201
        
206
        
202
        IProject project = ProjectUtilities.getProject(projectName);
207
        IProject project = ProjectUtilities.getProject(projectName);
Lines 505-511 Link Here
505
  public static String getDefaultServerValueFor(String typeId)
510
  public static String getDefaultServerValueFor(String typeId)
506
  {
511
  {
507
    String[] fIds = getServerFactoryIdsByServiceType(typeId);
512
    String[] fIds = getServerFactoryIdsByServiceType(typeId);
508
    if (fIds==null)
513
    if (fIds==null || fIds.length==0)
509
      return null;
514
      return null;
510
    
515
    
511
    return fIds[0];
516
    return fIds[0];
Lines 783-788 Link Here
783
  
788
  
784
  public static String getClientRuntimeId(TypeRuntimeServer trs, String projectName, String templateId)
789
  public static String getClientRuntimeId(TypeRuntimeServer trs, String projectName, String templateId)
785
  {
790
  {
791
    boolean serverSelected = (trs.getServerId()!=null) && (trs.getServerId().length()>0);
786
    //Find the first client runtime that supports the implementation type, runtime, server, and project
792
    //Find the first client runtime that supports the implementation type, runtime, server, and project
787
    String[] descs = getClientRuntimesByType(trs.getTypeId());
793
    String[] descs = getClientRuntimesByType(trs.getTypeId());
788
    for (int i=0; i<descs.length; i++)
794
    for (int i=0; i<descs.length; i++)
Lines 790-799 Link Here
790
      ClientRuntimeDescriptor desc = getClientRuntimeDescriptorById(descs[i]);      
796
      ClientRuntimeDescriptor desc = getClientRuntimeDescriptorById(descs[i]);      
791
      if (desc.getRuntime().getId().equals(trs.getRuntimeId()))
797
      if (desc.getRuntime().getId().equals(trs.getRuntimeId()))
792
      {
798
      {
793
        boolean supportsServer = doesClientRuntimeSupportServer(desc.getId(), trs.getServerId());
799
        if (serverSelected)
794
        if (!supportsServer)
795
        {
800
        {
796
          continue;
801
          boolean supportsServer = doesClientRuntimeSupportServer(desc.getId(), trs.getServerId());
802
          if (!supportsServer)
803
          {
804
            continue;
805
          }
797
        }
806
        }
798
        
807
        
799
        IProject project = ProjectUtilities.getProject(projectName);
808
        IProject project = ProjectUtilities.getProject(projectName);
Lines 873-879 Link Here
873
      //Check if this serviceRuntime supports the implementation type
882
      //Check if this serviceRuntime supports the implementation type
874
      if (desc.getClientImplementationType().getId().equals(clientImplId))
883
      if (desc.getClientImplementationType().getId().equals(clientImplId))
875
      {
884
      {
876
        runtimeIds.add(desc.getRuntime().getId());
885
        if (!runtimeIds.contains(desc.getRuntime().getId()))
886
        {
887
          runtimeIds.add(desc.getRuntime().getId());
888
        }
877
      }
889
      }
878
    }
890
    }
879
    
891
    
(-)src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/RuntimeDescriptor.java (-3 / +25 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.jst.ws.internal.consumption.ui.wsrt;
15
package org.eclipse.jst.ws.internal.consumption.ui.wsrt;
Lines 19-24 Link Here
19
  private IConfigurationElement elem;
22
  private IConfigurationElement elem;
20
  private String id;
23
  private String id;
21
  private String label;
24
  private String label;
25
  private String serverRequiredString;
26
  private boolean serverRequired;
22
  
27
  
23
28
24
  public RuntimeDescriptor(IConfigurationElement elem)
29
  public RuntimeDescriptor(IConfigurationElement elem)
Lines 49-52 Link Here
49
    return new String[]{"13", "14"};
54
    return new String[]{"13", "14"};
50
  }
55
  }
51
  
56
  
57
  public boolean getServerRequired()
58
  {
59
    if (serverRequiredString == null)
60
    {     
61
      //Defaults to true if the extension omits this attribute
62
      serverRequired = true;
63
64
      serverRequiredString = elem.getAttribute("serverRequired");
65
      if (serverRequiredString != null)
66
      {
67
        serverRequired = Boolean.valueOf(serverRequiredString).booleanValue();
68
      }             
69
      
70
    }    
71
    return serverRequired;    
72
  }
73
  
52
}
74
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/command/AntDefaultingOperation.java (+23 lines)
Lines 1-3 Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
1
package org.eclipse.jst.ws.internal.consumption.ui.command;
14
package org.eclipse.jst.ws.internal.consumption.ui.command;
2
15
3
import org.eclipse.core.commands.ExecutionException;
16
import org.eclipse.core.commands.ExecutionException;
Lines 33-36 Link Here
33
	{
46
	{
34
		return false;
47
		return false;
35
	}
48
	}
49
    
50
    public boolean getDeployService()
51
    {
52
      return true;
53
    }
54
    
55
    public boolean getDeployClient()
56
    {
57
      return true;
58
    }
36
}
59
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUI.properties (-5 / +11 lines)
Lines 1-16 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2004 IBM Corporation and others.
2
# Copyright (c) 2004, 2006 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
6
# http://www.eclipse.org/legal/epl-v10.html
7
#
7
#
8
# Contributors:
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
9
# IBM Corporation - initial API and implementation
10
#  yyyymmdd bug      Email and other contact information
10
# yyyymmdd bug      Email and other contact information
11
#  -------- -------- -----------------------------------------------------------
11
# -------- -------- -----------------------------------------------------------
12
#  20060204 124143   rsinha@ca.ibm.com - Rupam Kuehner
12
#  20060204 124143   rsinha@ca.ibm.com - Rupam Kuehner
13
#  20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner     
13
#  20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner     
14
# 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
14
###############################################################################
15
###############################################################################
15
16
16
#
17
#
Lines 58-64 Link Here
58
# General messages.
59
# General messages.
59
#
60
#
60
MSG_ERROR_TASK_EXCEPTED=IWAB0234E An internal error occurred. Details: {0}
61
MSG_ERROR_TASK_EXCEPTED=IWAB0234E An internal error occurred. Details: {0}
61
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}
62
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.
62
63
63
64
64
#
65
#
Lines 148-153 Link Here
148
MSG_NO_SERVER=No server specified for the {0} scenario.
149
MSG_NO_SERVER=No server specified for the {0} scenario.
149
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. 
150
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. 
150
MSG_WARN_STUB_ONLY={0} has only stub runtimes associated with it so the server will not be created or started.
151
MSG_WARN_STUB_ONLY={0} has only stub runtimes associated with it so the server will not be created or started.
152
MSG_WARN_NO_SERVICE_SERVER=No server has been selected. The Web service will not be deployed, installed, or run.
153
MSG_WARN_NO_CLIENT_SERVER=No server has been selected. The Web service client will not be deployed, installed, or run.
151
154
152
MSG_SERVER_TARGET_MISMATCH=The project, {0}, has a server target which is not compatible with the selected server type
155
MSG_SERVER_TARGET_MISMATCH=The project, {0}, has a server target which is not compatible with the selected server type
153
MSG_J2EE_MISMATCH=The project, {0}, has a different J2EE level from the selected J2EE level
156
MSG_J2EE_MISMATCH=The project, {0}, has a different J2EE level from the selected J2EE level
Lines 189-194 Link Here
189
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.
192
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.
190
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.
193
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.
191
194
195
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.  
196
197
192
# WebServiceClientRuntimeSelectionPage
198
# WebServiceClientRuntimeSelectionPage
193
PAGE_TITLE_WS_CLIENT_RUNTIME_SELECTION=Client Environment Configuration
199
PAGE_TITLE_WS_CLIENT_RUNTIME_SELECTION=Client Environment Configuration
194
PAGE_DESC_WS_CLIENT_RUNTIME_SELECTION=Choose from the list of supported runtimes and servers for the client environment, or use the default settings.
200
PAGE_DESC_WS_CLIENT_RUNTIME_SELECTION=Choose from the list of supported runtimes and servers for the client environment, or use the default settings.
(-)src/org/eclipse/jst/ws/internal/consumption/ui/ConsumptionUIMessages.java (-3 / +8 lines)
Lines 1-16 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 IBM Corporation and others.
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124143   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124143   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner     
13
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner     
14
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
14
 *******************************************************************************/
15
 *******************************************************************************/
15
package org.eclipse.jst.ws.internal.consumption.ui;
16
package org.eclipse.jst.ws.internal.consumption.ui;
16
17
Lines 85-90 Link Here
85
	public static String MSG_NO_SERVER;
86
	public static String MSG_NO_SERVER;
86
	public static String MSG_ERROR_STUB_ONLY;
87
	public static String MSG_ERROR_STUB_ONLY;
87
	public static String MSG_WARN_STUB_ONLY;
88
	public static String MSG_WARN_STUB_ONLY;
89
    public static String MSG_WARN_NO_SERVICE_SERVER;
90
    public static String MSG_WARN_NO_CLIENT_SERVER;
88
	public static String MSG_SERVER_TARGET_MISMATCH;
91
	public static String MSG_SERVER_TARGET_MISMATCH;
89
	public static String MSG_J2EE_MISMATCH;
92
	public static String MSG_J2EE_MISMATCH;
90
	public static String MSG_SERVICE_PROJECT_EMPTY;
93
	public static String MSG_SERVICE_PROJECT_EMPTY;
Lines 327-334 Link Here
327
    public static String MSG_ERROR_WSDD_NOT_FOUND;
330
    public static String MSG_ERROR_WSDD_NOT_FOUND;
328
    public static String MSG_CLIENT_CANNOT_ASSOCIATE;
331
    public static String MSG_CLIENT_CANNOT_ASSOCIATE;
329
    public static String MSG_SERVICE_CANNOT_ASSOCIATE;
332
    public static String MSG_SERVICE_CANNOT_ASSOCIATE;
333
    public static String MSG_PROJECT_MUST_EXIST;
334
330
335
331
	static {
336
	static {
332
		NLS.initializeMessages(BUNDLE_NAME, ConsumptionUIMessages.class);
337
		NLS.initializeMessages(BUNDLE_NAME, ConsumptionUIMessages.class);
333
	}
338
	}
334
}
339
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ClientExtensionDefaultingCommand.java (-21 / +69 lines)
Lines 1-25 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions;
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions;
15
16
16
import org.eclipse.core.commands.ExecutionException;
17
import org.eclipse.core.commands.ExecutionException;
18
import org.eclipse.core.resources.IProject;
17
import org.eclipse.core.runtime.IAdaptable;
19
import org.eclipse.core.runtime.IAdaptable;
18
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.eclipse.core.runtime.IProgressMonitor;
19
import org.eclipse.core.runtime.IStatus;
21
import org.eclipse.core.runtime.IStatus;
20
import org.eclipse.core.runtime.Status;
22
import org.eclipse.core.runtime.Status;
23
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
21
import org.eclipse.jst.ws.internal.common.ServerUtils;
24
import org.eclipse.jst.ws.internal.common.ServerUtils;
22
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
25
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
26
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor;
23
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
27
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
24
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
28
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
25
import org.eclipse.osgi.util.NLS;
29
import org.eclipse.osgi.util.NLS;
Lines 38-43 Link Here
38
  private TypeRuntimeServer    clientIds_;
42
  private TypeRuntimeServer    clientIds_;
39
  private String               clientRuntimeId_;
43
  private String               clientRuntimeId_;
40
  private Boolean              testService;
44
  private Boolean              testService;
45
  private Boolean              deployClient;
41
  private Boolean              installClient;
46
  private Boolean              installClient;
42
  private ResourceContext      resourceContext;
47
  private ResourceContext      resourceContext;
43
  
48
  
Lines 280-285 Link Here
280
  }
285
  }
281
286
282
  /**
287
  /**
288
   * @return Returns the deployService.
289
   */
290
  public Boolean getDeployClient()
291
  {
292
    return deployClient;
293
  }
294
  
295
  /**
283
   * @return Returns the installClient.
296
   * @return Returns the installClient.
284
   */
297
   */
285
  public Boolean getInstallClient()
298
  public Boolean getInstallClient()
Lines 469-474 Link Here
469
    //when the user clicks Finish prior to page 3 of the wizard.
482
    //when the user clicks Finish prior to page 3 of the wizard.
470
    
483
    
471
    IStatus status = Status.OK_STATUS;
484
    IStatus status = Status.OK_STATUS;
485
    
486
    //default deployClient to true. It will get set to false later if there is no
487
    //server type selected.
488
    deployClient = Boolean.TRUE;
489
    
472
    String scenario = ConsumptionUIMessages.MSG_CLIENT_SUB;
490
    String scenario = ConsumptionUIMessages.MSG_CLIENT_SUB;
473
491
474
    //Ensure server and runtime are non-null
492
    //Ensure server and runtime are non-null
Lines 484-513 Link Here
484
    
502
    
485
    if( serverId == null || serverId.length()==0)
503
    if( serverId == null || serverId.length()==0)
486
    {
504
    {
487
      status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) );
505
      //Popup and error if the selected client project does not exist.
488
      env.getStatusHandler().reportError(status);
506
      IProject clientProject = ProjectUtilities.getProject(clientProjectName_);
489
    }
507
      if (!clientProject.exists())
490
    
508
      {
491
    //ensure the server, runtime, and type are compatible
509
        String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
492
    if (!WebServiceRuntimeExtensionUtils2.isServerClientRuntimeTypeSupported(serverId, runtimeId, typeId)) 
510
        status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[]{runtimeLabel } ) );
493
    {    
511
        env.getStatusHandler().reportError(status);
494
      String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId);
512
      }
495
      String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
513
      else
496
      status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[]{ serverLabel, runtimeLabel } ) );
514
      {
497
      env.getStatusHandler().reportError(status);
515
        RuntimeDescriptor desc = WebServiceRuntimeExtensionUtils2.getRuntimeById(runtimeId);
516
517
        if (desc.getServerRequired())
518
        {
519
          status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[] { scenario }));
520
          env.getStatusHandler().reportError(status);
521
        } 
522
        else
523
        {
524
          // No server has been selected and the selected Web service runtime
525
          // does not
526
          // require a server. Set deploy, install, run, and test to false.
527
          deployClient = Boolean.FALSE;
528
          installClient = Boolean.FALSE;
529
          testService = Boolean.FALSE;
530
        }
531
      }
498
    }
532
    }
499
    
533
    
500
    //Determine if the selected server type has only stub runtimes associated with it.
534
    //If the server is non-null, ensure the server, runtime, and type are compatible
501
    //If so, set install and test to false in the context.
535
    if (serverId != null && serverId.length() > 0)
502
    IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId);
503
    if (nonStubRuntime == null)
504
    {
536
    {
505
      installClient = Boolean.FALSE;
537
      if (!WebServiceRuntimeExtensionUtils2.isServerClientRuntimeTypeSupported(serverId, runtimeId, typeId))
506
      testService = Boolean.FALSE;
538
      {
539
        String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId);
540
        String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
541
        status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[] { serverLabel,
542
            runtimeLabel }));
543
        env.getStatusHandler().reportError(status);
544
      }
545
546
      // Determine if the selected server type has only stub runtimes associated
547
      // with it.
548
      // If so, set install and test to false in the context.
549
      IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId);
550
      if (nonStubRuntime == null)
551
      {
552
        installClient = Boolean.FALSE;
553
        testService = Boolean.FALSE;
554
      }
507
    }
555
    }
508
556
509
    return status;
557
    return status;
510
  }
558
  }
511
  
559
  
512
  
560
  
513
}
561
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/extensions/ServerExtensionDefaultingCommand.java (-22 / +71 lines)
Lines 1-25 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060204 124408   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions;
15
package org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions;
15
16
16
import org.eclipse.core.commands.ExecutionException;
17
import org.eclipse.core.commands.ExecutionException;
18
import org.eclipse.core.resources.IProject;
17
import org.eclipse.core.runtime.IAdaptable;
19
import org.eclipse.core.runtime.IAdaptable;
18
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.eclipse.core.runtime.IProgressMonitor;
19
import org.eclipse.core.runtime.IStatus;
21
import org.eclipse.core.runtime.IStatus;
20
import org.eclipse.core.runtime.Status;
22
import org.eclipse.core.runtime.Status;
23
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
21
import org.eclipse.jst.ws.internal.common.ServerUtils;
24
import org.eclipse.jst.ws.internal.common.ServerUtils;
22
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
25
import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages;
26
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.RuntimeDescriptor;
23
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
27
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils2;
24
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
28
import org.eclipse.jst.ws.internal.data.TypeRuntimeServer;
25
import org.eclipse.osgi.util.NLS;
29
import org.eclipse.osgi.util.NLS;
Lines 33-38 Link Here
33
37
34
public class ServerExtensionDefaultingCommand extends AbstractDataModelOperation
38
public class ServerExtensionDefaultingCommand extends AbstractDataModelOperation
35
{
39
{
40
  private Boolean              deployService;
36
  private Boolean              installService;
41
  private Boolean              installService;
37
  private Boolean              startService;
42
  private Boolean              startService;
38
  private Boolean              testService;
43
  private Boolean              testService;
Lines 171-176 Link Here
171
  }
176
  }
172
177
173
  /**
178
  /**
179
   * @return Returns the deployService.
180
   */
181
  public Boolean getDeployService()
182
  {
183
    return deployService;
184
  }
185
  
186
  /**
174
   * @return Returns the installService.
187
   * @return Returns the installService.
175
   */
188
   */
176
  public Boolean getInstallService()
189
  public Boolean getInstallService()
Lines 296-301 Link Here
296
    //when the user clicks Finish prior to page 3 of the wizard.
309
    //when the user clicks Finish prior to page 3 of the wizard.
297
    
310
    
298
    IStatus status = Status.OK_STATUS;
311
    IStatus status = Status.OK_STATUS;
312
    
313
    //default deployService to true. It will get set to false later if there is no
314
    //server type selected.
315
    deployService = Boolean.TRUE;
316
    
299
    String scenario = ConsumptionUIMessages.MSG_SERVICE_SUB;
317
    String scenario = ConsumptionUIMessages.MSG_SERVICE_SUB;
300
318
301
    //Ensure server and runtime are non-null
319
    //Ensure server and runtime are non-null
Lines 311-338 Link Here
311
    
329
    
312
    if( serverId == null || serverId.length()==0)
330
    if( serverId == null || serverId.length()==0)
313
    {
331
    {
314
      status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[]{ scenario } ) );
332
      //Popup and error if the selected service project does not exist.
315
      env.getStatusHandler().reportError(status);
333
      IProject serviceProject = ProjectUtilities.getProject(serviceProjectName_);
316
    }
334
      if (!serviceProject.exists())        
317
    
335
      {
318
    //ensure the server, runtime, and type are compatible
336
        String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
319
    if (!WebServiceRuntimeExtensionUtils2.isServerRuntimeTypeSupported(serverId, runtimeId, typeId)) 
337
        status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_ERROR_NO_SERVER_RUNTIME, new String[]{ runtimeLabel } ) );
320
    {    
338
        env.getStatusHandler().reportError(status);
321
      String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId);
339
      }
322
      String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
340
      else
323
      status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[]{ serverLabel, runtimeLabel } ) );
341
      {
324
      env.getStatusHandler().reportError(status);
342
343
        RuntimeDescriptor desc = WebServiceRuntimeExtensionUtils2.getRuntimeById(runtimeId);
344
        if (desc.getServerRequired())
345
        {
346
          status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_NO_SERVER, new String[] { scenario }));
347
          env.getStatusHandler().reportError(status);
348
        } 
349
        else
350
        {
351
          // No server has been selected and the selected Web service runtime
352
          // does not require a server. Set deploy, install, run, and test to false.
353
          deployService = Boolean.FALSE;
354
          installService = Boolean.FALSE;
355
          startService = Boolean.FALSE;
356
          testService = Boolean.FALSE;
357
        }
358
      }
325
    }
359
    }
326
    
360
    
327
    //Determine if the selected server type has only stub runtimes associated with it.
361
    //If the server is non-null, ensure the server, runtime, and type are compatible
328
    //If so, set install, run, and test to false in the context.
362
    if (serverId != null && serverId.length() > 0)
329
    IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId);
330
    if (nonStubRuntime == null)
331
    {
363
    {
332
      installService = Boolean.FALSE;
364
      if (!WebServiceRuntimeExtensionUtils2.isServerRuntimeTypeSupported(serverId, runtimeId, typeId))
333
      startService = Boolean.FALSE;
365
      {
334
      testService = Boolean.FALSE;
366
        String serverLabel = WebServiceRuntimeExtensionUtils2.getServerLabelById(serverId);
367
        String runtimeLabel = WebServiceRuntimeExtensionUtils2.getRuntimeLabelById(runtimeId);
368
        status = StatusUtils.errorStatus(NLS.bind(ConsumptionUIMessages.MSG_INVALID_SRT_SELECTIONS, new String[] { serverLabel,
369
            runtimeLabel }));
370
        env.getStatusHandler().reportError(status);
371
      }
372
373
      // Determine if the selected server type has only stub runtimes associated
374
      // with it.
375
      // If so, set install, run, and test to false in the context.
376
      IRuntime nonStubRuntime = ServerUtils.getNonStubRuntime(serverId);
377
      if (nonStubRuntime == null)
378
      {
379
        installService = Boolean.FALSE;
380
        startService = Boolean.FALSE;
381
        testService = Boolean.FALSE;
382
      }
335
    }
383
    }
384
    
336
    return status;
385
    return status;
337
  }
386
  }
338
}
387
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/extension/ClientRootFragment.java (-3 / +6 lines)
Lines 1-15 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner          
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner          
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
15
15
package org.eclipse.jst.ws.internal.consumption.ui.extension;
16
package org.eclipse.jst.ws.internal.consumption.ui.extension;
Lines 92-97 Link Here
92
  	registry.addMapping( PreClientDevelopCommand.class, "Ear", RunClientFragment.class );
93
  	registry.addMapping( PreClientDevelopCommand.class, "Ear", RunClientFragment.class );
93
    
94
    
94
    //Mappings from framework to framework commands
95
    //Mappings from framework to framework commands
96
    registry.addMapping( PreClientDevelopCommand.class, "Context", PreClientDeployCommand.class );
97
    
95
    registry.addMapping( PreClientDevelopCommand.class, "WebService", PreClientAssembleCommand.class );
98
    registry.addMapping( PreClientDevelopCommand.class, "WebService", PreClientAssembleCommand.class );
96
    registry.addMapping( PreClientDevelopCommand.class, "Project", PreClientAssembleCommand.class );
99
    registry.addMapping( PreClientDevelopCommand.class, "Project", PreClientAssembleCommand.class );
97
    registry.addMapping( PreClientDevelopCommand.class, "Module", PreClientAssembleCommand.class );
100
    registry.addMapping( PreClientDevelopCommand.class, "Module", PreClientAssembleCommand.class );
(-)src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDevelopCommand.java (-4 / +11 lines)
Lines 1-15 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner     
12
 * 20060131 121071   rsinha@ca.ibm.com - Rupam Kuehner     
13
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
13
 *******************************************************************************/
14
 *******************************************************************************/
14
15
15
package org.eclipse.jst.ws.internal.consumption.ui.extension;
16
package org.eclipse.jst.ws.internal.consumption.ui.extension;
Lines 53-58 Link Here
53
  private IWebServiceClient webServiceClient_;
54
  private IWebServiceClient webServiceClient_;
54
  private String            j2eeLevel_;
55
  private String            j2eeLevel_;
55
  private ResourceContext   resourceContext_;
56
  private ResourceContext   resourceContext_;
57
  private boolean                       deploy_;
56
  private boolean						test_;
58
  private boolean						test_;
57
  private boolean						install_;
59
  private boolean						install_;
58
  private boolean						run_;
60
  private boolean						run_;
Lines 91-97 Link Here
91
    
93
    
92
    webServiceClient_ = wsrt.getWebServiceClient(wsInfo);
94
    webServiceClient_ = wsrt.getWebServiceClient(wsInfo);
93
    WebServiceScenario scenario = WebServiceScenario.CLIENT_LITERAL;
95
    WebServiceScenario scenario = WebServiceScenario.CLIENT_LITERAL;
94
    context_ = new SimpleContext(true, true, true, install_, run_, true, test_,
96
    context_ = new SimpleContext(true, true, deploy_, install_, run_, true, test_,
95
        false, scenario, resourceContext_.isOverwriteFilesEnabled(),
97
        false, scenario, resourceContext_.isOverwriteFilesEnabled(),
96
        resourceContext_.isCreateFoldersEnabled(), resourceContext_
98
        resourceContext_.isCreateFoldersEnabled(), resourceContext_
97
            .isCheckoutFilesEnabled());
99
            .isCheckoutFilesEnabled());
Lines 212-217 Link Here
212
  {
214
  {
213
	ear_ = ear;  
215
	ear_ = ear;  
214
  }
216
  }
217
  
218
  public void setDeployClient(boolean deployClient)
219
  {
220
      deploy_ = deployClient;
221
  }
215
	
222
	
216
  public void setInstallClient(boolean installClient)
223
  public void setInstallClient(boolean installClient)
217
  {
224
  {
(-)src/org/eclipse/jst/ws/internal/consumption/ui/extension/PreClientDeployCommand.java (-3 / +20 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.jst.ws.internal.consumption.ui.extension;
15
package org.eclipse.jst.ws.internal.consumption.ui.extension;
Lines 16-26 Link Here
16
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.Status;
20
import org.eclipse.core.runtime.Status;
18
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
21
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
22
import org.eclipse.wst.ws.internal.wsrt.IContext;
19
23
20
public class PreClientDeployCommand extends AbstractDataModelOperation 
24
public class PreClientDeployCommand extends AbstractDataModelOperation 
21
{
25
{
26
  private IContext    context_;
27
  
22
  public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
28
  public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
23
  {
29
  {
30
    if (context_.getDeploy())
31
    {
32
      //If and when there are framework specific deploy things to be done,
33
      //do them here.
34
    }
35
    
24
    return Status.OK_STATUS;
36
    return Status.OK_STATUS;
25
  }
37
  }
38
  
39
  public void setContext(IContext context)
40
  {
41
      context_=context;
42
  }    
26
}
43
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/widgets/ClientWizardWidgetDefaultingCommand.java (-5 / +13 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.consumption.ui.widgets;
14
package org.eclipse.jst.ws.internal.consumption.ui.widgets;
12
15
Lines 62-68 Link Here
62
    //String                       runtime  = registry.getAllClientRuntimes()[0];
65
    //String                       runtime  = registry.getAllClientRuntimes()[0];
63
		String                       runtime  = WebServiceRuntimeExtensionUtils2.getAllRuntimesForClientSide()[0];
66
		String                       runtime  = WebServiceRuntimeExtensionUtils2.getAllRuntimesForClientSide()[0];
64
    //String                       server   = registry.getAllClientServerFactoryIds()[0];
67
    //String                       server   = registry.getAllClientServerFactoryIds()[0];
65
		String                       server   = WebServiceRuntimeExtensionUtils2.getAllClientServerFactoryIds()[0];
68
        String[] servers = WebServiceRuntimeExtensionUtils2.getAllClientServerFactoryIds();
69
        String server = null;
70
        if (servers != null && servers.length>0)
71
        {
72
		  server   = servers[0];
73
        }
66
    TypeRuntimeServer            result   = new TypeRuntimeServer();
74
    TypeRuntimeServer            result   = new TypeRuntimeServer();
67
		// rskreg
75
		// rskreg
68
    
76
    
Lines 77-80 Link Here
77
  {
85
  {
78
    return Status.OK_STATUS;
86
    return Status.OK_STATUS;
79
  }
87
  }
80
}
88
}
(-)src/org/eclipse/jst/ws/internal/consumption/ui/wizard/RuntimeServerSelectionDialog.java (-4 / +7 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2004 IBM Corporation and others.
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.consumption.ui.wizard;
14
package org.eclipse.jst.ws.internal.consumption.ui.wizard;
12
15
Lines 473-479 Link Here
473
		runtimes = WebServiceRuntimeExtensionUtils2.getRuntimesByServiceType(typeId_);
476
		runtimes = WebServiceRuntimeExtensionUtils2.getRuntimesByServiceType(typeId_);
474
    }
477
    }
475
    else {
478
    else {
476
	  runtimes = WebServiceRuntimeExtensionUtils2.getAllRuntimesForClientSide();
479
	  runtimes = WebServiceRuntimeExtensionUtils2.getRuntimesByClientType(typeId_);
477
    }
480
    }
478
481
479
    TreeItem[] runtimeName = new TreeItem[runtimes.length];
482
    TreeItem[] runtimeName = new TreeItem[runtimes.length];
(-)src/org/eclipse/jst/ws/internal/consumption/ui/ant/AntClientRootCommandFragment.java (-3 / +7 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   119111 rsinha@ca.ibm.com - Rupam Kuehner
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.consumption.ui.ant;
14
package org.eclipse.jst.ws.internal.consumption.ui.ant;
12
15
Lines 112-117 Link Here
112
      dataRegistry.addMapping(AntDefaultingOperation.class, "ClientIdsFixed", ClientRuntimeSelectionWidgetDefaultingCommand.class);
115
      dataRegistry.addMapping(AntDefaultingOperation.class, "ClientIdsFixed", ClientRuntimeSelectionWidgetDefaultingCommand.class);
113
      dataRegistry.addMapping(AntDefaultingOperation.class, "StartService", PreClientDevelopCommand.class);
116
      dataRegistry.addMapping(AntDefaultingOperation.class, "StartService", PreClientDevelopCommand.class);
114
      dataRegistry.addMapping(AntDefaultingOperation.class, "InstallClient", PreClientDevelopCommand.class);        
117
      dataRegistry.addMapping(AntDefaultingOperation.class, "InstallClient", PreClientDevelopCommand.class);        
118
      dataRegistry.addMapping(AntDefaultingOperation.class, "DeployClient", PreClientDevelopCommand.class);
115
          
119
          
116
      // Map WSDLSelectionWidgetDefaultingCommand command.
120
      // Map WSDLSelectionWidgetDefaultingCommand command.
117
      dataRegistry.addMapping(WSDLSelectionWidgetDefaultingCommand.class, "GenWSIL", ClientExtensionDefaultingCommand.class);
121
      dataRegistry.addMapping(WSDLSelectionWidgetDefaultingCommand.class, "GenWSIL", ClientExtensionDefaultingCommand.class);
(-)src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ProjectName2IProjectTransformer.java (-13 / +22 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004 IBM Corporation and others.
2
 * Copyright (c) 2004, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * yyyymmdd bug      Email and other contact information
11
 * -------- -------- -----------------------------------------------------------
12
 * 20060221   124302 rsinha@ca.ibm.com - Rupam Kuehner
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.jst.ws.internal.consumption.ui.command.data;
14
package org.eclipse.jst.ws.internal.consumption.ui.command.data;
12
15
Lines 17-31 Link Here
17
{
20
{
18
  public Object transform(Object value)
21
  public Object transform(Object value)
19
  {
22
  {
20
	String project     = (String)value;
23
    if (value != null)
21
	int    slashIndex  = project.indexOf( '/' );
24
    {
22
	String projectName = project;
25
      String project = (String) value;
23
	
26
      int slashIndex = project.indexOf('/');
24
	if( slashIndex != -1 )
27
      String projectName = project;
25
	{
28
26
	  projectName = project.substring( 0, slashIndex );
29
      if (slashIndex != -1)
27
	}
30
      {
28
	
31
        projectName = project.substring(0, slashIndex);
29
    return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
32
      }
33
34
      return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
35
    } else
36
    {
37
      return null;
38
    }
30
  }
39
  }
31
}
40
}

Return to bug 119111