Author: Grid.Qian
Date: 2008-05-20 06:57:05 -0400 (Tue, 20 May 2008)
New Revision: 8206
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialClientCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceClient.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
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/JBossWSConfigWidgetFactory.java
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/JBossWebServiceRuntime.java
Log:
JBIDE-2236: implement ws client
Deleted:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.ws.core.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.jboss.tools.ws.core.JbossWSCoreMessages;
-import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
-import org.jboss.tools.ws.core.utils.StatusUtils;
-
-/**
- * @author Grid Qian
- */
-public class JbossWSRuntimeCommand extends AbstractDataModelOperation {
-
- IProject project;
- String runtimeLocation;
-
- public JbossWSRuntimeCommand(IProject project) {
- this.project = project;
- }
-
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- return executeOverride(monitor);
- }
-
- public IStatus executeOverride(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
-
- // copy lib jars to project's folder
- IPath wsPath = JbossWSCoreUtils.getJbossWSRuntimePath();
- IPath libPath = null;
- try {
- libPath = wsPath.append(JbossWSCoreMessages.DIR_LIB);
- } catch (Exception e) {
- status = StatusUtils.errorStatus(NLS.bind(
- JbossWSCoreMessages.ERROR_WS_LOCATION, new String[] { e
- .getLocalizedMessage() }), e);
- return status;
- }
- IPath targetPath = JbossWSCoreUtils.pathToWebProjectContainer(project
- .toString());
- targetPath = targetPath.append(JbossWSCoreMessages.DIR_WEB_INF).append(
- JbossWSCoreMessages.DIR_LIB);
- status = JbossWSCoreUtils.copy(libPath, targetPath);
-
- if (status == Status.OK_STATUS) {
- // copy client jars to project's folder
- libPath = wsPath.append(JbossWSCoreMessages.DIR_CLIENT);
- status = JbossWSCoreUtils.copy(libPath, targetPath);
- }
-
- return status;
- }
-
-}
\ No newline at end of file
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSRuntimeCommand.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.core.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.jboss.tools.ws.core.JbossWSCoreMessages;
+import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
+import org.jboss.tools.ws.core.utils.StatusUtils;
+
+/**
+ * @author Grid Qian
+ */
+public class JbossWSRuntimeCommand extends AbstractDataModelOperation {
+
+ IProject project;
+ String runtimeLocation;
+
+ public JbossWSRuntimeCommand(IProject project) {
+ this.project = project;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ return executeOverride(monitor);
+ }
+
+ public IStatus executeOverride(IProgressMonitor monitor) {
+ IStatus status = Status.OK_STATUS;
+
+ // copy lib jars to project's folder
+ IPath wsPath = JbossWSCoreUtils.getJbossWSRuntimePath();
+ IPath libPath = null;
+ try {
+ libPath = wsPath.append(JbossWSCoreMessages.DIR_LIB);
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(NLS.bind(
+ JbossWSCoreMessages.ERROR_WS_LOCATION, new String[] { e
+ .getLocalizedMessage() }), e);
+ return status;
+ }
+ IPath targetPath = JbossWSCoreUtils.pathToWebProjectContainer(project
+ .toString());
+ targetPath = targetPath.append(JbossWSCoreMessages.DIR_WEB_INF).append(
+ JbossWSCoreMessages.DIR_LIB);
+ status = JbossWSCoreUtils.copy(libPath, targetPath);
+
+ if (status == Status.OK_STATUS) {
+ // copy client jars to project's folder
+ libPath = wsPath.append(JbossWSCoreMessages.DIR_CLIENT);
+ status = JbossWSCoreUtils.copy(libPath, targetPath);
+ }
+
+ return status;
+ }
+
+}
\ No newline at end of file
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialClientCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialClientCommand.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialClientCommand.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.creation.core.commands;
+
+import javax.wsdl.WSDLException;
+
+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.core.runtime.Status;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.wsrt.IWebService;
+import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.creation.core.utils.WSDLPropertyReader;
+
+/**
+ * @author Grid Qian
+ */
+public class InitialClientCommand extends AbstractDataModelOperation {
+ private ServiceModel model;
+ private IWebServiceClient wsClient;
+ private int scenario;
+
+ public InitialClientCommand(ServiceModel model, IWebServiceClient wsClient, int
scenario) {
+ this.model = model;
+ this.wsClient = wsClient;
+ this.scenario = scenario;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ model.setTarget(JBossWSCreationCoreMessages.VALUE_TARGET_0);
+ if (scenario == WebServiceScenario.CLIENT) {
+ try{
+ model.setWsdlURI(wsClient.getWebServiceClientInfo().getWsdlURL());
+ WSDLPropertyReader reader = new WSDLPropertyReader();
+ reader.readWSDL(wsClient.getWebServiceClientInfo().getWsdlURL());
+ model.setCustomPackage(reader.packageFromTargetNamespace());
+ }catch (WSDLException e) {
+ return StatusUtils.errorStatus(e.getLocalizedMessage(), e);
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ public ServiceModel getWebServiceDataModel() {
+
+ return model;
+ }
+}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.ws.creation.core.commands;
import java.util.List;
@@ -23,6 +34,9 @@
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
+/**
+ * @author Grid Qian
+ */
public class MergeWebXMLCommand extends AbstractDataModelOperation {
private ServiceModel model;
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.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.core.runtime.Status;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.jboss.tools.ws.core.utils.StatusUtils;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
+
+/**
+ * @author Grid Qian
+ */
+public class ValidateWSImpl extends AbstractDataModelOperation {
+
+ private ServiceModel model;
+
+ public ValidateWSImpl(ServiceModel model) {
+ this.model = model;
+ }
+
+ @Override
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ String implClass = model.getServiceClass();
+ String project = model.getWebProjectName();
+ ICompilationUnit unit = null;
+ try {
+ unit = JBossWSCreationUtils.getJavaProjectByName(project).findType(
+ implClass).getCompilationUnit();
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ }
+ try {
+ if(!unit.getSource().contains(JBossWSCreationCoreMessages.WEBSERVICE_ANNOTATION)){
+ return StatusUtils.errorStatus(JBossWSCreationCoreMessages.ERROR_NO_ANNOTATION);
+ }
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ }
+ return Status.OK_STATUS;
+ }
+
+}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.ws.creation.core.commands;
import java.io.File;
@@ -50,11 +61,10 @@
while(str != null){
System.out.println(str);
str = input.readLine();
- }
+ }
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-05-20
10:57:05 UTC (rev 8206)
@@ -10,3 +10,5 @@
ERROR_MESSAGE_INVALID_BINDING_FILE={0} is not a valid JAX-WS or JAXB binding file
ERROR_READ_BINDING_FILE=Exception occurred while reading binding file
SEPARATOR_JAVA=/
+ERROR_NO_ANNOTATION=This class has not required Annotation!
+WEBSERVICE_ANNOTATION=@WebService
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -17,6 +17,9 @@
public static String ERROR_MESSAGE_INVALID_BINDING_FILE;
public static String ERROR_READ_BINDING_FILE;
public static String SEPARATOR_JAVA;
+
+ public static String ERROR_NO_ANNOTATION;
+ public static String WEBSERVICE_ANNOTATION;
private JBossWSCreationCoreMessages() {
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-05-20 10:29:36 UTC
(rev 8205)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-05-20 10:57:05 UTC
(rev 8206)
@@ -53,6 +53,7 @@
id="JBossWSProviderInvokeConfig"
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommand">
</widgetFactory>
- </extension>
+ </extension>
+
</plugin>
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSConfigWidgetFactory.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSConfigWidgetFactory.java 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWSConfigWidgetFactory.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -7,6 +7,7 @@
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
+import org.jboss.tools.ws.creation.core.commands.InitialClientCommand;
import org.jboss.tools.ws.creation.core.commands.InitialCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.ui.widgets.CodeGenConfigWidget;
@@ -39,6 +40,7 @@
dataRegistry.addMapping( InitialCommand.class,
"WebServiceDataModel", //$NON-NLS-1$
JBossWSConfigWidgetFactory.class );
+ dataRegistry.addMapping(InitialClientCommand.class, "WebServiceDataModel",
JBossWSConfigWidgetFactory.class);
}
public void setWebServiceDataModel( ServiceModel model ){
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-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -14,6 +14,7 @@
import org.jboss.tools.ws.creation.core.commands.ImplementationClassCreationCommand;
import org.jboss.tools.ws.creation.core.commands.InitialCommand;
import org.jboss.tools.ws.creation.core.commands.MergeWebXMLCommand;
+import org.jboss.tools.ws.creation.core.commands.ValidateWSImpl;
import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
import org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
@@ -55,6 +56,7 @@
}
else if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP){
commands.add(new InitialCommand(model, this, WebServiceScenario.BOTTOMUP));
+ commands.add(new ValidateWSImpl(model));
commands.add(new WSProviderInvokeCommand(model));
commands.add(new MergeWebXMLCommand(model));
//commands.add(new
JbossWSRuntimeCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project)));
Added:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceClient.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceClient.java
(rev 0)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceClient.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.creation.ui.wsrt;
+
+import java.util.Vector;
+
+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;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.wsrt.IContext;
+import org.eclipse.wst.ws.internal.wsrt.ISelection;
+import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceClientInfo;
+import org.eclipse.wst.ws.internal.wsrt.AbstractWebServiceClient;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.jboss.tools.ws.creation.core.commands.BindingFilesValidationCommand;
+import org.jboss.tools.ws.creation.core.commands.InitialClientCommand;
+import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+
+/**
+ * @author Grid Qian
+ */
+public class JBossWebServiceClient extends AbstractWebServiceClient {
+
+ @SuppressWarnings("restriction")
+ public JBossWebServiceClient(WebServiceClientInfo info) {
+ super(info);
+ }
+
+ public ICommandFactory assemble(IEnvironment env, IContext ctx,
+ ISelection sel, String project, String earProject) {
+ return null;
+ }
+
+ public ICommandFactory deploy(IEnvironment env, IContext ctx,
+ ISelection sel, String project, String earProject) {
+ return null;
+ }
+
+ public ICommandFactory develop(IEnvironment env, IContext ctx,
+ ISelection sel, String project, String earProject) {
+ Vector<AbstractDataModelOperation> commands = new Vector();
+ ServiceModel model = new ServiceModel();
+ model.setWebProjectName(project);
+ commands.add(new InitialClientCommand(model, this, WebServiceScenario.CLIENT));
+ commands.add(new BindingFilesValidationCommand(model));
+ commands.add(new WSDL2JavaCommand(model));
+
+ return new SimpleCommandFactory(commands);
+ }
+
+ public ICommandFactory run(IEnvironment env, IContext ctx, ISelection sel,
+ String project, String earProject) {
+ return null;
+ }
+
+ @Override
+ public ICommandFactory install(IEnvironment env, IContext ctx,
+ ISelection sel, String project, String earProject) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceRuntime.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceRuntime.java 2008-05-20
10:29:36 UTC (rev 8205)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebServiceRuntime.java 2008-05-20
10:57:05 UTC (rev 8206)
@@ -15,8 +15,7 @@
@Override
public IWebServiceClient getWebServiceClient(WebServiceClientInfo info) {
- // TODO Auto-generated method stub
- return null;
+ return new JBossWebServiceClient(info);
}
}