Author: dennyxu
Date: 2008-04-22 03:55:08 -0400 (Tue, 22 Apr 2008)
New Revision: 7676
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java
Log:
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-04-22 06:21:23 UTC (rev
7675)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-04-22 07:55:08 UTC (rev
7676)
@@ -12,7 +12,7 @@
<member category="jbossws.category "/>
</project-facet>
- <project-facet-version facet="jbossws.core" version="1.1">
+ <project-facet-version facet="jbossws.core" version="1.0">
<constraint>
<requires facet="jst.web" version="2.2,2.3,2.4,2.5"/>
</constraint>
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-04-22
06:21:23 UTC (rev 7675)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-04-22
07:55:08 UTC (rev 7676)
@@ -11,7 +11,8 @@
org.eclipse.wst.ws,
org.jboss.tools.ws.ui,
org.eclipse.core.resources,
- org.eclipse.jst.ws
+ org.eclipse.jst.ws,
+ org.jboss.tools.ws.core
Eclipse-LazyStart: true
Export-Package: org.jboos.tools.ws.creation.core,
org.jboos.tools.ws.creation.core.commands,
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-22
06:21:23 UTC (rev 7675)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-22
07:55:08 UTC (rev 7676)
@@ -31,4 +31,9 @@
return Status.OK_STATUS;
}
+ public ServiceModel getWebServiceDataModel()
+ {
+ return model;
+ }
+
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-22
06:21:23 UTC (rev 7675)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-22
07:55:08 UTC (rev 7676)
@@ -1,5 +1,6 @@
package org.jboos.tools.ws.creation.core.commands;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -17,6 +18,7 @@
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.jboos.tools.ws.creation.core.data.ServiceModel;
import org.jboos.tools.ws.creation.core.utils.JBossWSCreationUtils;
+import org.jboss.tools.ws.core.JbossWSCorePlugin;
public class WSDL2JavaCommnad extends AbstractDataModelOperation{
@@ -31,21 +33,14 @@
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- PreferenceStore prs = new PreferenceStore("jbosswsui.properties");
- try {
- prs.load();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- String runtimeLocation =
prs.getString("jbosswsruntimelocation");//JBossWSUIPlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
- String binLocation = runtimeLocation + "bin";
+ String runtimeLocation =
JbossWSCorePlugin.getDefault().getPreferenceStore().getString("jbosswsruntimelocation");
+ String binLocation = runtimeLocation + Path.SEPARATOR + "bin";
String commandLine = binLocation + Path.SEPARATOR + "wsconsume.sh";
String args = getCommandlineArgs();
- commandLine = commandLine + " -k -o " + args + " " +
model.getWsdlURI();
+ commandLine = commandLine + " -k " + args + " " +
model.getWsdlURI();
commandLine = "sh " + commandLine;
@@ -83,12 +78,27 @@
}
private String getCommandlineArgs(){
+ String commandLine;
String project = model.getWebProjectName();
String projectRoot = JBossWSCreationUtils.getProjectRoot(project).toOSString();
- String targetSrc = projectRoot + Path.SEPARATOR + "src";
+ commandLine = "-o " + projectRoot + Path.SEPARATOR + "src";
- return targetSrc;
+ String customePkg = model.getPackageText();
+ if(customePkg != null && !"".equals(customePkg)){
+ commandLine += " -p " + customePkg;
+ }
+ String bindingFileLocation = model.getBindingFileLocation();
+ if(bindingFileLocation != null && !"".equals(bindingFileLocation)){
+ File bindingFile = new File(bindingFileLocation);
+ if(bindingFile.exists()){
+ commandLine += " -b " + bindingFileLocation;
+ }
+ }
+
+ return commandLine;
+
}
+
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2008-04-22
06:21:23 UTC (rev 7675)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2008-04-22
07:55:08 UTC (rev 7676)
@@ -19,5 +19,6 @@
org.eclipse.wst.command.env,
org.eclipse.jdt.core,
org.eclipse.jst.ws.ui,
- org.jboos.tools.ws.creation.core
+ org.jboos.tools.ws.creation.core,
+ org.jboss.tools.ws.core
Eclipse-LazyStart: true
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-04-22 06:21:23 UTC
(rev 7675)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-04-22 07:55:08 UTC
(rev 7676)
@@ -18,24 +18,22 @@
</extension>
- <!-- define support for Axis2 Java bean bottom up and top-down support in web
projects -->
<extension
point="org.eclipse.jst.ws.consumption.ui.serviceRuntimes">
<serviceRuntime
id="org.jboss.tools.ws.creation.java"
serviceImplementationTypeId="org.eclipse.jst.ws.wsImpl.java"
runtimeId="org.jboss.tools.ws.creation.jbossWebServiceRT"
- bottomUp="true"
+ bottomUp="false"
topDown="true"
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
<required-facet-version facet="jst.web" version="2.3"
allow-newer="true"/>
- <!--required-facet-versiond facet="jbossws.core"
version="1.0" allow-newer="true" />
- <required-facet-version facet="jbossws.ext" version="1.0"
allow-newer="true" / -->
+ <required-facet-versiond facet="jbossws.core"
version="1.0" allow-newer="true" />
+ <!--required-facet-version facet="jbossws.ext"
version="1.0" allow-newer="true" / -->
</serviceRuntime>
</extension>
- <!-- define support for Axis Java clients in Web projects -->
<extension point="org.eclipse.jst.ws.consumption.ui.clientRuntimes">
<clientRuntime
id="org.jboss.tools.ws..consumption.web"
@@ -43,9 +41,8 @@
runtimeId="org.jboss.tools.ws.creation.jbossWebServiceRT"
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
- <!--required-facet-version facet="jst.web" version="2.3"
allow-newer="true" />
- <required-facet-version facet="axis2.core" version="1.1"
allow-newer="true" />
- <required-facet-version facet="axis2.ext" version="1.1"
allow-newer="true" / -->
+ <required-facet-version facet="jst.web" version="2.3"
allow-newer="true" />
+
</clientRuntime>
</extension>
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-04-22
06:21:23 UTC (rev 7675)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-04-22
07:55:08 UTC (rev 7676)
@@ -3,6 +3,7 @@
import java.awt.image.SampleModel;
import java.util.Vector;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.wst.command.internal.env.core.ICommandFactory;
import org.eclipse.wst.command.internal.env.core.SimpleCommandFactory;
import org.eclipse.wst.common.environment.IEnvironment;
@@ -14,6 +15,7 @@
import org.jboos.tools.ws.creation.core.commands.InitialCommnad;
import org.jboos.tools.ws.creation.core.commands.WSDL2JavaCommnad;
import org.jboos.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.core.command.JbossWSRuntimeCommand;
public class JBossWebService extends AbstractWebService {
@@ -45,6 +47,7 @@
if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) {
commands.add(new InitialCommnad(model, this, WebServiceScenario.TOPDOWN));
commands.add(new WSDL2JavaCommnad(model));
+ commands.add(new
JbossWSRuntimeCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project)));
}
return new SimpleCommandFactory(commands);