diff options
Diffstat (limited to 'bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws')
3 files changed, 15 insertions, 6 deletions
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java index 4e16c4650..0790f970b 100644 --- a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java +++ b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ClientRuntimeSelectionWidgetDefaultingCommand.java @@ -989,8 +989,11 @@ public class ClientRuntimeSelectionWidgetDefaultingCommand extends SimpleCommand } else { + String serverId = clientIds_.getServerId(); + if (serverId != null) + { //Use the server type - String clientServerTargetId = ServerUtils.getRuntimeTargetIdFromFactoryId(clientIds_.getServerId()); + String clientServerTargetId = ServerUtils.getRuntimeTargetIdFromFactoryId(serverId); if (clientServerTargetId!=null && clientServerTargetId.length()>0) { if (!ServerUtils.isTargetValidForEAR(clientServerTargetId,clientJ2EEVersion_)) @@ -1001,6 +1004,7 @@ public class ClientRuntimeSelectionWidgetDefaultingCommand extends SimpleCommand clientNeedEAR_ = false; } } + } } } diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java index 0f470b9f4..971c32941 100644 --- a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java +++ b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/ProjectSelectionWidget.java @@ -490,7 +490,7 @@ public class ProjectSelectionWidget extends SimpleWidgetDataContributor { else { //Use the server type - if (trsIds_ != null) + if (trsIds_ != null && trsIds_.getServerId() != null) { String targetId = ServerUtils.getRuntimeTargetIdFromFactoryId(trsIds_.getServerId()); if (targetId!=null && targetId.length()>0) diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java index da499cd76..fa4e9e106 100644 --- a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java +++ b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/widgets/runtime/RuntimeServerSelectionWidget.java @@ -135,19 +135,24 @@ public class RuntimeServerSelectionWidget extends SimpleWidgetDataContributor // Get the label for the general server type. //WebServiceServer server = registry.getWebServiceServerByFactoryId( ids_.getServerId() ); //serverLabel = server == null ? "" : server.getLabel(); - serverLabel = WebServiceRuntimeExtensionUtils.getServerLabelById(ids_.getServerId()); + String serverId = ids_.getServerId(); + if (serverId != null) + serverLabel = WebServiceRuntimeExtensionUtils.getServerLabelById(serverId); } else { // Get the label for the server instance. //serverLabel = registry.getServerInstanceLabelFromInstanceId( ids_.getServerInstanceId() ); - serverLabel = WebServiceRuntimeExtensionUtils.getServerInstanceLabelFromInstanceId(ids_.getServerInstanceId()); + String serverInstanceId = ids_.getServerInstanceId(); + if (serverInstanceId != null) + serverLabel = WebServiceRuntimeExtensionUtils.getServerInstanceLabelFromInstanceId(serverInstanceId); } // rskreg runtimeLabel = runtimeLabel == null ? "" : runtimeLabel; runtime_.setText( runtimeLabel ); - server_.setText( serverLabel ); + if (serverLabel != null) + server_.setText( serverLabel ); j2eeVersionText.setText((j2eeVersion_ != null) ? J2EEUtils.getLabelFromJ2EEVersion(j2eeVersion_) : msgUtils_.getMessage("LABEL_NA")); } @@ -200,7 +205,7 @@ public class RuntimeServerSelectionWidget extends SimpleWidgetDataContributor String runtimeLabel = WebServiceRuntimeExtensionUtils.getRuntimeLabelById( ids_.getRuntimeId() ); //WebServiceServer server = wsctRegistry.getWebServiceServerByFactoryId( ids_.getServerId() ); //String serverLabel = server == null ? "" : server.getLabel(); - String serverLabel = WebServiceRuntimeExtensionUtils.getServerLabelById(ids_.getServerId()); + String serverLabel = ids_.getServerId() == null ? "" : WebServiceRuntimeExtensionUtils.getServerLabelById(ids_.getServerId()); // rskreg if( ids_.getRuntimeId() == null || runtimeLabel == null || runtimeLabel.equals("" )) |