diff options
Diffstat (limited to 'bundles/org.eclipse.jst.ws.axis.creation.ui/src/org')
33 files changed, 0 insertions, 4393 deletions
diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/AxisCreationUI.properties b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/AxisCreationUI.properties deleted file mode 100644 index d254b469d..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/AxisCreationUI.properties +++ /dev/null @@ -1,78 +0,0 @@ -############################################################################### -# Copyright (c) 2004 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are 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: -# IBM Corporation - initial API and implementation -############################################################################### - -# -# Messages in plugin.xml. -# - -# -# Error messages used in this plugin -# -MSG_ERROR_PROJECT_URL=IWAB0514E Unable to get URL for project {0} -MSG_ERROR_CANNOT_NO_JAVA_BEAN=IWAB0015E A Java bean was not selected -MSG_ERROR_NO_PROJECT=IWAB0016E A project was not selected -MSG_ERROR_CANNOT_LOAD_JAVA_BEAN=IWAB0017E The Java bean, {0}, cannot be loaded from {1} -MSG_ERROR_JAVA_MOF_REFLECT_FAILED=IWAB0521E Failed to analyze the Java bean: {0}. -MSG_ERROR_READ_BEAN=IWAB0522E Error in reading methods from Java bean. -MSG_ERROR_MOVE_RESOURCE=IWAB0523E Error moving resource -MSG_ERROR_UPDATE_AXIS_WSDD=IWAB0524E Error updating Axis deploy.wsdd file - -# -#JavaToWSDLMethodCommand -# -MSG_ERROR_JAVA_TO_METHOD=IWAB0019E Error in getting method from Java bean. - -# -#UpdateWEBXMLCommand -# -MSG_ERROR_UPDATE_WEB_XML=IWAB0020E Error in adding servlet in web.xml. - -# -#UpdateAxisWSDDFileTask -# -MSG_PLUGIN_FILE_URL=Problem locating plugin file - -# -#WebServiceWSDLAxisSelectionPage -# -PAGE_MSG_NO_FILE_SPECIFIED=No file specified. -PAGE_MSG_NO_METHOD_SELECTED=No methods selected. - -# -#WebServiceSkeletonAxisConfigPage -# -TOOLTIP_PBSC_PAGE= -TOOLTIP_PBCF_TEXT_URI=The SOAP body namespace and unique identifier of the Web service. -TOOLTIP_PBCF_TEXT_WSDL_FOLDER=The folder of the WSDL file. -TOOLTIP_PBCF_TEXT_WSDL_FILE=The name of the WSDL file. -LABEL_URI=Web service URI: -LABEL_OUTPUT_FOLDER_NAME=WSDL Folder: -LABEL_OUTPUT_FILE_NAME=WSDL File: - -# -#WebServiceAxisBeanClassPage -# -PAGE_TITLE_WSBEAN_CLASS=Web Service Java Bean Selection -PAGE_DESC_WSBEAN_CLASS=Select a Java bean -LABEL_EXPLORE_MAPPINGS_BEAN2XML=Define custom mapping for package to namespace. -TOOLTIP_P2N_SHOW_MAPPINGS=Define package to namespace mapping for customization. - -# -#WebServiceAxisBeanConfigPage -# -TOOLTIP_PBCF_PAGE= -TOOLTIP_PBME_TREE_METHODS=Java bean methods to include. -PAGE_TITLE_WSBEAN_CONFIG=Web Service Java Bean Identity -PAGE_DESC_WSBEAN_CONFIG=Configure the Java bean as a Web service. -LABEL_STYLE_USE=Style and Use -STYLE_RPC_LITERAL=Document/ Literal -STYLE_DOC_LITERAL=Document/ Literal (Wrapped) -STYLE_RPC_ENCODED=RPC/ Encoded diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/AxisCreationUIMessages.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/AxisCreationUIMessages.java deleted file mode 100644 index 895a3feb1..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/AxisCreationUIMessages.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui; - -import org.eclipse.osgi.util.NLS; - -public final class AxisCreationUIMessages extends NLS { - - private static final String BUNDLE_NAME = "org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUI";//$NON-NLS-1$ - - private AxisCreationUIMessages() { - // Do not instantiate - } - - public static String MSG_ERROR_PROJECT_URL; - public static String MSG_ERROR_CANNOT_NO_JAVA_BEAN; - public static String MSG_ERROR_NO_PROJECT; - public static String MSG_ERROR_CANNOT_LOAD_JAVA_BEAN; - public static String MSG_ERROR_JAVA_MOF_REFLECT_FAILED; - public static String MSG_ERROR_READ_BEAN; - public static String MSG_ERROR_MOVE_RESOURCE; - public static String MSG_ERROR_UPDATE_AXIS_WSDD; - public static String MSG_ERROR_JAVA_TO_METHOD; - public static String MSG_ERROR_UPDATE_WEB_XML; - public static String MSG_PLUGIN_FILE_URL; - public static String PAGE_MSG_NO_FILE_SPECIFIED; - public static String PAGE_MSG_NO_METHOD_SELECTED; - public static String TOOLTIP_PBSC_PAGE; - public static String TOOLTIP_PBCF_TEXT_URI; - public static String TOOLTIP_PBCF_TEXT_WSDL_FOLDER; - public static String TOOLTIP_PBCF_TEXT_WSDL_FILE; - public static String LABEL_URI; - public static String LABEL_OUTPUT_FOLDER_NAME; - public static String LABEL_OUTPUT_FILE_NAME; - public static String PAGE_TITLE_WSBEAN_CLASS; - public static String PAGE_DESC_WSBEAN_CLASS; - public static String LABEL_EXPLORE_MAPPINGS_BEAN2XML; - public static String TOOLTIP_P2N_SHOW_MAPPINGS; - public static String TOOLTIP_PBCF_PAGE; - public static String TOOLTIP_PBME_TREE_METHODS; - public static String PAGE_TITLE_WSBEAN_CONFIG; - public static String PAGE_DESC_WSBEAN_CONFIG; - public static String LABEL_STYLE_USE; - public static String STYLE_RPC_LITERAL; - public static String STYLE_DOC_LITERAL; - public static String STYLE_RPC_ENCODED; - - static { - NLS.initializeMessages(BUNDLE_NAME, AxisCreationUIMessages.class); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java deleted file mode 100644 index 956da3c2d..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisOutputCommand.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - - -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.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.creation.ui.wsrt.AxisWebService; -import org.eclipse.jst.ws.internal.axis.creation.ui.wsrt.AxisWebServiceInfo; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - - -public class AxisOutputCommand extends AbstractDataModelOperation { - - private AxisWebService ws_; - private JavaWSDLParameter javaWSDLParam_; - - private String wsdlURI_; - - /** - * Default CTOR - */ - public AxisOutputCommand() { - } - - public AxisOutputCommand(AxisWebService ws) { - ws_ = ws; - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IStatus status = Status.OK_STATUS; - ws_.getWebServiceInfo().setWsdlURL(wsdlURI_); - AxisWebServiceInfo axisWSInfo = new AxisWebServiceInfo(); - axisWSInfo.setJavaWSDLParameter(javaWSDLParam_); - ws_.setAxisWebServiceInfo(axisWSInfo); - - return status; - } - - /** - * @param wsdlURI - * The wsdlURI to set. - */ - public void setWsdlURI(String wsdlURI) - { - wsdlURI_ = wsdlURI; - } - - public void setJavaWSDLParam (JavaWSDLParameter javaWSDLParam_) { - this.javaWSDLParam_ = javaWSDLParam_; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java deleted file mode 100644 index 0d1ce1173..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisRunInputCommand.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - -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.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.creation.ui.wsrt.AxisWebService; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - -public class AxisRunInputCommand extends AbstractDataModelOperation{ - - private AxisWebService ws_; - private JavaWSDLParameter javaWSDLParam_; - private String serverProject_; - - public AxisRunInputCommand() { - } - - public AxisRunInputCommand(AxisWebService ws, String project) { - ws_ = ws; - serverProject_ = project; - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - javaWSDLParam_ = ws_.getAxisWebServiceInfo().getJavaWSDLParameter(); - - return Status.OK_STATUS; - } - - /** - * @return Returns the serverProject. - */ - public String getServerProject() - { - return serverProject_; - } - - public JavaWSDLParameter getJavaWSDLParam() { - return javaWSDLParam_; - } - - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisServerDefaulter.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisServerDefaulter.java deleted file mode 100644 index b378b6b78..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/AxisServerDefaulter.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jst.ws.internal.consumption.common.IServerDefaulter; -import org.eclipse.jst.ws.internal.consumption.common.ServerInfo; - - - -public class AxisServerDefaulter implements IServerDefaulter -{ - /* (non-Javadoc) - * @see org.eclipse.jst.ws.internal.consumption.common.IServerDefaulter#recommendDefaultServer(org.eclipse.core.resources.IProject) - */ - public ServerInfo recommendDefaultServer(IProject project) - { - return null; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java deleted file mode 100644 index 1ea105e6f..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/BUAxisInputCommand.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - - -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.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.server.core.IServer; -import org.eclipse.wst.server.core.ServerCore; -import org.eclipse.wst.ws.internal.wsrt.IWebService; - - -public class BUAxisInputCommand extends AbstractDataModelOperation { - - private IWebService ws_; - private String serverProject_; - private String javaBeanName_; - - private String serviceServerTypeID_; - - /** - * Default CTOR - */ - public BUAxisInputCommand() { - } - - public BUAxisInputCommand(IWebService ws, String project) { - ws_ = ws; - serverProject_ = project; - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - - String serverInstanceId = ws_.getWebServiceInfo().getServerInstanceId(); - String serverFactoryId = ws_.getWebServiceInfo().getServerFactoryId(); - javaBeanName_ = ws_.getWebServiceInfo().getImplURL(); - - IServer serviceExistingServer=null; - - if (serverInstanceId != null) { // server exists - serviceExistingServer = ServerCore.findServer(serverInstanceId); - if (serviceExistingServer != null) - { - serviceServerTypeID_ = serviceExistingServer.getServerType().getId(); - } - } - else - { - serviceServerTypeID_ = serverFactoryId; - } - - return Status.OK_STATUS; - } - - /** - * @return Returns the serverProject. - */ - public String getServerProject() - { - return serverProject_; - } - - public String getServiceServerTypeID() - { - return serviceServerTypeID_; - } - - public String getJavaBeanName() { - return javaBeanName_; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java deleted file mode 100644 index adb2718db..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/ComputeAxisSkeletonBeanCommand.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - -import java.util.List; -import java.util.Vector; -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.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - - -public class ComputeAxisSkeletonBeanCommand extends AbstractDataModelOperation -{ - private List classNames; - //private String wsdlURI; - //private WebServicesParser webServicesParser; - private JavaWSDLParameter javaWSDLParameter; - - public ComputeAxisSkeletonBeanCommand() - { - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - classNames = new Vector(); - if (javaWSDLParameter != null) - { - String beanName = javaWSDLParameter.getBeanName(); - if (beanName != null) - classNames.add(beanName); - } - return Status.OK_STATUS; - } - - public List getClassNames() - { - return classNames; - } - - /** - * @param webServicesParser The webServicesParser to set. - */ - public void setWebServicesParser(WebServicesParser webServicesParser) - { - //this.webServicesParser = webServicesParser; - } - - /** - * @param wsdlURI The wsdlURI to set. - */ - public void setWsdlURI(String wsdlURI) - { - //this.wsdlURI = wsdlURI; - } - - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParameter) - { - this.javaWSDLParameter = javaWSDLParameter; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java deleted file mode 100644 index ecf057418..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/CopyDeploymentFileCommand.java +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -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.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; -import org.eclipse.wst.common.componentcore.resources.IVirtualFile; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - -/** - * - * This command copies the server-config.wsdd file to it's proper location in the module. - * - */ - -public class CopyDeploymentFileCommand extends AbstractDataModelOperation -{ - private String projectName_; - - /** - * Constructor for CopyDeploymentFileCommand. - * @param String description - * @param String name - * - */ - public CopyDeploymentFileCommand( String projectName ) - { - projectName_ = projectName; - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IStatus status = Status.OK_STATUS; - - try - { - IVirtualComponent component = J2EEUtils.getVirtualComponent( projectName_ ); - IFolder root = J2EEUtils.getOutputContainerRoot( component ); - IPath path = new Path( "WEB-INF" ).append( "server-config.wsdd" ); - IFile descriptorFile = root.getFile( path ); - IVirtualFile newLocation = component.getRootFolder().getFile( path ); - IPath targetPath = newLocation.getWorkspaceRelativePath(); - IFile targetFile = (IFile)ResourceUtils.findResource( targetPath ); - - descriptorFile.refreshLocal( 0, null ); - - if( targetFile != null && targetFile.exists() ) - { - // The target file already exists so we will just overwrite its contents. - targetFile.setContents( descriptorFile.getContents(), true, false, null ); - } - else - { - // The target file doesn't exist so we will copy it. - descriptorFile.copy( targetPath, true, null ); - } - } - catch( Throwable exc ) - { - } - - return status; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java deleted file mode 100644 index 3218b75fb..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/JavaToWSDLMethodCommand.java +++ /dev/null @@ -1,216 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - - -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.core.resources.IProject; -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.jem.internal.plugin.JavaEMFNature; -import org.eclipse.jem.java.JavaClass; -import org.eclipse.jem.java.JavaRefFactory; -import org.eclipse.jem.java.Method; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.osgi.util.NLS; -import org.eclipse.jst.ws.internal.common.JavaMOFUtils; -import org.eclipse.wst.command.internal.env.core.common.MessageUtils; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.environment.ILog; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - - -public class JavaToWSDLMethodCommand extends AbstractDataModelOperation { - - private static String JAVA_EXTENSION = ".java"; //$NON-NLS-1$ - private static String CLASS_EXTENSION = ".class"; //$NON-NLS-1$ - - private Hashtable fMethodNames; - private String fClassName; - private String fbeanBaseName; - private JavaWSDLParameter javaWSDLParam_; - private IProject serviceProject_; - - /** - * Default CTOR - */ - public JavaToWSDLMethodCommand() { - } - /** - * Default CTOR - */ - public JavaToWSDLMethodCommand( - JavaWSDLParameter javaParameter, - IProject serviceProject) { - javaWSDLParam_ = javaParameter; - serviceProject_ = serviceProject; - - } - - /** - * JavaToToWSDLMethod execute - */ - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - - fbeanBaseName = javaWSDLParam_.getBeanName(); - environment.getLog().log(ILog.INFO, 5070, this, "execute", "beanBaseName = "+fbeanBaseName); - IStatus status; - try { - //Get the qualified bean name; my.package.MyClass - fMethodNames = new Hashtable(); - Hashtable oldMethodsNames = javaWSDLParam_.getMethods(); - String qName = fbeanBaseName; - - if (qName.toLowerCase().endsWith(JAVA_EXTENSION) - || qName.toLowerCase().endsWith(CLASS_EXTENSION)) { - qName = qName.substring(0, qName.lastIndexOf('.')); - } - - JavaClass javaClass = JavaMOFUtils.getJavaClass(qName, serviceProject_); - - if (!javaClass.isExistingType()) { - environment.getLog().log(ILog.ERROR, 5022, this, "execute", - NLS.bind(AxisCreationUIMessages.MSG_ERROR_JAVA_MOF_REFLECT_FAILED, - new String[] { qName })); - - status = StatusUtils.errorStatus( - NLS.bind(AxisCreationUIMessages.MSG_ERROR_JAVA_MOF_REFLECT_FAILED, - new String[] { qName })); - environment.getStatusHandler().reportError(status); - return status; - } - - // Get the qualified name - fClassName = javaClass.getQualifiedName(); - String beanName; - if (fClassName.lastIndexOf('.') != -1) { - beanName = - fClassName.substring( - fClassName.lastIndexOf('.') + 1, - fClassName.length()); - } else - beanName = fClassName; - - // Walk the java class and get the method names - gatherMethods(javaClass, beanName, oldMethodsNames); - /* - Iterator m = javaClass.getPublicMethodsExtended().iterator(); - while (m.hasNext()) { - Method method = (Method) m.next(); - if ( ! method.isConstructor()){ - if (!beanName.equals(method.getName()) - && !(isDuplicateMethodName(method - .getMethodElementSignature())) - && !(method - .getContainingJavaClass() - .getJavaName() - .equalsIgnoreCase("javax.ejb.EJBObject")) //$NON-NLS-1$ - && !(method - .getContainingJavaClass() - .getJavaName() - .equalsIgnoreCase("javax.ejb.EJBObject[]")) //$NON-NLS-1$ - && !(method - .getContainingJavaClass() - .getJavaName() - .equalsIgnoreCase("java.lang.Object")) //$NON-NLS-1$ - && !(method - .getContainingJavaClass() - .getJavaName() - .equalsIgnoreCase("java.lang.Object[]"))) { //$NON-NLS-1$ - // add the method name to our list of method names - String methodName =method.getMethodElementSignature(); - Boolean isSelected = new Boolean(true); - if (oldMethodsNames != null && oldMethodsNames.containsKey(methodName)) - isSelected = (Boolean)oldMethodsNames.get(methodName); - fMethodNames.put(methodName, isSelected); - } - } - } - */ - javaWSDLParam_.setMethods(fMethodNames); - - return Status.OK_STATUS; - - } catch (Exception e) { - environment.getLog().log(ILog.ERROR, 5023, this, "execute", AxisCreationUIMessages.MSG_ERROR_READ_BEAN); - - status = StatusUtils.errorStatus(AxisCreationUIMessages.MSG_ERROR_JAVA_TO_METHOD, e); - environment.getStatusHandler().reportError(status); - return status; - } - } - - private void gatherMethods(JavaClass javaClass, String beanName, Hashtable oldMethodsNames) - { - String javaName = javaClass.getJavaName(); - if (!javaClass.isInterface() - && !javaName.equalsIgnoreCase("javax.ejb.EJBObject[]") - && !javaName.equalsIgnoreCase("javax.ejb.EJBObject") - && !javaName.equalsIgnoreCase("java.lang.Object[]") - && !javaName.equalsIgnoreCase("java.lang.Object")) - { - List publicMethods = javaClass.getPublicMethods(); - for (Iterator it = publicMethods.iterator(); it.hasNext();) - { - Method method = (Method)it.next(); - if (!method.isConstructor() - && !beanName.equals(method.getName()) - && !(isDuplicateMethodName(method.getMethodElementSignature()))) - { - // add the method name to our list of method names - String methodName = method.getMethodElementSignature(); - Boolean isSelected = new Boolean(true); - if (oldMethodsNames != null && oldMethodsNames.containsKey(methodName)) - isSelected = (Boolean)oldMethodsNames.get(methodName); - fMethodNames.put(methodName, isSelected); - } - } - gatherMethods(javaClass.getSupertype(), beanName, oldMethodsNames); - } - } - - //Returns true if the provided method name already exists in the - //fMethodNames vector. This method is used to detect overloaded - //methods in Beans and EJBs, which are currently unsupported. - private boolean isDuplicateMethodName(String methodName) { - return (fMethodNames == null ? false: fMethodNames.containsKey(methodName)); - } - - /** - * Returns the javaWSDLParam. - * @return JavaWSDLParameter - */ - public JavaWSDLParameter getJavaWSDLParam() { - return javaWSDLParam_; - } - - /** - * Sets the javaWSDLParam. - * @param javaWSDLParam The javaWSDLParam to set - */ - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) { - this.javaWSDLParam_ = javaWSDLParam; - } - - public void setServiceProject(IProject serviceProject) - { - serviceProject_ = serviceProject; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java deleted file mode 100644 index 183223875..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/TDAxisInputCommand.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - - -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.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.wsrt.IWebService; - - -public class TDAxisInputCommand extends AbstractDataModelOperation { - - private IWebService ws_; - private String serverProject_; - - private String serverServer_; - private String serviceServerTypeID_; - private String wsdlURI_; - - /** - * Default CTOR - */ - public TDAxisInputCommand() { - } - - public TDAxisInputCommand(IWebService ws, String project) { - ws_ = ws; - serverProject_ = project; - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - serverServer_ = ws_.getWebServiceInfo().getServerInstanceId(); - serviceServerTypeID_ = ws_.getWebServiceInfo().getServerFactoryId(); - wsdlURI_ = ws_.getWebServiceInfo().getWsdlURL(); - - return Status.OK_STATUS; - } - - /** - * @return Returns the serverProject. - */ - public String getServerProject() - { - return serverProject_; - } - - public String getServerServer() - { - return serverServer_; - } - - public String getServiceServerTypeID() - { - return serviceServerTypeID_; - } - - public String getWsdlURI() { - return wsdlURI_; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java deleted file mode 100644 index 0c26812b1..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/command/UpdateWEBXMLCommand.java +++ /dev/null @@ -1,176 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.command; - - -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit; -import org.eclipse.jst.j2ee.webapplication.Servlet; -import org.eclipse.jst.j2ee.webapplication.ServletMapping; -import org.eclipse.jst.j2ee.webapplication.ServletType; -import org.eclipse.jst.j2ee.webapplication.WebApp; -import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.componentcore.ComponentCore; -import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - -public class UpdateWEBXMLCommand extends AbstractDataModelOperation { - - private IProject serverProject; - - public UpdateWEBXMLCommand( ) - { - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - if (serverProject != null) { - IStatus status = null; - status = addServlet(serverProject, getAxisServletDescriptor()); - if (status.getSeverity() == Status.ERROR) { - environment.getStatusHandler().reportError(status); - return status; - } - if (status.getSeverity() == Status.ERROR) { - environment.getStatusHandler().reportError(status); - return status; - } - addServlet(serverProject, getAdmintServletDescriptor()); - if (status.getSeverity() == Status.ERROR) { - environment.getStatusHandler().reportError(status); - return status; - } - } - return Status.OK_STATUS; - } - - private ServletDescriptor getAxisServletDescriptor() { - - ServletDescriptor sd = new ServletDescriptor(); - sd._name = "AxisServlet"; //$NON-NLS-1$ - sd._displayName = "Apache-Axis Servlet"; //$NON-NLS-1$ - sd._className = "org.apache.axis.transport.http.AxisServlet"; //$NON-NLS-1$ - sd._mappings = new String[] { "/servlet/AxisServlet", //$NON-NLS-1$ - "*.jws", //$NON-NLS-1$ - "/services/*" }; //$NON-NLS-1$ - return sd; - } - - private ServletDescriptor getAdmintServletDescriptor() { - ServletDescriptor sd = new ServletDescriptor(); - sd._name = "AdminServlet"; //$NON-NLS-1$ - sd._displayName = "Axis Admin Servlet"; //$NON-NLS-1$ - sd._className = "org.apache.axis.transport.http.AdminServlet"; //$NON-NLS-1$ - sd._mappings = new String[] { "/servlet/AdminServlet" }; //$NON-NLS-1$ - sd._loadOnStartup = new Integer(100); - return sd; - } - - public IStatus addServlet( - IProject webProject, - ServletDescriptor servletDescriptor) { - - WebArtifactEdit webEdit = null; - try { - // - WebApp webapp = null; - IVirtualComponent vc = ComponentCore.createComponent(webProject); - webEdit = WebArtifactEdit.getWebArtifactEditForWrite(vc); - if (webEdit != null) - { - webapp = (WebApp) webEdit.getDeploymentDescriptorRoot(); - - boolean foundServlet = false; - - List theServlets = webapp.getServlets(); - for (int i = 0; i < theServlets.size(); i++) { - Servlet aServlet = (Servlet) theServlets.get(i); - if (aServlet.getServletName().equals(servletDescriptor._name)) { - foundServlet = true; - } - } - - if (foundServlet) { - return Status.OK_STATUS; - } - - WebapplicationFactory factory = WebapplicationFactory.eINSTANCE; - - Servlet servlet = factory.createServlet(); - ServletType servletType = factory.createServletType(); - servlet.setWebType(servletType); - servlet.setServletName(servletDescriptor._name); - servletType.setClassName(servletDescriptor._className); - if(servletDescriptor._displayName != null){ - servlet.setDisplayName(servletDescriptor._displayName); - } - if(servletDescriptor._loadOnStartup != null){ - servlet.setLoadOnStartup(servletDescriptor._loadOnStartup); - } - if(servletDescriptor._params != null){ - Properties properties = servlet.getParamsAsProperties(); - properties.putAll(servletDescriptor._params); - } - webapp.getServlets().add(servlet); - - if(servletDescriptor._mappings != null){ - for(int i=0; i<servletDescriptor._mappings.length; i++){ - ServletMapping servletMapping = factory.createServletMapping(); - servletMapping.setServlet(servlet); - servletMapping.setUrlPattern(servletDescriptor._mappings[i]); - webapp.getServletMappings().add(servletMapping); - } - } - - webEdit.save(new NullProgressMonitor()); - } - - return Status.OK_STATUS; - } catch (Exception e) { - - return StatusUtils.errorStatus( - AxisCreationUIMessages.MSG_ERROR_UPDATE_WEB_XML, - e); - } - finally{ - if (webEdit != null) - webEdit.dispose(); - } - } - - public void setServerProject(IProject serverProject) - { - this.serverProject = serverProject; - } - - public class ServletDescriptor { - String _name; - String _className; - String _displayName; - Map _params; - String[] _mappings; - Integer _loadOnStartup; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/plugin/WebServiceAxisCreationUIPlugin.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/plugin/WebServiceAxisCreationUIPlugin.java deleted file mode 100644 index 17c333b38..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/plugin/WebServiceAxisCreationUIPlugin.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.plugin; - - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.eclipse.wst.common.environment.EnvironmentService; -import org.eclipse.wst.common.environment.ILog; -import org.osgi.framework.BundleContext; - -/** -* This is the plugin class for the Web Services plugin. -* <p> -* This plugin contains the graphic user interface to the -* Web Services runtime found in org.eclipse.jst.ws. -*/ -public class WebServiceAxisCreationUIPlugin extends AbstractUIPlugin -{ - - // Copyright - public static final String copyright = "(c) Copyright IBM Corporation 2003."; //$NON-NLS-1$ - - /** - * The identifier of the descriptor of this plugin in plugin.xml. - */ - public static final String ID = "org.eclipse.jst.ws.axis.creation.ui"; //$NON-NLS-1$ - - /** - * The reference to the singleton instance of this plugin. - */ - private static WebServiceAxisCreationUIPlugin instance_; - private ILog log_; - - /** - * Constructs a runtime plugin object for this plugin. - * The "plugin" element in plugin.xml should include the attribute - * class = "org.eclipse.jst.ws.internal.ui.plugin.WebServicePlugin". - * @param descriptor The descriptor of this plugin. - */ - public WebServiceAxisCreationUIPlugin() - { - super(); - if (instance_ == null) - { - instance_ = this; - } - log_ = EnvironmentService.getEclipseLog(); - - } - - // This method is needed to keep the logging from blowing up. - public String toString() - { - return ID; - } - - /** - * Returns the singleton instance of this plugin. Equivalent to calling - * (WebServiceWasCreationUIPlugin)Platform.getPlugin("org.eclipse.jst.ws.was.v5.tp.ui"); - * @return The WebServiceConsumptionUIPlugin singleton. - */ - static public WebServiceAxisCreationUIPlugin getInstance () - { - return instance_; - } - - /** - * Called once by the platform when this plugin is first loaded. - * @throws CoreException If this plugin fails to start. - */ - public void start( BundleContext context ) throws CoreException - { - log_.log(ILog.INFO, 5068, this, "start", "Starting plugin org.eclipse.jst.ws.axis.creation.ui"); - - try - { - super.start( context ); - } - catch( Exception exc ) - { - log_.log( ILog.ERROR, 5068, this, "start", exc ); - } - - setPreferences(); - } - - /** - * Called once by the platform when this plugin is unloaded. - * @throws CoreException If this plugin fails to shutdown. - */ - public void stop( BundleContext context ) throws CoreException - { - log_.log(ILog.INFO, 5069, this, "stop", "Shutting plugin org.eclipse.jst.ws.axis.creation.ui"); - - try - { - super.stop( context ); - } - catch( Exception exc ) - { - log_.log( ILog.ERROR, 5068, this, "start", exc ); - } - } - - - /** - * Sets the general preferences to the values in the preferences store. - **/ - public void setPreferences() - { - // setDialogsPreferences(); - } - - /** - * @see AbstractUIPlugin#initializeDefaultPreferences - */ - protected void initializeDefaultPreferences(IPreferenceStore preferenceStore) { - - // Set the defaults Preference -// ActionDialogsPreferenceHelper.initializeDefaults(preferenceStore); - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BUCheckAxisDeploymentDescriptors.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BUCheckAxisDeploymentDescriptors.java deleted file mode 100644 index e0d5f07e7..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/BUCheckAxisDeploymentDescriptors.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CheckAxisDeploymentDescriptorsTask; - -public class BUCheckAxisDeploymentDescriptors extends CheckAxisDeploymentDescriptorsTask -{ - public BUCheckAxisDeploymentDescriptors() - { - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java deleted file mode 100644 index c3afaf985..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/DefaultsForServerJavaWSDLCommand.java +++ /dev/null @@ -1,263 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - - -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -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.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jst.ws.internal.axis.consumption.core.AxisConsumptionCoreMessages; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.ClasspathUtils; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.jst.ws.internal.consumption.ui.wsil.Utils; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.parser.discovery.WebServicesParserExt; -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - -public class DefaultsForServerJavaWSDLCommand extends AbstractDataModelOperation { - - private JavaWSDLParameter javaWSDLParam_ = null; - private IProject serviceProject_; - private String javaBeanName_; // this needs to be set by the extension with initial selection - private String WSDLServiceURL_; - private String WSDLServicePathname_; - private WebServicesParser WSParser_; - private String serviceServerTypeID_; - - private final String WSDL_FOLDER = "wsdl"; //$NON-NLS-1$ - public final String SERVICE_EXT = "/services/"; //$NON-NLS-1$ - private final String WSDL_EXT = "wsdl"; //$NON-NLS-1$ - public final byte MODE_BEAN = (byte) 0; - public final String SERVICE_NAME_EXT = "Service"; //$NON-NLS-1$ - - public DefaultsForServerJavaWSDLCommand( ) - { - } - - - /** - * Execute DefaultsForJavaToWSDLTask - */ - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - - IStatus status; - if (javaWSDLParam_ == null) { - status = StatusUtils.errorStatus( AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET); - environment.getStatusHandler().reportError(status); - return status; - } - - if (javaBeanName_ == null) { // either set by extension point or bean class page - javaBeanName_ = javaWSDLParam_.getBeanName(); - if (javaBeanName_ == null) { - //rm javaBeanName_ = isdElement.getJavaBeanName(); - javaWSDLParam_.setBeanName(javaBeanName_); - } - } - // rm WSParser_ = (WebServicesParser) wse_.getWSParser(); - - javaWSDLParam_.setServerSide(JavaWSDLParameter.SERVER_SIDE_BEAN); - javaWSDLParam_.setSkeletonDeploy(false); - - javaWSDLParam_.setBeanName(javaBeanName_); - String classpath = ClasspathUtils.getInstance().getClasspathString(serviceProject_); - javaWSDLParam_.setClasspath(classpath); - - String simpleBeanName = javaBeanName_; - if (javaBeanName_ != null) { - int index = javaBeanName_.lastIndexOf('.'); - if (index != -1) { - simpleBeanName = javaBeanName_.substring(index + 1); - } - } - String namespace = WSDLUtils.makeNamespace(javaWSDLParam_.getBeanName()); - javaWSDLParam_.setNamespace(namespace); - - javaWSDLParam_.setPortTypeName(simpleBeanName); - javaWSDLParam_.setServiceName(simpleBeanName + SERVICE_NAME_EXT); - - IPath moduleServerRoot = null; - - IPath modulePath = serviceProject_.getFullPath(); - IPath webinfPath = serviceProject_.getFullPath(); - try { - //if ( ResourceUtils.isWebProject(serviceProject_)) { - if (J2EEUtils.isWebComponent(serviceProject_)){ - moduleServerRoot = ResourceUtils.getJavaSourceLocation(serviceProject_); - - // should use ModuleCore.getSourceContainers(); -// IContainer container = ResourceUtils.getWebModuleServerRoot(serviceProject_); -// if (container!=null) { -// moduleServerRoot = container.getFullPath(); -// } - - modulePath = J2EEUtils.getWebContentPath(serviceProject_); - webinfPath = J2EEUtils.getWebInfPath( serviceProject_ ); - - } - - } catch (Exception e) { - status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_ERROR_DEFAULT_BEAN, e ); - environment.getStatusHandler().reportError(status); - return status; - } - - IPath wsdlPath = - modulePath.append(WSDL_FOLDER).append(simpleBeanName).addFileExtension(WSDL_EXT); - - try{ - IFolder folder = ResourceUtils.getWorkspaceRoot().getFolder(modulePath.append(WSDL_FOLDER)); - FileUtil.createFolder(folder, true, true); - - } - catch(CoreException e){ - status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_ERROR_WRITE_WSDL, e ); - environment.getStatusHandler().reportError(status); - return status; - } - - String wsdlLocation = ResourceUtils.getWorkspaceRoot().getFile(wsdlPath).getLocation().toString(); - - javaWSDLParam_.setOutputWsdlLocation(wsdlLocation); - javaWSDLParam_.setInputWsdlLocation(wsdlLocation); - WSDLServicePathname_ = wsdlPath.toString(); - - if (wsdlPath != null) { - String wsdlURL = PlatformUtils.getFileURLFromPath(new Path(wsdlLocation)); - WSDLServiceURL_ = wsdlURL; - // set parser - if (wsdlURL == null || wsdlURL.length() <= 0) { - IResource res = - ResourceUtils.findResource(WSDLServicePathname_); - if (res != null) - wsdlURL = (new Utils()).toFileSystemURI(res); - } - if (wsdlURL != null && wsdlURL.length() > 0) { - if (WSParser_ == null) { - WSParser_ = new WebServicesParserExt(); - } - } - } - - javaWSDLParam_.setStyle(JavaWSDLParameter.STYLE_WRAPPED); - javaWSDLParam_.setUse(JavaWSDLParameter.USE_LITERAL); - - String projectURL = ServerUtils.getEncodedWebComponentURL(serviceProject_, serviceServerTypeID_); - if (projectURL == null) { - status = StatusUtils.errorStatus( AxisCreationUIMessages.MSG_ERROR_PROJECT_URL); - environment.getStatusHandler().reportError(status); - return status; - } - - String serviceURL = projectURL + SERVICE_EXT + simpleBeanName; - javaWSDLParam_.setUrlLocation(serviceURL); - - javaWSDLParam_.setMetaInfOnly(true); - // String javaOutput = PlatformUtils.getPlatformURL(moduleServerRoot); - // String output = PlatformUtils.getPlatformURL(modulePath); - - String javaOutput = ResourceUtils.findResource(moduleServerRoot).getLocation().toString(); -// String javaOutput = ResourceUtils.getWorkspaceRoot().getFolder(moduleServerRoot).getLocation().toString(); - - String serviceName = javaWSDLParam_.getServiceName(); - IPath outputPath = ResourceUtils.findResource(webinfPath).getLocation(); - String output = serviceProject_.getFullPath().toString(); - if (outputPath!=null) - output = outputPath.append(serviceName).toString(); - - javaWSDLParam_.setJavaOutput(javaOutput); - javaWSDLParam_.setOutput(output); - - return Status.OK_STATUS; - } - - /** - * Returns the javaWSDLParam. - * @return JavaWSDLParameter - */ - public JavaWSDLParameter getJavaWSDLParam() { - return javaWSDLParam_; - } - - /** - * Sets the javaWSDLParam. - * @param javaWSDLParam The javaWSDLParam to set - */ - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) { - this.javaWSDLParam_ = javaWSDLParam; - } - - // rm - /* - public void setModel(Model model) { - this.model_ = model; - } - */ - - public void setServiceProject(IProject serviceProject) { - this.serviceProject_ = serviceProject; - } - - public void setJavaBeanName(String javaBeanName) { - this.javaBeanName_ = javaBeanName; - } - - public String getWSDLServiceURL() { - return WSDLServiceURL_; - } - - public String getWSDLServicePathname() { - return WSDLServicePathname_; - } - - public void setParser(WebServicesParser wsParser) { - this.WSParser_ = wsParser; - } - - public WebServicesParser getParser() { - return WSParser_; - } - - public void setObjectSelection(IStructuredSelection objectSelection) - { - if (objectSelection != null && !objectSelection.isEmpty()) - { - Object object = objectSelection.getFirstElement(); - if (object instanceof String) - setJavaBeanName((String)object); - } - } - - public void setServiceServerTypeID(String id) - { - serviceServerTypeID_ = id; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java deleted file mode 100644 index 21a92abb4..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveDeploymentFilesTask.java +++ /dev/null @@ -1,119 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - - -import java.io.File; - -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.jst.ws.internal.axis.consumption.core.AxisConsumptionCoreMessages; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.osgi.util.NLS; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - -public class MoveDeploymentFilesTask extends AbstractDataModelOperation { - - private IProject serverProject; - private String serviceServerTypeID_; - - private JavaWSDLParameter javaWSDLParam_; - - public MoveDeploymentFilesTask( ) - { - } - - /** - * Execute DefaultsForJavaToWSDLTask - */ - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - IStatus status = Status.OK_STATUS; - if (javaWSDLParam_ == null) { - status = StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET); - environment.getStatusHandler().reportError(status); - return status; - } - - IProject project = serverProject; - //String projectURL = ResourceUtils.getEncodedWebProjectURL(project); - String projectURL = ServerUtils.getEncodedWebComponentURL(project, serviceServerTypeID_); - - if (projectURL == null) { - status = StatusUtils.errorStatus(NLS.bind(AxisCreationUIMessages.MSG_ERROR_PROJECT_URL, new String[] { project.toString()})); - environment.getStatusHandler().reportError(status); - return status; - } else { - javaWSDLParam_.setProjectURL(projectURL); - } - - try { - String[] deployFiles = javaWSDLParam_.getDeploymentFiles(); - String javaOutput = javaWSDLParam_.getJavaOutput(); - - if (deployFiles == null || javaOutput == null) { - return status; - } - - - IPath webinfPath = J2EEUtils.getWebInfPath(project ); - - for (int i = 0; i < deployFiles.length; i++) { - File f = new File(deployFiles[i]); - String resourceToMove = f.getName(); - String targetFileName = ResourceUtils.getWorkspaceRoot().getFile(webinfPath.addTrailingSeparator().append(resourceToMove)).getLocation().toString(); - FileUtil.createTargetFile(deployFiles[i], targetFileName, true); - File deploymentFile = new File(deployFiles[i]); - deploymentFile.delete(); - deployFiles[i] = targetFileName; - } - - } catch (Exception e) { - status = StatusUtils.errorStatus(NLS.bind(AxisCreationUIMessages.MSG_ERROR_MOVE_RESOURCE,new String[] { e.getLocalizedMessage()}), e); - environment.getStatusHandler().reportError(status); - return status; - } - - return status; - } - - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam_; - } - - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) - { - javaWSDLParam_ = javaWSDLParam; - } - - public void setServerProject(IProject serverProject) - { - this.serverProject = serverProject; - } - - public void setServiceServerTypeID(String id) - { - serviceServerTypeID_ = id; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java deleted file mode 100644 index 48b6e7cb1..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/MoveJavaFilesTask.java +++ /dev/null @@ -1,131 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - - -import java.io.File; - -import org.eclipse.core.resources.IProject; -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.jst.ws.internal.axis.consumption.core.AxisConsumptionCoreMessages; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.osgi.util.NLS; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - - -public class MoveJavaFilesTask extends AbstractDataModelOperation { - - private JavaWSDLParameter javaWSDLParam_; - private IProject serviceProject_; - private String serviceServerTypeID_; - - public MoveJavaFilesTask() { - } - - /** - * Execute DefaultsForJavaToWSDLTask - */ - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - IStatus status = Status.OK_STATUS; - - if (javaWSDLParam_ == null) { - status = StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET); - environment.getStatusHandler().reportError(status); - return status; - } - - // rm - /* - if (model_ == null) { - status = new SimpleStatus("",msgUtils_.getMessage("MSG_ERROR_MODEL_NOT_SET"), Status.ERROR); - return status; - } - */ - - IProject project = serviceProject_; - //String projectURL = ResourceUtils.getEncodedWebProjectURL(project); - String projectURL = ServerUtils.getEncodedWebComponentURL(project, serviceServerTypeID_); - if (projectURL == null) { - status = StatusUtils.errorStatus(NLS.bind(AxisCreationUIMessages.MSG_ERROR_PROJECT_URL,new String[] {project.toString()})); - environment.getStatusHandler().reportError(status); - return status; - - } else { - javaWSDLParam_.setProjectURL(projectURL); - } - - String[] javaFiles = javaWSDLParam_.getJavaFiles(); - String javaoutput = javaWSDLParam_.getJavaOutput(); // <webproject>/JavaSource - String output = javaWSDLParam_.getOutput(); // <webproject>/WebContent/META_INF - - if(javaFiles == null || javaoutput == null && output == null ){ - return status; - } - try { - for (int i = 0; i < javaFiles.length; i++) { -// String resourceToMove = javaFiles[i].substring(output.length()); -// String targetFileName = javaoutput + resourceToMove; -// File resultFile = new File(targetFileName); - // copy java files that without overwtriting existing ones -// if (!resultFile.exists()) { -// FileUtil.createTargetFile( -// javaFiles[i], -// javaoutput + resourceToMove); -// } - // delete java files from the output directory - File source = new File(javaFiles[i]); - source.delete(); - } - } catch (Exception e) { - status = StatusUtils.errorStatus(NLS.bind(AxisCreationUIMessages.MSG_ERROR_MOVE_RESOURCE,new String[]{e.getLocalizedMessage()}), e); - environment.getStatusHandler().reportError(status); - return status; - } - - return status; - } - - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) - { - javaWSDLParam_ = javaWSDLParam; - } - - public JavaWSDLParameter getJavaWSDLParam() { - return javaWSDLParam_; - } - - public void setServiceProject(IProject serviceProject) - { - serviceProject_ = serviceProject; - } - - // rm - /* - public void setModel(Model model) - { - model_ = model; - } - */ - - public void setServiceServerTypeID(String id) - { - serviceServerTypeID_ = id; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java deleted file mode 100644 index e7c9ddc98..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/Skeleton2WSDLCommand.java +++ /dev/null @@ -1,282 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Iterator; -import java.util.Map; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.soap.SOAPAddress; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -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.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.ws.internal.axis.consumption.core.AxisConsumptionCoreMessages; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.PlatformUtils; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.WSDLUtils; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.jst.ws.internal.consumption.command.common.CopyWSDLCommand; -import org.eclipse.osgi.util.NLS; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - -public class Skeleton2WSDLCommand extends AbstractDataModelOperation -{ - private static final String IMPL = "Impl"; //$NON-NLS-1$ - private static final String SERVICE_EXT = "/services/"; //$NON-NLS-1$ - private static final String WSDL_EXT = "wsdl"; //$NON-NLS-1$ - private static final String DOT = "."; //$NON-NLS-1$ - private final String WSDL_FOLDER = "wsdl"; //$NON-NLS-1$ - private WebServicesParser webServicesParser; - private JavaWSDLParameter javaWSDLParam; - private IProject serverProject; - private String serviceServerTypeID_; - - public Skeleton2WSDLCommand( ) { - } - - /** - * Execute Skeleton2WSDLCommand - */ - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - if (javaWSDLParam == null) - { - IStatus status = StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET); - environment.getStatusHandler().reportError(status); - return status; - } - - // Read WSDL - Definition definition = null; - String wsdlURL = javaWSDLParam.getInputWsdlLocation(); - try - { - URL url = new URL(wsdlURL); - definition = webServicesParser.getWSDLDefinition(url.toString()); - } - catch(MalformedURLException e) - { - wsdlURL = PlatformUtils.getFileURLFromPath(new Path(wsdlURL)); - definition = webServicesParser.getWSDLDefinition(wsdlURL); - } - - // Compute the qualified name of the Java bean skeleton - Service service = null; - Port port = null; - if (definition != null) { - StringBuffer beanName = new StringBuffer(); - beanName.append(WSDLUtils.getPackageName(definition)); - beanName.append(DOT); - try{ - service = (Service) definition.getServices().values().iterator().next(); - port = (Port) service.getPorts().values().iterator().next(); - Binding binding = port.getBinding(); - beanName.append(binding.getQName().getLocalPart()); - beanName.append(IMPL); - javaWSDLParam.setBeanName(beanName.toString()); - - javaWSDLParam.setPortTypeName(WSDLUtils.getPortTypeName(definition)); - javaWSDLParam.setServiceName( - WSDLUtils.getServiceElementName(definition)); - javaWSDLParam.setBeanPackage(WSDLUtils.getPackageName(definition)); - } - catch(Throwable e){ - e.printStackTrace(); - } - } - else { - IStatus status = StatusUtils.errorStatus( NLS.bind(AxisConsumptionUIMessages.MSG_ERROR_WSDL_NO_DEFINITION, new String[] {wsdlURL})); - environment.getStatusHandler().reportError(status); - return status; - } - - // Modify WSDL endpoint - if (port == null) { - IStatus status = StatusUtils.errorStatus( NLS.bind(AxisConsumptionUIMessages.MSG_ERROR_WSDL_NO_PORT, new String[] {wsdlURL})); - environment.getStatusHandler().reportError(status); - return status; - } - Map services = definition.getServices(); - for (Iterator servicesIt = services.values().iterator(); servicesIt.hasNext();) - { - Service s = (Service)servicesIt.next(); - Map ports = s.getPorts(); - for (Iterator portsIt = ports.values().iterator(); portsIt.hasNext();) - { - Port p = (Port)portsIt.next(); - modifyEndpoint(p); - } - } - - // Set WSDL file name: javaWSDLParam.setOutputWsdlLocation(); - IWorkspaceRoot workspace = ResourcesPlugin.getWorkspace().getRoot(); - - String wsdlLocation = javaWSDLParam.getOutputWsdlLocation(); - IPath wsdlPath = null; - IFile outputFile = null; - try { - if(wsdlLocation != null){ - outputFile = workspace.getFileForLocation( new Path(wsdlLocation)); - } - else{ -// wsdlPath = serverProject.getFullPath(); -// -// if (serverProject.hasNature(IWebNatureConstants.J2EE_NATURE_ID)) { -// J2EEWebNatureRuntime webProject = -// (J2EEWebNatureRuntime) serverProject.getNature( -// IWebNatureConstants.J2EE_NATURE_ID); -// wsdlPath = J2EEUtils.getWebContentPath( serverProject, moduleName_ ); -// //wsdlPath = wsdlPath.append(webProject.getWEBINFPath()); -// } -// else if (serverProject.hasNature(IEJBNatureConstants.NATURE_ID)) -// { -// EJBNatureRuntime ejbProject = EJBNatureRuntime.getRuntime(serverProject); -// wsdlPath = wsdlPath.append(ejbProject.getMetaFolder().getProjectRelativePath().addTrailingSeparator()); -// } -// TODO: handle EJB case - wsdlPath = J2EEUtils.getWebContentPath( serverProject ); - IPath wsdlFilePath = wsdlPath.append(WSDL_FOLDER).append(port.getName()).addFileExtension(WSDL_EXT); - IFolder folder = ResourceUtils - .getWorkspaceRoot() - .getFolder(wsdlPath.append(WSDL_FOLDER)); - FileUtil.createFolder(folder, true, true); - outputFile = workspace.getFile(wsdlFilePath); - wsdlLocation = outputFile.getLocation().toString(); - javaWSDLParam.setOutputWsdlLocation(wsdlLocation); - - } - - // copy WSDL - CopyWSDLCommand copyWSDLCommand = new CopyWSDLCommand(); - copyWSDLCommand.setWebServicesParser(webServicesParser); - copyWSDLCommand.setWsdlURI(wsdlURL); - copyWSDLCommand.setDestinationURI(outputFile.getLocation().toFile().toURL().toString()); - copyWSDLCommand.setDefinition(definition); - copyWSDLCommand.setEnvironment(environment); - IStatus status = copyWSDLCommand.execute(null, null); - if(status!=null && status.getSeverity()==Status.ERROR) { - return status; - } - } - catch (Exception e) { - IStatus status = StatusUtils.errorStatus( NLS.bind(AxisConsumptionUIMessages.MSG_ERROR_WRITE_WSDL, new String[] { wsdlLocation }), e); - environment.getStatusHandler().reportError(status); - return status; - } - return Status.OK_STATUS; - } - - private IStatus modifyEndpoint(Port port) - { - Iterator it = port.getExtensibilityElements().iterator(); - SOAPAddress soapAddress = null; - while (it.hasNext()) - { - Object obj = it.next(); - if (obj instanceof SOAPAddress) - { - soapAddress = (SOAPAddress)obj; - break; - } - } - if (soapAddress != null) - { -// String projectURL = ResourceUtils.getEncodedWebProjectURL(serverProject); - String projectURL = ServerUtils.getEncodedWebComponentURL(serverProject, serviceServerTypeID_); - if (projectURL == null) - return StatusUtils.errorStatus( NLS.bind(AxisCreationUIMessages.MSG_ERROR_PROJECT_URL, new String[] {serverProject.toString()})); - StringBuffer serviceURL = new StringBuffer(projectURL); - serviceURL.append(SERVICE_EXT).append(port.getName()); - javaWSDLParam.setUrlLocation(serviceURL.toString()); - soapAddress.setLocationURI(serviceURL.toString()); - } - return Status.OK_STATUS; - } - - /** - * Returns the javaWSDLParam. - * @return JavaWSDLParameter - */ - public JavaWSDLParameter getJavaWSDLParam() { - return javaWSDLParam; - } - - /** - * Sets the javaWSDLParam. - * @param javaWSDLParam The javaWSDLParam to set - */ - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) { - this.javaWSDLParam = javaWSDLParam; - } - - /** - * @param serverProject The serverProject to set. - */ - public void setServerProject(IProject serverProject) { - this.serverProject = serverProject; - } - - /** - * @return Returns the webServicesParser. - */ - public WebServicesParser getWebServicesParser() { - return webServicesParser; - } - - /** - * @param webServicesParser The webServicesParser to set. - */ - public void setWebServicesParser(WebServicesParser webServicesParser) { - this.webServicesParser = webServicesParser; - } - - public String getWsdlURI() - { - File file = new File(getJavaWSDLParam().getOutputWsdlLocation()); - String url = ""; - try { - url = file.toURL().toString(); - } - catch(MalformedURLException mue){} - return url; - } - - public void setServiceServerTypeID(String id) - { - serviceServerTypeID_ = id; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/TDCheckAxisDeploymentDescriptors.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/TDCheckAxisDeploymentDescriptors.java deleted file mode 100644 index 31027b3bb..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/TDCheckAxisDeploymentDescriptors.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CheckAxisDeploymentDescriptorsTask; - -public class TDCheckAxisDeploymentDescriptors extends CheckAxisDeploymentDescriptorsTask -{ - public TDCheckAxisDeploymentDescriptors() - { - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java deleted file mode 100644 index 19064566c..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/task/UpdateAxisWSDDFileTask.java +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.task; - - -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -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.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.jst.ws.internal.axis.consumption.core.AxisConsumptionCoreMessages; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.consumption.ui.util.FileUtil; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.axis.creation.ui.plugin.WebServiceAxisCreationUIPlugin; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ServerUtils; -import org.eclipse.osgi.util.NLS; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.common.BundleUtils; - -public class UpdateAxisWSDDFileTask extends AbstractDataModelOperation { - - private final String DEPLOY_XSL = "deploy.xsl"; //$NON-NLS-1$ - private final String DEPLOY_BAK = "deploy.wsdd.bak"; //$NON-NLS-1$ - private final String CLASSNAME_PARAM = "newClassName"; //$NON-NLS-1$ - private JavaWSDLParameter javaWSDLParam_; - private IProject serviceProject_; - private String serviceServerTypeID_; - - public UpdateAxisWSDDFileTask() - { - } - - /** - * Execute UpdateAxisWSDDFileTask - */ - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - IStatus status = Status.OK_STATUS; - if (javaWSDLParam_ == null) { - status = StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET); - environment.getStatusHandler().reportError(status); - return status; - } - - IProject project = serviceProject_; - //String projectURL = ResourceUtils.getEncodedWebProjectURL(project); - String projectURL = ServerUtils.getEncodedWebComponentURL(project, serviceServerTypeID_); - if (projectURL == null) { - status = StatusUtils.errorStatus(NLS.bind(AxisCreationUIMessages.MSG_ERROR_PROJECT_URL,new String[] {project.toString()})); - environment.getStatusHandler().reportError(status); - return status; - } else { - javaWSDLParam_.setProjectURL(projectURL); - } - String outputLocation = javaWSDLParam_.getJavaOutput(); - if (outputLocation == null) { - return status; - } - - String webContentPath = J2EEUtils.getWebContentContainer( project ).getLocation().toString(); - try { - - if (javaWSDLParam_.getDeploymentFiles() != null - && javaWSDLParam_.getDeploymentFiles().length > 0) { - - String wsdd_deploy = javaWSDLParam_.getDeploymentFiles()[0]; - Path deployPath = new Path(wsdd_deploy); - String deployBackup = - deployPath - .removeLastSegments(1) - .append(DEPLOY_BAK) - .toString(); - FileUtil.createTargetFile(wsdd_deploy, deployBackup, true); - String deployXSL = getPluginFilePath(DEPLOY_XSL).toString(); - - TransformerFactory tFactory = TransformerFactory.newInstance(); - - // Use the TransformerFactory to instantiate a Transformer that will work with - // the stylesheet you specify. This method call also processes the stylesheet - // into a compiled Templates object. - Transformer transformer = - tFactory.newTransformer(new StreamSource(deployXSL)); - transformer.setParameter(CLASSNAME_PARAM, javaWSDLParam_.getBeanName()); - - // Use the Transformer to apply the associated Templates object to an XML document - // (foo.xml) and write the output to a file (foo.out). - transformer.transform( - new StreamSource(deployBackup), - new StreamResult(new FileOutputStream(wsdd_deploy))); - - } - - } catch (Exception e) { - String[] errorMsgStrings = new String[]{project.toString(), outputLocation.toString(), webContentPath.toString()}; - status = StatusUtils.errorStatus(NLS.bind(AxisCreationUIMessages.MSG_ERROR_UPDATE_AXIS_WSDD, errorMsgStrings), e); - environment.getStatusHandler().reportError(status); - return status; - } - - return status; - } - - private IPath getPluginFilePath(String pluginfileName) - throws CoreException { - try { - - URL localURL = - Platform.asLocalURL( - BundleUtils.getURLFromBundle( WebServiceAxisCreationUIPlugin.ID, pluginfileName)); - return new Path(localURL.getFile()); - } catch (MalformedURLException e) { - throw new CoreException( - new org.eclipse.core.runtime.Status( - IStatus.WARNING, - WebServiceAxisCreationUIPlugin.ID, - 0, - AxisCreationUIMessages.MSG_PLUGIN_FILE_URL, - e)); - } catch (IOException e) { - throw new CoreException( - new org.eclipse.core.runtime.Status( - IStatus.WARNING, - WebServiceAxisCreationUIPlugin.ID, - 0, - AxisCreationUIMessages.MSG_PLUGIN_FILE_URL, - e)); - } - } - - - /** - * Sets the javaWSDLParam. - * @param javaWSDLParam The javaWSDLParam to set - */ - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) { - javaWSDLParam_ = javaWSDLParam; - } - - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam_; - } - - public void setServiceProject(IProject serviceProject) - { - serviceProject_ = serviceProject; - } - - // rm - /* - public void setModel(Model model) - { - model_ = model; - } - */ - public void setServiceServerTypeID(String id) - { - serviceServerTypeID_ = id; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java deleted file mode 100644 index ece395c47..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BUAxisDefaultingCommand.java +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; - -import org.eclipse.core.resources.IProject; -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.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.consumption.datamodel.validate.ValidationManager; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.server.core.IServer; -import org.eclipse.wst.ws.internal.parser.discovery.WebServicesParserExt; -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - -/** - * - */ -public class BUAxisDefaultingCommand extends AbstractDataModelOperation -{ - - //Provide - private IServer serviceExistingServer_; - private JavaWSDLParameter javaWSDLParam_; - private String javaBeanName_; - private WebServicesParser parser_; - private boolean forceBuild_ = true; - private Boolean IsWebProjectStartupRequested = Boolean.TRUE; // rsk revisit - private ValidationManager validationManager_; - private boolean customizeServiceMappings_ = false; - - //This is proxy and client related information - //which can be nulled for commands dealing - //with service creation. - //rsk revisit - private Boolean isProxyProject_ = Boolean.FALSE; - private String clientRuntimeID_ = null; - private IProject proxyProject_ = null; - private IProject sampleProject_ = null; - private String sampleServerTypeID_ = null; - private IServer sampleExistingServer_ = null; - - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - - //javaWSDLParam - javaWSDLParam_ = new JavaWSDLParameter(); - - if (javaBeanName_ == null) { - IStatus status = StatusUtils.errorStatus( - AxisCreationUIMessages.MSG_ERROR_CANNOT_NO_JAVA_BEAN); - environment.getStatusHandler().reportError(status); - return status; - } - - //parser - parser_ = new WebServicesParserExt(); - - //validationManager - validationManager_ = new ValidationManager(); - - return Status.OK_STATUS; - } - - - /** - * @return Returns the clientRuntimeID_. - */ - public String getClientRuntimeID() - { - return clientRuntimeID_; - } - /** - * @return Returns the forceBuild_. - */ - public boolean getForceBuild() - { - return forceBuild_; - } - /** - * @return Returns the isProxyProject_. - */ - public Boolean getIsProxyProject() - { - return isProxyProject_; - } - /** - * @return Returns the javaBeanName_. - */ - public String getJavaBeanName() - { - return javaBeanName_; - } - /** - * @return Returns the javaWSDLParam_. - */ - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam_; - } - /** - * @return Returns the parser_. - */ - public WebServicesParser getParser() - { - return parser_; - } - /** - * @return Returns the proxyProject_. - */ - public IProject getProxyProject() - { - return proxyProject_; - } - /** - * @return Returns the sampleExistingServer_. - */ - public IServer getSampleExistingServer() - { - return sampleExistingServer_; - } - /** - * @return Returns the sampleProject_. - */ - public IProject getSampleProject() - { - return sampleProject_; - } - /** - * @return Returns the sampleServerTypeID_. - */ - public String getSampleServerTypeID() - { - return sampleServerTypeID_; - } - /** - * @return Returns the validationManager_. - */ - public ValidationManager getValidationManager() - { - return validationManager_; - } - - /** - * @return Returns the serviceExistingServer_. - */ - public IServer getServiceExistingServer() - { - return serviceExistingServer_; - } - - - public boolean getCustomizeServiceMappings() - { - return customizeServiceMappings_; - } - /** - * @return Returns the isWebProjectStartupRequested. - */ - public Boolean getIsWebProjectStartupRequested() - { - return IsWebProjectStartupRequested; - } - -public void setJavaBeanName(String javaBeanName) { - this.javaBeanName_ = javaBeanName; -} - -// public void setServiceTypeRuntimeServer(TypeRuntimeServer ids) -// { -// serviceIds_ = ids; -// } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BeanClassWidget.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BeanClassWidget.java deleted file mode 100644 index 9758e7039..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BeanClassWidget.java +++ /dev/null @@ -1,172 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.wizard.IWizardContainer; -import org.eclipse.jface.wizard.IWizardPage; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.consumption.common.JavaResourceFilter; -import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; -import org.eclipse.jst.ws.internal.ui.common.UIUtils; -import org.eclipse.jst.ws.internal.ui.dialog.DialogUtils; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.PlatformUI; -import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents; - - -public class BeanClassWidget extends SimpleWidgetDataContributor -{ - - private IProject serverProject_ = null; - private Composite parent_ = null; - private IWizardContainer context_ = null; - private JavaResourceFilter filter_ = new JavaResourceFilter(); - private IResource initialResource_ = null; - - /*CONTEXT_ID PBCL0001 for the Bean Selection Page*/ - private String INFOPOP_PBCL_PAGE = "PBCL0001"; - - private Text beanClassText_; - /*CONTEXT_ID PBCL0002 for the Bean Selection field of the Bean Selection Page*/ - private String INFOPOP_PBCL_TEXT_BEAN_CLASS = "PBCL0002"; - - private Button beanClassBrowseButton_; - /*CONTEXT_ID PBCL0003 for the Bean Class Browse button of the Bean Selection Page*/ - private String INFOPOP_PBCL_BUTTON_BEAN_CLASS_BROWSE = "PBCL0003"; - - private Button beanResourceBrowseButton_; - /*CONTEXT_ID PBCL0004 for the Bean Resource Browse button of the Bean Selection Page*/ - private String INFOPOP_PBCL_BUTTON_BEAN_RESOURCE_BROWSE = "PBCL0004"; - - public WidgetDataEvents addControls( Composite parent, Listener statusListener ) - { - String pluginId_ = "org.eclipse.jst.ws.consumption.ui"; - String thisPlugin = "org.eclipse.jst.ws.axis.creation.ui"; - UIUtils uiUtils = new UIUtils( thisPlugin ); - - parent_ = parent; - - Composite group = uiUtils.createComposite( parent, 4 ); - - group.setToolTipText( ConsumptionUIMessages.TOOLTIP_PBCL_PAGE ); - PlatformUI.getWorkbench().getHelpSystem().setHelp( group, pluginId_ + "." + INFOPOP_PBCL_PAGE ); - - beanClassText_ = uiUtils.createText( group, ConsumptionUIMessages.LABEL_BEAN_CLASS_NAME, - ConsumptionUIMessages.TOOLTIP_PBCL_TEXT_BEAN_CLASS, - INFOPOP_PBCL_TEXT_BEAN_CLASS, - SWT.SINGLE | SWT.BORDER); - - beanClassBrowseButton_ = uiUtils.createPushButton( group, ConsumptionUIMessages.BUTTON_BROWSE_CLASSES, - ConsumptionUIMessages.TOOLTIP_PBCL_BUTTON_BEAN_CLASS_BROWSE, - INFOPOP_PBCL_BUTTON_BEAN_CLASS_BROWSE ); - beanClassBrowseButton_.addSelectionListener( new SelectionAdapter() - { - public void widgetSelected( SelectionEvent evt ) - { - handleBrowseClasses(); - } - } ); - - beanResourceBrowseButton_ = uiUtils.createPushButton( group, ConsumptionUIMessages.BUTTON_BROWSE_FILES, - ConsumptionUIMessages.TOOLTIP_PBCL_BUTTON_BEAN_RESOURCE_BROWSE, - INFOPOP_PBCL_BUTTON_BEAN_RESOURCE_BROWSE ); - beanResourceBrowseButton_.addSelectionListener( new SelectionAdapter() - { - public void widgetSelected( SelectionEvent evt ) - { - handleBrowseFiles(); - } - } ); - - return this; - } - - private void handleBrowseClasses() - { - String className = DialogUtils.browseClasses( parent_.getShell(), - serverProject_, context_ ); - - if (className!=null) beanClassText_.setText(className); - - } - - private void handleBrowseFiles() - { - IResource topResource = serverProject_; - - if (topResource == null) - { - topResource = ResourceUtils.getWorkspaceRoot(); - } - - IResource resource - = DialogUtils.browseResources( parent_.getShell(), - topResource, - initialResource_, - filter_ ); - - if( resource != null ) - { - IPath path = resource.getFullPath(); - String basename = path.lastSegment(); - - if( basename != null && basename.length() > 0 ) - { - String beanPackage = org.eclipse.jst.ws.internal.common.ResourceUtils.getJavaResourcePackageName(path); - String beanClass = (beanPackage == null ? basename : (beanPackage + "." + basename)); - - if( beanClass.toLowerCase().endsWith(".java") || beanClass.toLowerCase().endsWith(".class" ) ) - { - beanClass = beanClass.substring( 0, beanClass.lastIndexOf('.') ); - } - - beanClassText_.setText(beanClass); - } - } - } - - public void setCurrentPage( IWizardPage page ) - { - context_ = page.getWizard().getContainer(); - } - - public void setBeanClassName(String beanClassName) - { - beanClassText_.setText(beanClassName); - } - - public String getBeanClassName() - { - return beanClassText_.getText().trim(); - } - - public void setServerProjectName( String name ) - { - serverProject_ = (IProject)ResourceUtils.findResource( new Path( name ).makeAbsolute() ); - } - - public void setInitialResource( IResource resource ) - { - initialResource_ = resource; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BeanConfigWidget.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BeanConfigWidget.java deleted file mode 100644 index e54abe807..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/BeanConfigWidget.java +++ /dev/null @@ -1,321 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; - -import java.util.Enumeration; -import java.util.Hashtable; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; -import org.eclipse.jst.ws.internal.ui.common.UIUtils; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.swt.widgets.TreeItem; -import org.eclipse.ui.PlatformUI; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents; - - -public class BeanConfigWidget extends SimpleWidgetDataContributor -{ - - private Button rpcEncodedButton_; - private Button rpcLiteralButton_; - private Button docLiteralButton_; - - private Listener statusListener_; - - private JavaWSDLParameter javaParameter_; - - /* CONTEXT_ID PBCF0001 for the Bean Config Page */ - private final String INFOPOP_PBCF_PAGE = "PBCF0001"; //$NON-NLS-1$ - - private Text uriText_; - /* CONTEXT_ID PBCF0002 for the URI field of the Bean Config Page */ - private final String INFOPOP_PBCF_TEXT_URI = "PBCF0002"; //$NON-NLS-1$ - - private Text wsdlFolderText_; - /* CONTEXT_ID PBCF0006 for the WSDL Folder field in the Bean Config Page */ - private final String INFOPOP_PBCF_TEXT_WSDL_FOLDER = "PBCF0006"; //$NON-NLS-1$ - - private Text wsdlFileText_; - /* CONTEXT_ID PBCF0007 for the WSDL File field of the Bean Config Page */ - private final String INFOPOP_PBCF_TEXT_WSDL_FILE = "PBCF0007"; //$NON-NLS-1$ - - private Tree methodsTree_; - /* CONTEXT_ID PBME0002 for the Methods tree of the Bean Methods Page */ - private final String INFOPOP_PBME_TREE_METHODS = "PBME0002"; //$NON-NLS-1$ - - private Button selectAllMethodsButton_; - /* CONTEXT_ID PBME0010 for the Select All button of the Bean Methods Page */ - private final String INFOPOP_PBME_BUTTON_SELECT_ALL = "PBME0010"; //$NON-NLS-1$ - - private Button deselectAllMethodsButton_; - /* CONTEXT_ID PBME0011 for the Deselect All button of the Bean Methods Page */ - private final String INFOPOP_PBME_BUTTON_DESELECT_ALL = "PBME0011"; //$NON-NLS-1$ - - private Button showMappingsCheckbox_; - /* CONTEXT_ID PBCF0016 for the Show Mappings checkbox of the Bean Methods Page */ - private String INFOPOP_P2N_SHOW_MAPPINGS = "PBCF0016"; //$NON-NLS-1$ - - public WidgetDataEvents addControls( Composite parent, Listener statusListener ) - { - String pluginId_ = "org.eclipse.jst.ws.axis.creation.ui"; - - UIUtils uiUtils = new UIUtils( pluginId_ ); - UIUtils baseConUiUtils = new UIUtils( pluginId_ ); - - statusListener_ = statusListener; - parent.setToolTipText( AxisCreationUIMessages.TOOLTIP_PBCF_PAGE ); - PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, pluginId_ + "." + INFOPOP_PBCF_PAGE ); - - Composite configGroup = uiUtils.createComposite( parent, 2 ); - - uriText_ = uiUtils.createText( configGroup, AxisCreationUIMessages.LABEL_URI, - AxisCreationUIMessages.TOOLTIP_PBCF_TEXT_URI, - INFOPOP_PBCF_TEXT_URI, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - - wsdlFolderText_ = uiUtils.createText( configGroup, AxisCreationUIMessages.LABEL_OUTPUT_FOLDER_NAME, - AxisCreationUIMessages.TOOLTIP_PBCF_TEXT_WSDL_FOLDER, - INFOPOP_PBCF_TEXT_WSDL_FOLDER, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - - wsdlFileText_ = uiUtils.createText( configGroup, AxisCreationUIMessages.LABEL_OUTPUT_FILE_NAME, - AxisCreationUIMessages.TOOLTIP_PBCF_TEXT_WSDL_FILE, - INFOPOP_PBCF_TEXT_WSDL_FILE, - SWT.SINGLE | SWT.BORDER ); - wsdlFileText_.addListener( SWT.Modify, statusListener ); - - uiUtils.createHorizontalSeparator( parent, 6 ); - - // TODO this group has no TOOLTIP or INFOPOP. - Group methodsGroup = baseConUiUtils.createGroup( parent, ConsumptionUIMessages.LABEL_METHODS, null, null ); - methodsGroup.setLayoutData( uiUtils.createFillAll() ); - - GridLayout layout = new GridLayout(); - layout.marginHeight = 0; - layout.marginWidth = 0; - methodsGroup.setLayout( layout ); - - methodsTree_ = uiUtils.createTree( methodsGroup, AxisCreationUIMessages.TOOLTIP_PBME_TREE_METHODS, - INFOPOP_PBME_TREE_METHODS, - SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.CHECK ); - methodsTree_.addListener( SWT.Selection, statusListener ); - - Composite selectButtons = uiUtils.createComposite( methodsGroup, 2 ); - - selectAllMethodsButton_ - = baseConUiUtils.createPushButton( selectButtons, ConsumptionUIMessages.BUTTON_SELECT_ALL, - ConsumptionUIMessages.TOOLTIP_PBME_BUTTON_SELECT_ALL, - INFOPOP_PBME_BUTTON_SELECT_ALL ); - selectAllMethodsButton_.addSelectionListener( new SelectionAdapter() - { - public void widgetSelected( SelectionEvent evt ) - { - handleSelectAll( true ); - } - }); - - deselectAllMethodsButton_ - = baseConUiUtils.createPushButton( selectButtons, ConsumptionUIMessages.BUTTON_DESELECT_ALL, - ConsumptionUIMessages.TOOLTIP_PBME_BUTTON_DESELECT_ALL, - INFOPOP_PBME_BUTTON_DESELECT_ALL ); - deselectAllMethodsButton_.addSelectionListener( new SelectionAdapter() - { - public void widgetSelected( SelectionEvent evt ) - { - handleSelectAll( false ); - } - }); - - // TODO this group has no TOOLTIP or INFOPOP. - Group styleGroup = uiUtils.createGroup( parent, AxisCreationUIMessages.LABEL_STYLE_USE, null, null ); - - // TODO radio buttons have no TOOLTIP or INFOPOP. - docLiteralButton_ = uiUtils.createRadioButton( styleGroup, AxisCreationUIMessages.STYLE_DOC_LITERAL, null, null ); - rpcLiteralButton_ = uiUtils.createRadioButton( styleGroup, AxisCreationUIMessages.STYLE_RPC_LITERAL, null, null ); - rpcEncodedButton_ = uiUtils.createRadioButton( styleGroup, AxisCreationUIMessages.STYLE_RPC_ENCODED, null, null ); - - showMappingsCheckbox_ = uiUtils.createCheckbox( parent, AxisCreationUIMessages.LABEL_EXPLORE_MAPPINGS_BEAN2XML, - AxisCreationUIMessages.TOOLTIP_P2N_SHOW_MAPPINGS, - INFOPOP_P2N_SHOW_MAPPINGS ); - - return this; - } - - public void handleSelectAll( boolean value ) - { - TreeItem[] items = methodsTree_.getItems(); - - for( int i = 0; i < items.length; i++ ) - { - items[i].setChecked(value); - } - - statusListener_.handleEvent( null ); - } - - public void setCustomizeServiceMappings( boolean value ) - { - showMappingsCheckbox_.setSelection( value ); - } - - public boolean getCustomizeServiceMappings() - { - return showMappingsCheckbox_ == null ? false : showMappingsCheckbox_.getSelection(); - } - - public void setJavaParameter( JavaWSDLParameter javaParameter ) - { - javaParameter_ = javaParameter; - - String wsdlLocation = javaParameter.getOutputWsdlLocation(); - - // TODO Verify that we need to find the WSDL in the eclipse file system. - //IFile file - // = ResourceUtils.getWorkspaceRoot().getFileForLocation(new Path(wsdlLocation)); - //IPath wsdlPath = file.getFullPath(); - IPath wsdlPath = new Path( wsdlLocation ); - - wsdlFolderText_.setText(wsdlPath.removeLastSegments(1).toString()); - wsdlFileText_.setText(wsdlPath.lastSegment()); - - String location = javaParameter.getUrlLocation(); - uriText_.setText(location == null ? "" : location); - - methodsTree_.removeAll(); - Hashtable methods = javaParameter.getMethods(); - Enumeration e = methods.keys(); - - while( e.hasMoreElements() ) - { - String name = (String) e.nextElement(); - TreeItem item = new TreeItem(methodsTree_, SWT.NULL); - - item.setData(name); - item.setText(name); - item.setChecked((((Boolean) methods.get(name)).booleanValue())); - } - - TreeItem[] items = methodsTree_.getItems(); - - if( items.length > 0 ) - { - methodsTree_.setSelection( new TreeItem[]{ items[0] } ); - } - - String style = javaParameter.getStyle(); - - if( style.equals( JavaWSDLParameter.STYLE_RPC ) ) - { - rpcEncodedButton_.setSelection(true); - } - else if( style.equals( JavaWSDLParameter.STYLE_DOCUMENT ) ) - { - rpcLiteralButton_.setSelection(true); - } - else - { - docLiteralButton_.setSelection(true); - } - } - - public JavaWSDLParameter getJavaParameter() - { - IPath wsdlPath - = new Path( wsdlFolderText_.getText().trim() ).append( wsdlFileText_.getText().trim() ); - - // TODO Do we need to go to the eclipse file system?? - //String wsdlLocation = workspace.getFile(wsdlPath).getLocation().toString(); - String wsdlLocation = wsdlPath.toString(); - - javaParameter_.setOutputWsdlLocation(wsdlLocation); - javaParameter_.setInputWsdlLocation(wsdlLocation); - - Hashtable methods = new Hashtable(); - - TreeItem[] items = methodsTree_.getItems(); - - for( int i = 0; i < items.length; i++ ) - { - TreeItem item = items[i]; - methods.put((String)item.getData(), new Boolean(item.getChecked())); - } - - javaParameter_.setMethods(methods); - - if( rpcEncodedButton_.getSelection()) - { - javaParameter_.setStyle(JavaWSDLParameter.STYLE_RPC); - javaParameter_.setUse(JavaWSDLParameter.USE_ENCODED); - } - else if( rpcLiteralButton_.getSelection()) - { - javaParameter_.setStyle(JavaWSDLParameter.STYLE_DOCUMENT); - javaParameter_.setUse(JavaWSDLParameter.USE_LITERAL); - } - else - { - javaParameter_.setStyle(JavaWSDLParameter.STYLE_WRAPPED); - javaParameter_.setUse(JavaWSDLParameter.USE_LITERAL); - } - - return javaParameter_; - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.WidgetContributor#getStatus() - */ - public IStatus getStatus() - { - IStatus result = null; - - if( wsdlFileText_.getText().equals( "" ) ) - { - result = StatusUtils.errorStatus( AxisCreationUIMessages.PAGE_MSG_NO_FILE_SPECIFIED ); - } - else - { - TreeItem[] items = methodsTree_.getItems(); - boolean itemSelected = false; - - for( int index = 0; index < items.length; index++ ) - { - if( items[index].getChecked() ) - { - itemSelected = true; - break; - } - } - - if( !itemSelected ) - { - result = StatusUtils.errorStatus( AxisCreationUIMessages.PAGE_MSG_NO_METHOD_SELECTED ); - } - } - - return result; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java deleted file mode 100644 index e3fa801bc..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/bean/ValidateObjectSelectionCommand.java +++ /dev/null @@ -1,172 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -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.jem.java.JavaClass; -import org.eclipse.jem.util.emf.workbench.ProjectUtilities; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.JavaMOFUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.consumption.common.JavaResourceFilter; -import org.eclipse.osgi.util.NLS; -import org.eclipse.wst.command.internal.env.core.common.StatusUtils; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - - -public class ValidateObjectSelectionCommand extends AbstractDataModelOperation -{ - private String JAVA_EXTENSION = ".java"; //$NON-NLS-1$ - private String CLASS_EXTENSION = ".class"; //$NON-NLS-1$ - private IStructuredSelection objectSelection; - private String serviceProjectName; - - - /** - * Validates that the selected Java bean can be loaded from the service project. If it can't, an error is displayed. - */ - public ValidateObjectSelectionCommand() - { - super(); - } - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - IEnvironment environment = getEnvironment(); - //Make sure a bean is selected - String javaBeanName = null; - if (objectSelection != null && !objectSelection.isEmpty()) - { - Object object = objectSelection.getFirstElement(); - if (object instanceof String) - { - javaBeanName = ((String)object); - } - else - { - //The ObjectSelectionWidget never appeared and so the IStucturedSelection from - //ObjectSelectionWidgetOutputCommand is the initial selection. - //Get the Java bean name from the selection. - try - { - System.out.println(object.getClass().toString()); - javaBeanName = getJavaBeanFromObjectSelection(objectSelection); - } catch (CoreException ce) - { - IStatus errorStatus = StatusUtils.errorStatus(AxisCreationUIMessages.MSG_ERROR_CANNOT_NO_JAVA_BEAN); - environment.getStatusHandler().reportError(errorStatus); - return errorStatus; - } - } - } - - if (javaBeanName==null || javaBeanName.length()==0) - { - IStatus errorStatus = StatusUtils.errorStatus(AxisCreationUIMessages.MSG_ERROR_CANNOT_NO_JAVA_BEAN); - environment.getStatusHandler().reportError(errorStatus); - return errorStatus; - } - - //Make sure a project is selected - IProject serviceProject = ProjectUtilities.getProject(serviceProjectName); - if (serviceProject==null) - { - IStatus errorStatus = StatusUtils.errorStatus(AxisCreationUIMessages.MSG_ERROR_NO_PROJECT); - environment.getStatusHandler().reportError(errorStatus); - return errorStatus; - } - - //Make sure the selected bean can be loaded from the selected project - if (javaBeanName.toLowerCase().endsWith(JAVA_EXTENSION) - || javaBeanName.toLowerCase().endsWith(CLASS_EXTENSION)) { - javaBeanName = javaBeanName.substring(0, javaBeanName.lastIndexOf('.')); - } - - try - { - JavaClass javaClass = JavaMOFUtils.getJavaClass(javaBeanName, serviceProject); - if (!javaClass.isExistingType()) - { - IStatus errorStatus = StatusUtils.errorStatus( NLS.bind(AxisCreationUIMessages.MSG_ERROR_CANNOT_LOAD_JAVA_BEAN, new String[] { javaBeanName, serviceProjectName })); - environment.getStatusHandler().reportError(errorStatus); - return errorStatus; - } - } catch (CoreException ce) - { - IStatus errorStatus = StatusUtils.errorStatus( NLS.bind(AxisCreationUIMessages.MSG_ERROR_CANNOT_LOAD_JAVA_BEAN, new String[] { javaBeanName, serviceProjectName })); - environment.getStatusHandler().reportError(errorStatus); - return errorStatus; - } - - return Status.OK_STATUS; - } - - /** - * @param serviceProjectName The serviceProjectName to set. - */ - public void setServiceProjectName(String serviceProjectName) - { - this.serviceProjectName = serviceProjectName; - } - - /** - * @param objectSelection The objectSelection to set. - */ - public void setObjectSelection(IStructuredSelection objectSelection) - { - this.objectSelection = objectSelection; - } - - private String getJavaBeanFromObjectSelection(IStructuredSelection objectSelection) throws CoreException - { - String beanClass = ""; - JavaResourceFilter filter = new JavaResourceFilter(); - //IStructuredSelection selection = initialSelection_; - // - if (objectSelection != null) - { - Object obj = objectSelection.getFirstElement(); - if (obj != null) - { - // get the IResource represented by the selection - IResource res = null; - - res = ResourceUtils.getResourceFromSelection(obj); - - if (filter.accepts(res)) - { - // get the package-qualified class name without file extensions - String beanPackage = ResourceUtils.getJavaResourcePackageName(res.getFullPath()); - if (beanPackage==null) - beanPackage = ""; - else - beanPackage = beanPackage + "."; - - beanClass = beanPackage + res.getName(); - - if (beanClass.toLowerCase().endsWith(".java") || beanClass.toLowerCase().endsWith(".class")) { - beanClass = beanClass.substring(0,beanClass.lastIndexOf('.')); - } - } - } - } - - // - return beanClass; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java deleted file mode 100644 index ed1c61239..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/AxisSkeletonDefaultingCommand.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import org.eclipse.core.resources.IFile; -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.jface.viewers.IStructuredSelection; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.consumption.common.WSDLParserFactory; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; -import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser; - - -public class AxisSkeletonDefaultingCommand extends AbstractDataModelOperation -{ - private IStructuredSelection initialSelection; - private WebServicesParser webServicesParser; - private String wsdlURI_; - private JavaWSDLParameter javaWSDLParam; - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - javaWSDLParam = new JavaWSDLParameter(); - javaWSDLParam.setServerSide(JavaWSDLParameter.SERVER_SIDE_BEAN); - javaWSDLParam.setSkeletonDeploy(true); - javaWSDLParam.setMetaInfOnly(false); - return Status.OK_STATUS; - - } - - public void setInitialSelection(IStructuredSelection initialSelection) - { - this.initialSelection = initialSelection; - } - - public void setObjectSelection(IStructuredSelection objectSelection) - { - } - - public void setWebServicesParser(WebServicesParser webServicesParser) - { - this.webServicesParser = webServicesParser; - } - - public WebServicesParser getWebServicesParser() - { - if (webServicesParser == null) - webServicesParser = WSDLParserFactory.getWSDLParser(); - return webServicesParser; - } - - public String getWebServiceURI() - { - if (initialSelection != null && !initialSelection.isEmpty()) - { - Object firstElement = initialSelection.getFirstElement(); - if (firstElement instanceof IFile) - { - IFile ifile = (IFile)firstElement; - String fileExtension = ifile.getFileExtension(); - if (fileExtension.equals("wsdl") || - fileExtension.equals("wsil") || - fileExtension.equals("html")) - { - return ifile.getFullPath().toString(); - } - } - } - return ""; - } - - public String getWsdlURI() - { - return wsdlURI_; - } - - public void setWsdlURI(String wsdlURI) - { - wsdlURI_ = wsdlURI; - - } - - public boolean getGenWSIL() - { - return false; - } - - public String getWsilURI() - { - String wsURI = getWsdlURI(); - int index = wsURI.lastIndexOf('.'); - if (index != -1) - { - StringBuffer sb = new StringBuffer(wsURI.substring(0, index)); - sb.append(".wsil"); - return sb.toString(); - } - return ""; - } - - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam; - } - - public String getHttpBasicAuthPassword() - { - return getWebServicesParser().getHTTPBasicAuthPassword(); - } - - public String getHttpBasicAuthUsername() - { - return getWebServicesParser().getHTTPBasicAuthUsername(); - } - -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidget.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidget.java deleted file mode 100644 index e8f06ef30..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidget.java +++ /dev/null @@ -1,208 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import java.io.File; -import java.net.MalformedURLException; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; -import org.eclipse.jst.ws.internal.ui.common.UIUtils; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.PlatformUI; -import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents; - - -public class SkeletonConfigWidget extends SimpleWidgetDataContributor -{ - private JavaWSDLParameter javaWSDLParam; - - /* CONTEXT_ID PBSC0001 for the Skeleton Config Page */ - private static final String INFOPOP_PBSC_PAGE = "PBSC0001"; //$NON-NLS-1$ - - // private Text uriText_; - /* CONTEXT_ID PBCF0002 for the URI field of the Bean Config Page */ - //private final String INFOPOP_PBCF_TEXT_URI = "PBCF0002"; //$NON-NLS-1$ - - - private Text wsdlFolderText_; - /* CONTEXT_ID PBCF0006 for the WSDL Folder field in the Bean Config Page */ - private final String INFOPOP_PBCF_TEXT_WSDL_FOLDER = "PBCF0006"; //$NON-NLS-1$ - - private Text wsdlFileText_; - /* CONTEXT_ID PBCF0007 for the WSDL File field of the Bean Config Page */ - private final String INFOPOP_PBCF_TEXT_WSDL_FILE = "PBCF0007"; //$NON-NLS-1$ - - - private Combo skeletonFolderText_; - /* CONTEXT_ID PBSC0004 for the Skeleton Folder field of the Skeleton Config Page */ - private static final String INFOPOP_PBSC_TEXT_SKELETON_FOLDER = "PBSC0004"; //$NON-NLS-1$ - - - /* CONTEXT_ID PBSC0005 for the Skeleton Folder Browse button of the Skeleton Config Page */ - // private static final String INFOPOP_PBSC_BUTTON_SKELETON_FOLDER_BROWSE = "PBSC0005"; //$NON-NLS-1$ - // private static final String TOOLTIP_PBSC_BUTTON_SKELETON_FOLDER_BROWSE = "TOOLTIP_PBSC_BUTTON_SKELETON_FOLDER_BROWSE"; - - private Button showMappingsCheckbox_; - /* CONTEXT_ID PBSC0016 for the Show Mappings checkbox of the Bean Methods Page */ - private String INFOPOP_N2P_SHOW_MAPPINGS = "PBSC0016"; //$NON-NLS-1$ - - public WidgetDataEvents addControls( Composite parent, Listener statusListener) - { - String pluginId = "org.eclipse.jst.ws.axis.creation.ui"; - - UIUtils uiUtils = new UIUtils( pluginId ); - UIUtils conUiUtils = new UIUtils( pluginId ); - UIUtils baseConUiUtils = new UIUtils( pluginId ); - - PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, pluginId + "." + INFOPOP_PBSC_PAGE ); - parent.setToolTipText( AxisCreationUIMessages.TOOLTIP_PBSC_PAGE ); - - Composite textGroup = uiUtils.createComposite( parent, 2, 0, 0 ); - - /* - uriText_ = uiUtils.createText( textGroup, "LABEL_URI", - TOOLTIP_PBCF_TEXT_URI, - INFOPOP_PBCF_TEXT_URI, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - */ - - wsdlFolderText_ = uiUtils.createText( textGroup, AxisCreationUIMessages.LABEL_OUTPUT_FOLDER_NAME, - AxisCreationUIMessages.TOOLTIP_PBCF_TEXT_WSDL_FOLDER, - INFOPOP_PBCF_TEXT_WSDL_FOLDER, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - - wsdlFileText_ = uiUtils.createText( textGroup, AxisCreationUIMessages.LABEL_OUTPUT_FILE_NAME, - AxisCreationUIMessages.TOOLTIP_PBCF_TEXT_WSDL_FILE, - INFOPOP_PBCF_TEXT_WSDL_FILE, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - - skeletonFolderText_ = baseConUiUtils.createCombo( textGroup, ConsumptionUIMessages.LABEL_SKELETON_ROOT_NAME, - ConsumptionUIMessages.TOOLTIP_PBSC_TEXT_SKELETON_FOLDER, - INFOPOP_PBSC_TEXT_SKELETON_FOLDER, - SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY ); - - uiUtils.createHorizontalSeparator( parent, 5 ); - - showMappingsCheckbox_ = conUiUtils.createCheckbox( parent, AxisConsumptionUIMessages.LABEL_EXPLORE_MAPPINGS_XML2BEAN, - AxisConsumptionUIMessages.TOOLTIP_N2P_SHOW_MAPPINGS, - INFOPOP_N2P_SHOW_MAPPINGS ); - - return this; - } - - public void setEndpointURI(String endpointURI) - { - /* - if (endpointURI != null) - uriText_.setText(endpointURI); - */ - } - - public void setOutputWSDLFolder(String outputWSDLFolder) - { - if (outputWSDLFolder != null) - wsdlFolderText_.setText(outputWSDLFolder); - } - - public void setOutputWSDLFile(String outputWSDLFile) - { - if (outputWSDLFile != null) - wsdlFileText_.setText(outputWSDLFile); - } - - public void setOutputJavaFolder(String outputJavaFolder) - { - if (outputJavaFolder != null) - { - int index = skeletonFolderText_.indexOf(outputJavaFolder); - if (index != -1) - skeletonFolderText_.select(index); - else if (skeletonFolderText_.getItemCount() <= 0) - { - String root = getWorkspaceRootLocation(); - if (outputJavaFolder.startsWith(root)) - skeletonFolderText_.setText(outputJavaFolder.substring(root.length())); - else - skeletonFolderText_.setText(outputJavaFolder); - } - } - } - - public void setShowMapping(boolean showMapping) - { - showMappingsCheckbox_.setSelection(showMapping); - } - - public boolean getShowMapping() - { - return showMappingsCheckbox_.getSelection(); - } - - /** - * @return Returns the javaWSDLParam. - */ - public JavaWSDLParameter getJavaWSDLParam() { - String root = getWorkspaceRootLocation(); - File file = new File(root); - try - { - root = file.toURL().toString(); - char lastChar = root.charAt(root.length()-1); - if (lastChar == '/' || lastChar == '\\') - root = root.substring(0, root.length()-1); - } - catch (MalformedURLException murle) - { - } - javaWSDLParam.setOutput(root + wsdlFolderText_.getText()); - javaWSDLParam.setJavaOutput(root + skeletonFolderText_.getText()); - return javaWSDLParam; - } - - /** - * @param javaWSDLParam The javaWSDLParam to set. - */ - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) { - this.javaWSDLParam = javaWSDLParam; - } - - public void setServerProject(IProject serviceProject) - { - String originalSkeletonFolder = skeletonFolderText_.getText(); - skeletonFolderText_.removeAll(); - IPath[] paths = ResourceUtils.getAllJavaSourceLocations(serviceProject); - for (int i = 0; i < paths.length ; i++) - skeletonFolderText_.add(paths[i].toString()); - int index = skeletonFolderText_.indexOf(originalSkeletonFolder); - if (index != -1) - skeletonFolderText_.select(index); - else - skeletonFolderText_.select(0); - } - - private String getWorkspaceRootLocation() - { - return ResourcesPlugin.getWorkspace().getRoot().getLocation().removeTrailingSeparator().toString(); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java deleted file mode 100644 index ad50e0156..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/widgets/skeleton/SkeletonConfigWidgetDefaultingCommand.java +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton; - -import java.io.File; -import java.net.MalformedURLException; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -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.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; -import org.eclipse.jst.ws.internal.common.J2EEUtils; -import org.eclipse.jst.ws.internal.common.ResourceUtils; -import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; - -public class SkeletonConfigWidgetDefaultingCommand extends AbstractDataModelOperation -{ - private String wsdlURI; - private IProject serverProject; - private JavaWSDLParameter javaWSDLParam; - - public SkeletonConfigWidgetDefaultingCommand( ) - { - } - - public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) - { - String root = getRootURL(); - javaWSDLParam.setOutput( root + getOutputWSDLFolder()); - javaWSDLParam.setJavaOutput(root + getOutputJavaFolder()); - return Status.OK_STATUS; - - } - - public void setWsdlURI(String wsdlURI) - { - this.wsdlURI = wsdlURI; - } - - public void setServerProject(String serverProject) - { - this.serverProject = ResourcesPlugin.getWorkspace().getRoot().getProject(serverProject); - } - - public String getEndpointURI() - { - return null; - } - - public String getOutputWSDLFolder() - { - IPath wsdlPath = J2EEUtils.getWebContentPath(serverProject ).append("wsdl"); - return wsdlPath.toString(); - } - - public String getOutputWSDLFile() - { - int index = wsdlURI.lastIndexOf('/'); - if (index == -1) - index = wsdlURI.lastIndexOf('\\'); - return wsdlURI.substring(index+1, wsdlURI.length()); - } - - public String getOutputJavaFolder() - { - if (serverProject!=null){ - return ResourceUtils.getJavaSourceLocation(serverProject).toString(); - } - return null; - } - - public boolean getShowMapping() - { - return false; - } - - public boolean isShowMapping() - { - return getShowMapping(); - } - - public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) - { - this.javaWSDLParam = javaWSDLParam; - } - - public JavaWSDLParameter getJavaWSDLParam() - { - return javaWSDLParam; - } - - private String getRootURL() - { - String rootURL = ResourcesPlugin.getWorkspace().getRoot().getLocation().removeTrailingSeparator().toString(); - File file = new File( rootURL ); - - try - { - rootURL = file.toURL().toString(); - - char lastChar = rootURL.charAt(rootURL.length()-1); - - if (lastChar == '/' || lastChar == '\\') - { - rootURL = rootURL.substring(0, rootURL.length()-1); - } - } - catch (MalformedURLException murle) - { - } - - return rootURL; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java deleted file mode 100644 index 45b037db1..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/beans/WSBeanAxisType.java +++ /dev/null @@ -1,221 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans; - - -import org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CheckAxisDeploymentDescriptorsTask; -import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidget; -import org.eclipse.jst.ws.internal.axis.creation.ui.AxisCreationUIMessages; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.JavaToWSDLMethodCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.DefaultsForServerJavaWSDLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.BeanConfigWidget; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionWidget; -import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry; -import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment; -import org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactory; -import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; -import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry; -import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; -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.WidgetRegistry; - - -/** -* This is the class for the -* Axis bottom up Java Bean scenario -* -*/ -public class WSBeanAxisType implements CommandWidgetBinding -{ - private String serverName_; - private String runtimeName_; - private boolean isWebModuleRequired_; - - - /** - * Returns a locale specific label for the Server supported by this Web Service type - * @return A locale specific server label from server plugins - */ - public String getServerLabel() - { - return serverName_; - } - - /** - * Sets the server label to the appropriate name found in the server plugins. - * @param server name - */ - public void setServerLabel(String serverLabel) - { - serverName_ = serverLabel; - } - - /** - * Returns a locale specific label for the deployment runtime of this Web Service type - * @return A locale specific label for the deployment runtime - */ - public String getRuntimeLabel() - { - return runtimeName_; - } - - /** - * Sets the runtime label for the appropriate runtime - * @param server name - */ - public void setRuntimeLabel(String runtimeLabel) - { - runtimeName_ = runtimeLabel; - } - - - /** - * Returns whether or not a Web Module is required for this WebServiceServerRuntimeType - * @return true if requireWebModule - */ - public boolean isWebModuleRequired() - { - return isWebModuleRequired_; - } - - /** - * Sets the boolean value at runtime according to requireWebModule attribute from the manifest file - * @param requireWebModule - */ - public void setWebModuleRequired(boolean requireWebModule) - { - isWebModuleRequired_ = requireWebModule; - } - - - /* (non-Javadoc) - * @see org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType#isEJBModuleRequired() - */ - public boolean isEJBModuleRequired() { - return false; - } - - /* (non-Javadoc) - * @see org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType#setEJBModuleRequired(boolean) - */ - public void setEJBModuleRequired(boolean arg0) { - return; - - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerCanFinish(org.eclipse.wst.command.env.ui.widgets.CanFinishRegistry) - */ - public void registerCanFinish(CanFinishRegistry canFinishRegistry) - { - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerDataMappings(org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry) - */ - public void registerDataMappings(DataMappingRegistry dataRegistry) - { - /* - dataRegistry.addMapping( CurrentPageCommand.class, "CurrentPage", BeanClassWidget.class ); - //BeanClassWidget - as target - dataRegistry.addMapping(BUAxisDefaultingCommand.class, "JavaBeanName", BeanClassWidget.class, "BeanClassName", null); - //BeanClassWidget - as source - dataRegistry.addMapping(BeanClassWidget.class, "BeanClassName", DefaultsForServerJavaWSDLCommand.class, "JavaBeanName", null); //BeanConfigWidget - */ - // ObjectSelectionWidget - dataRegistry.addMapping(ObjectSelectionWidget.class, "ObjectSelection", DefaultsForServerJavaWSDLCommand.class); - - //BeanConfigWidget - as target - dataRegistry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", BeanConfigWidget.class, "JavaParameter", null ); - //BeanConfigWidget - as source - - dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", CheckAxisDeploymentDescriptorsTask.class, "JavaWSDLParam", null); - dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", Java2WSDLCommand.class, "JavaWSDLParam", null); - dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", WSDL2JavaCommand.class, "JavaWSDLParam", null); - - //AxisMappingsWidget - as target - dataRegistry.addMapping(BeanConfigWidget.class, "JavaParameter", AxisMappingsWidget.class); - - //AxisMappingsWidget - as source - - dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", CheckAxisDeploymentDescriptorsTask.class, "JavaWSDLParam", null); - dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", Java2WSDLCommand.class, "JavaWSDLParam", null); - dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", WSDL2JavaCommand.class, "JavaWSDLParam", null); - - //dataRegistry.addMapping( DefaultsForConfig.class, "JavaParameter", BeanConfigWidget.class ); - //dataRegistry.addMapping( DefaultsForConfig.class, "CustomizeServiceMappings", BeanConfigWidget.class ); - } - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerWidgetMappings(org.eclipse.wst.command.env.ui.widgets.WidgetRegistry) - */ - public void registerWidgetMappings(WidgetRegistry widgetRegistry) - { - - /* - widgetRegistry.add( "BeanSelection", - AxisCreationUIMessages.PAGE_TITLE_WSBEAN_CLASS, - AxisCreationUIMessages.PAGE_DESC_WSBEAN_CLASS, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new BeanClassWidget(); - } - } ); - */ - - widgetRegistry.add( "BeanConfig", - AxisCreationUIMessages.PAGE_TITLE_WSBEAN_CONFIG, - AxisCreationUIMessages.PAGE_DESC_WSBEAN_CONFIG, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new BeanConfigWidget(); - } - } ); - - - widgetRegistry.add( "AxisServiceBeanMapping", - AxisConsumptionUIMessages.PAGE_TITLE_WS_BEAN2XML, - AxisConsumptionUIMessages.PAGE_DESC_P2N_MAPPINGS, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new AxisMappingsWidget(AxisMappingsWidget.MODE_BEAN2XML ); - } - } ); - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactoryFactory#create() - */ - public CommandFragmentFactory create() - { - return new CommandFragmentFactory() - { - public CommandFragment create() - { - //dead code - doesn't matter what gets returned here. - return new SimpleFragment(); - } - }; - } - -} - - - diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java deleted file mode 100644 index 6877b5790..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wizard/wsdl/WSWSDLAxisType.java +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl; - - -import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsFragment; -import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidget; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.AxisSkeletonDefaultingCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidget; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand; -import org.eclipse.jst.ws.internal.consumption.ui.ConsumptionUIMessages; -import org.eclipse.jst.ws.internal.consumption.ui.command.data.ProjectName2IProjectTransformer; -import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionDefaultingCommand; -import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry; -import org.eclipse.wst.command.internal.env.core.fragment.CommandFragment; -import org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactory; -import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment; -import org.eclipse.wst.command.internal.env.ui.widgets.CanFinishRegistry; -import org.eclipse.wst.command.internal.env.ui.widgets.CommandWidgetBinding; -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.WidgetRegistry; - -/** -* This is the class for the Axis Web service type. -*/ -public class WSWSDLAxisType implements CommandWidgetBinding -{ - private String serverName_; - private String runtimeName_; - private boolean isWebModuleRequired_; - - /** - * Returns a locale specific label for the Server supported by this Web Service type - * @return A locale specific server label from server plugins - */ - public String getServerLabel() { - return serverName_; - } - - /** - * Sets the server label to the appropriate name found in the server plugins. - * @param server name - */ - public void setServerLabel(String serverLabel) { - serverName_ = serverLabel; - } - - /** - * Returns a locale specific label for the deployment runtime of this Web Service type - * @return A locale specific label for the deployment runtime - */ - public String getRuntimeLabel() { - return runtimeName_; - } - - /** - * Sets the runtime label for the appropriate runtime - * @param server name - */ - public void setRuntimeLabel(String runtimeLabel) { - runtimeName_ = runtimeLabel; - } - - /** - * Returns whether or not a Web Module is required for this WebServiceServerRuntimeType - * @return true if requireWebModule - */ - public boolean isWebModuleRequired() { - return isWebModuleRequired_; - } - - /** - * Sets the boolean value at runtime according to requireWebModule attribute from the manifest file - * @param requireWebModule - */ - public void setWebModuleRequired(boolean requireWebModule) { - isWebModuleRequired_ = requireWebModule; - } - - - /* (non-Javadoc) - * @see org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType#isEJBModuleRequired() - */ - public boolean isEJBModuleRequired() { - - return false; - } - - - /* (non-Javadoc) - * @see org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeType#setEJBModuleRequired(boolean) - */ - public void setEJBModuleRequired(boolean arg0) { - return; - - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerCanFinish(org.eclipse.wst.command.env.ui.widgets.CanFinishRegistry) - */ - public void registerCanFinish(CanFinishRegistry canFinishRegistry) - { - } - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerDataMappings(org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry) - */ - public void registerDataMappings(DataMappingRegistry dataRegistry) - { - // SkeletonConfigWidget - dataRegistry.addMapping(ServerExtensionDefaultingCommand.class, "ServerProject", SkeletonConfigWidget.class, "ServerProject", new ProjectName2IProjectTransformer()); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "JavaWSDLParam", SkeletonConfigWidget.class); - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "EndpointURI", SkeletonConfigWidget.class); - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "OutputWSDLFolder", SkeletonConfigWidget.class); - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "OutputWSDLFile", SkeletonConfigWidget.class); - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "OutputJavaFolder", SkeletonConfigWidget.class); - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "ShowMapping", SkeletonConfigWidget.class); - - // AxisMappingsFragment - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "ShowMapping", AxisMappingsFragment.class); - dataRegistry.addMapping(SkeletonConfigWidget.class, "ShowMapping", AxisMappingsFragment.class); - - // AxisMappingsWidget - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null); - dataRegistry.addMapping(SkeletonConfigWidget.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null); - - // WSDL2JavaCommand - dataRegistry.addMapping(SkeletonConfigWidgetDefaultingCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class); - dataRegistry.addMapping(SkeletonConfigWidget.class, "JavaWSDLParam", WSDL2JavaCommand.class); - dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", WSDL2JavaCommand.class, "JavaWSDLParam", null); - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerWidgetMappings(org.eclipse.wst.command.env.ui.widgets.WidgetRegistry) - */ - public void registerWidgetMappings(WidgetRegistry widgetRegistry) - { - - /* - widgetRegistry.add( "WSDLSelection", - ConsumptionUIMessages.PAGE_TITLE_WS_SELECTION, - ConsumptionUIMessages.PAGE_DESC_WS_SELECTION, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new WSDLSelectionWidget(); - } - } ); - - widgetRegistry.add( "WSDLSelectionTreeWidget", - ConsumptionUIMessages.PAGE_TITLE_WSDL_SELECTION, - ConsumptionUIMessages.PAGE_DESC_WSDL_SELECTION, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new WSDLSelectionTreeWidget(); - } - }); - */ - - widgetRegistry.add( "SkeletonConfig", - ConsumptionUIMessages.PAGE_TITLE_WSSKEL_CONFIG, - ConsumptionUIMessages.PAGE_DESC_WSSKEL_CONFIG, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new SkeletonConfigWidget(); - } - } ); - - widgetRegistry.add( "AxisMappingsWidget", - ConsumptionUIMessages.PAGE_TITLE_WS_XML2BEAN, - ConsumptionUIMessages.PAGE_DESC_N2P_MAPPINGS, - new WidgetContributorFactory() - { - public WidgetContributor create() - { - return new AxisMappingsWidget(AxisMappingsWidget.MODE_XML2BEAN); - } - } ); - } - - /* (non-Javadoc) - * @see org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentFactoryFactory#create() - */ - public CommandFragmentFactory create() - { - return new CommandFragmentFactory() - { - public CommandFragment create() - { - //dead code - doesn't matter what gets returned here. - return new SimpleFragment(); - } - }; - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisBeanConfigWidgetFactory.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisBeanConfigWidgetFactory.java deleted file mode 100644 index 77e6b55e6..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisBeanConfigWidgetFactory.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.wsrt; - -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.BeanConfigWidget; -import org.eclipse.jst.ws.internal.axis.creation.ui.wizard.beans.WSBeanAxisType; -import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry; -import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributorFactory; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetBindingToWidgetFactoryAdapter; - -public class AxisBeanConfigWidgetFactory implements INamedWidgetContributorFactory { - - private INamedWidgetContributor beanConfigWidget_; - private INamedWidgetContributor mappingsWidget_; - private BeanConfigWidget beanWidget_; - private WidgetBindingToWidgetFactoryAdapter adapter_; - - public AxisBeanConfigWidgetFactory() - { - adapter_ = new WidgetBindingToWidgetFactoryAdapter( new WSBeanAxisType() ); - - beanConfigWidget_ = adapter_.getWidget( "BeanConfig" ); - beanWidget_ = (BeanConfigWidget)beanConfigWidget_.getWidgetContributorFactory().create(); - mappingsWidget_ = adapter_.getWidget( "AxisServiceBeanMapping" ); - } - - public INamedWidgetContributor getFirstNamedWidget() - { - return beanConfigWidget_; - } - - public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor widgetContributor) - { - return widgetContributor == beanConfigWidget_ && beanWidget_.getCustomizeServiceMappings() ? mappingsWidget_ : null; - } - - public void registerDataMappings(DataMappingRegistry dataRegistry) - { - adapter_.registerDataMappings( dataRegistry ); - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisSkeletonConfigWidgetFactory.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisSkeletonConfigWidgetFactory.java deleted file mode 100644 index 0d8b8fecc..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisSkeletonConfigWidgetFactory.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.wsrt; - -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidget; -import org.eclipse.jst.ws.internal.axis.creation.ui.wizard.wsdl.WSWSDLAxisType; -import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry; -import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributor; -import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributorFactory; -import org.eclipse.wst.command.internal.env.ui.widgets.WidgetBindingToWidgetFactoryAdapter; - -public class AxisSkeletonConfigWidgetFactory implements INamedWidgetContributorFactory { - - private INamedWidgetContributor skelConfigWidget_; - private INamedWidgetContributor mappingsWidget_; - private SkeletonConfigWidget skelWidget_; - private WidgetBindingToWidgetFactoryAdapter adapter_; - - public AxisSkeletonConfigWidgetFactory() - { - adapter_ = new WidgetBindingToWidgetFactoryAdapter( new WSWSDLAxisType() ); - - skelConfigWidget_ = adapter_.getWidget( "SkeletonConfig" ); - skelWidget_ = (SkeletonConfigWidget)skelConfigWidget_.getWidgetContributorFactory().create(); - mappingsWidget_ = adapter_.getWidget( "AxisMappingsWidget" ); - } - - public INamedWidgetContributor getFirstNamedWidget() - { - return skelConfigWidget_; - } - - public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor widgetContributor) - { - return widgetContributor == skelConfigWidget_ && skelWidget_.getShowMapping() ? mappingsWidget_ : null; - } - - public void registerDataMappings(DataMappingRegistry dataRegistry) - { - adapter_.registerDataMappings( dataRegistry ); - } -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java deleted file mode 100644 index eeb2eb3c0..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebService.java +++ /dev/null @@ -1,342 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.wsrt; - -import java.util.Vector; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.GeronimoAxisDeployCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCommand; -import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.RefreshProjectCommand; -import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.AxisOutputCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.AxisRunInputCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.BUAxisInputCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.ComputeAxisSkeletonBeanCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.CopyDeploymentFileCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.JavaToWSDLMethodCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.TDAxisInputCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.command.UpdateWEBXMLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.BUCheckAxisDeploymentDescriptors; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.DefaultsForServerJavaWSDLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.MoveDeploymentFilesTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.MoveJavaFilesTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.Skeleton2WSDLCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.TDCheckAxisDeploymentDescriptors; -import org.eclipse.jst.ws.internal.axis.creation.ui.task.UpdateAxisWSDDFileTask; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.bean.BUAxisDefaultingCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.AxisSkeletonDefaultingCommand; -import org.eclipse.jst.ws.internal.axis.creation.ui.widgets.skeleton.SkeletonConfigWidgetDefaultingCommand; -import org.eclipse.jst.ws.internal.common.StringToIProjectTransformer; -import org.eclipse.jst.ws.internal.consumption.command.common.BuildProjectCommand; -import org.eclipse.jst.ws.internal.consumption.ui.command.OpenJavaEditorCommand; -import org.eclipse.jst.ws.internal.consumption.ui.command.data.ProjectName2IProjectTransformer; -import org.eclipse.wst.command.internal.env.common.WaitForAutoBuildCommand; -import org.eclipse.wst.command.internal.env.core.ICommandFactory; -import org.eclipse.wst.command.internal.env.core.SimpleCommandFactory; -import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry; -import org.eclipse.wst.command.internal.env.eclipse.EclipseEnvironment; -import org.eclipse.wst.common.environment.IEnvironment; -import org.eclipse.wst.ws.internal.wsrt.AbstractWebService; -import org.eclipse.wst.ws.internal.wsrt.IContext; -import org.eclipse.wst.ws.internal.wsrt.ISelection; -import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo; -import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario; - -public class AxisWebService extends AbstractWebService -{ - private AxisWebServiceInfo axisWebServiceInfo_; - - public AxisWebService(WebServiceInfo 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 commands = new Vector(); - EclipseEnvironment environment = (EclipseEnvironment)env; - - if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP) { - - registerBUDataMappings( environment.getCommandManager().getMappingRegistry()); - - commands.add(new BUAxisInputCommand(this, project)); -// commands.add(new ValidateObjectSelectionCommand()); - commands.add(new BUAxisDefaultingCommand()); - commands.add(new DefaultsForServerJavaWSDLCommand()); - commands.add(new JavaToWSDLMethodCommand()); - // commands.add(new SimpleFragment( "BeanConfig" )); - // commands.add(new SimpleFragment( "AxisServiceBeanMapping" )); - commands.add(new BUCheckAxisDeploymentDescriptors()); - commands.add(new CopyAxisJarCommand()); - commands.add(new WaitForAutoBuildCommand()); - commands.add(new Java2WSDLCommand()); - commands.add(new RefreshProjectCommand()); - commands.add(new WSDL2JavaCommand()); - commands.add(new MoveJavaFilesTask()); - commands.add(new UpdateAxisWSDDFileTask()); - commands.add(new UpdateWEBXMLCommand()); - commands.add(new RefreshProjectCommand()); - commands.add(new BuildProjectCommand()); - commands.add(new AxisOutputCommand(this)); - - } else if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) { - - registerTDDataMappings( environment.getCommandManager().getMappingRegistry()); - - commands.add(new TDAxisInputCommand(this, project)); - commands.add(new AxisSkeletonDefaultingCommand()); - commands.add(new ValidateWSDLCommand()); - commands.add(new SkeletonConfigWidgetDefaultingCommand()); -// commands.add(new SimpleFragment( "SkeletonConfig" )); -// commands.add(new SimpleFragment( "AxisMappingsWidget" )); - commands.add(new TDCheckAxisDeploymentDescriptors()); - commands.add(new CopyAxisJarCommand()); - commands.add(new WSDL2JavaCommand()); - commands.add(new MoveDeploymentFilesTask()); - commands.add(new Skeleton2WSDLCommand()); - commands.add(new UpdateWEBXMLCommand()); - commands.add(new RefreshProjectCommand()); - commands.add(new BuildProjectCommand()); - commands.add(new AxisOutputCommand(this)); - - } else { - System.out.println("Error - WebServiceScenario should not be Client for AxisWebService"); - return null; - } - - - return new SimpleCommandFactory(commands); - } - - public ICommandFactory install(IEnvironment env, IContext ctx, ISelection sel, - String project, String earProject) - { - return null; - } - - public ICommandFactory run(IEnvironment env, IContext ctx, ISelection sel, - String project, String earProject) - { - Vector commands = new Vector(); - - if (ctx.getScenario().getValue() == WebServiceScenario.CLIENT) { - System.out - .println("Error - WebServiceScenario should not be Client for AxisWebService"); - return null; - } else {// For BOTTOM_UP and TOP_DOWN - commands.add(new AxisRunInputCommand(this, project)); - if (getWebServiceInfo().getServerFactoryId().equals("org.eclipse.jst.server.geronimo.10")) { - commands.add(new GeronimoAxisDeployCommand(project)); - } - else { - commands.add(new AxisDeployCommand()); - } - commands.add( new CopyDeploymentFileCommand( project ) ); - commands.add(new RefreshProjectCommand()); - if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) { - commands.add(new ComputeAxisSkeletonBeanCommand()); - commands.add(new OpenJavaEditorCommand()); - } - return new SimpleCommandFactory(commands); - } - } - - public void registerBUDataMappings(DataMappingRegistry registry) - { - //BUAxisInputCommand -// registry.addMapping(BUAxisInputCommand.class, "ServiceServerTypeID", StartProjectCommand.class); - registry.addMapping(BUAxisInputCommand.class, "JavaBeanName", BUAxisDefaultingCommand.class ); - - //ValidateObjectSelectionCommand -// registry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", ValidateObjectSelectionCommand.class); -// registry.addMapping(BUAxisInputCommand.class, "ServerProject", ValidateObjectSelectionCommand.class,"ServiceProjectName", null ); - - //BUAxisDefaultingCommand -// registry.addMapping(SelectionCommand.class, "InitialSelection", BUAxisDefaultingCommand.class ); -//KSC registry.addMapping(BUAxisInputCommand.class, "ServiceTypeRuntimeServer", BUAxisDefaultingCommand.class ); - - //BUAxisCommands2 - these run after BeanClassWidget - //DefaultsForServerJavaWSDLCommand - registry.addMapping(BUAxisDefaultingCommand.class, "JavaWSDLParam", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(BUAxisInputCommand.class, "ServerProject", DefaultsForServerJavaWSDLCommand.class, "ServiceProject", new StringToIProjectTransformer()); - registry.addMapping(BUAxisInputCommand.class, "ServiceServerTypeID", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "JavaBeanName", DefaultsForServerJavaWSDLCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "Parser", DefaultsForServerJavaWSDLCommand.class); - - //JavaWSDLMethodCommand - registry.addMapping(DefaultsForServerJavaWSDLCommand.class, "JavaWSDLParam", JavaToWSDLMethodCommand.class); - registry.addMapping(BUAxisInputCommand.class, "ServerProject", JavaToWSDLMethodCommand.class, "ServiceProject", new StringToIProjectTransformer()); - - // BUAxisCommands3 - these run after BeanConfigWidget - - //CheckAxisDeploymentDescriptorsTask - //registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", CheckAxisDeploymentDescriptorsTask.class); - registry.addMapping(BUAxisInputCommand.class, "ServerProject", BUCheckAxisDeploymentDescriptors.class, "ServerProject", new StringToIProjectTransformer()); - - //CopyAxisJarCommand - registry.addMapping(BUAxisInputCommand.class, "ServerProject", CopyAxisJarCommand.class, "Project", new StringToIProjectTransformer()); - - //Java2WSDLCommand - registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", Java2WSDLCommand.class); - - //RefreshProjectCommand - registry.addMapping(BUAxisInputCommand.class, "ServerProject", RefreshProjectCommand.class, "Project", new StringToIProjectTransformer()); - - //WSDL2JavaCommand - registry.addMapping(JavaToWSDLMethodCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class); - - - //MoveJavaFilesTask - registry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", MoveJavaFilesTask.class); - registry.addMapping(BUAxisInputCommand.class, "ServerProject", MoveJavaFilesTask.class, "ServiceProject", new StringToIProjectTransformer()); - registry.addMapping(BUAxisInputCommand.class, "ServiceServerTypeID", MoveJavaFilesTask.class); - - //UpdateAxisWSDDFileTask - registry.addMapping(MoveJavaFilesTask.class, "JavaWSDLParam", UpdateAxisWSDDFileTask.class); - registry.addMapping(BUAxisInputCommand.class, "ServerProject", UpdateAxisWSDDFileTask.class, "ServiceProject", new StringToIProjectTransformer()); - registry.addMapping(BUAxisInputCommand.class, "ServiceServerTypeID", UpdateAxisWSDDFileTask.class); - - //UpdateWEBXMLCommand - registry.addMapping(BUAxisInputCommand.class, "ServerProject", UpdateWEBXMLCommand.class, "ServerProject", new StringToIProjectTransformer()); - - //BuildProjectCommand - registry.addMapping(BUAxisInputCommand.class, "ServerProject", BuildProjectCommand.class, "Project", new StringToIProjectTransformer()); - registry.addMapping(BUAxisDefaultingCommand.class, "ForceBuild", BuildProjectCommand.class); - registry.addMapping(BUAxisDefaultingCommand.class, "ValidationManager", BuildProjectCommand.class); - - //StartProjectCommand -// registry.addMapping(BUAxisInputCommand.class, "ServerProject", StartProjectCommand.class, "ServiceProject", new StringToIProjectTransformer()); -// registry.addMapping(BUAxisDefaultingCommand.class, "SampleProject", StartProjectCommand.class); -//KSC registry.addMapping(BUAxisDefaultingCommand.class, "ServiceServerTypeID", StartProjectCommand.class); -// registry.addMapping(BUAxisDefaultingCommand.class, "SampleServerTypeID", StartProjectCommand.class); -// registry.addMapping(BUAxisDefaultingCommand.class, "ServiceExistingServer", StartProjectCommand.class); -// registry.addMapping(BUAxisDefaultingCommand.class, "SampleExistingServer", StartProjectCommand.class); -// registry.addMapping(BUAxisDefaultingCommand.class, "IsWebProjectStartupRequested",StartProjectCommand.class); - - // AxisOutputCommand - registry.addMapping(Java2WSDLCommand.class, "WsdlURI", AxisOutputCommand.class); - registry.addMapping(UpdateAxisWSDDFileTask.class, "JavaWSDLParam", AxisOutputCommand.class); - - // Run extension - - // GeronimoAxisDeployCommand - registry.addMapping(AxisRunInputCommand.class, "JavaWSDLParam", GeronimoAxisDeployCommand.class); - - //AxisDeployCommand - registry.addMapping(AxisRunInputCommand.class, "JavaWSDLParam", AxisDeployCommand.class); - - //RefreshProjectCommand - registry.addMapping(AxisRunInputCommand.class, "ServerProject", RefreshProjectCommand.class, "Project", new StringToIProjectTransformer()); - - - - } - - public void registerTDDataMappings(DataMappingRegistry dataRegistry) - { - // Transformers - ProjectName2IProjectTransformer projectTransformer = new ProjectName2IProjectTransformer(); - - // TODO: map "InitialSelection" and "ObjectSelection" from TDAxisInputCommand - -// dataRegistry.addMapping(SelectionCommand.class, "InitialSelection", AxisSkeletonDefaultingCommand.class); -// dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", AxisSkeletonDefaultingCommand.class); -// dataRegistry.addMapping(TDAxisInputCommand.class, "WebServicesParser", AxisSkeletonDefaultingCommand.class); - - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "JavaWSDLParam", SkeletonConfigWidgetDefaultingCommand.class); - dataRegistry.addMapping(TDAxisInputCommand.class, "WsdlURI", AxisSkeletonDefaultingCommand.class); - // ValidateWSDLCommand - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", ValidateWSDLCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WsdlURI", ValidateWSDLCommand.class); - - // SkeletonConfigWidgetDefaultingCommand - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", SkeletonConfigWidgetDefaultingCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WsdlURI", SkeletonConfigWidgetDefaultingCommand.class); - - // CheckAxisDeploymentDescriptorsTask - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", TDCheckAxisDeploymentDescriptors.class, "ServerProject", projectTransformer); - - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WsdlURI", WSDL2JavaCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "HttpBasicAuthUsername", WSDL2JavaCommand.class); - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "HttpBasicAuthPassword", WSDL2JavaCommand.class); - -// WSDL2JavaCommand - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class); - - // MoveDeploymentFilesTask - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", MoveDeploymentFilesTask.class, "ServerProject", projectTransformer); - dataRegistry.addMapping(TDAxisInputCommand.class, "ServiceServerTypeID", MoveDeploymentFilesTask.class); - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", MoveDeploymentFilesTask.class); - - // CopyAxisJarCommand - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", CopyAxisJarCommand.class, "Project", projectTransformer); - - // Skeleton2WSDLCommand - dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", Skeleton2WSDLCommand.class); - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", Skeleton2WSDLCommand.class, "ServerProject", projectTransformer); - dataRegistry.addMapping(TDAxisInputCommand.class, "ServiceServerTypeID", Skeleton2WSDLCommand.class); - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", Skeleton2WSDLCommand.class); - - // UpdateWEBXMLCommand - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", UpdateWEBXMLCommand.class, "ServerProject", projectTransformer); - - // RefreshProjectCommand - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", RefreshProjectCommand.class, "Project", projectTransformer); - - // BuildProjectCommand - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", BuildProjectCommand.class, "Project", projectTransformer); - - // GeronimoAxisDeployCommand - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", GeronimoAxisDeployCommand.class); - - // AxisDeployCommand - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", AxisDeployCommand.class); - - // AxisOutputCommand - dataRegistry.addMapping(Skeleton2WSDLCommand.class, "WsdlURI", AxisOutputCommand.class); - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", AxisOutputCommand.class); - - // ComputeAxisSkeletonBeanCommand - dataRegistry.addMapping(WSDL2JavaCommand.class, "JavaWSDLParam", ComputeAxisSkeletonBeanCommand.class); - //dataRegistry.addMapping(Skeleton2WSDLCommand.class, "WsdlURI", ComputeAxisSkeletonBeanCommand.class); - //dataRegistry.addMapping(AxisSkeletonDefaultingCommand.class, "WebServicesParser", ComputeAxisSkeletonBeanCommand.class); - - // OpenJavaEditorCommand - dataRegistry.addMapping(ComputeAxisSkeletonBeanCommand.class, "ClassNames", OpenJavaEditorCommand.class); - dataRegistry.addMapping(TDAxisInputCommand.class, "ServerProject", OpenJavaEditorCommand.class, "Project", projectTransformer); - } - public AxisWebServiceInfo getAxisWebServiceInfo() { - return axisWebServiceInfo_; - } - - public void setAxisWebServiceInfo(AxisWebServiceInfo axisWebServiceInfo) { - axisWebServiceInfo_ = axisWebServiceInfo; - } -} - diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebServiceInfo.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebServiceInfo.java deleted file mode 100644 index 1e7f78be2..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebServiceInfo.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.wsrt; - -import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter; - -public class AxisWebServiceInfo { - - private JavaWSDLParameter javaWSDLParameter; - - public JavaWSDLParameter getJavaWSDLParameter() { - return javaWSDLParameter; - } - - public void setJavaWSDLParameter(JavaWSDLParameter javaWSDLParameter) { - this.javaWSDLParameter = javaWSDLParameter; - } - -} diff --git a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebServiceRuntime.java b/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebServiceRuntime.java deleted file mode 100644 index bbbd10dd1..000000000 --- a/bundles/org.eclipse.jst.ws.axis.creation.ui/src/org/eclipse/jst/ws/internal/axis/creation/ui/wsrt/AxisWebServiceRuntime.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jst.ws.internal.axis.creation.ui.wsrt; - -import org.eclipse.jst.ws.internal.axis.consumption.ui.wsrt.AxisWebServiceClient; -import org.eclipse.wst.ws.internal.wsrt.AbstractWebServiceRuntime; -import org.eclipse.wst.ws.internal.wsrt.IWebService; -import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient; -import org.eclipse.wst.ws.internal.wsrt.WebServiceClientInfo; -import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo; - -public class AxisWebServiceRuntime extends AbstractWebServiceRuntime -{ - - public IWebService getWebService(WebServiceInfo info) - { - return new AxisWebService(info); - } - - public IWebServiceClient getWebServiceClient(WebServiceClientInfo info) - { - return new AxisWebServiceClient(info); - } - -} |