Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.jst.ws.axis.consumption.ui')
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/.classpath7
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/.cvsignore6
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/.project38
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.pde.prefs12
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF47
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/about.html22
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/build.properties6
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.properties25
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml54
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUI.properties108
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUIMessages.java78
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java263
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java69
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java49
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java178
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java186
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/plugin/WebServiceAxisConsumptionUIPlugin.java105
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/preferences/AxisEmitterPreferencePage.java321
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java81
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java298
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java130
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java63
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java248
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanInfo.java600
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java74
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/ClasspathUtils.java297
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/FileUtil.java120
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/PlatformUtils.java176
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/WSDLUtils.java514
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsFragment.java39
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsWidget.java127
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisProxyWidget.java140
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java119
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisClientConfigWidgetFactory.java51
-rw-r--r--bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java159
36 files changed, 0 insertions, 4867 deletions
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.classpath b/bundles/org.eclipse.jst.ws.axis.consumption.ui/.classpath
deleted file mode 100644
index cb0105380..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.cvsignore b/bundles/org.eclipse.jst.ws.axis.consumption.ui/.cvsignore
deleted file mode 100644
index 36207666d..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-bin
-build.xml
-temp.folder
-wsc-axis-ui.jar
-@dot
-src.zip
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.project b/bundles/org.eclipse.jst.ws.axis.consumption.ui/.project
deleted file mode 100644
index cb0ee10ec..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.project
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.ws.axis.consumption.ui</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.wst.command.env</project>
- <project>org.eclipse.wst.command.env.core</project>
- <project>org.eclipse.jst.ws</project>
- <project>org.eclipse.jst.ws.axis.consumption.core</project>
- <project>org.eclipse.jst.ws.consumption</project>
- <project>org.eclipse.jst.ws.consumption.ui</project>
- <project>org.eclipse.jst.ws.discovery.core</project>
- <project>org.eclipse.jst.ws.ui</project>
- <project>org.eclipse.wst.wsdl</project>
- <project>org.eclipse.wst.ws.parser</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bdf9129cb..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Mon Jan 30 10:34:37 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index a2bb559df..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Mon Jan 30 10:41:34 EST 2006
-compilers.p.deprecated=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 7b2cacec5..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,47 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %PLUGIN_NAME
-Bundle-SymbolicName: org.eclipse.jst.ws.axis.consumption.ui; singleton:=true
-Bundle-Version: 1.0.101.qualifier
-Bundle-Activator: org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin
-Bundle-Vendor: %PLUGIN_PROVIDER
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.ws.internal.axis.consumption.ui;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.command;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.plugin;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.task;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.util;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.widgets;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client;x-internal:=true,
- org.eclipse.jst.ws.internal.axis.consumption.ui.wsrt;x-internal:=true
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.resources,
- org.eclipse.emf.common,
- org.eclipse.emf.ecore,
- org.eclipse.jdt.core,
- org.eclipse.jem,
- org.eclipse.jem.util,
- org.eclipse.jem.workbench,
- org.eclipse.wst.ws.parser,
- org.eclipse.jst.ws.consumption.ui,
- org.eclipse.jst.ws,
- org.eclipse.jst.ws.axis.consumption.core,
- org.eclipse.jst.ws.ui,
- org.eclipse.jst.ws.consumption,
- org.eclipse.core.runtime.compatibility,
- org.eclipse.wst.command.env.core,
- org.eclipse.wst.command.env,
- org.eclipse.wst.command.env.ui,
- org.eclipse.wst.server.core,
- org.eclipse.wst.wsdl,
- org.eclipse.jst.j2ee,
- org.eclipse.jem.workbench,
- org.eclipse.wst.ws,
- org.eclipse.wst.common.modulecore,
- org.wsdl4j,
- org.apache.axis,
- org.eclipse.wst.common.frameworks,
- org.eclipse.wst.common.environment,
- com.ibm.icu
-Eclipse-LazyStart: true
-Plugin-Class: org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/about.html b/bundles/org.eclipse.jst.ws.axis.consumption.ui/about.html
deleted file mode 100644
index 6f6b96c4c..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/about.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/build.properties b/bundles/org.eclipse.jst.ws.axis.consumption.ui/build.properties
deleted file mode 100644
index c772b640e..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-bin.includes = .,\
- plugin.properties,\
- plugin.xml,\
- META-INF/,\
- about.html
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.properties b/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.properties
deleted file mode 100644
index 73587db3a..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.properties
+++ /dev/null
@@ -1,25 +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
-###############################################################################
-
-#
-# Messages in plugin.xml.
-#
-PLUGIN_NAME=Webservice Axis Consumption UI
-PLUGIN_PROVIDER=Eclipse.org
-
-WEBSERVICECLIENTTYPE_NAME_JAVA_AXIS=Java proxy
-LABEL_RUNTIME_AXIS_11=Apache Axis
-DESC_RUNTIME_AXIS_11=Apache Axis
-#
-# Web Services Preferance Pages
-#
-# Categories
-PREFERENCE_CATEGORY_AXIS_EMITTER=Axis Emitter
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml b/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml
deleted file mode 100644
index 8a19deec1..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/plugin.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
-
- <extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
- <widgetFactory
- id="AxisClientConfig"
- insertBeforeCommandId="org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand"
- class="org.eclipse.jst.ws.internal.axis.consumption.ui.wsrt.AxisClientConfigWidgetFactory"/>
- </extension>
- <extension
- point="org.eclipse.wst.command.env.antDataMapping">
- <map
- key="ClientProjectName"
- operation="org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientDefaultingCommand"
- property="ClientProject"
- transform="org.eclipse.jst.ws.internal.common.String2IProjectTransformer"/>
- <map
- key="CustomizeClientMappings"
- operation="org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientDefaultingCommand"
- property="CustomizeClientMappings"/>
- <map
- key="Mappings"
- operation="org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand"
- property="JavaWSDLParam"
- transform="org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParamModifier"/>
- <map
- key="Mappings"
- operation="org.eclipse.jst.ws.internal.axis.consumption.ui.command.DefaultsForClientJavaWSDLCommand"
- property="JavaWSDLParam"
- transform="org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParamModifier"/>
- <map
- key="Mappings"
- operation="org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand"
- property="JavaWSDLParam"
- transform="org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParamModifier"/>
- <map
- key="Mappings"
- operation="org.eclipse.jst.ws.internal.axis.consumption.ui.task.Stub2BeanCommand"
- property="JavaWSDLParam"
- transform="org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParamModifier"/>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PREFERENCE_CATEGORY_AXIS_EMITTER"
- category="org.eclipse.wst.ws.internal.ui.preferences.name"
- class="org.eclipse.jst.ws.internal.axis.consumption.ui.preferences.AxisEmitterPreferencePage"
- id="org.eclipse.jst.ws.internal.axis.consumption.ui.preferences.AxisEmitterPreferencePage">
- </page>
-
- </extension>
-</plugin> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUI.properties b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUI.properties
deleted file mode 100644
index e205e23d1..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUI.properties
+++ /dev/null
@@ -1,108 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2006 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
-# -------- -------- -----------------------------------------------------------
-# 20060216 126989 pmoogk@ca.ibm.com - Peter Moogk
-# 20060329 127016 andyzhai@ca.ibm.com - Andy Zhai
-###############################################################################
-
-#
-# Messages in plugin.xml.
-#
-
-MSG_ERROR_DEFAULT_BEAN=IWAB0491E Error encountered while setting up default values for Java bean
-MSG_ERROR_WSDL_NO_DEFINITION=IWAB0495E WSDL file at {0} has no definition element
-MSG_ERROR_WSDL_NO_PORT=IWAB0496E WSDL file at {0} has no port element
-MSG_ERROR_WRITE_WSDL=IWAB0497E Error in writing WSDL file {0}
-
-#
-# Messages for CopyClientWSDLTask
-#
-MSG_ERROR_IMPORT_WSDL=IWAB0531E Error in resolving WSDL file {0}, import WSDL file must have absolute URL or relative URL in the same directory
-
-
-#
-#DefaultsForClientJavaWSDLCommand
-#
-MSG_ERROR_WSDL_LOCATION_NOT_SET=IWAB0501E WSDL location not set.
-
-#
-#AddJarsToProjectBuildPathTask
-#
-MSG_WARN_NO_JAVA_NATURE=IWAB0502W The project is not a Java project.
-MSG_ERROR_BAD_BUILDPATH=IWAB0503E Unable to update Java build path. Please check your system environment.
-
-#
-#CopyAxisJarCommand
-#
-PROGRESS_INFO_COPY_AXIS_CFG=IWAB0505I Copying Axis jar files to web project.
-MSG_ERROR_FILECOPY=IWAB0506E Error when copying Axis jar files to web project
-
-#
-#RefreshProjectTask
-#
-MSG_ERROR_REFRESH_PROJECT=IWAB0508E Unable to refresh project.
-
-#
-#WebServiceAxisProxyPage
-#
-TOOLTIP_PWJB_PAGE=Page
-TOOLTIP_PWJB_TEXT_FOLDER=Folder for proxy to be generated for the selected binding.
-TOOLTIP_PWJB_CHECKBOX_GENPROXY=Check to enable/disable the generation of a proxy.
-
-PAGE_TITLE_WS_AXIS_PROXY=Web Service Proxy Page
-PAGE_DESC_WS_AXIS_PROXY=Select generate proxy if you want to generate proxy for your service.
-CHECKBOX_GENPROXY=Generate proxy
-LABEL_FOLDER_NAME=Output folder
-
-#
-# Messages for WebSerivceAxisMappingsPage
-#
-PAGE_TITLE_WS_BEAN2XML=Web Service Package to Namespace Mapping
-PAGE_TITLE_WS_XML2PROXY=Web Service Client Namespace to Package Mapping
-PAGE_DESC_P2N_MAPPINGS=Define custom mapping for package to namespace.
-
-
-LABEL_MAPPING_PAIRS=Mapping pairs
-TABLE_COLUMN_LABEL_PACKAGE=package
-TABLE_COLUMN_LABEL_NAMESPACE=namespace
-LABEL_EXPLORE_MAPPINGS_XML2BEAN=Define custom mapping for namespace to package.
-TOOLTIP_N2P_SHOW_MAPPINGS=Define namespace to package mapping for customization.
-
-#
-# Messages for CheckAxisDeploymentDescriptorsTask
-#
-MSG_ERROR_XML_FILE_OVERWRITE_DISABLED=IWAB0532E Do you want to overwrite the Apache Axis deployment descriptor?
-
-# Messages for Axis Emitter Preference Page
-TOOLTIP_PPAE_PAGE=Set preferences that control Axis Emitter.
-TOOLTIP_PPAE_CHECKBOX_ALL_WANTED=By default, code is generated only for referenced elements. \nCall bGenerateAll(true) and WSDL2Java will generate code \nfor all elements in the scope regardless of whether they are referenced. \nScope means: by default, all WSDL files; if generateImports(false),\nthen only the immediate WSDL file.
-TOOLTIP_PPAE_CHECKBOX_HELPER_WANTED=Emits separate Helper classes for meta data.
-TOOLTIP_PPAE_CHECKBOX_WRAP_ARRAYS=Prefers building beans to straight arrays for wrapped XML array types.
-TOOLTIP_PPAE_CHECKBOX_USE_INHERITED_METHODS=If this option is selected, the Java2WSDL parser will look into extended classes to determine the list of methods to export into the WSDL file.
-TOOLTIP_PPAE_COMBO_DEPLOY_SCOPE=Add scope to deploy.wsdd.
-TOOLTIP_PPAE_FIELD_TIME_OUT=Timeout in seconds (default is 45, specify -1 to disable).
-TOOLTIP_PPAE_GROUP_WSDL2JAVA=Set preferences for wsdl2java.
-TOOLTIP_PPAE_GROUP_JAVA2WSDL=Set preferences for java2wsdl.
-BUTTON_ALL_WANTED=&Generate code for all elements, even unreferenced ones.
-BUTTON_HELPER_WANTED=Emits separate &Helper classes for meta data.
-BUTTON_WRAP_ARRAYS=Prefers building beans to straight arrays for &wrapped XML array types.
-BUTTON_USE_INHERITED_METHODS=Look for allowed &methods in inherited class
-LABEL_DEPLOY_SCOPE=Add &scope to deploy.wsdd:
-LABEL_TIME_OUT=&Timeout in seconds:
-GROUP_WSDL2JAVA_NAME=Wsdl2Java
-GROUP_JAVA2WSDL_NAME=Java2Wsdl
-DEPLOY_SCOPE_APPLICATION=Application
-DEPLOY_SCOPE_REQUEST=Request
-DEPLOY_SCOPE_SESSION=Session
-MSG_ERROR_INVALID_TIME_OUT=Invalid timeout! Timeout should be positive integer or -1 to disable.
-MSG_USE_JVM_ARGUMENT_FOR_TIME_OUT=You are using the value of timeout from JVM arguments AxisWsdl2JavaTimeout which specifies timeout in milliseconds.
-
-
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUIMessages.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUIMessages.java
deleted file mode 100644
index a3c779c30..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/AxisConsumptionUIMessages.java
+++ /dev/null
@@ -1,78 +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
- * yyyymmdd bug Email and other contact information
- * -------- -------- -----------------------------------------------------------
- * 20060329 127016 andyzhai@ca.ibm.com - Andy Zhai
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class AxisConsumptionUIMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUI";//$NON-NLS-1$
-
- private AxisConsumptionUIMessages() {
- // Do not instantiate
- }
-
- public static String MSG_ERROR_DEFAULT_BEAN;
- public static String MSG_ERROR_WSDL_NO_DEFINITION;
- public static String MSG_ERROR_WSDL_NO_PORT;
- public static String MSG_ERROR_WRITE_WSDL;
- public static String MSG_ERROR_IMPORT_WSDL;
- public static String MSG_ERROR_WSDL_LOCATION_NOT_SET;
- public static String MSG_WARN_NO_JAVA_NATURE;
- public static String MSG_ERROR_BAD_BUILDPATH;
- public static String PROGRESS_INFO_COPY_AXIS_CFG;
- public static String MSG_ERROR_FILECOPY;
- public static String MSG_ERROR_REFRESH_PROJECT;
- public static String TOOLTIP_PWJB_PAGE;
- public static String TOOLTIP_PWJB_TEXT_FOLDER;
- public static String TOOLTIP_PWJB_CHECKBOX_GENPROXY;
- public static String PAGE_TITLE_WS_AXIS_PROXY;
- public static String PAGE_DESC_WS_AXIS_PROXY;
- public static String CHECKBOX_GENPROXY;
- public static String LABEL_FOLDER_NAME;
- public static String PAGE_TITLE_WS_BEAN2XML;
- public static String PAGE_TITLE_WS_XML2PROXY;
- public static String PAGE_DESC_P2N_MAPPINGS;
- public static String LABEL_MAPPING_PAIRS;
- public static String TABLE_COLUMN_LABEL_PACKAGE;
- public static String TABLE_COLUMN_LABEL_NAMESPACE;
- public static String LABEL_EXPLORE_MAPPINGS_XML2BEAN;
- public static String TOOLTIP_N2P_SHOW_MAPPINGS;
- public static String MSG_ERROR_XML_FILE_OVERWRITE_DISABLED;
- public static String TOOLTIP_PPAE_PAGE;
- public static String TOOLTIP_PPAE_CHECKBOX_ALL_WANTED;
- public static String TOOLTIP_PPAE_CHECKBOX_HELPER_WANTED;
- public static String TOOLTIP_PPAE_CHECKBOX_WRAP_ARRAYS;
- public static String TOOLTIP_PPAE_CHECKBOX_USE_INHERITED_METHODS;
- public static String TOOLTIP_PPAE_COMBO_DEPLOY_SCOPE;
- public static String TOOLTIP_PPAE_FIELD_TIME_OUT;
- public static String TOOLTIP_PPAE_GROUP_WSDL2JAVA;
- public static String TOOLTIP_PPAE_GROUP_JAVA2WSDL;
- public static String BUTTON_ALL_WANTED;
- public static String BUTTON_HELPER_WANTED;
- public static String BUTTON_WRAP_ARRAYS;
- public static String BUTTON_USE_INHERITED_METHODS;
- public static String LABEL_DEPLOY_SCOPE;
- public static String LABEL_TIME_OUT;
- public static String GROUP_WSDL2JAVA_NAME;
- public static String GROUP_JAVA2WSDL_NAME;
- public static String DEPLOY_SCOPE_APPLICATION;
- public static String DEPLOY_SCOPE_REQUEST;
- public static String DEPLOY_SCOPE_SESSION;
- public static String MSG_ERROR_INVALID_TIME_OUT;
- public static String MSG_USE_JVM_ARGUMENT_FOR_TIME_OUT;
- static {
- NLS.initializeMessages(BUNDLE_NAME, AxisConsumptionUIMessages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java
deleted file mode 100644
index 959002a71..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientDefaultingCommand.java
+++ /dev/null
@@ -1,263 +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.consumption.ui.command;
-
-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.common.ResourceUtils;
-import org.eclipse.jst.ws.internal.consumption.common.WSDLParserFactory;
-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.parser.wsil.WebServicesParser;
-
-/**
- *
- * AxisClientDefaultingCommand
- *
- */
-public class AxisClientDefaultingCommand extends AbstractDataModelOperation
-{
- private boolean isClientScenario_ = true;
- private boolean customizeMappings_ = false;
- private boolean generateProxy_ = true;
- private String clientRuntimeId_;
- private JavaWSDLParameter javaWSDLParam_;
- private IProject proxyProject_ = null;
- private IProject clientProjectEAR_ = null;
- private String wsdlURL_;
- private boolean testProxySelected_;
- private IServer clientExistingServer_;
- private String clientServer_;
- private boolean clientIsExistingServer_;
- private String proxyProjectFolder_;
- private WebServicesParser webServicesParser_;
- public AxisClientDefaultingCommand( )
- {
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IStatus status = Status.OK_STATUS;
-
- clientExistingServer_ = getServerFromServerLabel();
-// if (clientExistingServer_ != null) {
-// //TODO The following line should no longer be necessary.
-// clientExistingServer_.getServerType().getId();
-// } else {
-// //TODO get the factory id for the type.
-// }
- //javaWSDLParam
- javaWSDLParam_ = new JavaWSDLParameter();
-
- // proxyProjectFolber_
-
- webServicesParser_ = WSDLParserFactory.getWSDLParser();
- return status;
- }
-
- public void setClientRuntimeID(String clientRuntimeId) {
- clientRuntimeId_ = clientRuntimeId;
- }
-
- public String getClientRuntimeID() {
- return this.clientRuntimeId_;
- }
-
- /**
- * @return Returns the javaWSDLParam.
- */
- public JavaWSDLParameter getJavaWSDLParam() {
- return javaWSDLParam_;
- }
-
- /**
- * @return Returns the clientProject.
- */
- public IProject getClientProject() {
- return proxyProject_;
- }
-
- /**
- * @param clientProject
- * The clientProject to set.
- */
- public void setClientProject(IProject clientProject) {
- this.proxyProject_ = clientProject;
- }
-
- /**
- * @return Returns the clientProjectEAR.
- */
- public IProject getClientProjectEAR() {
- return clientProjectEAR_;
- }
-
- /**
- * @param clientProjectEAR
- * The clientProjectEAR to set.
- */
- public void setClientProjectEAR(IProject clientProjectEAR) {
- this.clientProjectEAR_ = clientProjectEAR;
- }
-
- /**
- * @return Returns the testProxySelected.
- */
- public boolean getTestProxySelected() {
- return testProxySelected_;
- }
-
- /**
- * @param testProxySelected
- * The testProxySelected to set.
- */
- public void setTestProxySelected(boolean testProxySelected) {
- this.testProxySelected_ = testProxySelected;
- }
-
- /**
- * @return Returns the wsdlURL.
- */
- public String getWsdlURL() {
- return wsdlURL_;
- }
-
- /**
- * @param wsdlURL
- * The wsdlURL to set.
- */
- public void setWsdlURL(String wsdlURL) {
- this.wsdlURL_ = wsdlURL;
- }
-
- /**
- * @return Returns the clientServer.
- */
- public IServer getClientExistingServer() {
- return clientExistingServer_;
- }
-
- /**
- * @param clientServer
- * The clientServer to set.
- */
- public void setClientServer(String clientServer) {
- this.clientServer_ = clientServer;
- }
-
- /**
- * @return Returns the clientIsExistingServer.
- */
- public boolean isClientIsExistingServer() {
- return clientIsExistingServer_;
- }
-
- /**
- * @param clientIsExistingServer
- * The clientIsExistingServer to set.
- */
- public void setClientIsExistingServer(boolean clientIsExistingServer) {
- this.clientIsExistingServer_ = clientIsExistingServer;
- }
-
- public boolean getCustomizeClientMappings() {
- return customizeMappings_;
- }
-
- public void setCustomizeClientMappings(boolean value) {
- customizeMappings_ = value;
- }
-
- private IServer getServerFromServerLabel() {
- if (true)
- // rsk revisit if (clientIsExistingServer_)
- {
- // Maybe this should be in WebServiceServerRuntimeTypeRegistry
- {
- IServer[] servers = ServerCore.getServers();
- if (servers != null && servers.length!=0) {
- for (int i = 0; i < servers.length; i++) {
- IServer server = (IServer) servers[i];
- if ((server.getName()).equals(clientServer_))
- return server;
- }
- }
- }
- //
- } else {
- //TODO create the server
- }
- return null;
- }
- /**
- * @return Returns the proxyProjectFolder.
- */
- public String getProxyProjectFolder() {
- if (proxyProject_!=null) {
- proxyProjectFolder_ = ResourceUtils.getJavaSourceLocation(proxyProject_ ).toString();
- }
- return proxyProjectFolder_;
- }
-
- /**
- * @return Returns the webServicesParser.
- */
- public WebServicesParser getWebServicesParser() {
- return webServicesParser_;
- }
- /**
- * @param webServicesParser The webServicesParser to set.
- */
- public void setWebServicesParser(WebServicesParser webServicesParser) {
- this.webServicesParser_ = webServicesParser;
- }
- /**
- * @return Returns the generateProxy.
- */
- public boolean getGenerateProxy() {
- return generateProxy_;
- }
- /**
- * @param generateProxy The generateProxy to set.
- */
- public void setGenerateProxy(boolean generateProxy) {
- this.generateProxy_ = generateProxy;
- }
-
- /**
- * @return Returns the isClientScenario_.
- */
- public boolean getIsClientScenario()
- {
- return isClientScenario_;
- }
-
- /**
- * @param isClientScenario_ The isClientScenario_ to set.
- */
- public void setIsClientScenario(boolean isClientScenario)
- {
- isClientScenario_ = isClientScenario;
- }
-
- /**
- * @param setEndpointMethod The setEndpointMethod to set.
- */
- public String getSetEndpointMethod()
- {
- return "setEndpoint";
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java
deleted file mode 100644
index 7c9edf127..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientInputCommand.java
+++ /dev/null
@@ -1,69 +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.consumption.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.parser.wsil.WebServicesParser;
-import org.eclipse.wst.ws.internal.wsrt.IContext;
-import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
-
-
-public class AxisClientInputCommand extends AbstractDataModelOperation {
-
- private IWebServiceClient wsc_;
-
- private String clientProject_ = null;
- private String wsdlURL_;
- private String clientServer_;
- private WebServicesParser webServicesParser_;
-
- /**
- * Default CTOR
- */
- public AxisClientInputCommand() {
- }
-
- public AxisClientInputCommand(IWebServiceClient wsc, IContext context, String project) {
- wsc_ = wsc;
- clientProject_ = project;
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- wsdlURL_ = wsc_.getWebServiceClientInfo().getWsdlURL();
- clientServer_ = wsc_.getWebServiceClientInfo().getServerInstanceId();
-
- return Status.OK_STATUS;
- }
-
- public String getClientServer() {
- return clientServer_;
- }
-
- public String getClientProject() {
- return clientProject_;
- }
-
- public WebServicesParser getWebServicesParser() {
- return webServicesParser_;
- }
-
- public String getWsdlURL() {
- return wsdlURL_;
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java
deleted file mode 100644
index 1f21ce548..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/AxisClientOutputCommand.java
+++ /dev/null
@@ -1,49 +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.consumption.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.IContext;
-import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
-
-
-public class AxisClientOutputCommand extends AbstractDataModelOperation {
-
- private IWebServiceClient wsc_;
- private String proxyBean_;
-
- /**
- * Default CTOR
- */
- public AxisClientOutputCommand() {
- }
-
- public AxisClientOutputCommand(IWebServiceClient wsc, IContext context) {
- wsc_ = wsc;
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- wsc_.getWebServiceClientInfo().setImplURL(proxyBean_);
- return Status.OK_STATUS;
- }
-
- public void setProxyBean(String proxyBean) {
- this.proxyBean_ = proxyBean;
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java
deleted file mode 100644
index df0689420..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/CopyClientWSDLCommand.java
+++ /dev/null
@@ -1,178 +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.consumption.ui.command;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.xml.WSDLWriter;
-
-import org.eclipse.core.resources.IWorkspaceRoot;
-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.ui.AxisConsumptionUIMessages;
-import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
-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 CopyClientWSDLCommand extends AbstractDataModelOperation
-{
-
- private String wsdlURL_;
- private String clientWSDLPathName_;
- private WebServicesParser wsParser_;
-
- public CopyClientWSDLCommand()
- {
-
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment env = getEnvironment();
- IStatus status = Status.OK_STATUS;
- Definition def = wsParser_.getWSDLDefinition(wsdlURL_);
- if(def==null)
- {
- status = StatusUtils.errorStatus( NLS.bind(AxisConsumptionUIMessages.MSG_ERROR_WSDL_NO_DEFINITION, new String[]{wsdlURL_}));
- env.getStatusHandler().reportError(status);
- return status;
- }
- IPath clientWSDLPath = new Path(clientWSDLPathName_);
- IWorkspaceRoot workspaceRoot = FileResourceUtils.getWorkspaceRoot();
- status = resolveWSDL(workspaceRoot, def, clientWSDLPath, env, monitor);
- return status;
- }
-
- private IStatus resolveWSDL(
- IWorkspaceRoot workspace,
- Definition wsdlDef,
- IPath wsdlPath,
- IEnvironment env,
- IProgressMonitor monitor) {
- try {
- writeWSDLFile(workspace, wsdlDef, wsdlPath, env, monitor);
- Map importDefs = wsdlDef.getImports();
- Set keysSet = importDefs.keySet();
- for (Iterator e = keysSet.iterator(); e.hasNext();) {
- Object keyName = e.next();
- Vector vector = (Vector) importDefs.get(keyName);
- for (int i = 0; i < vector.size(); i++) {
- Import importDef = (Import) vector.get(i);
- Definition def = importDef.getDefinition();
- String newPathString =
- wsdlPath.toString().substring(
- 0,
- wsdlPath.toString().lastIndexOf("/") + 1); //$NON-NLS-1$
- if (isInvalidImportWSDL(importDef.getLocationURI())) {
- return StatusUtils.errorStatus( NLS.bind(AxisConsumptionUIMessages.MSG_ERROR_IMPORT_WSDL,new String[]{importDef.getLocationURI()}));
- }
- IPath newPath =
- new Path(newPathString + importDef.getLocationURI());
- IStatus status = resolveWSDL(workspace, def, newPath, env, monitor);
- if (status != null
- && status.getSeverity() == Status.ERROR) {
- return status;
- }
- }
- }
- } catch (Exception e) {
- return StatusUtils.errorStatus( NLS.bind(AxisConsumptionUIMessages.MSG_ERROR_WRITE_WSDL,new String[] { wsdlPath.toString() }), e);
- }
- return Status.OK_STATUS;
- }
-
- private boolean isInvalidImportWSDL(String wsdlPath) {
-
- // relative url
- if (!wsdlPath.toLowerCase().startsWith("http://")) { //$NON-NLS-1$
-
- if (wsdlPath.indexOf("/") != -1) { //$NON-NLS-1$
- if (!wsdlPath.startsWith("./")) { //$NON-NLS-1$
- return true;
- }
- }
-
- }
- return false;
- }
-
- private void writeWSDLFile(
- IWorkspaceRoot workspace,
- Definition wsdlDef,
- IPath wsdlPath,
- IEnvironment env,
- IProgressMonitor monitor)
- throws Exception {
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- //WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- //WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
- WSDLWriter wsdlWriter = (new org.eclipse.wst.wsdl.internal.impl.wsdl4j.WSDLFactoryImpl()).newWSDLWriter();
- wsdlWriter.writeWSDL(wsdlDef, baos);
- byte[] b = baos.toByteArray();
- ByteArrayInputStream bais = new ByteArrayInputStream(b);
-
- ResourceContext context =
- WebServicePlugin.getInstance().getResourceContext();
- FileResourceUtils.createFile(
- context,
- wsdlPath.makeAbsolute(),
- bais,
- monitor,
- env.getStatusHandler());
-
- baos.close();
- bais.close();
-
- }
-
- /**
- * @param clientWSDLPathName_ The clientWSDLPathName_ to set.
- */
- public void setClientWSDLPathName(String clientWSDLPathName)
- {
- this.clientWSDLPathName_ = clientWSDLPathName;
- }
- /**
- * @param wsdlURL_ The wsdlURL_ to set.
- */
- public void setWsdlURL(String wsdlURL)
- {
- this.wsdlURL_ = wsdlURL;
- }
- /**
- * @param wsParser_ The wsParser_ to set.
- */
- public void setWsParser(WebServicesParser wsParser)
- {
- this.wsParser_ = wsParser;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java
deleted file mode 100644
index 7881c7e64..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/command/DefaultsForClientJavaWSDLCommand.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.ui.command;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-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.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-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.PlatformUtils;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-
-public class DefaultsForClientJavaWSDLCommand extends AbstractDataModelOperation
-{
- private JavaWSDLParameter javaWSDLParam_;
- private IProject proxyProject_;
- private String WSDLServiceURL_;
- private String WSDLServicePathname_;
- private String outputFolder_;
-
- public DefaultsForClientJavaWSDLCommand()
- {
- }
-
- public IStatus execute(IProgressMonitor monitor, IAdaptable adaptable)
- {
- IEnvironment environment = getEnvironment();
- IStatus status;
-
- if( outputFolder_ == null )
- {
- IPath[] paths = ResourceUtils.getAllJavaSourceLocations(proxyProject_);
- outputFolder_ = paths[0].toString();
- }
-
- if (javaWSDLParam_ == null)
- {
- status = StatusUtils
- .errorStatus(AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
- environment.getStatusHandler().reportError(status);
- return status;
- }
- javaWSDLParam_.setMetaInfOnly(false);
- javaWSDLParam_.setServerSide(JavaWSDLParameter.SERVER_SIDE_NONE);
- ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(proxyProject_);
- if (mn != null)
- {
- IPath webModuleServerRoot = ResourceUtils.getJavaSourceLocation(proxyProject_);
- // String output = PlatformUtils.getPlatformURL(webModuleServerRoot);
- String output = ResourceUtils.findResource(webModuleServerRoot).getLocation().toString();
- // String output =
- // ResourceUtils.getWorkspaceRoot().getFolder(webModuleServerRoot).getLocation().toString();
- IPath javaOutput = ResourceUtils.findResource( new Path( outputFolder_ )).getLocation();
- javaWSDLParam_.setJavaOutput(javaOutput.toString());
-
- IFolder webModuleContainer = ResourceUtils.getWebComponentServerRoot(proxyProject_);
- if (webModuleContainer != null)
- {
- IPath webModulePath = webModuleContainer.getFullPath();
- // output = PlatformUtils.getPlatformURL(webModulePath);
- IResource res = ResourceUtils.findResource(webModulePath);
- if (res != null)
- {
- output = res.getLocation().toString();
- }
- javaWSDLParam_.setOutput(output);
- }
- }
- else
- {
- // Check if it's a plain old Java project
- IJavaProject javaProject = null;
- javaProject = JavaCore.create(proxyProject_);
- if (javaProject != null)
- {
- IPath output = ResourceUtils.findResource( new Path( outputFolder_ )).getLocation();
- javaWSDLParam_.setJavaOutput(output.toString());
- javaWSDLParam_.setOutput(output.toString());
- }
- else
- {
- // Not familiar with this kind of project
- status = StatusUtils.errorStatus(AxisConsumptionUIMessages.MSG_WARN_NO_JAVA_NATURE);
- environment.getStatusHandler().reportError(status);
- return status;
- }
- }
- if (WSDLServicePathname_ == null)
- {
- if (WSDLServiceURL_ == null)
- {
- status = StatusUtils.errorStatus(AxisConsumptionUIMessages.MSG_ERROR_WSDL_LOCATION_NOT_SET);
- environment.getStatusHandler().reportError(status);
- return status;
- }
- }
- else
- {
- WSDLServiceURL_ = PlatformUtils.getFileFromPlatform(WSDLServicePathname_);
- }
- javaWSDLParam_.setInputWsdlLocation(WSDLServiceURL_);
- 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 proxyProject_
- * The proxyProject_ to set.
- */
- public void setProxyProject(IProject proxyProject)
- {
- this.proxyProject_ = proxyProject;
- }
-
- /**
- * @param serviceURL_
- * The wSDLServiceURL_ to set.
- */
- public void setWSDLServiceURL(String serviceURL)
- {
- WSDLServiceURL_ = serviceURL;
- }
-
- /**
- * @param servicePathname_
- * The wSDLServicePathname_ to set.
- */
- public void setWSDLServicePathname(String servicePathname)
- {
- WSDLServicePathname_ = servicePathname;
- }
-
- public String getOutputFolder()
- {
- return outputFolder_;
- }
-
- public void setOutputFolder(String outputFolder)
- {
- outputFolder_ = outputFolder;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/plugin/WebServiceAxisConsumptionUIPlugin.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/plugin/WebServiceAxisConsumptionUIPlugin.java
deleted file mode 100644
index d7eb402eb..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/plugin/WebServiceAxisConsumptionUIPlugin.java
+++ /dev/null
@@ -1,105 +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.consumption.ui.plugin;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Plugin;
-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 WebServiceAxisConsumptionUIPlugin extends Plugin
-{
-
- /**
- * The identifier of the descriptor of this plugin in plugin.xml.
- */
- public static final String ID =
- "org.eclipse.jst.ws.axis.consumption.ui";
-
- /**
- * The reference to the singleton instance of this plugin.
- */
- private static WebServiceAxisConsumptionUIPlugin 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 WebServiceAxisConsumptionUIPlugin() {
- 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
- * (WebServiceWasConsumptionPlugin)Platform.getPlugin("org.eclipse.jst.ws.was.v5.tp");
- * @return The WebServiceWasConsumptionPlugin singleton.
- */
- static public WebServiceAxisConsumptionUIPlugin 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 bundle ) throws CoreException {
- log_.log(ILog.INFO, 5066, this, "start", "Starting plugin org.eclipse.jst.ws.axis.consumption.ui");
-
- try
- {
- super.start( bundle );
- }
- catch( Exception exc )
- {
- log_.log( ILog.ERROR, 5066, this, "start", exc );
- }
- }
-
- /**
- * 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, 5067, this, "shutdown", "Shutting plugin org.eclipse.jst.ws.axis.consumption.ui");
-
- try
- {
- super.stop( context );
- }
- catch( Exception exc )
- {
- log_.log( ILog.ERROR, 5066, this, "stop", exc );
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/preferences/AxisEmitterPreferencePage.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/preferences/AxisEmitterPreferencePage.java
deleted file mode 100644
index 31a4e8d87..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/preferences/AxisEmitterPreferencePage.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060329 127016 andyzhai@ca.ibm.com - Andy Zhai
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.ui.preferences;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.DialogPage;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.preference.PreferencePage;
-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.axis.consumption.ui.AxisConsumptionUIMessages;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin;
-import org.eclipse.jst.ws.internal.ui.common.UIUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.help.IWorkbenchHelpSystem;
-
-
-
-public class AxisEmitterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage
-{
- /*CONTEXT_ID PPAE0001 for the Axis Emitter Preference Page*/
- private String INFOPOP_PPAE_PAGE = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0001";
- //
- private Button allWanted;
- /*CONTEXT_ID PPAE0002 for the all wanted check box on the Axis Emitter Preference Page*/
- private String INFOPOP_PPAE_CHECKBOX_ALL_WANTED = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0002";
- //
- private Button helperWanted;
- /*CONTEXT_ID PPAE0003 for helper wanted check box on the Axis Emitter Preference Page*/
- private String INFOPOP_PPAE_CHECKBOX_HELPER_WANTED = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0003";
- //
- private Button wrapArrays;
- /*CONTEXT_ID PPAE0004 for the wrap arrays check box on the Axis Emitter Preference Page*/
- private String INFOPOP_PPAE_CHECKBOX_WRAP_ARRAYS = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0004";
-
- private Combo deployScopeTypes;
- //*CONTEXT_ID PPAE0005 for the deploy scope type combo box on the Axis Emitter page*/
- private String INFOPOP_PPAE_COMBO_DEPLOY_SCOPE = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0005";
-
- private Text timeOutField;
- int timeOut;
- String wsdl2JavaTimeoutProperty = System.getProperty("AxisWsdl2JavaTimeout");
-
- private Label timeOutPropertyLabel;
- /*CONTEXT_ID PPAE0006 for the time out field on the Axis Emitter Preference page*/
- private String INFOPOP_PPAE_FIELD_TIME_OUT = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0006";
-
- private Button useInheritedMethods;
- /*CONTEXT_ID PPAE0007 for the use inherited methods check box on the Axis Emitter Preference page*/
- private String INFOPOP_PPAE_CHECKBOX_USE_INHERITED_METHODS = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0007";
-
- /*CONTEXT_ID PPAE0008 for the wsdl2java group on the Axis Emitter Preference page*/
- private String INFOPOP_PPAE_GROUP_WSDL2JAVA = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0008";
- /*CONTEXT_ID PPAE0009 for the java2wsdl group on the Axis Emitter Preference page*/
- private String INFOPOP_PPAE_GROUP_JAVA2WSDL = WebServiceAxisConsumptionUIPlugin.ID + ".PPAE0009";
-
-
- /**
- * Creates preference page controls on demand.
- * @param parent the parent for the preference page
- */
- protected Control createContents(Composite superparent)
- {
- UIUtils utils = new UIUtils( WebServiceAxisConsumptionUIPlugin.ID );
- IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
-
- Composite parent = new Composite( superparent, SWT.NONE );
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- parent.setLayout( layout );
- parent.setToolTipText(AxisConsumptionUIMessages.TOOLTIP_PPAE_PAGE);
- helpSystem.setHelp(parent, INFOPOP_PPAE_PAGE);
- Group wsdl2JavaGroup = utils.createGroup(parent, AxisConsumptionUIMessages.GROUP_WSDL2JAVA_NAME, AxisConsumptionUIMessages.TOOLTIP_PPAE_GROUP_WSDL2JAVA, INFOPOP_PPAE_GROUP_WSDL2JAVA, 2, 10,10);
- allWanted = createCheckBox(wsdl2JavaGroup, AxisConsumptionUIMessages.BUTTON_ALL_WANTED,AxisConsumptionUIMessages.TOOLTIP_PPAE_CHECKBOX_ALL_WANTED,INFOPOP_PPAE_CHECKBOX_ALL_WANTED);
-
- helperWanted = createCheckBox(wsdl2JavaGroup, AxisConsumptionUIMessages.BUTTON_HELPER_WANTED,AxisConsumptionUIMessages.TOOLTIP_PPAE_CHECKBOX_HELPER_WANTED,INFOPOP_PPAE_CHECKBOX_HELPER_WANTED);
-
- wrapArrays = createCheckBox(wsdl2JavaGroup, AxisConsumptionUIMessages.BUTTON_WRAP_ARRAYS,AxisConsumptionUIMessages.TOOLTIP_PPAE_CHECKBOX_WRAP_ARRAYS,INFOPOP_PPAE_CHECKBOX_WRAP_ARRAYS);
-
- deployScopeTypes = utils.createCombo(wsdl2JavaGroup, AxisConsumptionUIMessages.LABEL_DEPLOY_SCOPE, AxisConsumptionUIMessages.TOOLTIP_PPAE_COMBO_DEPLOY_SCOPE, INFOPOP_PPAE_COMBO_DEPLOY_SCOPE, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- /*
- * Ensure the order is the same as it in the fields for class
- * org.eclipse.jst.ws.internal.axis.consumption.core.context.AxisEmitterContext
- */
- deployScopeTypes.setItems(new String []{AxisConsumptionUIMessages.DEPLOY_SCOPE_APPLICATION, AxisConsumptionUIMessages.DEPLOY_SCOPE_REQUEST,AxisConsumptionUIMessages.DEPLOY_SCOPE_SESSION});
-
- timeOutField = createTextField(wsdl2JavaGroup,AxisConsumptionUIMessages.LABEL_TIME_OUT,AxisConsumptionUIMessages.TOOLTIP_PPAE_FIELD_TIME_OUT,INFOPOP_PPAE_FIELD_TIME_OUT);
- timeOutPropertyLabel = new Label(wsdl2JavaGroup, SWT.NONE);
-
- Group java2WsdlGroup = utils.createGroup(parent, AxisConsumptionUIMessages.GROUP_JAVA2WSDL_NAME, AxisConsumptionUIMessages.TOOLTIP_PPAE_GROUP_JAVA2WSDL, INFOPOP_PPAE_GROUP_JAVA2WSDL, 2, 10,10);
- useInheritedMethods = createCheckBox(java2WsdlGroup, AxisConsumptionUIMessages.BUTTON_USE_INHERITED_METHODS,AxisConsumptionUIMessages.TOOLTIP_PPAE_CHECKBOX_USE_INHERITED_METHODS,INFOPOP_PPAE_CHECKBOX_USE_INHERITED_METHODS);
-
- initializeValues();
- org.eclipse.jface.dialogs.Dialog.applyDialogFont(superparent);
-
- return parent;
- }
-
- /**
- * Creates checkbox with horizontalSpan = 2 in its grid data in order to
- * match the grid layout for combo
- */
- private Button createCheckBox( Composite parent, String labelName, String tooltip, String infopop )
- {
- Button button = new Button( parent, SWT.CHECK );
- button.setText(labelName);
- button.setToolTipText( tooltip );
- if( infopop != null ) PlatformUI.getWorkbench().getHelpSystem().setHelp( button, WebServiceAxisConsumptionUIPlugin.ID + "." + infopop );
- GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan= 2;
- button.setLayoutData(gd);
- return button;
- }
-
- private Text createTextField(Composite parent,String labelName, String tooltip, String infopop)
- { tooltip = tooltip == null ? labelName : tooltip;
- if( labelName != null )
- {
- Label label = new Label( parent, SWT.WRAP);
- label.setText( labelName );
- label.setToolTipText( tooltip );
- }
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- text.setLayoutData(data);
- text.setToolTipText(tooltip);
- if( infopop != null ) PlatformUI.getWorkbench().getHelpSystem().setHelp( text, WebServiceAxisConsumptionUIPlugin.ID + "." + infopop );
-
- text.addModifyListener( new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- numberFieldChanged((Text) e.widget);
- }
- }
- );
- return text;
- }
-
- /**
- * Does anything necessary because the default button has been pressed.
- */
- protected void performDefaults()
- {
- super.performDefaults();
- initializeDefaults();
- }
-
- /**
- * Do anything necessary because the OK button has been pressed.
- * @return whether it is okay to close the preference page
- */
- public boolean performOk()
- {
- if(validateNumber(timeOutField.getText()).isOK())
- storeValues();
- return true;
- }
-
- protected void performApply()
- {
- performOk();
- }
-
- /**
- * @see IWorkbenchPreferencePage
- */
- public void init(IWorkbench workbench) { }
-
- /**
- * Initializes states of the controls using default values
- * in the preference store.
- */
- private void initializeDefaults()
- {
- allWanted.setSelection( AxisEmitterDefaults.getAllWantedDefault());
- helperWanted.setSelection( AxisEmitterDefaults.getHelperWantedDefault());
- wrapArrays.setSelection( AxisEmitterDefaults.getWrapArraysDefault());
- deployScopeTypes.select(AxisEmitterDefaults.getDeployScopeDefault());
- if (wsdl2JavaTimeoutProperty != null) timeOutField.setText(""+ getTimeOutValueWithProperty());
- else timeOutField.setText("" + AxisEmitterDefaults.getTimeOutDefault());
- useInheritedMethods.setSelection(AxisEmitterDefaults.getUseInheritedMethodsDefault());
- }
-
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues()
- {
- // get the persistent context from the plugin
- AxisEmitterContext context = WebServiceAxisConsumptionCorePlugin.getInstance().getAxisEmitterContext();
- allWanted.setSelection( context.isAllWantedEnabled());
- helperWanted.setSelection( context.isHelperWantedEnabled());
- wrapArrays.setSelection( context.isWrapArraysEnabled());
- deployScopeTypes.select(context.getDeployScopeType());
- useInheritedMethods.setSelection( context.isUseInheritedMethodsEnabled());
- if (wsdl2JavaTimeoutProperty != null)
- { timeOut=getTimeOutValueWithProperty();
- timeOutField.setEnabled(false);
- timeOutPropertyLabel.setText(AxisConsumptionUIMessages.MSG_USE_JVM_ARGUMENT_FOR_TIME_OUT);
- }
- else
- {
- timeOut = context.getTimeOut();
- }
- timeOutField.setText(""+ timeOut);
- }
-
- /**
- * Stores the values of the controls back to the preference store.
- */
- private void storeValues()
- {
- // get the persistent context from the plugin
- AxisEmitterContext context = WebServiceAxisConsumptionCorePlugin.getInstance().getAxisEmitterContext();
- context.setAllWantedEnabled( allWanted.getSelection() );
- context.setHelperWantedEnabled( helperWanted.getSelection() );
- context.setWrapArraysEnabled( wrapArrays.getSelection() );
- context.selectDeployScopeType(deployScopeTypes.getSelectionIndex());
- timeOut = Integer.parseInt(timeOutField.getText().trim());
- context.setTimeOut(timeOut);
- context.setUseInheritedMethodsEnabled( useInheritedMethods.getSelection() );
- }
-
- private void numberFieldChanged(Text textControl) {
- IStatus status = validateNumber(textControl.getText());
- setValid(!status.matches(IStatus.ERROR));
- applyToStatusLine(this,status);
- }
-
- private int getTimeOutValueWithProperty()
- {
- if (wsdl2JavaTimeoutProperty != null)
- { long timeOutProperty = new Integer(wsdl2JavaTimeoutProperty).longValue();
- if (timeOutProperty < 0) return -1; // timeout = -1 equals never time out; treating all negative number as -1
- else return (int)Math.ceil(timeOutProperty/1000.0);
- }
- else return AxisEmitterDefaults.getTimeOutDefault();
- }
-
- private IStatus validateNumber(String numberString)
- {
- IStatus status;
- try
- {
- int number = Integer.parseInt(numberString);
- if (number <= 0 && number != -1)
- {
- status = new Status(IStatus.ERROR, WebServiceAxisConsumptionUIPlugin.ID, IStatus.ERROR,
- AxisConsumptionUIMessages.MSG_ERROR_INVALID_TIME_OUT, null);
- }
- else
- { timeOut = number;
- status = Status.OK_STATUS;
- //we set param:message="" here, Later in
- //applyToStatusLine(), we do page.setMessage(null,type)
- status = new Status(IStatus.OK, WebServiceAxisConsumptionUIPlugin.ID, IStatus.OK, "",null);
- }
- }
- catch
- (NumberFormatException e)
- {
- status = new Status(IStatus.ERROR, WebServiceAxisConsumptionUIPlugin.ID, IStatus.ERROR,
- AxisConsumptionUIMessages.MSG_ERROR_INVALID_TIME_OUT, null);
- }
- return status;
- }
-
- private void applyToStatusLine(DialogPage page, IStatus status) {
- String message= status.getMessage();
- switch (status.getSeverity()) {
- case IStatus.OK:
- page.setMessage(null, IMessageProvider.NONE);
- page.setErrorMessage(null);
- break;
- case IStatus.WARNING:
- page.setMessage(message, IMessageProvider.WARNING);
- page.setErrorMessage(null);
- break;
- case IStatus.INFO:
- page.setMessage(message, IMessageProvider.INFORMATION);
- page.setErrorMessage(null);
- break;
- default:
- if (message.length() == 0) {
- message= null;
- }
- page.setMessage(null);
- page.setErrorMessage(message);
- break;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java
deleted file mode 100644
index 3c87e5105..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CheckAxisDeploymentDescriptorsTask.java
+++ /dev/null
@@ -1,81 +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.consumption.ui.task;
-
-import org.eclipse.core.resources.IFile;
-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.AxisConsumptionCoreMessages;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.command.internal.env.ui.eclipse.EnvironmentUtils;
-import org.eclipse.wst.common.environment.IEnvironment;
-import org.eclipse.wst.common.environment.StatusException;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-
-public class CheckAxisDeploymentDescriptorsTask extends AbstractDataModelOperation {
-
- private IProject serverProject;
-
- public CheckAxisDeploymentDescriptorsTask( )
- {
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment env = getEnvironment();
- IStatus status = Status.OK_STATUS;
- if(EnvironmentUtils.getResourceContext(env).isOverwriteFilesEnabled()) {
- return status;
- }
-
- IPath filePath = null;
- IProject project = serverProject;
-
-
- filePath = J2EEUtils.getWebInfPath( project );
- filePath = filePath.append("/server-config.wsdd");
-
- if(filePath==null || filePath.isEmpty())
- {
- status = StatusUtils.errorStatus( AxisConsumptionCoreMessages.MSG_ERROR_JAVA_WSDL_PARAM_NOT_SET);
- env.getStatusHandler().reportError(status);
- return status;
- }
-
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- if (file.exists() && !EnvironmentUtils.getResourceContext(env).isOverwriteFilesEnabled()) {
- status = StatusUtils.warningStatus( AxisConsumptionUIMessages.MSG_ERROR_XML_FILE_OVERWRITE_DISABLED);
- try
- {
- env.getStatusHandler().report(status);
- }
- catch(StatusException se)
- {
- status = StatusUtils.errorStatus( "User aborted");
- }
-
- return status;
- }
- return status;
- }
-
- public void setServerProject(IProject serverProject)
- {
- this.serverProject = serverProject;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java
deleted file mode 100644
index 768fb9161..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java
+++ /dev/null
@@ -1,298 +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.consumption.ui.task;
-
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-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.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.plugin.WebServiceAxisConsumptionUIPlugin;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.jst.ws.internal.consumption.ConsumptionMessages;
-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.core.context.TransientResourceContext;
-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 CopyAxisJarCommand extends AbstractDataModelOperation {
-
- public static String AXIS_RUNTIME_PLUGIN_ID = "org.apache.axis"; //$NON-NLS-1$
- public static String[] JARLIST = new String[] {
- "axis.jar",
- "commons-discovery-0.2.jar",
- "commons-logging-1.0.4.jar",
- "jaxrpc.jar",
- "saaj.jar",
- "wsdl4j-1.5.1.jar"
- };
- public static String PATH_TO_JARS_IN_PLUGIN = "lib/";
-
- private IProject project;
- private Boolean projectRestartRequired_ = Boolean.FALSE;
-
- /**
- * Default CTOR;
- */
- public CopyAxisJarCommand( ) {
- }
-
- /**
- * Execute the command
- */
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment env = getEnvironment();
- IStatus status = Status.OK_STATUS;
- ProgressUtils.report(monitor, AxisConsumptionUIMessages.PROGRESS_INFO_COPY_AXIS_CFG);
-
- if (J2EEUtils.isWebComponent(project))
- {
- copyAxisJarsToProject(project, status, env, monitor);
- }
- else
- {
- //Check if it's a plain old Java project
- if (J2EEUtils.isJavaComponent(project))
- {
- status = addAxisJarsToBuildPath(project, env, monitor);
- if (status.getSeverity()==Status.ERROR)
- {
- env.getStatusHandler().reportError(status);
- return status;
- }
- }
- else
- {
- status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_WARN_NO_JAVA_NATURE);
- env.getStatusHandler().reportError(status);
- return status;
- }
-
- }
-
- return status;
-
- }
-
- private void copyAxisJarsToProject(IProject project, IStatus status, IEnvironment env, IProgressMonitor monitor) {
-// IPath webModulePath = ResourceUtils.getWebModuleServerRoot(project).getFullPath();
- IPath webModulePath = J2EEUtils.getWebContentPath( project );
- if (webModulePath == null) {
- status = StatusUtils.errorStatus( ConsumptionMessages.MSG_ERROR_PROJECT_NOT_FOUND);
- env.getStatusHandler().reportError(status);
- return;
- }
-
- for (int i=0; i<JARLIST.length; ) {
- copyIFile("lib/"+JARLIST[i], webModulePath, "WEB-INF/lib/"+JARLIST[i++], status, env, monitor);
- if (status.getSeverity() == Status.ERROR)
- return;
- }
- return;
- }
-
- /**
- *
- */
- private void copyIFile(String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) {
- IPath target = targetPath.append(new Path(targetFile));
- ProgressUtils.report(monitor,ConsumptionMessages.PROGRESS_INFO_COPYING_FILE);
-
- try {
- ResourceContext context = new TransientResourceContext();
- context.setOverwriteFilesEnabled(true);
- context.setCreateFoldersEnabled(true);
- context.setCheckoutFilesEnabled(true);
- URL sourceURL = BundleUtils.getURLFromBundle( AXIS_RUNTIME_PLUGIN_ID, source );
- IFile resource = ResourceUtils.getWorkspaceRoot().getFile(target);
- if (!resource.exists()) {
- IFile file = FileResourceUtils.createFile(context, target, sourceURL.openStream(), monitor,
- env.getStatusHandler());
- if (projectRestartRequired_.booleanValue() == false && file.exists()) {
- projectRestartRequired_ = Boolean.TRUE;
- }
-
- }
- }
- catch (Exception e) {
- status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_ERROR_FILECOPY, e);
- env.getStatusHandler().reportError(status);
-
- }
- }
-
- public IStatus addAxisJarsToBuildPath(IProject p, IEnvironment env, IProgressMonitor monitor)
- {
- String[] jarNames = new String[JARLIST.length];
- for (int i=0; i<JARLIST.length; i++)
- {
- StringBuffer sb = new StringBuffer();
- sb.append(PATH_TO_JARS_IN_PLUGIN);
- sb.append(JARLIST[i]);
- String jarName = sb.toString();
- jarNames[i] = jarName;
- }
-
- IStatus status = addJar(p, AXIS_RUNTIME_PLUGIN_ID, jarNames, env, monitor);
- if (status.getSeverity()==Status.ERROR)
- {
- return status;
- }
- return Status.OK_STATUS;
- }
-
-
- private IStatus addJar(IProject webProject, String pluginId, String[] jarNames, IEnvironment env, IProgressMonitor monitor)
- {
-
- IStatus status = Status.OK_STATUS;
- //
- // Get the current classpath.
- //
- IJavaProject javaProject_ = null;
- IClasspathEntry[] oldClasspath = null;
- javaProject_ = JavaCore.create(webProject);
- try
- {
- oldClasspath = javaProject_.getRawClasspath();
- } catch (JavaModelException jme)
- {
- status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_ERROR_BAD_BUILDPATH, jme);
- // env.getStatusHandler().reportError(status);
- return status;
- }
-
- ArrayList newJarNamesList = new ArrayList();
-
- for (int k = 0; k < jarNames.length; k++)
- {
- boolean found = false;
- for (int i = 0; i < oldClasspath.length; i++)
- {
- found = oldClasspath[i].getPath().toString().toLowerCase().endsWith(jarNames[k].toLowerCase());
- if (found)
- {
- break;
- }
- }
-
- if (!found)
- {
- newJarNamesList.add(jarNames[k]);
- }
- }
-
- if (newJarNamesList.size() > 0)
- {
- String[] newJarNames = (String[]) newJarNamesList.toArray(new String[] {});
-
- IClasspathEntry[] newClasspath = new IClasspathEntry[oldClasspath.length + newJarNames.length];
- int i = 0;
- while (i < oldClasspath.length)
- {
- newClasspath[i] = oldClasspath[i];
- i++;
- }
-
- try
- {
- int m = 0;
- while (i < newClasspath.length)
- {
- newClasspath[i] = JavaCore.newLibraryEntry(getTheJarPath(pluginId, newJarNames[m]), null, null);
- m++;
- i++;
- }
- } catch (CoreException e)
- {
- status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_ERROR_BAD_BUILDPATH, e);
- return status;
- }
-
- //
- // Then update the project classpath.
- //
- try
- {
- javaProject_.setRawClasspath(newClasspath, monitor);
- } catch (JavaModelException e)
- {
- status = StatusUtils.errorStatus(AxisConsumptionUIMessages.MSG_ERROR_BAD_BUILDPATH, e);
- return status;
- }
- }
-
- return status;
-
- }
-
- //
- // Returns the local native pathname of the jar.
- //
- private IPath getTheJarPath(String pluginId, String theJar)
- throws CoreException {
- try {
- if (pluginId != null) {
- URL localURL = Platform.asLocalURL(BundleUtils.getURLFromBundle( pluginId, theJar ) );
- return new Path(localURL.getFile());
- } else {
- return new Path(theJar);
- }
- } catch (MalformedURLException e) {
- throw new CoreException(
- new org.eclipse.core.runtime.Status(
- IStatus.WARNING,
- WebServiceAxisConsumptionUIPlugin.ID,
- 0,
- AxisConsumptionUIMessages.MSG_ERROR_BAD_BUILDPATH,
- e));
- } catch (IOException e) {
- throw new CoreException(
- new org.eclipse.core.runtime.Status(
- IStatus.WARNING,
- WebServiceAxisConsumptionUIPlugin.ID,
- 0,
- AxisConsumptionUIMessages.MSG_ERROR_BAD_BUILDPATH,
- e));
- }
- }
-
- public void setProject(IProject project) {
- this.project = project;
- }
-
- public boolean getProjectRestartRequired() {
- return projectRestartRequired_.booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java
deleted file mode 100644
index 0a6c00e75..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java
+++ /dev/null
@@ -1,130 +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.consumption.ui.task;
-
-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.consumption.ui.wsil.DialogWWWAuthentication;
-import org.eclipse.ui.PlatformUI;
-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.WWWAuthenticationException;
-import org.eclipse.wst.ws.internal.parser.wsil.WebServiceEntity;
-import org.eclipse.wst.ws.internal.parser.wsil.WebServicesParser;
-
-
-
-public class DefaultsForHTTPBasicAuthCommand extends AbstractDataModelOperation
-{
- private WebServicesParser webServicesParser;
- private String wsdlServiceURL;
- private JavaWSDLParameter javaWSDLParam;
-
- public DefaultsForHTTPBasicAuthCommand()
- {
- super();
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- if (wsdlServiceURL != null && wsdlServiceURL.length() > 0)
- {
- if (webServicesParser == null)
- {
- webServicesParser = new WebServicesParserExt();
- //wse.setWSParser(webServicesParser);
- }
- WebServiceEntity wsEntity = webServicesParser.getWebServiceEntityByURI(wsdlServiceURL);
- if (wsEntity == null || !wsEntity.isEntityResolved())
- {
- webServicesParser.setURI(wsdlServiceURL);
- try
- {
- webServicesParser.parse(WebServicesParser.PARSE_NONE);
- }
- catch (WWWAuthenticationException wwwae)
- {
- DialogWWWAuthentication dialog = new DialogWWWAuthentication(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- dialog.handleWWWAuthentication(wwwae);
- String username = dialog.getUsername();
- String password = dialog.getPassword();
- if (username != null && password != null)
- {
- webServicesParser.setHTTPBasicAuthUsername(username);
- webServicesParser.setHTTPBasicAuthPassword(password);
- try
- {
- webServicesParser.parse(WebServicesParser.PARSE_NONE);
- }
- catch (Throwable t)
- {
- }
- webServicesParser.setHTTPBasicAuthUsername(null);
- webServicesParser.setHTTPBasicAuthPassword(null);
- }
- }
- catch (Throwable t)
- {
- }
- wsEntity = webServicesParser.getWebServiceEntityByURI(wsdlServiceURL);
- }
- if (wsEntity != null && wsEntity.getType() == WebServiceEntity.TYPE_WSDL)
- {
- String httpUsername = wsEntity.getHTTPUsername();
- String httpPassword = wsEntity.getHTTPPassword();
- if (httpUsername != null && httpPassword != null)
- {
- javaWSDLParam.setHTTPUsername(httpUsername);
- javaWSDLParam.setHTTPPassword(httpPassword);
- }
- }
- }
- return Status.OK_STATUS;
- }
- /**
- * @param javaWSDLParam The javaWSDLParam to set.
- */
- public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam) {
- this.javaWSDLParam = javaWSDLParam;
- }
-
- /**
- * @param wsdlServiceURL The wsdlServiceURL to set.
- */
- public void setWsdlServiceURL(String wsdlServiceURL) {
- this.wsdlServiceURL = wsdlServiceURL;
- }
-
- /**
- * @return Returns the javaWSDLParam.
- */
- public JavaWSDLParameter getJavaWSDLParam() {
- return javaWSDLParam;
- }
-
- /**
- * @return Returns the webServicesParser.
- */
- public WebServicesParser getWebServicesParser() {
- return webServicesParser;
- }
-
- /**
- * @param webServicesParser The webServicesParser to set.
- */
- public void setWebServicesParser(WebServicesParser webServicesParser) {
- this.webServicesParser = webServicesParser;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java
deleted file mode 100644
index cd0bdf3b8..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/RefreshProjectCommand.java
+++ /dev/null
@@ -1,63 +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.consumption.ui.task;
-
-
-import org.eclipse.core.resources.IProject;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
-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 RefreshProjectCommand extends AbstractDataModelOperation
-{
- private IProject project;
-
- public RefreshProjectCommand()
- {
- }
-
- /**
- * Execute RefreshProjectTask
- */
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment env = getEnvironment();
- try
- {
- if (project!=null)
- project.refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
- }
- catch (CoreException e)
- {
- IStatus status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_ERROR_REFRESH_PROJECT, e);
- env.getStatusHandler().reportError(status);
- return status;
- }
- return Status.OK_STATUS;
- }
-
- public IProject getProject() {
- return project;
- }
-
- public void setProject(IProject project) {
- this.project = project;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java
deleted file mode 100644
index 955e06d99..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanCommand.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-
-package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.xml.namespace.QName;
-import org.eclipse.core.resources.IProject;
-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.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.ws.internal.axis.consumption.core.common.JavaWSDLParameter;
-import org.eclipse.jst.ws.internal.axis.consumption.core.common.NameMappingUtils;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
-import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-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 Stub2BeanCommand extends AbstractDataModelOperation
-{
- private WebServicesParser webServicesParser;
- private JavaWSDLParameter javaWSDLParam_;
- private String discoveredWsdlPortElementName;
- private Vector portTypes_;
- private String proxyBean_;
- private String outputFolder_;
-
- private IProject clientProject_;
-
- public Stub2BeanCommand(){
- super();
- portTypes_ = new Vector();
- }
-
- /**
- * Execute
- */
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment environment = getEnvironment();
- String inputWsdlLocation = javaWSDLParam_.getInputWsdlLocation();
- Definition def = webServicesParser.getWSDLDefinition(inputWsdlLocation);
- /*
- * Hack: Axis is not using a proper java.net.URL as its inputWsdlLocation.
- * We need to convert it to a proper file URL.
- */
- if (def == null)
- {
- File file = new File(inputWsdlLocation);
- if (file.exists())
- {
- try
- {
- def = webServicesParser.getWSDLDefinition(file.toURL().toString());
- }
- catch (MalformedURLException murle)
- {
- }
- }
- }
-
- //Ensure the client project is either a flexible project or a Java project
- ModuleCoreNature mn = ModuleCoreNature.getModuleCoreNature(clientProject_);
- if (mn==null)
- {
- // Check if it's a plain old Java project
- IJavaProject javaProject = null;
- javaProject = JavaCore.create(clientProject_);
- if (javaProject == null)
- {
- IStatus status = StatusUtils.errorStatus( AxisConsumptionUIMessages.MSG_WARN_NO_JAVA_NATURE);
- environment.getStatusHandler().reportError(status);
- return status;
- }
- }
-
- Map pkg2nsMapping = javaWSDLParam_.getMappings();
- Map services = def.getServices();
- for (Iterator it = services.values().iterator(); it.hasNext();)
- {
- Service service = (Service)it.next();
- String servicePkgName = NameMappingUtils.getPackageName(service.getQName().getNamespaceURI(), pkg2nsMapping);
- String serviceClassName = computeClassName(service.getQName().getLocalPart());
- String jndiName = serviceClassName;
- Map ports = service.getPorts();
- for (Iterator it2 = ports.values().iterator(); it2.hasNext();)
- {
- if (serviceClassName.equals(computeClassName(((Port)it2.next()).getBinding().getPortType().getQName().getLocalPart())))
- {
- serviceClassName = serviceClassName + "_Service";
- break;
- }
- }
- for (Iterator it2 = ports.values().iterator(); it2.hasNext();)
- {
- Port port = (Port)it2.next();
- if (discoveredWsdlPortElementName != null && !discoveredWsdlPortElementName.equals(port.getName()))
- continue;
- SOAPAddress soapAddress = null;
- List extensibilityElements = port.getExtensibilityElements();
- if (extensibilityElements != null)
- {
- for (Iterator it3 = extensibilityElements.iterator(); it3.hasNext();)
- {
- Object object = it3.next();
- if (object instanceof SOAPAddress)
- {
- soapAddress = (SOAPAddress)object;
- break;
- }
- }
- }
- if (soapAddress != null)
- {
- PortType portType = port.getBinding().getPortType();
- QName portTypeQName = portType.getQName();
- StringBuffer portTypeID = new StringBuffer();
- portTypeID.append(portTypeQName.getNamespaceURI());
- portTypeID.append("#");
- portTypeID.append(portTypeQName.getLocalPart());
- if (!portTypes_.contains(portTypeID.toString()))
- {
- portTypes_.add(portTypeID.toString());
- Stub2BeanInfo stub2BeanInfo = new Stub2BeanInfo();
- stub2BeanInfo.setClientProject(clientProject_);
- stub2BeanInfo.setOutputFolder( outputFolder_ );
- String portTypePkgName = NameMappingUtils.getPackageName(portType.getQName().getNamespaceURI(), pkg2nsMapping);
- String portTypeClassName = computeClassName(portTypeQName.getLocalPart());
- stub2BeanInfo.setPackage(portTypePkgName);
- stub2BeanInfo.setClass(portTypeClassName + "Proxy");
- proxyBean_ = portTypePkgName+"."+portTypeClassName+"Proxy";
- if (jndiName.equals(portTypeClassName))
- portTypeClassName = portTypeClassName + "_PortType";
- stub2BeanInfo.addSEI(portTypePkgName, portTypeClassName, servicePkgName, serviceClassName, jndiName, NameMappingUtils.getPortName(port.getName()));
- try
- {
- stub2BeanInfo.write( monitor, environment.getStatusHandler() );
- if (discoveredWsdlPortElementName != null)
- {
- // The discovered port was processed. Ignore all other ports and services.
- return Status.OK_STATUS;
- }
- }
- catch (CoreException ce)
- {
- }
- catch (IOException ioe)
- {
- }
- }
- }
- }
- }
- return Status.OK_STATUS;
- }
-
- private String computeClassName(String className)
- {
- return NameMappingUtils.xmlNameToJavaClass(className);
- }
-
- /**
- * Returns the javaWSDLParam.
- * @return JavaWSDLParameter
- */
- public JavaWSDLParameter getJavaWSDLParam()
- {
- return javaWSDLParam_;
- }
-
- /**
- * Sets the javaWSDLParam.
- * @param javaWSDLParam The javaWSDLParam to set
- */
- public void setJavaWSDLParam(JavaWSDLParameter javaWSDLParam)
- {
- javaWSDLParam_ = javaWSDLParam;
- }
- /**
- * @return Returns the webServicesParser.
- */
- public WebServicesParser getWebServicesParser() {
- return webServicesParser;
- }
-
- /**
- * @param webServicesParser The webServicesParser to set.
- */
- public void setWebServicesParser(WebServicesParser webServicesParser) {
- this.webServicesParser = webServicesParser;
- }
-
-
- /**
- * @param discoveredWsdlPortElementName The discoveredWsdlPortElementName to set.
- */
- public void setDiscoveredWsdlPortElementName(String discoveredWsdlPortElementName) {
- this.discoveredWsdlPortElementName = discoveredWsdlPortElementName;
- }
-
- /**
- * @param clientProject The clientProject to set.
- */
- public void setClientProject(IProject clientProject) {
- this.clientProject_ = clientProject;
- }
-
- /**
- * @return Returns the proxyBean.
- */
- public String getProxyBean() {
- return proxyBean_;
- }
-
- public void setOutputFolder( String outputFolder )
- {
- outputFolder_ = outputFolder;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanInfo.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanInfo.java
deleted file mode 100644
index 8561175c8..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/Stub2BeanInfo.java
+++ /dev/null
@@ -1,600 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
- * 20060216 127138 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-
-package org.eclipse.jst.ws.internal.axis.consumption.ui.task;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jem.java.JavaParameter;
-import org.eclipse.jem.java.JavaVisibilityKind;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.ws.internal.common.JavaMOFUtils;
-import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
-import org.eclipse.wst.command.internal.env.common.FileResourceUtils;
-import org.eclipse.wst.common.environment.IStatusHandler;
-import com.ibm.icu.util.StringTokenizer;
-
-public class Stub2BeanInfo
-{
- private final String NEW_LINE = System.getProperty("line.separator");
-
- private int indentCount;
-
- private String package_;
- private StringBuffer imports_;
- private StringBuffer seis_;
- private StringBuffer services_;
- private StringBuffer jndiNames_;
- private StringBuffer ports_;
- private String class_;
- private Vector usedNames;
-
- private IProject clientProject_;
- private String outputFolder_;
-
- public Stub2BeanInfo()
- {
- indentCount = 0;
- package_ = null;
- imports_ = new StringBuffer();
- seis_ = new StringBuffer();
- services_ = new StringBuffer();
- jndiNames_ = new StringBuffer();
- ports_ = new StringBuffer();
- class_ = "SEIBean";
- usedNames = new Vector();
- }
-
- public void setClientProject(IProject clientProject) {
- this.clientProject_ = clientProject;
- }
-
- public void setOutputFolder( String outputFolder )
- {
- outputFolder_ = outputFolder;
- }
-
- public void setPackage(String pkgName)
- {
- package_ = pkgName;
- }
-
- public void addImports(String pkgName, String className)
- {
- imports_.append(toFullyQualifiedClassName(pkgName, className));
- imports_.append(";");
- }
-
- public void addSEI(String seiPkgName, String seiClassName, String servicePkgName, String serviceClassName, String portName)
- {
- addSEI(seiPkgName, seiClassName, servicePkgName, serviceClassName, serviceClassName, portName);
- }
-
- public void addSEI(String seiPkgName, String seiClassName, String servicePkgName, String serviceClassName, String jndiName, String portName)
- {
- seis_.append(toFullyQualifiedClassName(seiPkgName, seiClassName));
- seis_.append(";");
- services_.append(toFullyQualifiedClassName(servicePkgName, serviceClassName));
- services_.append(";");
- jndiNames_.append(jndiName);
- jndiNames_.append(";");
- ports_.append(portName);
- ports_.append(";");
- }
-
- public void setClass(String className)
- {
- class_ = className;
- }
-
- private String toFullyQualifiedClassName(String pkgName, String className)
- {
- StringBuffer sb = new StringBuffer();
- sb.append(pkgName);
- sb.append(".");
- sb.append(className);
- return sb.toString();
- }
-
- private String getPackageName(String qname)
- {
- int index = qname.lastIndexOf(".");
- if (index != -1)
- return qname.substring(0, index);
- else
- return qname;
- }
-
- private String getClassName(String qname)
- {
- int index = qname.lastIndexOf(".");
- if (index != -1)
- return qname.substring(index+1, qname.length());
- else
- return qname;
- }
-
- private String firstCharToLowerCase(String s)
- {
- StringBuffer sb = new StringBuffer();
- sb.append(s.substring(0, 1).toLowerCase());
- sb.append(s.substring(1, s.length()));
- return sb.toString();
- }
-
- private String getFullyQualifiedName(JavaHelpers javaHelpers)
- {
- if (javaHelpers.isPrimitive())
- return javaHelpers.getJavaName();
- else
- return javaHelpers.getQualifiedName();
- }
-
- public void write(IProgressMonitor progressMonitor, IStatusHandler statusMonitor) throws CoreException, IOException
- {
- StringWriter sw = new StringWriter(2048);
- writePackage(sw);
- writeImports(sw);
- writeClass(sw);
- sw.close();
- byte[] bytes = sw.getBuffer().toString().getBytes();
- StringBuffer sb = new StringBuffer();
- if (package_ != null && package_.length() > 0)
- {
- sb.append(package_);
- sb.append(".");
- }
- sb.append(class_);
- sb = new StringBuffer(sb.toString().replace('.', '/'));
- sb.append(".java");
-
- ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-
- IPath newFilePath = new Path(outputFolder_).append( sb.toString() );
-
- FileResourceUtils.createFile(WebServicePlugin.getInstance().getResourceContext(), newFilePath, bais, progressMonitor, statusMonitor);
- }
-
- private void writePackage(Writer w) throws IOException
- {
- if (package_ != null && package_.length() > 0)
- {
- w.write("package ");
- w.write(package_);
- w.write(";");
- newLine(w);
- }
- }
-
- private void writeImports(Writer w) throws IOException
- {
- StringTokenizer st = new StringTokenizer(imports_.toString(), ";");
- while (st.hasMoreTokens())
- {
- w.write("import ");
- w.write(st.nextToken());
- w.write(";");
- newLine(w);
- }
- }
-
- private void writeClass(Writer w) throws IOException, CoreException
- {
- newLine(w);
- w.write("public class ");
- w.write(class_);
- w.write(" ");
- StringTokenizer st = new StringTokenizer(seis_.toString(), ";");
- if (st.hasMoreTokens())
- w.write("implements ");
- while (st.hasMoreTokens())
- {
- w.write(st.nextToken());
- if (st.hasMoreTokens())
- w.write(", ");
- }
- w.write(" {");
- incrementIndent();
- newLine(w);
- writeFieldsDeclarations(w);
- writeConstructor(w);
- writeInit(w);
- /*
- * Cannot use JNDI lookup for AXIS
- *
- writeUseJNDI(w);
- */
- writeGetSetEndpoint(w);
- writeSEIGetters(w);
- writeSEIMethods(w);
- decrementIndent();
- newLine(w);
- w.write("}");
- }
-
- private void writeFieldsDeclarations(Writer w) throws IOException
- {
- /*
- * Cannot use JNDI lookup for AXIS
- *
- w.write("private boolean _useJNDI = true;");
- newLine(w);
- */
- w.write("private String _endpoint = null;");
- usedNames.add("_endpoint");
- newLine(w);
- StringTokenizer st = new StringTokenizer(seis_.toString(), ";");
- while (st.hasMoreTokens())
- {
- w.write("private ");
- String sei = st.nextToken();
- w.write(sei);
- w.write(" ");
- String stubName = firstCharToLowerCase(getClassName(sei));
- w.write(stubName);
- usedNames.add(stubName);
- w.write(" = null;");
- newLine(w);
- }
- }
-
- private void writeConstructor(Writer w) throws IOException
- {
- newLine(w);
- w.write("public ");
- w.write(class_);
- w.write("() {");
- incrementIndent();
- newLine(w);
- w.write("_init");
- w.write(class_);
- w.write("();");
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- }
-
- private void writeInit(Writer w) throws IOException
- {
- newLine(w);
- w.write("private void _init");
- w.write(class_);
- w.write("() {");
- incrementIndent();
- newLine(w);
- w.write("try {");
- incrementIndent();
- newLine(w);
- /*
- * Cannot use JNDI lookup for AXIS
- *
- w.write("if (_useJNDI) {");
- incrementIndent();
- newLine(w);
- */
- StringTokenizer st = new StringTokenizer(seis_.toString(), ";");
- StringTokenizer serviceTokens = new StringTokenizer(services_.toString(), ";");
- //StringTokenizer jndiNameTokens = new StringTokenizer(jndiNames_.toString(), ";");
- StringTokenizer portTokens = new StringTokenizer(ports_.toString(), ";");
- /*
- if (st.hasMoreTokens())
- {
- w.write("javax.naming.InitialContext ctx = new javax.naming.InitialContext();");
- newLine(w);
- }
- while (st.hasMoreTokens())
- {
- w.write(firstCharToLowerCase(getClassName(st.nextToken())));
- w.write(" = ((");
- w.write(serviceTokens.nextToken());
- w.write(")ctx.lookup(\"java:comp/env/service/");
- w.write(jndiNameTokens.nextToken());
- w.write("\")).get");
- w.write(mangleClassName(portTokens.nextToken()));
- w.write("();");
- newLine(w);
- }
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- w.write("else {");
- incrementIndent();
- newLine(w);
- st = new StringTokenizer(seis_.toString(), ";");
- serviceTokens = new StringTokenizer(services_.toString(), ";");
- portTokens = new StringTokenizer(ports_.toString(), ";");
- */
- while (st.hasMoreTokens())
- {
- String seiName = firstCharToLowerCase(getClassName(st.nextToken()));
- w.write(seiName);
- w.write(" = (new ");
- w.write(serviceTokens.nextToken());
- w.write("Locator()).get");
- w.write(portTokens.nextToken());
- w.write("();");
- newLine(w);
- w.write("if (");
- w.write(seiName);
- w.write(" != null) {");
- incrementIndent();
- newLine(w);
- w.write("if (_endpoint != null)");
- incrementIndent();
- newLine(w);
- w.write("((javax.xml.rpc.Stub)");
- w.write(seiName);
- w.write(")._setProperty(\"javax.xml.rpc.service.endpoint.address\", _endpoint);");
- decrementIndent();
- newLine(w);
- w.write("else");
- incrementIndent();
- newLine(w);
- w.write("_endpoint = (String)((javax.xml.rpc.Stub)");
- w.write(seiName);
- w.write(")._getProperty(\"javax.xml.rpc.service.endpoint.address\");");
- decrementIndent();
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- }
- /*
- decrementIndent();
- newLine(w);
- w.write("}");
- */
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- /*
- w.write("catch (javax.naming.NamingException namingException) {}");
- newLine(w);
- */
- w.write("catch (javax.xml.rpc.ServiceException serviceException) {}");
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- }
-
- private void writeSetPropertyEndpoint(Writer w) throws IOException
- {
- StringTokenizer st = new StringTokenizer(seis_.toString(), ";");
- while (st.hasMoreTokens())
- {
- String seiName = firstCharToLowerCase(getClassName(st.nextToken()));
- w.write("if (");
- w.write(seiName);
- w.write(" != null)");
- incrementIndent();
- newLine(w);
- w.write("((javax.xml.rpc.Stub)");
- w.write(seiName);
- w.write(")._setProperty(\"javax.xml.rpc.service.endpoint.address\", _endpoint);");
- decrementIndent();
- newLine(w);
- }
- }
-
-
- private void writeSEIGetters(Writer w) throws IOException
- {
- StringTokenizer st = new StringTokenizer(seis_.toString(), ";");
- while (st.hasMoreTokens())
- {
- String sei = st.nextToken();
- String seiClassName = getClassName(sei);
- String seiFieldName = firstCharToLowerCase(seiClassName);
- newLine(w);
- w.write("public ");
- w.write(sei);
- w.write(" get");
- w.write(seiClassName);
- w.write("() {");
- incrementIndent();
- newLine(w);
- w.write("if (");
- w.write(seiFieldName);
- w.write(" == null)");
- incrementIndent();
- newLine(w);
- w.write("_init");
- w.write(class_);
- w.write("();");
- decrementIndent();
- newLine(w);
- w.write("return ");
- w.write(seiFieldName);
- w.write(";");
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- }
- }
-
- private void writeSEIMethods(Writer w) throws IOException, CoreException
- {
- newLine(w);
- //WebServiceElement wse = WebServiceElement.getWebServiceElement(model_);
- if (clientProject_ == null) return;//wse.getProxyProject();
- StringTokenizer st = new StringTokenizer(seis_.toString(), ";");
- while (st.hasMoreTokens())
- {
- String sei = st.nextToken();
- JavaClass javaClass = JavaMOFUtils.getJavaClass(getPackageName(sei), getClassName(sei), clientProject_);
- if (javaClass != null)
- {
- List methods = javaClass.getMethods();
- for (Iterator it = methods.iterator(); it.hasNext();)
- {
- Method method = (Method)it.next();
- if (!method.isConstructor() && !method.isNative() && method.getJavaVisibility().getValue() == JavaVisibilityKind.PUBLIC)
- writeSEIMethods(w, javaClass, method);
- }
- }
- }
- }
-
- private void writeSEIMethods(Writer w, JavaClass javaClass, Method method) throws IOException
- {
- w.write("public ");
- // isVoid
- if (method.isVoid())
- w.write("void ");
- else
- {
- w.write(getFullyQualifiedName(method.getReturnType()));
- w.write(" ");
- }
- // method name
- w.write(method.getName());
- w.write("(");
- // input parameters
- JavaParameter[] inputParams = method.listParametersWithoutReturn();
- for (int i = 0; i < inputParams.length; i++)
- {
- if (i > 0)
- w.write(", ");
- JavaHelpers javaHelpers = inputParams[i].getJavaType();
- w.write(getFullyQualifiedName(javaHelpers));
- w.write(" ");
- String paramName = getClassName(inputParams[i].getQualifiedName());
- w.write(getUnusedName(paramName));
- }
- w.write(")");
- // exceptions
- List exceptions = method.getJavaExceptions();
- if (!exceptions.isEmpty())
- w.write(" throws ");
- for (Iterator it = exceptions.iterator(); it.hasNext();)
- {
- JavaClass exception = (JavaClass)it.next();
- w.write(exception.getQualifiedNameForReflection());
- if (it.hasNext())
- w.write(", ");
- }
- // method body
- w.write("{");
- incrementIndent();
- newLine(w);
- String stubName = firstCharToLowerCase(javaClass.getName());
- w.write("if (");
- w.write(stubName);
- w.write(" == null)");
- incrementIndent();
- newLine(w);
- w.write("_init");
- w.write(class_);
- w.write("();");
- decrementIndent();
- newLine(w);
- if (!method.isVoid())
- w.write("return ");
- w.write(stubName);
- w.write(".");
- w.write(method.getName());
- w.write("(");
- for (int i = 0; i < inputParams.length; i++)
- {
- if (i > 0)
- w.write(", ");
- String paramName = getClassName(inputParams[i].getQualifiedName());
- w.write(getUnusedName(paramName));
- }
- w.write(");");
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- newLine(w);
- }
-
- private void writeGetSetEndpoint(Writer w) throws IOException
- {
- newLine(w);
- w.write("public String getEndpoint() {");
- incrementIndent();
- newLine(w);
- w.write("return _endpoint;");
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- newLine(w);
- w.write("public void setEndpoint(String endpoint) {");
- incrementIndent();
- newLine(w);
- w.write("_endpoint = endpoint;");
- newLine(w);
- writeSetPropertyEndpoint(w);
- decrementIndent();
- newLine(w);
- w.write("}");
- newLine(w);
- }
-
- private void incrementIndent()
- {
- indentCount++;
- }
-
- private void decrementIndent()
- {
- indentCount--;
- }
-
- private void indent(Writer w) throws IOException
- {
- for (int i = 0; i < indentCount; i++)
- w.write(" ");
- }
-
- private void newLine(Writer w) throws IOException
- {
- w.write(NEW_LINE);
- indent(w);
- }
-
- private String getUnusedName(String name)
- {
- if (usedNames.contains(name))
- {
- for (int i = 0; i < 100; i++)
- {
- String newName = (new StringBuffer(name)).append(String.valueOf(i)).toString();
- if (!usedNames.contains(newName))
- return newName;
- }
- }
- return name;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java
deleted file mode 100644
index cbbd872e7..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/ValidateWSDLCommand.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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.consumption.ui.task;
-
-import javax.wsdl.Definition;
-
-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.consumption.ui.ConsumptionUIMessages;
-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 ValidateWSDLCommand extends AbstractDataModelOperation
-{
- private WebServicesParser webServicesParser;
- private String wsdlURI;
-
- public ValidateWSDLCommand()
- {
- }
-
- public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
- {
- IEnvironment environment = getEnvironment();
- if (wsdlURI != null && wsdlURI.length() > 0)
- {
- Definition definition = webServicesParser.getWSDLDefinition(wsdlURI);
- if (definition != null)
- {
- int numServices = definition.getServices().size();
- if (numServices < 1)
- {
- IStatus status = StatusUtils.errorStatus( NLS.bind(ConsumptionUIMessages.MSG_ERROR_WSDL_HAS_NO_SERVICE_ELEMENT, new Object[] {wsdlURI}), null);
- environment.getStatusHandler().reportError(status);
- return status;
- }
- }
- }
- return Status.OK_STATUS;
- }
-
- /**
- * @param wsdlURI The wsdlURI to set.
- */
- public void setWsdlURI(String wsdlURI)
- {
- this.wsdlURI = wsdlURI;
- }
-
- /**
- * @param webServicesParser The webServicesParser to set.
- */
- public void setWebServicesParser(WebServicesParser webServicesParser)
- {
- this.webServicesParser = webServicesParser;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/ClasspathUtils.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/ClasspathUtils.java
deleted file mode 100644
index f794c782f..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/ClasspathUtils.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060203 126418 kathy@ca.ibm.com - Kathy Chan
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.ui.util;
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-
-public class ClasspathUtils {
-
- // Copyright
- public static final String copyright = "(c) Copyright IBM Corporation 2003."; //$NON-NLS-1$
-
- private static ClasspathUtils instance_; //$NON-NLS-1$
- private static String DOT_JAR = ".jar"; //$NON-NLS-1$
- private static String JAR = "jar"; //$NON-NLS-1$
- private static String WEBINF_LIB = "/WEB-INF/lib"; //$NON-NLS-1$
-
- private ClasspathUtils() {
- }
-
- public static ClasspathUtils getInstance() {
- if (instance_ == null)
- instance_ = new ClasspathUtils();
- return instance_;
- }
-
- public String getClasspathString(IProject project) {
- StringBuffer classpath = new StringBuffer();
- String[] classpathEntries = getClasspath(project, false);
-
- Vector classpathVector = new Vector();
- for (int i = 0; i < classpathEntries.length; i++) {
- if (!classpathVector.contains(classpathEntries[i])) {
- classpathVector.add(classpathEntries[i]);
- classpath.append(classpathEntries[i]);
- classpath.append(";"); //$NON-NLS-1$
- }
- }
- return classpath.toString();
- }
-
-
- private String[] getClasspath(IProject project, boolean isDependent) {
- String[] moduleClasspath = new String[0];
- ArrayList projectClasspath = new ArrayList();
- boolean needJavaClasspath = false;
-
- IVirtualComponent comp = ComponentCore.createComponent(project);
- if (comp != null) {
- // get the module's classpath
-
- if (J2EEUtils.isEARComponent(comp)) {
- moduleClasspath = getClasspathForEARProject(project, comp.getName());
-// add module classpath to project classpath
- for (int j = 0; j < moduleClasspath.length; j++) {
- projectClasspath.add(moduleClasspath[j]);
- }
- } else if (J2EEUtils.isWebComponent(comp) || J2EEUtils.isJavaComponent(comp)) {
- needJavaClasspath = true;
-
- IContainer outputContainer = null;
- IResource fragmentRoot = null;
- IPackageFragmentRoot[] pkgFragmentRoot = ResourceUtils.getJavaPackageFragmentRoots(project);
- ArrayList webModuleClasspath = new ArrayList();
- try {
- for (int i = 0; i < pkgFragmentRoot.length; i++) {
- fragmentRoot = pkgFragmentRoot[i].getCorrespondingResource();
- if (fragmentRoot != null
- && (fragmentRoot.getProject().equals(project))
- && (fragmentRoot.getType() != IResource.FILE)) {
- outputContainer = J2EEProjectUtilities.getOutputContainer(project, pkgFragmentRoot[i]);
- if (outputContainer != null) {
- webModuleClasspath.add(outputContainer.getLocation().toOSString());
- }
- }
- }
- } catch (JavaModelException e) {
- }
-
- // add Web module classpath to project classpath
- Iterator iter = webModuleClasspath.iterator();
- while (iter.hasNext()) {
- projectClasspath.add((String) iter.next());
- }
- }
-
- if (!isDependent) {
- if (J2EEUtils.isWebComponent(comp)) {
- needJavaClasspath = true;
- moduleClasspath = getWEBINFLib(project);
- for (int j = 0; j < moduleClasspath.length; j++) {
- projectClasspath.add(moduleClasspath[j]);
- }
- }
- }
-
- } else {
- needJavaClasspath = true;
- }
-
- // If there are Web or Java module in the project, get the project's Java classpath
- if (needJavaClasspath) {
- String[] javaClasspath;
- try {
- IJavaProject javaProj = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
- if (javaProj != null) {
- javaClasspath = getClasspathForJavaProject(javaProj);
- for (int j = 0; j < javaClasspath.length; j++) {
- projectClasspath.add(javaClasspath[j]);
- }
- }
- } catch (CoreException e) {
- // not able to get Java classpath, just ignore
- }
- }
-
- return (String[]) projectClasspath.toArray(new String[projectClasspath.size()]);
- }
-
- // Need to get all modules in the project. If there's a EAR module, get the utility JARs
- private String[] getUtilityJarClasspath(IProject project) {
- String[] utilityJarString = new String[0];
- String[] moduleClasspath = new String[0];
- ArrayList utilityJarsClasspath = new ArrayList();
-
- String module;
- IVirtualComponent comp = ComponentCore.createComponent(project);
- if (comp != null) {
- module = comp.getName();
- if (J2EEUtils.isEARComponent(comp)) {
- moduleClasspath = getClasspathForEARProject(project, module);
- for (int j = 0; j < moduleClasspath.length; j++) {
- utilityJarsClasspath.add(moduleClasspath[j]);
- }
- utilityJarString = (String[]) utilityJarsClasspath.toArray(new String[utilityJarsClasspath.size()]);
- }
- }
-
- return utilityJarString;
- }
-
- private String[] getClasspathForEARProject(IProject project, String module) {
- IPath projectPath =
- project.getProject().getLocation().addTrailingSeparator().append(module).addTrailingSeparator();
- return getDirectoryJarFiles(projectPath);
- }
-
- private String[] getDirectoryJarFiles(IPath iPath) {
- File dir = iPath.toFile();
- Vector jarsVector = new Vector();
- if (dir.exists() && dir.isDirectory()) {
- String[] filenames = dir.list();
- for (int i = 0; i < filenames.length; i++) {
- if (filenames[i].endsWith(DOT_JAR))
- jarsVector.add(path2String(iPath) + filenames[i]);
- }
- }
- String[] jars = new String[jarsVector.size()];
- jarsVector.copyInto(jars);
- return jars;
- }
-
- private String[] getWEBINFLib(IProject project) {
- String[] webinfLibJars = new String[0];
- ArrayList anArrayList = new ArrayList();
- try {
- IVirtualComponent component = ComponentCore.createComponent(project);
- if (component != null) {
-
- IVirtualFolder webInfLib = component.getRootFolder().getFolder(new Path(
- WEBINF_LIB));
- if (webInfLib != null) {
- IVirtualResource[] resources = webInfLib.members();
- IResource aResource = null;
- for (int i = 0; i < resources.length; i++) {
- aResource = resources[i].getUnderlyingResource();
- if (JAR.equalsIgnoreCase(aResource.getFileExtension()))
- anArrayList.add( aResource.getLocation().toOSString());
- }
- if (anArrayList.size() != 0)
- webinfLibJars = (String[]) anArrayList.toArray(new String[anArrayList.size()]);
- }
- }
- } catch (CoreException e) {
- }
- return webinfLibJars;
- }
-
- private String[] getClasspathForJavaProject(IJavaProject javaProject) {
- ArrayList projectClasspath = new ArrayList();
- try {
- IClasspathEntry[] buildPath =
- javaProject.getResolvedClasspath(true);
- for (int i = 0; i < buildPath.length; i++) {
- String[] buildPathString =
- classpathEntry2String(
- buildPath[i],
- javaProject.getProject());
- for (int j = 0; j < buildPathString.length; j++) {
- projectClasspath.add(buildPathString[j]);
- }
- }
- } catch (JavaModelException jme) {
- }
-
- String[] utilityJarsClasspath;
- IProject project = javaProject.getProject();
- IProject[] referencingProjects = project.getReferencingProjects();
- for (int i = 0; i < referencingProjects.length; i++) {
- utilityJarsClasspath = getUtilityJarClasspath(referencingProjects[i]);
- for (int j = 0; j < utilityJarsClasspath.length; j++) {
- projectClasspath.add(utilityJarsClasspath[j]);
- }
- }
-
- return (String[]) projectClasspath.toArray(new String[projectClasspath.size()]);
- }
-
- private String[] classpathEntry2String(
- IClasspathEntry entry,
- IProject project)
- {
- switch (entry.getEntryKind()) {
- case IClasspathEntry.CPE_LIBRARY :
- {
- return new String[] { path2String(entry.getPath())};
- }
- case IClasspathEntry.CPE_PROJECT :
- {
- return getClasspath(
- ResourcesPlugin.getWorkspace().getRoot().getProject(
- entry.getPath().lastSegment()), true);
- }
- case IClasspathEntry.CPE_SOURCE :
- {
- IPath path = entry.getPath();
- if (path.segment(0).equals(project.getName()))
- path = path.removeFirstSegments(1);
- return new String[] {
- path2String(
- project
- .getLocation()
- .addTrailingSeparator()
- .append(
- path))};
- }
- case IClasspathEntry.CPE_VARIABLE :
- {
- return classpathEntry2String(
- JavaCore.getResolvedClasspathEntry(entry),
- project);
- }
- default :
- {
- return new String[] { path2String(entry.getPath())};
- }
- }
- }
-
- private String path2String(IPath path) {
- return path.toOSString();
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/FileUtil.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/FileUtil.java
deleted file mode 100644
index 52f98d9ec..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/FileUtil.java
+++ /dev/null
@@ -1,120 +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.consumption.ui.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-
-public class FileUtil
-{
- public FileUtil()
- {
- super();
- }
-
- public static void copyFile(String src, String dest)
- {
- InputStream is = null;
- FileOutputStream fos = null;
-
- try
- {
- is = new FileInputStream(src);
- fos = new FileOutputStream(dest);
- int c = 0;
- byte[] array = new byte[1024];
- while ((c = is.read(array)) >= 0)
- {
- fos.write(array, 0, c);
- }
- }
- catch (Exception e)
- {
- }
- finally
- {
- try
- {
- fos.close();
- is.close();
- }
- catch (Exception e)
- {
- }
- }
- }
-
- public static File createFileAndParentDirectories(String fileName) throws Exception
- {
- File file = new File(fileName);
- File parent = file.getParentFile();
- if (!parent.exists())
- {
- parent.mkdirs();
- }
- file.createNewFile();
- return file;
- }
-
- public static void deleteDirectories(File dir) throws Exception
- {
- File[] children = dir.listFiles();
- for (int i = 0; i < children.length; i++)
- {
- if (children[i].list() != null && children[i].list().length > 0)
- {
- deleteDirectories(children[i]);
- }
- else
- {
- children[i].delete();
- }
- }
- dir.delete();
- }
-
- /**
- * Creates a folder and all parent folders if not existing Project must exist
- */
- public static void createFolder(IFolder folder, boolean force, boolean local) throws CoreException
- {
- if (!folder.exists())
- {
- IContainer parent = folder.getParent();
- if (parent instanceof IFolder)
- {
- createFolder((IFolder)parent, force, local);
- }
- folder.create(force, local, new NullProgressMonitor());
- }
- }
-
- public static void createTargetFile(String sourceFileName, String targetFileName) throws Exception
- {
- createTargetFile(sourceFileName, targetFileName, false);
- }
-
- public static void createTargetFile(String sourceFileName, String targetFileName, boolean overwrite) throws Exception
- {
- File idealResultFile = new File(targetFileName);
- if (overwrite || !idealResultFile.exists())
- {
- FileUtil.createFileAndParentDirectories(targetFileName);
- FileUtil.copyFile(sourceFileName, targetFileName);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/PlatformUtils.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/PlatformUtils.java
deleted file mode 100644
index 518496b0b..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/PlatformUtils.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.consumption.ui.util;
-
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-
-public class PlatformUtils {
-
- public static final String PLATFORM_ROOT = "platform:/resource";
- public static final String WIN_FILE_PROTOCOL = "file:/";
- public static final String LNX_FILE_PROTOCOL = "file://";
- public static final String PLATFORM = "platform";
- public static final String RESOURCE = "/resource";
-
- private PlatformUtils() {
- }
-
- /**
- * Returns the string representation of platform URL given an IPath
- * @param IPath path
- * @return String platformURL
- */
- public static String getPlatformURL(IPath path) {
- String platformURL;
- platformURL = URI.createPlatformResourceURI(path.toString()).toString();
- // old method: file system representation
- // platformURL = ResourcesPlugin.getWorkspace().getRoot().getFile(path).getLocation().toString();
- return platformURL;
- }
-
- /**
- * Returns the URL representation of the Platform URL given an IPath
- * The PlatformResourceManager underdstands this format and therefore
- * this is suited for command URL's
- * @param IPath path
- * @return URL Platform URL
- */
- public static URL getCommandPlatformURL(IPath path) {
- URL url = null;
- try {
- url = new URL(PLATFORM, null, RESOURCE + path.toString());
- } catch (MalformedURLException e) {
- return url;
- }
- return url;
- }
-
- /**
- * Returns the string representation of path given platform URL string
- * @param String platform URL string
- * @return String path string
- */
- public static String getPathFromPlatform(String platformStr) {
- String pathStr = platformStr;
-
- String rootLocation;
- rootLocation = PLATFORM_ROOT;
- // old method: file system representation
- // rootLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
- if (platformStr.startsWith(rootLocation))
- pathStr = platformStr.substring(rootLocation.length());
- return pathStr;
- }
-
- /**
- * Returns the string representation of platform URL given the path string
- * @param String path string
- * @return String platform URL string
- */
- public static String getPlatformFromPath(String pathStr) {
- String platformStr = pathStr;
-
- String rootLocation;
- rootLocation = PLATFORM_ROOT;
- // old method: file system representation
- // rootLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
- platformStr = rootLocation + pathStr;
- return platformStr;
- }
-
- /**
- * Returns the string representation of the local file system file given platform URL string
- * @param String platform URL string
- * @return String file string
- */
- public static String getFileFromPlatform(String platformStr) {
- String fileStr = platformStr;
- String pathStr = getPathFromPlatform(platformStr);
-
- fileStr =
- ResourcesPlugin
- .getWorkspace()
- .getRoot()
- .getFile(new Path(pathStr))
- .getLocation()
- .toString();
-
- // old method: file system representation
- // Do nothing
-
- return fileStr;
- }
-
- /**
- * Returns the file protocol representation of the local file system file given platform URL string
- * @param String platform URL string
- * @return String the file protocol uri
- */
- public static String getFileURLFromPlatform(String platformStr) {
- String fileStr = platformStr;
- String pathStr = getPathFromPlatform(platformStr);
- try {
- fileStr =
- ResourcesPlugin
- .getWorkspace()
- .getRoot()
- .getFile(new Path(pathStr))
- .getLocation()
- .toFile()
- .toURL()
- .toString();
- } catch (MalformedURLException murle) {
- fileStr = getFileURLFromPath(new Path(pathStr));
- }
- return fileStr;
- }
-
- /**
- * Returns the file protocol representation of a local file
- * @param IPath the Path object representing the file
- * @return String the file protocol uri
- */
- public static String getFileURLFromPath(IPath path) {
-
- String file = null;
- if (path != null) {
- if (!path.isAbsolute()) {
- file =
- ResourcesPlugin
- .getWorkspace()
- .getRoot()
- .getFile(path)
- .getLocation()
- .toString();
- if (file.charAt(0) == IPath.SEPARATOR) {
- file = LNX_FILE_PROTOCOL + file;
- } else {
- file = WIN_FILE_PROTOCOL + file;
- }
- } else {
- file = path.toString();
- }
- if (file != null && file.charAt(0) == IPath.SEPARATOR) {
- file = LNX_FILE_PROTOCOL + file;
- } else {
- file = WIN_FILE_PROTOCOL + file;
- }
- }
- return file == null ? null : file;
-
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/WSDLUtils.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/WSDLUtils.java
deleted file mode 100644
index 3cb3670e2..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/util/WSDLUtils.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 127138 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-
-package org.eclipse.jst.ws.internal.axis.consumption.ui.util;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import javax.wsdl.Binding;
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.Service;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-import org.apache.axis.wsdl.toJava.Utils;
-import org.eclipse.wst.wsdl.internal.impl.wsdl4j.WSDLFactoryImpl;
-import com.ibm.icu.text.Collator;
-import com.ibm.icu.util.StringTokenizer;
-
-public class WSDLUtils {
-
- private static final String DOT = ".";
-
- /**
- * These are java keywords as specified at the following URL (sorted alphabetically).
- * http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#229308
- * Note that false, true, and null are not strictly keywords; they are literal values,
- * but for the purposes of this array, they can be treated as literals.
- */
- static final String keywords[] =
- {
- "abstract", "boolean", "break", "byte", "case",
- "catch", "char", "class", "const", "continue",
- "default", "do", "double", "else", "extends",
- "false", "final", "finally", "float", "for",
- "goto", "if", "implements", "import", "instanceof",
- "int", "interface", "long", "native", "new",
- "null", "package", "private", "protected", "public",
- "return", "short", "static", "strictfp", "super",
- "switch", "synchronized", "this", "throw", "throws",
- "transient", "true", "try", "void", "volatile",
- "while"
- };
-
- /** Collator for comparing the strings */
- static final Collator englishCollator = Collator.getInstance(Locale.ENGLISH);
-
- /** Use this character as suffix */
- static final char keywordPrefix = '_';
-
- private WSDLUtils() {
- }
-
- /**
- * Returns the name of the first service element in the WSDL definition.
- * @return String service element name
- */
- public static String getServiceElementName(Definition definition) {
- Service service = (Service) definition.getServices().values().iterator().next();
- return service.getQName().getLocalPart();
- }
-
- /**
- * Returns the name of the port type element points to by the first service and port element in the WSDL definition.
- * @return String port type element name
- */
- public static String getPortTypeName(Definition definition) {
- Service service = (Service) definition.getServices().values().iterator().next();
- Iterator iterator = service.getPorts().values().iterator();
- while(iterator.hasNext()){
- Port port = (Port) iterator.next();
- for (int i=0; i<port.getExtensibilityElements().size();i++) {
- if (port.getExtensibilityElements().get(i) instanceof SOAPAddress) {
- Binding binding = port.getBinding();
- return binding.getPortType().getQName().getLocalPart();
- }
- }
- }
- return "";
-
- }
-
- /**
- * Returns the name of the port element in the WSDL definition.
- * @return String port name
- */
- public static String getPortName(Definition definition) {
- Service service = (Service) definition.getServices().values().iterator().next();
- Iterator iterator = service.getPorts().values().iterator();
- while(iterator.hasNext()){
- Port port = (Port) iterator.next();
- for (int i=0; i<port.getExtensibilityElements().size();i++) {
- if (port.getExtensibilityElements().get(i) instanceof SOAPAddress)
- return port.getName();
- }
- }
- return "";
- }
-
-
-
- public static String makeNamespace (String clsName) {
- return makeNamespace(clsName, "http");
- }
-
- /**
- * Make namespace from a fully qualified class name
- * and the given protocol
- *
- * @param clsName fully qualified class name
- * @param protocol protocol String
- * @return namespace namespace String
- */
- public static String makeNamespace (String clsName, String protocol) {
- if (clsName.lastIndexOf('.') == -1)
- return protocol + "://" + "DefaultNamespace";
- String packageName = clsName.substring(0, clsName.lastIndexOf('.'));
- return makeNamespaceFromPackageName(packageName, protocol);
- }
-
-
- private static String makeNamespaceFromPackageName(String packageName, String protocol) {
- if (packageName == null || packageName.equals(""))
- return protocol + "://" + "DefaultNamespace";
- StringTokenizer st = new StringTokenizer( packageName, "." );
- String[] words = new String[ st.countTokens() ];
- for(int i = 0; i < words.length; ++i)
- words[i] = st.nextToken();
-
- StringBuffer sb = new StringBuffer(80);
- for(int i = words.length-1; i >= 0; --i) {
- String word = words[i];
- // seperate with dot
- if( i != words.length-1 )
- sb.append('.');
- sb.append( word );
- }
- return protocol + "://" + sb.toString();
- }
-
- /**
- * Return a Definition for the wsdl url given
- *
- */
- public static Definition getWSDLDefinition(String wsdlURL)
- {
- if(wsdlURL == null) return null;
-
- WSDLFactory wsdlFactory;
- Definition definition = null;
- try {
- wsdlFactory = new WSDLFactoryImpl();
- WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
- definition = wsdlReader.readWSDL(wsdlURL);
- }
- catch (Exception e) { // can be WSDLException or IOException
- return null;
- }
- return definition;
- }
-
- public static String getPackageName(Definition definition)
- {
- if (definition != null)
- {
- String namespace = definition.getTargetNamespace();
- return namespaceURI2PackageName(namespace);
- }
- return "";
- }
-
- public static String getPackageNameForBindingImpl(Port port, Map ns2pkgMap)
- {
- if (port != null && ns2pkgMap != null)
- {
- Binding binding = port.getBinding();
- QName bndQName = binding.getQName();
- String namespace = bndQName.getNamespaceURI();
- Object pkg = ns2pkgMap.get(namespace);
- if (pkg != null)
- return (String)pkg;
- }
- return getPackageNameForBindingImpl(port);
- }
-
- public static String getPackageNameForBindingImpl(Definition definition, Map ns2pkgMap)
- {
- if (definition != null && ns2pkgMap != null)
- {
- Service service = (Service) definition.getServices().values().iterator().next();
- Port port = (Port) service.getPorts().values().iterator().next();
- return getPackageNameForBindingImpl(port, ns2pkgMap);
- }
- return getPackageNameForBindingImpl(definition);
- }
-
- public static String getPackageNameForBindingImpl(Definition definition)
- {
- Port port = null;
- if (definition != null)
- {
- Service service = (Service)definition.getServices().values().iterator().next();
- port = (Port)service.getPorts().values().iterator().next();
- }
- return getPackageNameForBindingImpl(port);
- }
-
-// This is yet another naming algorithm based on webservices.jar
-// They always use the binding namespace as the package name
-// of the BindingImpl class.
-public static String getPackageNameForBindingImpl(Port port)
-{
- if (port != null)
- {
- Binding binding = port.getBinding();
-// PortType portType = binding.getPortType();
- QName bndQName = binding.getQName();
- String namespace = bndQName.getNamespaceURI();
- return namespaceURI2PackageName(namespace);
- }
- return "";
-}
-
-/**
-* Get the namespace for the Port Type
-*
-*/
-public static String getPortTypeNamespace(Definition definition)
-{
- String namespace = "";
- if (definition != null)
- {
- Service service = (Service) definition.getServices().values().iterator().next();
- Iterator iterator = service.getPorts().values().iterator();
- while(iterator.hasNext()){
- Port port = (Port) iterator.next();
- for (int i=0; i<port.getExtensibilityElements().size();i++) {
- if (port.getExtensibilityElements().get(i) instanceof SOAPAddress){
- PortType portType = port.getBinding().getPortType();
- QName bndQName = portType.getQName();
- namespace = bndQName.getNamespaceURI();
- }
- }
- }
- }
- return namespace;
-}
-
-// This is yet another naming algorithm based on webservices.jar
-// They always use the porttype namespace as the package name
-// of the Java class (in ejb).
-public static String getPackageNameForPortType(Definition definition)
-{
- if (definition != null)
- {
- String namespace = getPortTypeNamespace(definition);
- return namespaceURI2PackageName(namespace);
- }
- return "";
-}
-
- /**
- * checks if the input string is a valid java keyword.
- * @return boolean true/false
- */
- public static boolean isJavaKeyword(String keyword) {
- return (Arrays.binarySearch(keywords, keyword, englishCollator) >= 0);
- }
-
- /**
- * Turn a java keyword string into a non-Java keyword string. (Right now
- * this simply means appending an underscore.)
- */
- public static String makeNonJavaKeyword(String keyword){
- return keywordPrefix + keyword;
- }
-
- public static String getFullyQualifiedPortTypeName(Definition definition)
- {
- StringBuffer beanName = new StringBuffer();
- beanName.append(getPackageNameForPortType(definition));
- beanName.append(DOT);
- beanName.append(getPortTypeName(definition));
- return beanName.toString();
-
- }
-
- /**
- * getName
- * @param uri String
- * @return get the file name after the last \ and /
- */
- public static String getName(String uri) {
-
- // Get everything after last slash or backslash
- int bslash = uri.lastIndexOf("\\");
- int slash = uri.lastIndexOf("/");
- int i = bslash > slash ? bslash : slash;
- String fileName = uri.substring(i+1).replace('?', '.');
-
- return fileName;
- }
-
-
-/**
- * getWSDLName
- * @param uri String
- * @return get the file name after the last \ and /, trimmed, defaulted to
- * "default.wsdl" if there is no name, and ending with ".wsdl".
- */
- public static String getWSDLName(String uri) {
-
- // Get everything after last slash or backslash from input URI
- // with no whitespace.
- String WSDLName = getName(uri).trim();
-
- // if empty, return the default "default.wsdl"
- if ( WSDLName.equals( "" ) ) {
- WSDLName = "default.wsdl";
- }
-
- // make sure name ends with ".wsdl", lower case.
- else {
- if ( ! WSDLName.endsWith( ".wsdl" ) ) {
- if ( WSDLName.toLowerCase().endsWith( ".wsdl" ) ) {
- int lastDot = WSDLName.lastIndexOf(".");
- WSDLName = WSDLName.substring( 0, lastDot ) + ".wsdl";
- }
- else {
- WSDLName = WSDLName + ".wsdl";
- }
- }
- }
-
- return WSDLName;
- }
-
- /**
- * getPortTypeNameFromBeanName
- * @param beanname String
- * @return get the port type name based on the bean name
- */
- public static String getPortTypeNameFromBeanName(String beanName) {
- return beanName.substring(beanName.lastIndexOf('.') + 1);
- }
-
- public static String getPackageName(Service service, Map ns2pkgMap)
- {
- if (service != null)
- {
- String namespace = service.getQName().getNamespaceURI();
- if (ns2pkgMap != null)
- {
- Object pkg = ns2pkgMap.get(namespace);
- if (pkg != null)
- return (String)pkg;
- }
- return namespaceURI2PackageName(namespace);
- }
- else
- return "";
- }
-
- public static String getPackageName(Port port, Map ns2pkgMap)
- {
- if (port != null)
- return getPackageName(port.getBinding(), ns2pkgMap);
- else
- return "";
- }
-
- public static String getPackageName(Binding binding, Map ns2pkgMap)
- {
- if (binding != null)
- {
- String namespace = binding.getQName().getNamespaceURI();
- if (ns2pkgMap != null)
- {
- Object pkg = ns2pkgMap.get(namespace);
- if (pkg != null)
- return (String)pkg;
- }
- return namespaceURI2PackageName(namespace);
- }
- else
- return "";
- }
-
- public static String getPackageName(PortType portType, Map ns2pkgMap)
- {
- if (portType != null)
- {
- String namespace = portType.getQName().getNamespaceURI();
- if (ns2pkgMap != null)
- {
- Object pkg = ns2pkgMap.get(namespace);
- if (pkg != null)
- return (String)pkg;
- }
- return namespaceURI2PackageName(namespace);
- }
- else
- return "";
- }
-
-
- /**
- * namespaceURI2PackageName
- * @param namespaceURI
- * @return package name based on namespace
- */
- public static String namespaceURI2PackageName(String namespaceURI)
- {
- /**
- * TODO: The makePackageName method from
- * org.apache.axis.wsdl.toJava.Utils in axis-1_1 is called to map namespace to package name.
- * This will be replaced with an extension point to plug in runtime emitter specific namespace to
- * package mapping algorithm
- */
- return Utils.makePackageName(namespaceURI);
-
-// StringBuffer sb = new StringBuffer(80);
-// if (namespaceURI != null && namespaceURI.length() > 0)
-// {
-// String hostname = null;
-// try
-// {
-// hostname = new URL(namespaceURI).getHost();
-// }
-// catch (MalformedURLException e)
-// {
-// int index = namespaceURI.indexOf(":");
-// if (index > -1)
-// {
-// hostname = namespaceURI.substring(index+1);
-// index = hostname.indexOf("/");
-// if (index > -1)
-// hostname = hostname.substring(0, index);
-// }
-// else
-// hostname = namespaceURI;
-// }
-//
-// // if we didn't file a hostname, bail
-// if (hostname == null) {
-// return null;
-// }
-//
-// //convert illegal java identifier
-// hostname = hostname.replace('-', '_');
-// // tokenize the hostname and reverse it
-// StringTokenizer st = new StringTokenizer(hostname, ".");
-// String[] words = new String[st.countTokens()];
-// for (int i = 0; i < words.length; ++i)
-// words[i] = st.nextToken();
-// for(int i = words.length-1; i >= 0; --i)
-// {
-// String word = words[i];
-// if (isJavaKeyword(word))
-// word = makeNonJavaKeyword(word);
-// // seperate with dot
-// if (i != words.length-1)
-// sb.append('.');
-// // convert digits to underscores
-// if (Character.isDigit(word.charAt(0)))
-// sb.append('_');
-// sb.append(word);
-// }
-// }
-// return normalizePackageName(sb.toString(), DOT.charAt(0));
- }
-
-
- public static String resolveDotInPortName(String name) {
- if(name.indexOf(".")<0)
- {
- return name;
- }
- StringBuffer sb = new StringBuffer();
- boolean afterDot = false;
- for(int i=0; i<name.length(); i++)
- {
- if(name.charAt(i)=='.')
- {
- afterDot = true;
- }
- else if(afterDot)
- {
- sb.append(name.substring(i,i+1).toUpperCase());
- afterDot=false;
- }
- else
- {
- sb.append(name.charAt(i));
- }
- }
- return sb.toString();
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsFragment.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsFragment.java
deleted file mode 100644
index b26999ede..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsFragment.java
+++ /dev/null
@@ -1,39 +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.consumption.ui.widgets;
-
-import org.eclipse.wst.command.internal.env.core.common.Condition;
-import org.eclipse.wst.command.internal.env.core.fragment.BooleanFragment;
-import org.eclipse.wst.command.internal.env.core.fragment.SimpleFragment;
-
-
-public class AxisMappingsFragment extends BooleanFragment
-{
- private boolean showMappings_;
-
- public AxisMappingsFragment()
- {
- super();
- setTrueFragment( new SimpleFragment( "AxisMappingsWidget" ));
- setCondition( new Condition()
- {
- public boolean evaluate()
- {
- return showMappings_;
- }
- } );
- }
-
- public void setShowMapping( boolean showMappings )
- {
- showMappings_ = showMappings;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsWidget.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsWidget.java
deleted file mode 100644
index ad8f74f2d..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisMappingsWidget.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.consumption.ui.widgets;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-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.consumption.ui.widgets.TableViewerWidget;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.TableItem;
-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 AxisMappingsWidget extends SimpleWidgetDataContributor
-{
- private String pluginId_ = "org.eclipse.jst.ws.axis.consumption.ui";
-
- private TableViewerWidget mappings_;
-
- private byte mode_;
- private JavaWSDLParameter javaParameter_;
-
- public static final byte MODE_BEAN2XML = (byte)0;
- public static final byte MODE_XML2BEAN = (byte)1;
- public static final byte MODE_XML2PROXY = (byte)2;
- public static final byte MODE_XML2EJB = (byte)3;
- public static final byte MODE_EJB2XML = (byte)4;
-
- private final String DEFAULT_PACKAGE = "default.javapackage";
- private final String DEFAULT_NAMESPACE = "http://default.namespace";
-
- /*CONTEXT_ID PWJM0001 for the WSDL to Java Mappings Page*/
- private String INFOPOP_PWJM_PAGE = "PWJM0001"; //$NON-NLS-1$
-
- public AxisMappingsWidget( byte mode )
- {
- mode_ = mode;
- }
-
- public WidgetDataEvents addControls( Composite parent, Listener statusListener )
- {
-
- // TODO The TOOLTIP_PWJM_PAGE key doesn't seem to exist anywhere???
- //parent.setToolTipText( msgUtils.getMessage( "TOOLTIP_PWJM_PAGE" ) );
- PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, pluginId_ + "." + INFOPOP_PWJM_PAGE );
-
- Text mappingLabel = new Text( parent, SWT.READ_ONLY | SWT.WRAP );
- mappingLabel.setText( AxisConsumptionUIMessages.LABEL_MAPPING_PAIRS );
- mappingLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
-
- List initValues = new ArrayList();
-
- if( mode_ == MODE_BEAN2XML || mode_ == MODE_EJB2XML)
- {
- String[] columns = { AxisConsumptionUIMessages.TABLE_COLUMN_LABEL_PACKAGE,
- AxisConsumptionUIMessages.TABLE_COLUMN_LABEL_NAMESPACE};
- mappings_ = new TableViewerWidget( columns, initValues, new String[] {DEFAULT_PACKAGE, DEFAULT_NAMESPACE}, TableViewerWidget.MAP_ONE_TO_ONE); //$NON-NLS-1$
- }
- else
- {
- String[] columns = { AxisConsumptionUIMessages.TABLE_COLUMN_LABEL_NAMESPACE,
- AxisConsumptionUIMessages.TABLE_COLUMN_LABEL_PACKAGE};
- mappings_ = new TableViewerWidget( columns, initValues, new String[] {DEFAULT_NAMESPACE, DEFAULT_PACKAGE }, TableViewerWidget.MAP_MANY_TO_ONE); //$NON-NLS-1$
- }
-
- mappings_.addControls( parent, statusListener );
-
- return this;
- }
-
- public IStatus getStatus()
- {
- return mappings_.getStatus();
- }
-
- public void setJavaParameter( JavaWSDLParameter parameter )
- {
- javaParameter_ = parameter;
- }
-
- public JavaWSDLParameter getJavaParameter()
- {
- if( mode_ == MODE_BEAN2XML || mode_ == MODE_EJB2XML || mode_ == MODE_XML2BEAN || mode_ == MODE_XML2PROXY)
- {
- //Set the mappings on javaParameter
- TableItem[] pairs = mappings_.getItems();
- HashMap map = new HashMap();
- for (int i=0; i<pairs.length; i++)
- {
- map.put(pairs[i].getText(0),pairs[i].getText(1));
- }
- javaParameter_.setMappings(map);
-
- //Set the namespace on the javaParameter
- String beanName = javaParameter_.getBeanName();
- if(beanName != null && !beanName.equals(""))
- {
- String packageName = beanName.substring(0, beanName.lastIndexOf('.'));
- if(map.containsKey(packageName))
- {
- String tns = (String)map.get(packageName);
- javaParameter_.setNamespace(tns);
- }
- }
-
- }
- return javaParameter_;
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisProxyWidget.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisProxyWidget.java
deleted file mode 100644
index bc08bf119..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/widgets/AxisProxyWidget.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.ui.widgets;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.AxisConsumptionUIMessages;
-import org.eclipse.jst.ws.internal.common.ResourceUtils;
-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.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Listener;
-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 AxisProxyWidget extends SimpleWidgetDataContributor
-{
- private String pluginId_ = "org.eclipse.jst.ws.axis.consumption.ui";
-
- /*CONTEXT_ID PWJB0001 for the WSDL to Java Bindings Page*/
- private final String INFOPOP_PWJB_PAGE = "PWJB0001"; //$NON-NLS-1$
-
- private Combo outputFolderCombo_;
- /*CONTEXT_ID PWJB0003 for the Folder field of the WSDL to Java Bindings Page*/
- private final String INFOPOP_PWJB_TEXT_FOLDER = "PWJB0003"; //$NON-NLS-1$
-
- private Button genProxyCheckbox_;
- /*CONTEXT_ID PWJB0009 Indicates whether to generate a proxy or not. */
- private final String INFOPOP_PWJB_CHECKBOX_GENPROXY = "PWJB0009"; //$NON-NLS-1$
-
- private Button showMappingsCheckbox_;
- /*CONTEXT_ID PWJB0016 for the Show Mappings checkbox of the Bean Methods Page*/
- private String INFOPOP_N2P_SHOW_MAPPINGS = "PWJB0016"; //$NON-NLS-1$
-
- public WidgetDataEvents addControls( Composite parent, Listener statusListener )
- {
- UIUtils uiUtils = new UIUtils( pluginId_ );
-
- parent.setToolTipText( AxisConsumptionUIMessages.TOOLTIP_PWJB_PAGE );
- PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, pluginId_ + "." + INFOPOP_PWJB_PAGE);
-
- genProxyCheckbox_ = uiUtils.createCheckbox( parent, AxisConsumptionUIMessages.CHECKBOX_GENPROXY,
- AxisConsumptionUIMessages.TOOLTIP_PWJB_CHECKBOX_GENPROXY,
- INFOPOP_PWJB_CHECKBOX_GENPROXY );
- genProxyCheckbox_.addListener( SWT.Selection, statusListener );
- genProxyCheckbox_.addSelectionListener( new SelectionAdapter()
- {
- public void widgetSelected( SelectionEvent evt )
- {
- handleGenProxy();
- }
- });
-
- Composite textGroup = uiUtils.createComposite( parent, 2, 5, 0 );
-
- outputFolderCombo_ = uiUtils.createCombo( textGroup, AxisConsumptionUIMessages.LABEL_FOLDER_NAME,
- AxisConsumptionUIMessages.TOOLTIP_PWJB_TEXT_FOLDER,
- INFOPOP_PWJB_TEXT_FOLDER,
- SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY );
-
- showMappingsCheckbox_ = uiUtils.createCheckbox( parent, AxisConsumptionUIMessages.LABEL_EXPLORE_MAPPINGS_XML2BEAN,
- AxisConsumptionUIMessages.TOOLTIP_N2P_SHOW_MAPPINGS,
- INFOPOP_N2P_SHOW_MAPPINGS );
- // Since this widget affects whether the next page is shown or not we
- // need to add the statusListener.
- showMappingsCheckbox_.addListener( SWT.Selection, statusListener );
-
- return this;
- }
-
- private void handleGenProxy()
- {
- boolean enabled = genProxyCheckbox_.getSelection();
-
- outputFolderCombo_.setEnabled( enabled );
- showMappingsCheckbox_.setEnabled( enabled );
- }
-
- public void setClientProject(IProject clientProject)
- {
- IPath[] paths = ResourceUtils.getAllJavaSourceLocations(clientProject);
-
- for (int i = 0; i < paths.length ; i++)
- {
- outputFolderCombo_.add(paths[i].toString());
- }
-
- if( paths.length > 0 )
- {
- outputFolderCombo_.select(0);
- }
- }
-
- public String getOutputFolder()
- {
- return outputFolderCombo_.getText();
- }
-
- public void setGenerateProxy( Boolean genProxy )
- {
- genProxyCheckbox_.setSelection( genProxy.booleanValue() );
- }
-
- public Boolean getGenerateProxy()
- {
- return new Boolean( genProxyCheckbox_.getSelection() );
- }
-
- public void setCustomizeClientMappings( boolean showMappings )
- {
- showMappingsCheckbox_.setSelection( showMappings );
- }
-
- public boolean getCustomizeClientMappings()
- {
- return showMappingsCheckbox_.getSelection() && genProxyCheckbox_.getSelection();
- }
-
- public void setIsClientScenario( boolean isClientScenario )
- {
- genProxyCheckbox_.setEnabled( !isClientScenario );
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java
deleted file mode 100644
index 311064cb0..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wizard/client/WebServiceClientAxisType.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-package org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client;
-
-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.command.AxisClientDefaultingCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.command.DefaultsForClientJavaWSDLCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.Stub2BeanCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisMappingsWidget;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisProxyWidget;
-import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ClientExtensionOutputCommand;
-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;
-
-
-/**
- * Developers who are adding web service clients into the wizard should create
- * a class that implements this interface.
-**/
-public class WebServiceClientAxisType implements CommandWidgetBinding
-{
-
-
- /* (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)
- {
- // AxisClientDefaultingCommand
- dataRegistry.addMapping( AxisClientDefaultingCommand.class, "CustomizeClientMappings", AxisProxyWidget.class );
- dataRegistry.addMapping( AxisClientDefaultingCommand.class, "ProxyProjectFolder", AxisProxyWidget.class, "ProxyFolder", null );
- dataRegistry.addMapping( AxisClientDefaultingCommand.class, "GenerateProxy", AxisProxyWidget.class);
- dataRegistry.addMapping( AxisClientDefaultingCommand.class, "IsClientScenario", AxisProxyWidget.class);
- dataRegistry.addMapping( AxisClientDefaultingCommand.class, "ClientProject", AxisProxyWidget.class );
- dataRegistry.addMapping( AxisClientDefaultingCommand.class, "JavaWSDLParam", AxisMappingsWidget.class, "JavaParameter", null);
-
- // AxisProxyWidget
- dataRegistry.addMapping( AxisProxyWidget.class, "GenerateProxy", ClientExtensionOutputCommand.class );
- dataRegistry.addMapping( AxisProxyWidget.class, "OutputFolder", DefaultsForClientJavaWSDLCommand.class );
-
- //AxisMappingsWidget
- dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", DefaultsForHTTPBasicAuthCommand.class, "JavaWSDLParam", null); //OK
- dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", DefaultsForClientJavaWSDLCommand.class, "JavaWSDLParam", null); //OK
- dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", ValidateWSDLCommand.class, "JavaWSDLParam", null); //OK
- dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", WSDL2JavaCommand.class, "JavaWSDLParam", null); //OK
- dataRegistry.addMapping(AxisMappingsWidget.class, "JavaParameter", Stub2BeanCommand.class, "JavaWSDLParam", null); //OK
- }
-
- /* (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( "AxisClientStart",
- AxisConsumptionUIMessages.PAGE_TITLE_WS_AXIS_PROXY,
- AxisConsumptionUIMessages.PAGE_DESC_WS_AXIS_PROXY,
- new WidgetContributorFactory()
- {
- public WidgetContributor create()
- {
- return new AxisProxyWidget();
- }
- } );
-
- widgetRegistry.add( "AxisClientBeanMapping",
- AxisConsumptionUIMessages.PAGE_TITLE_WS_XML2PROXY,
- AxisConsumptionUIMessages.LABEL_EXPLORE_MAPPINGS_XML2BEAN,
- new WidgetContributorFactory()
- {
- public WidgetContributor create()
- {
- return new AxisMappingsWidget(AxisMappingsWidget.MODE_XML2PROXY );
- }
- } );
- }
-
- /* (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();
- }
- };
- }
- /* (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)
- {
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisClientConfigWidgetFactory.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisClientConfigWidgetFactory.java
deleted file mode 100644
index cdb7e9fbf..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisClientConfigWidgetFactory.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.consumption.ui.wsrt;
-
-import org.eclipse.jst.ws.internal.axis.consumption.ui.widgets.AxisProxyWidget;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.wizard.client.WebServiceClientAxisType;
-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 AxisClientConfigWidgetFactory implements INamedWidgetContributorFactory {
-
- private INamedWidgetContributor proxyConfigWidget_;
- private INamedWidgetContributor mappingsWidget_;
- private AxisProxyWidget proxyWidget_;
- private WidgetBindingToWidgetFactoryAdapter adapter_;
-
- public AxisClientConfigWidgetFactory()
- {
- adapter_ = new WidgetBindingToWidgetFactoryAdapter( new WebServiceClientAxisType() );
-
- proxyConfigWidget_ = adapter_.getWidget( "AxisClientStart" );
- proxyWidget_ = (AxisProxyWidget)proxyConfigWidget_.getWidgetContributorFactory().create();
- mappingsWidget_ = adapter_.getWidget( "AxisClientBeanMapping" );
- }
-
- public INamedWidgetContributor getFirstNamedWidget()
- {
- return proxyConfigWidget_;
- }
-
- public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor widgetContributor)
- {
- return widgetContributor == proxyConfigWidget_ && proxyWidget_.getCustomizeClientMappings() ? mappingsWidget_ : null;
- }
-
- public void registerDataMappings(DataMappingRegistry dataRegistry)
- {
- adapter_.registerDataMappings( dataRegistry );
- }
-}
diff --git a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java b/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java
deleted file mode 100644
index 370160d8d..000000000
--- a/bundles/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/wsrt/AxisWebServiceClient.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 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
- * -------- -------- -----------------------------------------------------------
- * 20060216 115144 pmoogk@ca.ibm.com - Peter Moogk
- *******************************************************************************/
-
-package org.eclipse.jst.ws.internal.axis.consumption.ui.wsrt;
-
-import java.util.Vector;
-import org.eclipse.jst.ws.internal.axis.consumption.core.command.WSDL2JavaCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientDefaultingCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientInputCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.command.AxisClientOutputCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.command.DefaultsForClientJavaWSDLCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.CopyAxisJarCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.DefaultsForHTTPBasicAuthCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.RefreshProjectCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.Stub2BeanCommand;
-import org.eclipse.jst.ws.internal.axis.consumption.ui.task.ValidateWSDLCommand;
-import org.eclipse.jst.ws.internal.common.StringToIProjectTransformer;
-import org.eclipse.jst.ws.internal.consumption.command.common.BuildProjectCommand;
-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.AbstractWebServiceClient;
-import org.eclipse.wst.ws.internal.wsrt.IContext;
-import org.eclipse.wst.ws.internal.wsrt.ISelection;
-import org.eclipse.wst.ws.internal.wsrt.WebServiceClientInfo;
-
-public class AxisWebServiceClient extends AbstractWebServiceClient
-{
-
- public AxisWebServiceClient(WebServiceClientInfo info)
- {
- super(info);
- // TODO Auto-generated constructor stub
- }
-
- 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)
- {
- EclipseEnvironment environment = (EclipseEnvironment)env;
- registerDataMappings( environment.getCommandManager().getMappingRegistry());
-
- Vector commands = new Vector();
- commands.add(new AxisClientInputCommand(this, ctx, project));
- commands.add(new AxisClientDefaultingCommand());
-// commands.add(new SimpleFragment("AxisClientStart"));
-// commands.add(new SimpleFragment("AxisClientBeanMapping"));
- commands.add(new DefaultsForHTTPBasicAuthCommand());
- commands.add(new CopyAxisJarCommand());
- commands.add(new DefaultsForClientJavaWSDLCommand());
- commands.add(new ValidateWSDLCommand());
- commands.add(new WSDL2JavaCommand());
- commands.add(new RefreshProjectCommand());
- commands.add(new Stub2BeanCommand());
- commands.add(new AxisClientOutputCommand(this,ctx));
- commands.add(new BuildProjectCommand());
- 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)
- {
- return null;
- }
-
- public void registerDataMappings(DataMappingRegistry registry)
- {
- // AxisClientDefaultingCommand
- registry.addMapping(AxisClientInputCommand.class, "ClientProject", AxisClientDefaultingCommand.class, "ClientProject",
- new StringToIProjectTransformer());
-// registry.addMapping(ClientExtensionDefaultingCommand.class, "ClientRuntime", AxisClientDefaultingCommand.class, "ClientRuntimeID",
-// null);
-// registry.addMapping(ClientExtensionDefaultingCommand.class, "WebServicesParser", AxisClientDefaultingCommand.class);
-// registry.addMapping(ClientExtensionDefaultingCommand.class, "ClientProjectEAR", AxisClientDefaultingCommand.class,
-// "ClientProjectEAR", new StringToIProjectTransformer());
- registry.addMapping(AxisClientInputCommand.class, "WsdlURL", AxisClientDefaultingCommand.class); // URI
- // to
- // URL
- // transformer
- // req'd??
-// registry.addMapping(ClientExtensionDefaultingCommand.class, "TestProxySelected", AxisClientDefaultingCommand.class,
-// "TestProxySelected", null);
- registry.addMapping(AxisClientInputCommand.class, "ClientServer", AxisClientDefaultingCommand.class);
-// registry.addMapping(ClientExtensionDefaultingCommand.class, "IsClientScenario", AxisClientDefaultingCommand.class);
- registry.addMapping(AxisClientInputCommand.class, "GenerateProxy", AxisClientDefaultingCommand.class);
- // DefaultsForHTTPBasicAuthCommand()
- registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", DefaultsForHTTPBasicAuthCommand.class); //OK
- registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", DefaultsForHTTPBasicAuthCommand.class, "WsdlServiceURL", null); //OK
- registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", DefaultsForHTTPBasicAuthCommand.class); //OK
-
- registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", CopyAxisJarCommand.class, "Project", null);
-
- // DefaultsForClientJavaWSDLCommand() // javaParam_, model_
- registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", DefaultsForClientJavaWSDLCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", DefaultsForClientJavaWSDLCommand.class, "ProxyProject",
- null);
- // registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL",
- // DefaultsForClientJavaWSDLCommand.class,"WSDLServicePathname",null);
- // //
- // URL to URL??
- registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", DefaultsForClientJavaWSDLCommand.class, "WSDLServiceURL", null); // URI
- // to
- // URL??
- // ValidateWSDLCommand()
- registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", ValidateWSDLCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "WsdlServiceURL", ValidateWSDLCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", ValidateWSDLCommand.class);
- // WSDL2JavaCommand() // javaParam_
- registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", WSDL2JavaCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "WsdlURL", WSDL2JavaCommand.class, "WsdlURI", null); // URL
- // to
- // URI??
- // RefreshProjectCommand()
- registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", RefreshProjectCommand.class, "Project", null);
- // Stub2BeanCommand()
- registry.addMapping(AxisClientDefaultingCommand.class, "JavaWSDLParam", Stub2BeanCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "WebServicesParser", Stub2BeanCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", Stub2BeanCommand.class);
- registry.addMapping(DefaultsForClientJavaWSDLCommand.class, "OutputFolder", Stub2BeanCommand.class );
- // BuildProjectCommand()
- registry.addMapping(AxisClientDefaultingCommand.class, "ClientProject", BuildProjectCommand.class, "Project", null);
- registry.addMapping(AxisClientDefaultingCommand.class, "ForceBuild", BuildProjectCommand.class);
- registry.addMapping(AxisClientDefaultingCommand.class, "ValidationManager", BuildProjectCommand.class);
-
- registry.addMapping(Stub2BeanCommand.class, "ProxyBean", AxisClientOutputCommand.class, "ProxyBean", null);
-// registry.addMapping(AxisClientDefaultingCommand.class, "GenerateProxy", ClientExtensionOutputCommand.class);
-// registry.addMapping(AxisClientDefaultingCommand.class, "SetEndpointMethod", ClientExtensionOutputCommand.class);
- }
-}

Back to the top