Author: dennyxu
Date: 2008-04-20 21:54:55 -0400 (Sun, 20 Apr 2008)
New Revision: 7639
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath
trunk/ws/plugins/org.jboss.tools.ws.creation.core/.project
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/JBossWSCreationCore.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/
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.core/src/org/jboos/tools/ws/creation/core/data/
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java
Log:
create a plugin contains all commands related to create a web service
Added: trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath
(rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/.classpath 2008-04-21 01:54:55 UTC
(rev 7639)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/ws/plugins/org.jboss.tools.ws.creation.core/.project
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/.project
(rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/.project 2008-04-21 01:54:55 UTC
(rev 7639)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboos.tools.ws.creation.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: 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
(rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-04-21
01:54:55 UTC (rev 7639)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.jboos.tools.ws.creation.core
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboos.tools.ws.creation.core.JBossWSCreationCore
+Bundle-Vendor: %PLUGIN_PROVIDER
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.ws
+Eclipse-LazyStart: true
+Export-Package: org.jboos.tools.ws.creation.core,
+ org.jboos.tools.ws.creation.core.commands,
+ org.jboos.tools.ws.creation.core.data
Added: trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties
(rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/build.properties 2008-04-21 01:54:55
UTC (rev 7639)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/JBossWSCreationCore.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/JBossWSCreationCore.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/JBossWSCreationCore.java 2008-04-21
01:54:55 UTC (rev 7639)
@@ -0,0 +1,50 @@
+package org.jboos.tools.ws.creation.core;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class JBossWSCreationCore extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboos.tools.ws.creation.core";
+
+ // The shared instance
+ private static JBossWSCreationCore plugin;
+
+ /**
+ * The constructor
+ */
+ public JBossWSCreationCore() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static JBossWSCreationCore getDefault() {
+ return plugin;
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/InitialCommnad.java 2008-04-21
01:54:55 UTC (rev 7639)
@@ -0,0 +1,41 @@
+package org.jboos.tools.ws.creation.core.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.wsrt.IWebService;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.jboos.tools.ws.creation.core.data.ServiceModel;
+
+public class InitialCommnad extends AbstractDataModelOperation{
+
+ private ServiceModel model;
+ private IWebService ws;
+ private int scenario;
+
+ public InitialCommnad(ServiceModel model ,IWebService ws, int scenario){
+ this.model = model;
+ this.ws = ws;
+ this.scenario = scenario;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ if (scenario == WebServiceScenario.TOPDOWN) {
+ model.setWsdlURI(ws.getWebServiceInfo().getWsdlURL());
+ model.setDatabindingType(Axis2Constants.DATA_BINDING_ADB);
+ DefaultCodegenUtil defaultCodegenUtil = new DefaultCodegenUtil(model);
+ defaultCodegenUtil.populateModelParamsFromWSDL();
+ model.setServicesXML(true);
+ model.setServerXMLCheck(true);
+ ServiceContext.getInstance().setServiceName(model.getServiceName());
+ }
+
+ return null;
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/commands/WSDL2JavaCommnad.java 2008-04-21
01:54:55 UTC (rev 7639)
@@ -0,0 +1,25 @@
+package org.jboos.tools.ws.creation.core.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.jboos.tools.ws.creation.core.data.ServiceModel;
+
+public class WSDL2JavaCommnad extends AbstractDataModelOperation{
+
+ private ServiceModel model;
+
+ public WSDL2JavaCommnad(ServiceModel model){
+ this.model = model;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ return null;
+ }
+
+}
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboos/tools/ws/creation/core/data/ServiceModel.java 2008-04-21
01:54:55 UTC (rev 7639)
@@ -0,0 +1,50 @@
+package org.jboos.tools.ws.creation.core.data;
+
+public class ServiceModel {
+
+private String webProjectName;
+
+ private boolean serverStatus;
+ private String wsdlURI;
+ private String portName;
+ private String serviceName;
+ private String packageText;
+
+ public String getPackageText() {
+ return packageText;
+ }
+ public void setPackageText(String packageText) {
+ this.packageText = packageText;
+ }
+ public String getPortName() {
+ return portName;
+ }
+ public void setPortName(String portName) {
+ this.portName = portName;
+ }
+ public String getServiceName() {
+ return serviceName;
+ }
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+ public String getWsdlURI() {
+ return wsdlURI;
+ }
+ public void setWsdlURI(String wsdlURI) {
+ this.wsdlURI = wsdlURI;
+ }
+ public boolean getServerStatus() {
+ return serverStatus;
+ }
+ public void setServerStatus(boolean b) {
+ this.serverStatus = b;
+ }
+
+ public String getWebProjectName() {
+ return webProjectName;
+ }
+ public void setWebProjectName(String webProjectName) {
+ this.webProjectName = webProjectName;
+ }
+}