Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command')
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java209
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java279
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java259
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java460
4 files changed, 0 insertions, 1207 deletions
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java
deleted file mode 100644
index be9b12056..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/AxisDeployCommand.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20080227 119964 trungha@ca.ibm.com - Trung Ha
- * 20080613 236523 makandre@ca.ibm.com - Andrew Mak, Overwrite setting on Web service wizard is coupled with preference
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.core.command;
-
-
-import java.io.File;
-
-import org.apache.axis.client.AdminClient;
-import org.apache.axis.tools.ant.axis.AdminClientTask;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.filters.StringInputStream;
-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.AxisConsumptionCoreMessages;
-import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
-import org.eclipse.wst.command.internal.env.core.common.ProgressUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
-import org.eclipse.wst.command.internal.env.eclipse.BaseEclipseEnvironment;
-import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.environment.IStatusHandler;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-/**
- * Commands are executable, undoable, redoable objects. Every Command has a name and a description.
- */
-
-public class AxisDeployCommand extends AbstractDataModelOperation
-{
- protected static final String SERVICE_EXT = "/services/AdminService"; //$NON-NLS-1$
- protected static final String SERVER_CONFIG = "server-config.wsdd"; //$NON-NLS-1$
-
- private JavaWSDLParameter javaWSDLParam;
- private String project_;
-
- /**
- * Constructor for AxisDeployCommand.
- * @param String description
- * @param String name
- *
- */
- public AxisDeployCommand()
- {
- }
-
- public AxisDeployCommand(String project ){
- this.project_ = project;
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment environment = getEnvironment();
- if (javaWSDLParam == null)
- {
- return StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
- }
-
- if (javaWSDLParam.getProjectURL() == null || javaWSDLParam.getProjectURL().equals(""))
- { //$NON-NLS-1$
- return StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_PROJECT_URL_PARAM_NOT_SET);
- }
-
- if (javaWSDLParam.getDeploymentFiles() == null || javaWSDLParam.getDeploymentFiles().length == 0)
- {
- return StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_DEPLOY_FILE_PARAM_NOT_SET);
- }
-
- ProgressUtils.report(monitor, AxisConsumptionCoreMessages.MSG_AXIS_DEPLOY);
-
- IStatus status = executeAntTask(monitor);
- if (status.getSeverity() == Status.ERROR)
- {
- environment.getStatusHandler().reportError(status);
- }
-
- return status;
- }
-
- protected IStatus executeAntTask(IProgressMonitor monitor)
- {
- final class DeployTask extends AdminClientTask
- {
- public DeployTask()
- {
- super.setProject(new Project());
- super.getProject().init();
- super.setTaskType("axis"); //$NON-NLS-1$
- super.setTaskName("axis-admin"); //$NON-NLS-1$
- super.setOwningTarget(new Target());
- }
- }
-
- DeployTask adminClient = new DeployTask();
- String url = javaWSDLParam.getProjectURL() + SERVICE_EXT;
- adminClient.setUrl(url);
- adminClient.setXmlFile(new File(javaWSDLParam.getDeploymentFiles()[0]));
-
- // Since the admin server may not be available right away we will try
- // several times to execute it.
- try
- {
- BuildException lastException = null;
-
- for( int index = 0; index < 20; index++ )
- {
- try
- {
- lastException = null;
- adminClient.execute();
- }
- catch( BuildException exc )
- {
- lastException = exc;
-
- try
- {
- Thread.sleep( 200 );
- }
- catch( InterruptedException threadException )
- {
- }
- }
-
- // If no exception occured then we should break out of the loop.
- if( lastException == null ) break;
- }
-
- // If after many tries we still get an exception, then we will re throw it.
- if( lastException != null ) throw lastException;
-
- return createConfigFile(monitor, url);
- }
- catch (BuildException e)
- {
- e.printStackTrace();
- String message = e.getMessage();
- if (e.getCause() != null)
- {
- message = e.getCause().toString();
- }
-
- IStatus[] childStatus = new Status[1];
- childStatus[0] = StatusUtils.errorStatus( message);
- return StatusUtils.multiStatus(AxisConsumptionCoreMessages.MSG_ERROR_AXIS_DEPLOY, childStatus);
- }
- }
-
- /** Creates 'server-config.wsdd' in the WebContent folder in the Eclipse workspace project
- * @param monitor
- * @param url
- * @return
- */
- private IStatus createConfigFile(IProgressMonitor monitor, String url) {
- AdminClient listAdmin = new AdminClient();
- String config = "";
- try {
- config = listAdmin.process(new String[] { "-l" + url, "list" });
-
- IPath webInfPath = J2EEUtils.getWebInfPath(ResourcesPlugin
- .getWorkspace().getRoot().getProject(project_));
- IPath relativeServerConfigPath = webInfPath.append(SERVER_CONFIG);
- IStatusHandler statusHandler = getEnvironment().getStatusHandler();
- ResourceContext context = ((BaseEclipseEnvironment) getEnvironment())
- .getResourceContext();
- FileResourceUtils.createFile(context, relativeServerConfigPath,
- new StringInputStream(config), monitor, statusHandler);
- } catch (Exception e){
- e.printStackTrace();
- String message = e.getMessage();
- if (e.getCause() != null)
- {
- message = e.getCause().toString();
- }
-
- IStatus[] childStatus = new Status[1];
- childStatus[0] = StatusUtils.errorStatus( message);
- return StatusUtils.multiStatus(AxisConsumptionCoreMessages.MSG_ERROR_AXIS_DEPLOY, childStatus);
- }
- return Status.OK_STATUS;
- }
-
- /**
- * @param javaWSDLParam The javaWSDLParam to set.
- */
- public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam)
- {
- this.javaWSDLParam = javaWSDLParam;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java
deleted file mode 100644
index 2455a377f..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/GeronimoAxisDeployCommand.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.consumption.core.command;
-
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-
-import org.apache.axis.AxisEngine;
-import org.apache.axis.server.AxisServer;
-import org.apache.axis.tools.ant.axis.AdminClientTask;
-import org.apache.axis.utils.ClassUtils;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-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.common.J2EEUtils;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.wst.command.internal.env.core.common.ProgressUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-
-/**
- * Commands are executable, undoable, redoable objects. Every Command has a name and a description.
- */
-
-public class GeronimoAxisDeployCommand extends AbstractDataModelOperation
-{
-
- private JavaWSDLParameter javaWSDLParam;
-
- private String projectName_;
- private static final String AXIS_SERVER_CONFIG_FILE = "axis.ServerConfigFile";
-
- IFolder outputRoot;
-
- /**
- * Constructor for GeronimoAxisDeployCommand.
- * @param String projectName
- *
- */
- public GeronimoAxisDeployCommand(String projectName)
- {
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment environment = getEnvironment();
- if (javaWSDLParam == null)
- {
- return StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
- }
-
- if (javaWSDLParam.getProjectURL() == null || javaWSDLParam.getProjectURL().equals(""))
- { //$NON-NLS-1$
- return StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_PROJECT_URL_PARAM_NOT_SET);
- }
-
- if (javaWSDLParam.getDeploymentFiles() == null || javaWSDLParam.getDeploymentFiles().length == 0)
- {
- return StatusUtils.errorStatus(
- AxisConsumptionCoreMessages.MSG_ERROR_DEPLOY_FILE_PARAM_NOT_SET);
- }
-
- ProgressUtils.report(monitor, AxisConsumptionCoreMessages.MSG_AXIS_DEPLOY);
-
- IStatus status = executeAdminTask();
- if (status.getSeverity() == Status.ERROR)
- {
- environment.getStatusHandler().reportError(status);
- }
-
- status = executeAntTask();
- if (status.getSeverity() == Status.ERROR)
- {
- environment.getStatusHandler().reportError(status);
- }
- return status;
- }
-
- protected IStatus executeAntTask()
- {
- final class DeployTask extends AdminClientTask
- {
- public DeployTask()
- {
- super.setProject(new Project());
- super.getProject().init();
- super.setTaskType("axis"); //$NON-NLS-1$
- super.setTaskName("axis-admin"); //$NON-NLS-1$
- super.setOwningTarget(new Target());
- }
- }
-
- DeployTask adminClient = new DeployTask();
- String url = javaWSDLParam.getProjectURL() + AxisDeployCommand.SERVICE_EXT;
- adminClient.setUrl(url);
- adminClient.setXmlFile(new File(javaWSDLParam.getDeploymentFiles()[0]));
-
- // Since the admin server may not be available right away we will try
- // several times to execute it.
- try
- {
- BuildException lastException = null;
-
- for( int index = 0; index < 20; index++ )
- {
- try
- {
- lastException = null;
- adminClient.execute();
- }
- catch( BuildException exc )
- {
- lastException = exc;
-
- try
- {
- Thread.sleep( 200 );
- }
- catch( InterruptedException threadException )
- {
- }
- }
-
- // If no exception occured then we should break out of the loop.
- if( lastException == null ) break;
- }
-
- // If after many tries we still get an exception, then we will re throw it.
- if( lastException != null ) throw lastException;
- }
- catch (BuildException e)
- {
- e.printStackTrace();
- String message = e.getMessage();
- if (e.getCause() != null)
- {
- message = e.getCause().toString();
- }
-
- IStatus[] childStatus = new Status[1];
- childStatus[0] = StatusUtils.errorStatus( message);
- return StatusUtils.multiStatus(AxisConsumptionCoreMessages.MSG_ERROR_AXIS_DEPLOY, childStatus);
- }
- return Status.OK_STATUS;
-
- }
-
- protected IStatus executeAdminTask(){
-
- IStatus status = Status.OK_STATUS;
- // check if server-config.wsdd exists
- IVirtualComponent component = J2EEUtils.getVirtualComponent( projectName_ );
- outputRoot = J2EEUtils.getOutputContainerRoot( component );
- IPath path = new Path( "WEB-INF" ).append( "server-config.wsdd" );
- IFile descriptorFile = outputRoot.getFile( path );
-
- if (!descriptorFile.exists()){
- status = createServerConfigFile();
- if (status.getSeverity()==Status.ERROR)
- return status;
- }
-
- // check if deploy.wsdd exists
- String deployWSDD = javaWSDLParam.getDeploymentFiles()[0];
- File deployFile = new File(deployWSDD);
- if (deployFile==null || !deployFile.exists()){
- return status;
- }
-
- try {
- // get Classpath
- String jarsCP = new String();
- // classes dir
- IPath classesPath = new Path("WEB-INF").append("classes");
- IFile classesDir = outputRoot.getFile(classesPath);
- jarsCP = "\""+classesDir.getRawLocation().toOSString()+"\"";
-
- // lib JARs
- IPath libPath = new Path("WEB-INF").append("lib");
- IFile libEntry = outputRoot.getFile(libPath);
- IFolder libFolder = (IFolder)ResourceUtils.findResource(libEntry.getFullPath());
- IResource[] JARfiles = libFolder.members();
- for (int i=0;i<JARfiles.length;i++){
- IResource res = JARfiles[i];
- if (res.getFileExtension().equals("jar")){
- jarsCP = jarsCP + ";\""+ res.getRawLocation().toOSString()+"\"";
- }
- }
-
- // form and run utils.Admin command
- String adminCommand = new String("java -Daxis.ServerConfigFile="+ descriptorFile.getRawLocation().toOSString()
- +" -cp "+jarsCP+" org.apache.axis.utils.Admin server "+deployFile.getCanonicalPath());
- Runtime.getRuntime().exec(adminCommand);
-
- }
- catch(Exception e){
- System.setProperty(AXIS_SERVER_CONFIG_FILE,"server-conifg.wsdd");
- e.printStackTrace();
- String message = e.getMessage();
- if (e.getCause() != null)
- {
- message = e.getCause().toString();
- }
-
- IStatus[] childStatus = new Status[1];
- childStatus[0] = StatusUtils.errorStatus( message);
- return StatusUtils.multiStatus(AxisConsumptionCoreMessages.MSG_ERROR_AXIS_DEPLOY, childStatus);
- }
-
- return status;
- }
-
- /**t
- * Creates the initial server-config.wsdd file from a template in Axis
- * @return
- */
- private IStatus createServerConfigFile(){
- try{
-
- // server-config.wsdd file
- IPath path = new Path( "WEB-INF" ).append( "server-config.wsdd" );
- IFile descriptorFile = outputRoot.getFile( path );
-
- // create the initial server-config.wsdd file
- AxisEngine preEngine = new AxisServer();
- InputStream is = ClassUtils.getResourceAsStream(preEngine.getClass(), "server-config.wsdd");
- FileOutputStream fos = new FileOutputStream(descriptorFile.getRawLocation().toOSString());
- ResourceUtils.copyStream(is, fos);
- fos.close();
-
- return Status.OK_STATUS;
- }
- catch(Exception e){
- e.printStackTrace();
- String message = e.getMessage();
- if (e.getCause() != null)
- {
- message = e.getCause().toString();
- }
-
- IStatus[] childStatus = new Status[1];
- childStatus[0] = StatusUtils.errorStatus( message);
- return StatusUtils.multiStatus(AxisConsumptionCoreMessages.MSG_ERROR_AXIS_DEPLOY, childStatus);
-
- }
- }
-
- /**
- * @param javaWSDLParam The javaWSDLParam to set.
- */
- public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam)
- {
- this.javaWSDLParam = javaWSDLParam;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java
deleted file mode 100644
index 766612252..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/Java2WSDLCommand.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20060106 121199 jesper@selskabet.org - Jesper Møller
- * 20060329 127016 andyzhai@ca.ibm.com - Andy Zhai
- * 20060515 115225 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070813 188999 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.core.command;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask;
-import org.apache.axis.tools.ant.wsdl.NamespaceMapping;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-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.core.context.AxisEmitterContext;
-import org.eclipse.jst.ws.internal.axis.consumption.core.context.AxisEmitterDefaults;
-import org.eclipse.jst.ws.internal.axis.consumption.core.plugin.WebServiceAxisConsumptionCorePlugin;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
-import org.eclipse.wst.command.internal.env.core.common.ProgressUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
-import org.eclipse.wst.command.internal.env.eclipse.BaseEclipseEnvironment;
-import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.environment.ILog;
-import org.eclipse.wst.common.environment.IStatusHandler;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-
-/**
- * Commands are executable, undoable, redoable objects.
- * Every Command has a name and a description.
- */
-
-public class Java2WSDLCommand extends AbstractDataModelOperation
-{
-
- private JavaWSDLParameter javaWSDLParam_;
- private File tempOutputWsdlFile;
- private final String TEMP = "temp"; //$NON-NLS-1$
- private final String WSDL_EXT = ".wsdl"; //$NON-NLS-1$
-
- public Java2WSDLCommand() {
- }
- /**
- * Constructor for Java2WSDLCommand.
- */
- public Java2WSDLCommand(JavaWSDLParameter javaWSDLParam) {
- super();
- this.javaWSDLParam_ = javaWSDLParam;
- }
-
- 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 (javaWSDLParam_.getBeanName() == null) {
- status = StatusUtils.errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
- environment.getStatusHandler().reportError(status);
- return status;
- }
-
- ProgressUtils.report(monitor, NLS.bind(AxisConsumptionCoreMessages.MSG_GENERATE_WSDL, javaWSDLParam_.getBeanName() ));
-
- return executeAntTask(environment, monitor);
- }
-
- protected IStatus executeAntTask(IEnvironment environment, IProgressMonitor monitor) {
-
- final class Emitter extends Java2WsdlAntTask {
- public Emitter() {
- super.setProject(new Project());
- super.getProject().init();
- super.setTaskType("axis"); //$NON-NLS-1$
- super.setTaskName("axis-java2wsdl"); //$NON-NLS-1$
- super.setOwningTarget(new Target());
- }
- }
-
- IStatus status = Status.OK_STATUS;
- ILog envLog = environment.getLog();
- Emitter emitter = new Emitter();
- emitter.createClasspath().setPath(javaWSDLParam_.getClasspath());
- envLog.log(ILog.INFO, 5008, this, "executeAntTask", "Class Path = "+ javaWSDLParam_.getClasspath());
-
- emitter.setPortTypeName(javaWSDLParam_.getPortTypeName());
- envLog.log(ILog.INFO, 5009, this, "executeAntTask", "Port Type Name = "+ javaWSDLParam_.getPortTypeName());
-
- emitter.setServiceElementName(javaWSDLParam_.getServiceName());
- envLog.log(ILog.INFO, 5010, this, "executeAntTask", "Service Name = "+ javaWSDLParam_.getServiceName());
-
- emitter.setLocation(javaWSDLParam_.getUrlLocation());
- envLog.log(ILog.INFO, 5011, this, "executeAntTask", "URL Location = "+ javaWSDLParam_.getUrlLocation());
-
- emitter.setMethods(javaWSDLParam_.getMethodString());
- envLog.log(ILog.INFO, 5012, this, "executeAntTask", "Methods = "+ javaWSDLParam_.getMethodString());
-
- emitter.setStyle(javaWSDLParam_.getStyle());
- envLog.log(ILog.INFO, 5013, this, "executeAntTask", "Style = "+ javaWSDLParam_.getStyle());
-
- emitter.setUse(javaWSDLParam_.getUse());
- envLog.log(ILog.INFO, 5014, this, "executeAntTask", "Use = "+ javaWSDLParam_.getUse());
-
- // create temporary directory to use as output directory for java2wsdl
- IPath pluginStateLoc = WebServiceAxisConsumptionCorePlugin.getInstance().getStateLocation();
- File tempDir = new File(pluginStateLoc.toString());
- File newTempFile = null;
- try {
- newTempFile = File.createTempFile(TEMP, WSDL_EXT, tempDir);
- tempOutputWsdlFile = newTempFile;
- } catch (Exception e) {
- tempOutputWsdlFile = new File (pluginStateLoc.append(TEMP+WSDL_EXT).toString());
- }
-
- emitter.setOutput(tempOutputWsdlFile);
-
- envLog.log(ILog.INFO, 5015, this, "executeAntTask", "WSDL Location = "+ javaWSDLParam_.getOutputWsdlLocation());
-
- emitter.setNamespace(javaWSDLParam_.getNamespace());
- envLog.log(ILog.INFO, 5016, this, "executeAntTask", "Name Space = "+ javaWSDLParam_.getNamespace());
-
- emitter.setClassName(javaWSDLParam_.getBeanName());
- envLog.log(ILog.INFO, 5017, this, "executeAntTask", "Bean name = "+ javaWSDLParam_.getBeanName());
-
- emitter.setImplClass(javaWSDLParam_.getBeanName());
-
- AxisEmitterContext context = WebServiceAxisConsumptionCorePlugin.getInstance().getAxisEmitterContext();
-
- if (context.isUseInheritedMethodsEnabled() != AxisEmitterDefaults.getUseInheritedMethodsDefault())
- {
- emitter.setUseInheritedMethods(context.isUseInheritedMethodsEnabled());
- envLog.log(ILog.INFO, 5099, this, "executeAntTask", " set UseInheritedMethods : " + context.isUseInheritedMethodsEnabled() );
- }
-
- HashMap mappings = javaWSDLParam_.getMappings();
- if(mappings != null){
- Iterator keys = mappings.keySet().iterator();
- while(keys.hasNext()){
- String pakage = (String)keys.next();
- String namespace = (String)mappings.get(pakage);
- NamespaceMapping map = new NamespaceMapping();
- map.setPackage(pakage);
- map.setNamespace(namespace);
- emitter.addMapping(map);
- }
- }
-
-
- try {
- emitter.execute();
- status = moveGeneratedWSDL(environment, monitor);
- } catch (BuildException e) {
- envLog.log(ILog.ERROR, 5018, this, "executeAntTask", e);
- status = StatusUtils.errorStatus(
- AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_GENERATE + " " //$NON-NLS-1$
- +e.getCause().toString(), e.getCause());
- environment.getStatusHandler().reportError(status);
- return status;
- } finally {
- if (tempOutputWsdlFile.exists()) {
- tempOutputWsdlFile.delete();
- }
- }
- return status;
-
- }
-
- public IStatus moveGeneratedWSDL(IEnvironment environment,
- IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- FileInputStream finStream = null;
-
- ResourceContext context = ((BaseEclipseEnvironment)environment).getResourceContext();
- IStatusHandler statusHandler = environment.getStatusHandler();
-
- String outputWsdlLocation = javaWSDLParam_.getOutputWsdlLocation();
- IPath targetPath = new Path(outputWsdlLocation);
- try {
- finStream = new FileInputStream(tempOutputWsdlFile);
- if (finStream != null) {
- FileResourceUtils.createFileAtLocation(context, targetPath.makeAbsolute(), finStream,
- monitor, statusHandler);
- finStream.close();
- }
- } catch (Exception e) {
- status = StatusUtils.errorStatus(NLS.bind(AxisConsumptionCoreMessages.MSG_ERROR_MOVE_RESOURCE,new String[]{e.getLocalizedMessage()}), e);
- environment.getStatusHandler().reportError(status);
- } finally {
- try {
- if (finStream != null) {
- finStream.close();
- }
- } catch (IOException e) {
- }
- }
- return status;
- }
-
- public Status undo(IEnvironment environment) {
- return null;
- }
-
- public Status redo(IEnvironment environment) {
- return null;
- }
-
- /**
- * Returns the javaWSDLParam.
- * @return JavaWSDLParameter
- */
- public JavaWSDLParameter getJavaWSDLParam() {
- return javaWSDLParam_;
- }
-
- public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParm) {
- this.javaWSDLParam_ = javaWSDLParm;
- }
-
- public String getWsdlURI()
- {
- File file = new File(getJavaWSDLParam().getOutputWsdlLocation());
- String url = "";
- try {
- url = file.toURL().toString();
- }
- catch(MalformedURLException mue){}
- return url;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java
deleted file mode 100644
index 1556c972c..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.core/src/org/eclipse/jst/ws/internal/axis/consumption/core/command/WSDL2JavaCommand.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * yyyymmdd bug Email and other contact information
- * 20060329 127016 andyzhai@ca.ibm.com - Andy Zhai
- * 20060404 134791 andyzhai@ca.ibm.com - Andy Zhai
- * 20060515 115225 sengpl@ca.ibm.com - Seng Phung-Lu
- * 20070813 188999 pmoogk@ca.ibm.com - Peter Moogk
- * 20070927 204649 kelvinhc@ca.ibm.com - Kelvin Cheung
- * 20080505 225625 pmoogk@ca.ibm.com - Peter Moogk, Fixed null pointer problem, if user cancells out of overwrite resource.
- * 20080604 235648 makandre@ca.ibm.com - Andrew Mak, Errors in client proxy if using default namespace to package mapping
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.core.command;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.apache.axis.constants.Scope;
-import org.apache.axis.wsdl.toJava.Emitter;
-import org.apache.axis.wsdl.toJava.GeneratedFileInfo;
-import org.eclipse.core.resources.IFile;
-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.core.context.AxisEmitterContext;
-import org.eclipse.jst.ws.internal.axis.consumption.core.context.AxisEmitterDefaults;
-import org.eclipse.jst.ws.internal.axis.consumption.core.plugin.WebServiceAxisConsumptionCorePlugin;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
-import org.eclipse.wst.command.internal.env.core.common.ProgressUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
-import org.eclipse.wst.command.internal.env.eclipse.BaseEclipseEnvironment;
-import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.environment.ILog;
-import org.eclipse.wst.common.environment.IStatusHandler;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-
-
-public class WSDL2JavaCommand extends AbstractDataModelOperation {
-
- private final String DEPLOY_TYPE = "deploy"; //$NON-NLS-1$
- private final String UNDEPLOY_TYPE = "undeploy"; //$NON-NLS-1$
- private final String TEMP = "temp"; //$NON-NLS-1$
- private JavaWSDLParameter javaWSDLParam;
- private String wsdlURI;
- private String httpBasicAuthUsername;
- private String httpBasicAuthPassword;
- private List deployFiles;
- private List javaFiles;
- private File tempOutputFile;
-
- public WSDL2JavaCommand() {
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment environment = getEnvironment();
- ILog envLog = environment.getLog();
- IStatus status;
- if (javaWSDLParam == null) {
- status = StatusUtils.errorStatus(
- AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
- environment.getStatusHandler().reportError(status);
- return status;
- }
-
- if (wsdlURI != null) //bottom up case has already has the correct WSDL on javaWSDLParam
- {
- javaWSDLParam.setInputWsdlLocation(wsdlURI);
- }
- javaWSDLParam.setHTTPUsername(httpBasicAuthUsername);
- javaWSDLParam.setHTTPPassword(httpBasicAuthPassword);
-
- Emitter wsdl2Java = new Emitter();
- if (envLog.isEnabled("emitter")) {
- wsdl2Java.setVerbose(true);
- } else {
- wsdl2Java.setVerbose(false);
- }
- boolean serverSide = javaWSDLParam.getServerSide() == JavaWSDLParameter.SERVER_SIDE_BEAN;
- wsdl2Java.setServerSide(serverSide);
- if (serverSide) {
- wsdl2Java.setSkeletonWanted(javaWSDLParam.isSkeletonDeploy());
- }
-
- // create temporary directory to use as output directory for wsdl2java
- tempOutputFile = createTempDir();
- wsdl2Java.setOutputDir(tempOutputFile.toString());
-
- try {
- if (javaWSDLParam.isMetaInfOnly()) {
- // for the case Java2WSDL-WSDL2Java
- HashMap pck2nsMap = javaWSDLParam.getMappings();
- if (pck2nsMap != null) {
- HashMap ns2pckMap = new HashMap();
- Iterator keys = pck2nsMap.keySet().iterator();
- while (keys.hasNext()) {
- String pakage = (String) keys.next();
- String namespace = (String) pck2nsMap.get(pakage);
- ns2pckMap.put(namespace, pakage);
- }
- wsdl2Java.setNamespaceMap(ns2pckMap);
- }
- } else {
- // for the case WSDL2Java
- if (javaWSDLParam.getMappings() != null) {
- wsdl2Java.setNamespaceMap(javaWSDLParam.getMappings());
- }
- }
- envLog.log(ILog.INFO, 5019, this, "execute", "Java output = " + javaWSDLParam.getJavaOutput());
- if (javaWSDLParam.getHTTPPassword() != null) {
- wsdl2Java.setPassword(javaWSDLParam.getHTTPPassword());
- envLog.log(ILog.INFO, 5081, this, "execute", "password: " + javaWSDLParam.getHTTPPassword());
- }
- if (javaWSDLParam.getHTTPUsername() != null) {
- wsdl2Java.setUsername(javaWSDLParam.getHTTPUsername());
- envLog.log(ILog.INFO, 5082, this, "execute", "username: " + javaWSDLParam.getHTTPUsername());
- }
- envLog.log(ILog.INFO, 5020, this, "execute", "WSDL Location = " + javaWSDLParam.getInputWsdlLocation());
-
- // If timeout is not set, the default timeout for wsdl2java is 45 seconds.
- // The user can change the timeout value by setting
- // "-DAxisWsdl2JavaTimeout=<timeout_value_in_milliseconds>" as VM argument
- // when starting the Eclipse workbench.
- //
- // For example, enter the following command to start the Eclipse workbench
- // in order to set the Axis WSDL to Java emitter timeout to 60 seconds:
- //
- // eclipse -vmargs "-DAxisWsdl2JavaTimeout=60000"
- //
- // When AxisWsdl2JavaTimeout is set, the Axis emitter preference page timeout setting is ignored
- AxisEmitterContext context = WebServiceAxisConsumptionCorePlugin.getInstance().getAxisEmitterContext();
- String wsdl2JavaTimeoutProperty = System.getProperty("AxisWsdl2JavaTimeout");
- long timeout;
- if (wsdl2JavaTimeoutProperty != null) {
- timeout = new Integer(wsdl2JavaTimeoutProperty).longValue();
- wsdl2Java.setTimeout(timeout);
- envLog.log(ILog.INFO, 5091, this, "execute", "AxisWsdl2JavaTimeout = " + timeout);
- }
- else if(context.getTimeOut() != AxisEmitterDefaults.getTimeOutDefault())
- {
- timeout = context.getTimeOut() == -1 ? -1 : context.getTimeOut()* 1000;
- wsdl2Java.setTimeout(timeout);
- envLog.log(ILog.INFO, 5100, this, "execute", "Timeout = " + timeout);
- }
- if (context.getDeployScopeType() != AxisEmitterDefaults.getDeployScopeDefault())
- {
- switch (context.getDeployScopeType())
- {
- case AxisEmitterContext.DEPLOY_SCOPE_TYPE_APPLICATION:
- wsdl2Java.setScope(Scope.APPLICATION);
- envLog.log(ILog.INFO, 5101, this, "execute", " Deploy Scope: Application" );
- break;
- case AxisEmitterContext.DEPLOY_SCOPE_TYPE_REQUEST:
- wsdl2Java.setScope(Scope.REQUEST);
- envLog.log(ILog.INFO, 5102, this, "execute", " Deploy Scope: Request" );
- break;
- case AxisEmitterContext.DEPLOY_SCOPE_TYPE_SESSTION:
- wsdl2Java.setScope(Scope.SESSION);
- envLog.log(ILog.INFO, 5103, this, "execute", " Deploy Scope: Session" );
- break;
- default:
- }
- }
-
- if (context.isAllWantedEnabled() != AxisEmitterDefaults.getAllWantedDefault())
- {
- wsdl2Java.setAllWanted(context.isAllWantedEnabled());
- envLog.log(ILog.INFO, 5104, this, "execute", " set AllWanted : " + context.isAllWantedEnabled() );
- }
-
- if (context.isHelperWantedEnabled() != AxisEmitterDefaults.getHelperWantedDefault())
- {
- wsdl2Java.setHelperWanted(context.isHelperWantedEnabled());
- envLog.log(ILog.INFO, 5105, this, "execute", " set HelperWanted : " + context.isHelperWantedEnabled() );
- }
- if (context.isWrapArraysEnabled() != AxisEmitterDefaults.getWrapArraysDefault())
- {
- wsdl2Java.setWrapArrays(context.isWrapArraysEnabled());
- envLog.log(ILog.INFO, 5106, this, "execute", " set WrapArrays : " + context.isWrapArraysEnabled() );
- }
-
- ProgressUtils.report(monitor, NLS.bind(AxisConsumptionCoreMessages.MSG_PARSING_WSDL, javaWSDLParam.getInputWsdlLocation() ) );
-
- wsdl2Java.run(javaWSDLParam.getInputWsdlLocation());
-
- javaFiles = wsdl2Java.getGeneratedFileNames();
-
- deployFiles = new ArrayList();
- if (serverSide) {
- // set deployment files
- List deploymentFiles1 = wsdl2Java.getGeneratedFileInfo().findType(DEPLOY_TYPE);
- List deploymentFiles2 = wsdl2Java.getGeneratedFileInfo().findType(UNDEPLOY_TYPE);
- if (deploymentFiles1 != null && deploymentFiles2 != null) {
- deploymentFiles1.addAll(deploymentFiles2);
- for (int i = 0; i < deploymentFiles1.size(); i++) {
- GeneratedFileInfo.Entry entry = (GeneratedFileInfo.Entry) deploymentFiles1.get(i);
- deployFiles.add(entry.fileName);
- }
- }
- javaFiles.removeAll(deployFiles);
- }
-
- // update the name2package map with actual package values used by the emitter
- // because emitter will prefix illegal package names with "_". See bug
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=235648
- if (!javaWSDLParam.isMetaInfOnly() && javaWSDLParam.getMappings() != null) {
-
- Map pkg2NsMap = wsdl2Java.getNamespaces().getPkg2NamespacesMap();
-
- Iterator iter = pkg2NsMap.entrySet().iterator();
- while (iter.hasNext()) {
-
- Map.Entry entry = (Map.Entry) iter.next();
-
- String pkg = (String) entry.getKey();
- List nsList = (List) entry.getValue();
-
- Iterator iter2 = nsList.iterator();
- while (iter2.hasNext()) {
- String ns = (String) iter2.next();
- if (javaWSDLParam.getMappings().containsKey(ns))
- javaWSDLParam.getMappings().put(ns, pkg);
- }
- }
- }
-
- status = moveGeneratedFiles(environment, monitor);
-
- } catch (Exception e) {
- envLog.log(ILog.ERROR, 5021, this, "execute", e);
- status = StatusUtils.errorStatus(
- AxisConsumptionCoreMessages.MSG_ERROR_WSDL_JAVA_GENERATE + " " //$NON-NLS-1$
- + e.toString(), e);
- environment.getStatusHandler().reportError(status);
- } finally {
- deleteDir(tempOutputFile);
- }
- return status;
- }
-
- public IStatus moveGeneratedFiles( IEnvironment environment, IProgressMonitor monitor )
- {
- IStatus status = Status.OK_STATUS;
- IStatusHandler statusHandler = environment.getStatusHandler();
- FileInputStream finStream = null;
-
- try {
- String outputDir, javaOutput;
- outputDir = removeFileProtocol(javaWSDLParam.getOutput());
- javaOutput = removeFileProtocol(javaWSDLParam.getJavaOutput());
-
- ResourceContext context = ((BaseEclipseEnvironment)environment).getResourceContext();
- IPath outputPath = new Path (outputDir);
-
- String fileName;
- IPath targetPath=null;
-
- String deployFile;
- Iterator iterator;
-
- String tempOutputDir = tempOutputFile.toString();
- String [] movedDeployFiles = new String [deployFiles.size()];
- iterator = deployFiles.iterator();
- int i = 0;
- while (iterator.hasNext()) {
- deployFile = (String) iterator.next();
- File source = new File(deployFile);
- finStream = new FileInputStream(source);
- if (finStream != null) {
- if (deployFile.startsWith(tempOutputDir)) {
- fileName = deployFile.substring(tempOutputDir.length());
- targetPath = outputPath.append(fileName).makeAbsolute();
- FileResourceUtils.createFileAtLocation(context,
- targetPath,
- finStream,
- monitor,
- statusHandler);
- movedDeployFiles[i++]= ResourceUtils.getWorkspaceRoot().getFileForLocation(targetPath).getLocation().toString();
- }
- finStream.close();
- }
- }
-
- javaWSDLParam.setDeploymentFiles(movedDeployFiles);
-
- IPath javaOutputPath = new Path (javaOutput);
-
- String javaFile;
- String fullClassName = null;
- Vector movedJavaFiles = new Vector();;
- iterator = javaFiles.iterator();
- i = 0;
- while (iterator.hasNext()) {
- javaFile = (String) iterator.next();
- File source = new File(javaFile);
- finStream = new FileInputStream(source);
- if (finStream != null) {
- // for the case Java2WSDL-WSDL2Java, no need to move Java files, just delete them
- if (!javaWSDLParam.isMetaInfOnly()) {
- // for the case WSDL2Java, move Java files to Java output directory
- if (javaFile.startsWith(tempOutputDir)) {
- fullClassName = javaFile.substring(tempOutputDir.length());
- targetPath = javaOutputPath.append(fullClassName).makeAbsolute();
- IFile file = FileResourceUtils.createFileAtLocation(context,
- targetPath,
- finStream,
- monitor,
- statusHandler);
-
- if( file != null )
- {
- file.setCharset("UTF-8", monitor);
- movedJavaFiles.add( ResourceUtils.getWorkspaceRoot().getFileForLocation(targetPath).getLocation().toString() );
- }
- }
- }
-
- finStream.close();
- }
- }
- javaWSDLParam.setJavaFiles( (String[])movedJavaFiles.toArray( new String[0] ) );
-
- } catch (Exception e) {
- status = StatusUtils.errorStatus(NLS.bind(AxisConsumptionCoreMessages.MSG_ERROR_MOVE_RESOURCE,new String[]{e.getLocalizedMessage()}), e);
- statusHandler.reportError(status);
-
- } finally {
- if (finStream != null) {
- try {
- finStream.close();
- } catch (IOException e) {
- }
- }
- }
-
- return status;
- }
-
- /**
- * Deletes all files and subdirectories under dir.
- * Just ignore and keep going if delete is not successful
- *
- * @param dir directory to delete
- */
- public void deleteDir(File dir) {
- if (dir.isDirectory()) {
- String[] children = dir.list();
- for (int i = 0; i < children.length; i++) {
- deleteDir(new File(dir, children[i]));
- }
- }
- // The directory is now empty so delete it
- dir.delete();
- }
-
- /**
- * Creates a temporary directory under the plugin's state location (i.e.
- * .metadata/.plugin directory)
- *
- * @return File
- */
- private File createTempDir() {
- String pluginTempDir = WebServiceAxisConsumptionCorePlugin
- .getInstance().getStateLocation().toString();
- File tempDir = new File(pluginTempDir);
- File newTempDir = null;
- try {
- newTempDir = File.createTempFile(TEMP, "", tempDir);
- // delete the temp file and create a temp directory instead
- if (newTempDir.delete()) {
- if (newTempDir.mkdir()) {
- tempDir = newTempDir;
- }
- }
- return tempDir;
- } catch (Exception e) {
- return tempDir;
- }
- }
-
- /*
- * Hack: Axis doesn't like file URLs
- */
- private String removeFileProtocol(String s) {
- if (s.startsWith("file:")) {
- String newS = s.substring(5, s.length());
- int i = newS.indexOf(':');
- if (i != -1) {
- String protocol = newS.substring(0, i);
- int j = protocol.indexOf('/');
- int k = protocol.indexOf('\\');
- int max = Math.max(j, k);
- if (max != -1)
- newS = newS.substring(max + 1, newS.length());
- }
- return newS;
- }
- return s;
- }
-
- public Status undo(IEnvironment environment) {
- return null;
- }
-
- public Status redo(IEnvironment environment) {
- return null;
- }
-
- public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) {
- this.javaWSDLParam = javaWSDLParam;
- }
-
- public JavaWSDLParameter getJavaWSDLParam() {
- return javaWSDLParam;
- }
-
- /**
- * @param httpBasicAuthPassword
- * The httpBasicAuthPassword to set.
- */
- public void setHttpBasicAuthPassword(String httpBasicAuthPassword) {
- this.httpBasicAuthPassword = httpBasicAuthPassword;
- }
-
- /**
- * @param httpBasicAuthUsername
- * The httpBasicAuthUsername to set.
- */
- public void setHttpBasicAuthUsername(String httpBasicAuthUsername) {
- this.httpBasicAuthUsername = httpBasicAuthUsername;
- }
-
- public void setWsdlURI(String wsdlURI) {
- this.wsdlURI = wsdlURI;
- }
-
-}

Back to the top