[prev in list] [next in list] [prev in thread] [next in thread]
List: wsf-java-dev
Subject: [wsf-java-dev] svn commit r5353 - in
From: svn () wso2 ! org (svn () wso2 ! org)
Date: 2007-07-13 6:28:10
Message-ID: E1I9LBb-0006mK-Ke () wso2 ! org
[Download RAW message or body]
Author: sandakith
Date: Fri Jul 13 06:26:08 2007
New Revision: 5353
Modified:
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUI.properties
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUIMessages.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/commands/WSASWebservicesServerCommand.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/deligate/WSASCoreFacetInstallDelegate.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASDefaultingCommand.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASServiceInstallCommand.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.ui/src/org/wso2/wsf/ide/consumption/ui/preferences/WSASRuntimePreferencePage.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStartCommand.java
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStopCommand.java
Log:
Refactored the codebase,
Include the system properties to export the security credentials for the client with \
WSE
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUI.properties
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUI.properties (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUI.properties Fri \
Jul 13 06:26:08 2007 @@ -57,7 +57,7 @@
DIR_DOT_PLUGINS=.plugins
DIR_UNZIP=unzip
-LOCAL_SERVER_PORT=http://localhost:8080
+LOCAL_SERVER_PORT=http://localhost:9762
SERVICES=services
WEBAPP_EXPLODED_SERVER_LOCATION_FILE=server.properties
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUIMessages.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUIMessages.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/core/plugin/messages/WSASCoreUIMessages.java Fri \
Jul 13 06:26:08 2007 @@ -20,7 +20,31 @@
public final class WSASCoreUIMessages extends NLS {
private static final String BUNDLE_NAME =
- "org.wso2.wsf.ide.core.plugin.messages.WSASCoreUI";//$NON-NLS-1$
+ "org.wso2.wsf.ide.core.plugin.messages.WSASCoreUI"; //$NON-NLS-1$
+ public static final String DIR_BIN = "bin" ; //$NON-NLS-1$
+ public static final String WSAS_START_BAT = "wso2wsas.bat" ; //$NON-NLS-1$
+ public static final String WSAS_START_SH = "wso2.wsas.sh" ; //$NON-NLS-1$
+ public static final String WSAS_STOP_BAT = "shutdown.bat" ; //$NON-NLS-1$
+ public static final String WSAS_STOP_SH = "shutdown.sh" ; //$NON-NLS-1$
+
+ public static final String SHELL = "sh " ; //$NON-NLS-1$
+ public static final String XTERM_EXEC = "xterm -e sh " ; //$NON-NLS-1$
+ public static final String PROPERTIES_OS_NAME = "os.name" ; //$NON-NLS-1$
+
+
+ public static final String WSAS_ALREADY_RUNNING = "WSAS Already Running !!" ; \
//$NON-NLS-1$ + public static final String WSAS_NOT_ACTIVE = "WSAS Instance is not \
active !!" ; //$NON-NLS-1$ +
+
+ public static final String OS_WIN_9 = "windows 9" ; //$NON-NLS-1$
+ public static final String OS_WIN_NT = "nt" ; //$NON-NLS-1$
+ public static final String OS_WIN_2000 = "windows 2000" ; //$NON-NLS-1$
+ public static final String OS_WIN_XP = "windows xp" ; //$NON-NLS-1$
+
+
+
+
+
private WSASCoreUIMessages() {
// Do not instantiate
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/commands/WSASWebservicesServerCommand.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/commands/WSASWebservicesServerCommand.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/commands/WSASWebservicesServerCommand.java Fri \
Jul 13 06:26:08 2007 @@ -45,7 +45,7 @@
return Status.OK_STATUS;
}
- public IStatus exexuteOverrride(IProgressMonitor monitor) {
+ public IStatus exexuteOverride(IProgressMonitor monitor) {
//Copy the wsas libs in to this client project
IStatus status =null;
String runtimeLocation = null;
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/deligate/WSASCoreFacetInstallDelegate.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/deligate/WSASCoreFacetInstallDelegate.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.core/src/org/wso2/wsf/ide/facet/deligate/WSASCoreFacetInstallDelegate.java Fri \
Jul 13 06:26:08 2007 @@ -36,7 +36,7 @@
WSASWebservicesServerCommand command = new WSASWebservicesServerCommand(
project.toString()
);
- status = command.exexuteOverrride(monitor);
+ status = command.exexuteOverride(monitor);
if (status.getCode() == Status.OK_STATUS.getCode() ){
RuntimePropertyUtils.writeServerStausToPropertiesFile(
WSASCoreUIMessages.SERVER_STATUS_PASS);
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASDefaultingCommand.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASDefaultingCommand.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASDefaultingCommand.java Fri \
Jul 13 06:26:08 2007 @@ -15,6 +15,7 @@
*/
package org.wso2.wsf.ide.creation.core.command;
+import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -30,6 +31,8 @@
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
import org.wso2.wsf.ide.consumption.core.utils.DefaultCodegenUtil;
import org.wso2.wsf.ide.core.context.ServiceContext;
+import org.wso2.wsf.ide.core.context.WSASEmitterContext;
+import org.wso2.wsf.ide.core.plugin.WebServiceWSASCorePlugin;
import org.wso2.wsf.ide.core.plugin.messages.WSASCoreUIMessages;
import org.wso2.wsf.ide.core.utils.WSASCoreUtils;
import org.wso2.wsf.ide.core.utils.FacetContainerUtils;
@@ -99,6 +102,12 @@
ServiceContext.getInstance().getServiceName());
ws.getWebServiceInfo().setWsdlURL(deployedWSDLURL);
+ WSASEmitterContext context = \
WebServiceWSASCorePlugin.getDefault().getWSASEmitterContext(); +
+ System.setProperty("javax.net.ssl.trustStore", \
context.getWSASRuntimeLocation()+File.separator+"conf"+File.separator+"wso2wsas.jks");
+ System.setProperty("javax.net.ssl.trustStorePassword", "wso2wsas");
+ System.setProperty("javax.net.ssl.trustStoreType","wso2wsas");
+
return status;
}
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASServiceInstallCommand.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASServiceInstallCommand.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.creation.core/src/org/wso2/wsf/ide/creation/core/command/WSASServiceInstallCommand.java Fri \
Jul 13 06:26:08 2007 @@ -87,8 +87,6 @@
String newNodes[] = {"WebContent", "WEB-INF","services",serviceName};
String servicesDirectory = FileUtils.addNodesToPath(currentDynamicWebProjectDir, \
newNodes);
- //Create the
-
//Copy the directory to wsas
FileUtils.copyDirectory(new File(servicesDirectory), new \
File(wsasRepoLocationOfService)); } catch (IOException e) {
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.ui/src/org/wso2/wsf/ide/consumption/ui/preferences/WSASRuntimePreferencePage.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.ui/src/org/wso2/wsf/ide/consumption/ui/preferences/WSASRuntimePreferencePage.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.ui/src/org/wso2/wsf/ide/consumption/ui/preferences/WSASRuntimePreferencePage.java Fri \
Jul 13 06:26:08 2007 @@ -128,6 +128,8 @@
if (webappExist) {
status = Status.OK_STATUS;
statusUpdate(true);
+ System.setProperty("wso2wsas.home", wsasPath.getText());
+ System.out.println(System.getProperty("wso2wsas.home"));
}else{
status = Status.CANCEL_STATUS;
statusUpdate(false);
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStartCommand.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStartCommand.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStartCommand.java Fri \
Jul 13 06:26:08 2007 @@ -19,35 +19,40 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.wso2.wsf.ide.core.plugin.messages.WSASCoreUIMessages;
+import org.wso2.wsf.ide.core.utils.FileUtils;
import org.wso2.wsf.ide.wtp.ext.server.bean.WSASConfigurationBean;
public class WSASStartCommand {
private static IStatus status;
- //private Process wsasProcess = null;
public static IStatus run() throws InvocationTargetException {
status = Status.OK_STATUS;
Process wsasProcess = null;
+ String pathNodesStopWin[] = {WSASCoreUIMessages.DIR_BIN, \
WSASCoreUIMessages.WSAS_START_BAT}; + String pathNodesStopIx[] = \
{WSASCoreUIMessages.DIR_BIN, WSASCoreUIMessages.WSAS_START_SH};
if (WSASConfigurationBean.isWsasStartStatus()) {
- status = new Status( IStatus.ERROR,"id",11,"WSAS Already Running !!",null);
+ status = new Status( \
IStatus.ERROR,"id",11,WSASCoreUIMessages.WSAS_ALREADY_RUNNING,null); \
WSASConfigurationBean.setWSASAlreadyRunning(true); }else{
String wsasInstallationLocation = \
WSASConfigurationBean.getWsasInstallationPath(); try {
Runtime runtime = Runtime.getRuntime();
- String OS = System.getProperty("os.name").toLowerCase();
- if ((OS.indexOf("windows 9") > -1)
- || (OS.indexOf("nt") > -1)
- || (OS.indexOf("windows 2000") > -1)
- || (OS.indexOf("windows xp") > -1)) {
- wsasProcess = runtime.exec(wsasInstallationLocation +"\\bin\\startup.bat");
+ String OS = System.getProperty(WSASCoreUIMessages.PROPERTIES_OS_NAME).toLowerCase();
+ if ((OS.indexOf(WSASCoreUIMessages.OS_WIN_9) > -1)
+ || (OS.indexOf(WSASCoreUIMessages.OS_WIN_NT) > -1)
+ || (OS.indexOf(WSASCoreUIMessages.OS_WIN_2000) > -1)
+ || (OS.indexOf(WSASCoreUIMessages.OS_WIN_XP) > -1)) {
+ wsasProcess = runtime.exec(FileUtils.addNodesToPath(wsasInstallationLocation,
+ pathNodesStopWin));
+ wsasProcess.waitFor();
} else {
- wsasProcess = runtime.exec("sh " + wsasInstallationLocation \
+"\\bin\\startup.sh"); + wsasProcess = \
runtime.exec(WSASCoreUIMessages.XTERM_EXEC + \
+ FileUtils.addNodesToPath(wsasInstallationLocation, pathNodesStopIx)); }
- wsasProcess.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
Modified: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStopCommand.java
==============================================================================
--- trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStopCommand.java (original)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.ide.wtp.ext/src/org/wso2/wsf/ide/wtp/ext/server/command/WSASStopCommand.java Fri \
Jul 13 06:26:08 2007 @@ -19,6 +19,8 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.wso2.wsf.ide.core.plugin.messages.WSASCoreUIMessages;
+import org.wso2.wsf.ide.core.utils.FileUtils;
import org.wso2.wsf.ide.wtp.ext.server.bean.WSASConfigurationBean;
public class WSASStopCommand {
@@ -43,18 +45,22 @@
if (WSASConfigurationBean.isWsasStartStatus()) {
Process wsasProcess = null;
-
+ String pathNodesStopWin[] = {WSASCoreUIMessages.DIR_BIN, \
WSASCoreUIMessages.WSAS_STOP_BAT}; + String pathNodesStopIx[] = \
{WSASCoreUIMessages.DIR_BIN, WSASCoreUIMessages.WSAS_STOP_SH}; String \
wsasInstallationLocation = WSASConfigurationBean.getWsasInstallationPath(); try {
Runtime runtime = Runtime.getRuntime();
String OS = System.getProperty("os.name").toLowerCase();
- if ((OS.indexOf("windows 9") > -1)
- || (OS.indexOf("nt") > -1)
- || (OS.indexOf("windows 2000") > -1)
- || (OS.indexOf("windows xp") > -1)) {
- wsasProcess = runtime.exec(wsasInstallationLocation +"\\bin\\shutdown.bat");
+ if ((OS.indexOf(WSASCoreUIMessages.OS_WIN_9) > -1)
+ || (OS.indexOf(WSASCoreUIMessages.OS_WIN_NT) > -1)
+ || (OS.indexOf(WSASCoreUIMessages.OS_WIN_2000) > -1)
+ || (OS.indexOf(WSASCoreUIMessages.OS_WIN_XP) > -1)) {
+ wsasProcess = runtime.exec(FileUtils.addNodesToPath(wsasInstallationLocation,
+ pathNodesStopWin));
+ wsasProcess.waitFor();
} else {
- wsasProcess = runtime.exec("sh " + wsasInstallationLocation \
+"\\bin\\shutdown.sh"); + wsasProcess = runtime.exec(WSASCoreUIMessages.SHELL +
+ FileUtils.addNodesToPath(wsasInstallationLocation, pathNodesStopIx));
}
} catch (Exception e) {
e.printStackTrace();
@@ -64,7 +70,7 @@
WSASConfigurationBean.setWsasStartStatus(false);
}else{
- status = new Status( IStatus.ERROR,"id",12,"WSAS Instance is not active !!",null \
); + status = new Status( \
IStatus.ERROR,"id",12,WSASCoreUIMessages.WSAS_NOT_ACTIVE,null ); }
return status;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic