Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Stryker2018-01-25 18:11:24 +0000
committerRob Stryker2018-01-25 18:11:24 +0000
commita3b4f57ca16c1d8b05dd04e23e374ca080d2f2f1 (patch)
tree4952700ae47199657a29a777e62506f40b751275
parent21192bad0e6725cef8568429fb84aaa0a5311c9c (diff)
parent53d65e9949a028b566b24458f3ef5f6c8d1e2700 (diff)
downloadwebtools.webservices-a3b4f57ca16c1d8b05dd04e23e374ca080d2f2f1.tar.gz
webtools.webservices-a3b4f57ca16c1d8b05dd04e23e374ca080d2f2f1.tar.xz
webtools.webservices-a3b4f57ca16c1d8b05dd04e23e374ca080d2f2f1.zip
Merge ../webtools.webservices.axis2
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.classpath7
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.cvsignore5
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.project28
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/META-INF/MANIFEST.MF37
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/about.html34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/build.properties21
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/plugin.properties23
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/pom.xml27
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientCodegenCommand.java257
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java63
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientOutputCommand.java58
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientTestCaseIntegrateCommand.java173
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2WebservicesServerCommand.java43
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/DataModel.java106
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/Model.java109
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUI.properties43
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUIMessages.java59
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/plugin/WebServiceAxis2ConsumptionCorePlugin.java63
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ContentCopyUtils.java148
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/DefaultCodegenUtil.java94
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ServicePingUtil.java77
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDL2JavaGenerator.java413
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDLPropertyReader.java250
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/creation/core/data/DataModel.java155
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.classpath7
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.cvsignore5
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.project28
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/META-INF/MANIFEST.MF35
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/about.html34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/build.properties23
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.properties31
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.xml20
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/pom.xml27
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/plugin/WebServiceAxis2ConsumptionUIPlugin.java65
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java33
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/widgets/Axis2ProxyWidget.java565
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wizard/client/WebServiceClientAxis2Type.java105
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2ClientConfigWidgetFactory.java77
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2WebServiceClient.java136
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/.classpath7
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/.cvsignore5
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/.project28
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/META-INF/MANIFEST.MF39
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/about.html34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/build.properties23
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.properties34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.xml68
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/pom.xml27
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/resources/services.xsd131
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/constant/Axis2Constants.java104
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterContext.java96
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterDefaults.java96
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/PersistentAxis2EmitterContext.java152
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java43
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/WebServiceAxis2CorePlugin.java95
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUI.properties54
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUIMessages.java71
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/Axis2CoreUtils.java274
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/ClassLoadingUtil.java131
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FacetContainerUtils.java216
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FileUtils.java254
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/RuntimePropertyUtils.java191
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/Axis2WebservicesServerCommand.java186
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/MergeWEBXMLCommand.java255
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetInstallDelegate.java56
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetUnInstallDelegate.java42
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetInstallDelegate.java30
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetUnInstallDelegate.java30
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUI.properties17
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUIMessages.java37
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/model/FacetModel.java29
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/plugin/Axis2FacetPlugin.java87
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2RuntimeUtils.java242
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2WebappUtils.java119
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/ContentCopyUtils.java410
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.classpath7
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.cvsignore5
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.project28
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/META-INF/MANIFEST.MF31
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/about.html34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/build.properties19
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/plugin.properties23
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/pom.xml27
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUCommand.java47
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUServiceCreationCommand.java169
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BuildProjectCommand.java104
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ChengeBuildPathCommand.java62
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2CleanupCommand.java37
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java115
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ServicesXMLValidationCommand.java32
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2SkelImplCommand.java97
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDCommand.java47
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java146
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WSDL2JavaCommand.java241
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WebservicesServerCommand.java81
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUI.properties49
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUIMessages.java63
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/plugin/WebServiceAxis2CreationCorePlugin.java65
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/AARFileWriter.java54
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/CommonUtils.java50
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java85
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PluginLocationFinderUtil.java120
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServiceXMLCreator.java59
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServicesXMLUtils.java55
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.classpath7
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.cvsignore5
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.project28
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/META-INF/MANIFEST.MF31
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/about.html34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/build.properties22
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.properties22
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.xml59
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/pom.xml27
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/plugin/WebServiceAxis2CreationUIPlugin.java62
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java238
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java567
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2BeanConfigWidgetFactory.java89
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2CheckWSDLCommand.java70
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2SkelConfigWidgetFactory.java87
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebService.java131
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceInfo.java20
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceRuntime.java36
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/.classpath7
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/.cvsignore5
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/.project28
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/META-INF/MANIFEST.MF17
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.html34
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.ini12
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.mappings6
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.properties24
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/build.properties25
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/icons/WTP_icon_x32_v2.pngbin0 -> 5616 bytes
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.properties25
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.xml12
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/pom.xml27
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/axis2/ui/plugin/WebServiceAxis2UIPlugin.java65
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/preferences/Axis2RuntimePreferencePage.java350
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.cvsignore2
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.project22
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/DocBuild.xml66
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/META-INF/MANIFEST.MF7
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/about.html34
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/build.properties18
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/_4.cfsbin0 -> 21564 bytes
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/deletablebin0 -> 4 bytes
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_contributions3
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_dependencies4
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_docs6
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/segmentsbin0 -> 27 bytes
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/myplugin.xml25
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.user.maplist8
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.userindex.xml35
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.properties15
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.xml25
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/pom.xml27
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.dita100
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.html154
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.dita172
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.html237
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.dita146
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.html212
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.dita143
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.html251
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.ditamap39
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.xml5
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.ditamap15
-rw-r--r--axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.xml11
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/.cvsignore2
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/.project17
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/build.properties3
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/eclipse_update_120.jpgbin0 -> 21695 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.properties48
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.xml72
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/pom.xml63
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.html27
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.ini31
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.mappings6
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.properties26
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/build.properties2
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/plugin.properties12
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.gifbin0 -> 1752 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.pngbin0 -> 2672 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/build.properties14
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/eclipse_update_120.jpgbin0 -> 21695 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/feature.properties47
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.html27
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/build.properties2
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.gifbin0 -> 1752 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.pngbin0 -> 2672 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/.project17
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/build.properties5
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/eclipse_update_120.jpgbin0 -> 21695 bytes
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.properties48
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.xml30
-rw-r--r--axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/pom.xml27
-rw-r--r--axis2/pom.xml46
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.classpath7
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.project28
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/META-INF/MANIFEST.MF32
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/about.html34
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/build.properties17
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/plugin.properties14
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/pom.xml27
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/Activator.java64
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/AllPerformanceTests.java53
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/WSWizardTomcat55Test.java59
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrBUJavaAxis2TC55.java169
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrClientAxis2TC55.java160
-rw-r--r--axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrTDJavaAxis2TC55.java155
222 files changed, 14937 insertions, 0 deletions
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.classpath b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.cvsignore b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.cvsignore
new file mode 100644
index 000000000..3cbc7212f
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.cvsignore
@@ -0,0 +1,5 @@
+build.xml
+javaCompiler...args
+@dot
+org.eclipse.jst.ws.axis2.consumption.core_1.0.102.200804020204.jar
+temp.folder
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.project b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.project
new file mode 100644
index 000000000..673d2ac41
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.consumption.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.core.resources.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..a75855759
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Tue Apr 24 12:40:53 EDT 2007
+eclipse.preferences.version=1
+encoding//src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUI.properties=ISO-8859-1
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.jdt.core.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..5cd75ccdf
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#Sun May 06 17:32:38 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+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=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+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.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=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=ignore
+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.unusedLabel=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=ignore
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/META-INF/MANIFEST.MF b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..885fa4aaf
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/META-INF/MANIFEST.MF
@@ -0,0 +1,37 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.consumption.core
+Bundle-Version: 1.0.200.qualifier
+Bundle-Activator: org.eclipse.jst.ws.axis2.consumption.core.plugin.WebServiceAxis2ConsumptionCorePlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.wst.ws.parser,
+ org.eclipse.jst.ws,
+ org.eclipse.jst.ws.ui,
+ org.eclipse.jst.ws.consumption,
+ org.eclipse.jst.ws.consumption.ui,
+ org.eclipse.wst.ws,
+ org.eclipse.wst.command.env,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.wsdl,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.environment,
+ org.eclipse.jst.ws.axis2.ui,
+ org.eclipse.jst.ws.axis2.core
+Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.ws.axis2.consumption.core.command,
+ org.eclipse.jst.ws.axis2.consumption.core.data,
+ org.eclipse.jst.ws.axis2.consumption.core.messages,
+ org.eclipse.jst.ws.axis2.consumption.core.plugin,
+ org.eclipse.jst.ws.axis2.consumption.core.utils,
+ org.eclipse.jst.ws.axis2.creation.core.data
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %PLUGIN_PROVIDER
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/about.html b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/about.html
new file mode 100644
index 000000000..0799bdb88
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/build.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/build.properties
new file mode 100644
index 000000000..37a61feab
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc 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:
+# WSO2 Inc - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+# Axis2 runtime to the framework for 168762
+# 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/plugin.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/plugin.properties
new file mode 100644
index 000000000..d1f71ad72
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/plugin.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2007, 2010 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070428 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+# Axis2 runtime to the framework for 168762
+# 20070501 184617 sandakith@wso2.com - Lahiru Sandakith, Provide plugin details
+# 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
+# 20080530 234841 kathy@ca.ibm.com - Kathy Chan, Change plugin provider to Eclipse.org
+###############################################################################
+
+#
+# Messages in plugin.xml.
+#
+PLUGIN_NAME=Webservice Axis2 Consumption Core Plug-in
+PLUGIN_PROVIDER=Eclipse Web Tools Platform
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/pom.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/pom.xml
new file mode 100644
index 000000000..cf3618142
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.consumption.core</artifactId>
+ <version>1.0.200-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientCodegenCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientCodegenCommand.java
new file mode 100644
index 000000000..fdf3ec673
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientCodegenCommand.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070205 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070206 172186 sandakith@wso2.com - Fix for 172186, Added a check to overcome the issue.
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 185398 sandakith@wso2.com - Lahiru Sandakith
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20070814 187840 sandakith@wso2.com - Lahiru Sandakith, Fixing 187840 ITE message
+ * 20070814 193593 sandakith@wso2.com - Lahiru Sandakith, custom package name fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080213 218910 kathy@ca.ibm.com - Kathy Chan
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ * 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+*******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.command;
+
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+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.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.ContentCopyUtils;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.WSDL2JavaGenerator;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.WSDLPropertyReader;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+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.environment.IStatusHandler;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2ClientCodegenCommand extends AbstractDataModelOperation {
+
+ private DataModel model;
+
+ public Axis2ClientCodegenCommand( DataModel model ){
+ this.model = model;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
+ IEnvironment environment = getEnvironment();
+ IStatusHandler statusHandler = environment.getStatusHandler();
+
+ String workspaceDirectory = ResourcesPlugin.getWorkspace().getRoot().
+ getLocation().toOSString();
+ String currentDynamicWebProjectDir = FacetContainerUtils.getProjectRoot(
+ model.getWebProjectName()).toOSString();
+ String matadataDir = FileUtils.addAnotherNodeToPath(
+ workspaceDirectory,
+ Axis2Constants.DIR_DOT_METADATA);
+ String matadataPluginsDir = FileUtils.addAnotherNodeToPath(
+ matadataDir,
+ Axis2Constants.DIR_DOT_PLUGINS);
+ String matadataAxis2Dir = FileUtils.addAnotherNodeToPath(
+ matadataPluginsDir,
+ Axis2Constants.AXIS2_PROJECT);
+ String tempCodegenOutputLocation = FileUtils.addAnotherNodeToPath(
+ matadataAxis2Dir,
+ Axis2Constants.CODEGEN_RESULTS);
+ File tempCodegenOutputLocationFile = new File(tempCodegenOutputLocation);
+ if (tempCodegenOutputLocationFile.exists()){
+ FileUtils.deleteDirectories(tempCodegenOutputLocation);
+ }
+ FileUtils.createDirectorys(tempCodegenOutputLocation);
+ WSDL2JavaGenerator generator = new WSDL2JavaGenerator();
+
+ //AxisService service;
+ Object axisServiceInstance;
+
+ String transformerFactory = null;
+ boolean transformerFactoryModified = false;
+
+ try {
+ // use the xalan transformer factory if loadable
+ try {
+ transformerFactory = System.getProperty("javax.xml.transform.TransformerFactory");
+ Class.forName("org.apache.xalan.processor.TransformerFactoryImpl");
+ String modifiedTransformerFactory = "org.apache.xalan.processor.TransformerFactoryImpl";
+ if (!modifiedTransformerFactory.equals(transformerFactory)) {
+ System.setProperty("javax.xml.transform.TransformerFactory", modifiedTransformerFactory);
+ transformerFactoryModified = true;
+ }
+ }
+ catch (ClassNotFoundException e) {
+ // If class not found, keep using the default transformer factory.
+ }
+
+ //service = generator.getAxisService(model.getWsdlURI());
+ ClassLoadingUtil.setInitByClient(true);
+ ClassLoadingUtil.cleanAntClassLoader();
+ ClassLoadingUtil.init(model.getWebProjectName());
+ axisServiceInstance = generator.getAxisService(model.getWsdlURI(),model.getServiceQName(),model.getPortName());
+ Map optionsMap = generator.fillOptionMap(
+ model.isASync(), //async
+ model.isSync(), //sync
+ false, //servirside false always
+ false, //services.xml false always
+ model.isTestCaseCheck(),
+ model.isGenerateAllCheck(),
+ (model.getServiceName()!=null)?model.getServiceName():null,
+ (model.getPortName()!=null)?model.getPortName():null,
+ (model.getDatabindingType().toLowerCase()!=null)
+ ?model.getDatabindingType().toLowerCase()
+ :null,
+ (model.getWsdlURI()!=null)?model.getWsdlURI():null,
+ (model.getPackageText()!=null)?model.getPackageText():null,
+ "java",
+ tempCodegenOutputLocation,
+ Axis2CoreUtils.getSourceFolder(model.getWebProjectName()),
+ model.getNamespaseToPackageMapping(),
+ false //Serverside interface always false
+ );
+
+ //CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
+ Class CodeGenConfigurationClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.wsdl.codegen.CodeGenConfiguration");
+
+ //-----------------------------------------------------------------------------------//
+ //Fix for the Axis2 1.2
+ //Constructor CodeGenConfigurationConstructor = CodeGenConfigurationClass
+ // .getConstructor(new Class[]{axisServiceInstance.getClass(),Map.class});
+ //Object CodeGenConfigurationInstance = CodeGenConfigurationConstructor
+ // .newInstance(new Object[]{axisServiceInstance,optionsMap});
+
+ Constructor CodeGenConfigurationConstructor = CodeGenConfigurationClass
+ .getConstructor(new Class[]{Map.class});
+ Object CodeGenConfigurationInstance = CodeGenConfigurationConstructor
+ .newInstance(new Object[]{optionsMap});
+
+ // codegenConfig.addAxisService(service);
+ Method addAxisServiceMethod = CodeGenConfigurationClass
+ .getMethod("addAxisService", new Class[]{ axisServiceInstance.getClass()});
+ addAxisServiceMethod.invoke(CodeGenConfigurationInstance,
+ new Object[]{axisServiceInstance});
+
+ //set the wsdl definision for codegen config for skeleton generarion.
+ WSDLPropertyReader reader = new WSDLPropertyReader(model);
+ reader.readWSDL(model.getWebProjectName(),model.getWsdlURI());
+ Object wsdlDefinitionInstance = reader.getWsdlDefinitionInstance();
+ //Class DefinitionClass = ClassLoadingUtil.loadClassFromAntClassLoader("javax.wsdl.Definition");
+ //codegenConfig.setWsdlDefinition(wsdlDefinition);
+ Method setWsdlDefinitionMethod = CodeGenConfigurationClass
+ .getMethod("setWsdlDefinition", new Class[]{reader.getWsdlDefinitionClass()});
+ setWsdlDefinitionMethod.invoke(CodeGenConfigurationInstance,
+ new Object[]{wsdlDefinitionInstance});
+
+ //-----------------------------------------------------------------------------------//
+
+ //set the baseURI
+ //codegenConfig.setBaseURI(generator.getBaseUri(model.getWsdlURI()));
+
+ Method setBaseURIMethod = CodeGenConfigurationClass
+ .getMethod("setBaseURI", new Class[]{String.class});
+ setBaseURIMethod.invoke(CodeGenConfigurationInstance,
+ new Object[]{generator.getBaseUri(model.getWsdlURI())});
+
+ //Get the namespace from the AxisService and set it in the configuration
+ Class AxisServiceClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.description.AxisService");
+
+ Method getTargetNamespaceMethod = AxisServiceClass.getMethod("getTargetNamespace", null);
+ Object targetNamespace = getTargetNamespaceMethod.invoke(axisServiceInstance, null);
+
+ Object stringReturn = null;
+ if (model.getPackageText()!=null) {
+ stringReturn = model.getPackageText();
+ } else {
+ Class URLProcessorClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.util.URLProcessor");
+ Method makePackageNameMethod = URLProcessorClass
+ .getMethod("makePackageName", new Class[]{String.class});
+ stringReturn = makePackageNameMethod.invoke(null, new Object[]{targetNamespace});
+ }
+
+
+ model.setPackageText(stringReturn.toString());
+
+ Method setPackageNameMethod = CodeGenConfigurationClass
+ .getMethod("setPackageName", new Class[]{String.class});
+ setPackageNameMethod.invoke(CodeGenConfigurationInstance, new Object[]{stringReturn});
+
+ //new CodeGenerationEngine(codegenConfig).generate();
+
+ Class CodeGenerationEngineClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.wsdl.codegen.CodeGenerationEngine");
+ Constructor CodeGenerationEngineConstructor = CodeGenerationEngineClass
+ .getConstructor(new Class[]{CodeGenConfigurationInstance.getClass()});
+ Object CodeGenerationEngineInstance = CodeGenerationEngineConstructor
+ .newInstance(new Object[]{CodeGenConfigurationInstance});
+
+ //Invoke Codegen Method
+ Method generateMethod = CodeGenerationEngineClass.getMethod("generate", null);
+ generateMethod.invoke(CodeGenerationEngineInstance, null);
+
+ //Copy the existing codegen results to the current project
+ ContentCopyUtils contentCopyUtils = new ContentCopyUtils(getEnvironment());
+ status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
+ tempCodegenOutputLocation,
+ currentDynamicWebProjectDir,
+ monitor,
+ statusHandler);
+
+ IProject project = FacetContainerUtils.getProjectName(model.getWebProjectName());
+ IFolder folder = project.getFolder("resources");
+ if (folder.exists()){
+ Axis2CoreUtils.addResourcesFolderAsClassPath(project);
+ }
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(NLS.bind(
+ Axis2ConsumptionUIMessages.ERROR_CODEGEN_EXCEPTION,
+ new String[]{" : "+e.getCause()}),
+ e);
+ environment.getStatusHandler().reportError(status);
+ } finally {
+ if (transformerFactoryModified) {
+ // restore to the original TransformerFactory
+ if (transformerFactory == null) {
+ System.clearProperty("javax.xml.transform.TransformerFactory");
+ } else {
+ System.setProperty("javax.xml.transform.TransformerFactory", transformerFactory);
+ }
+ }
+ }
+
+ return status;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java
new file mode 100644
index 000000000..bea5ea899
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientDefaultingCommand.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc., 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070205 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070508 175030 sandakith@wso2.com - Lahiru Sandakith, WSDL not passed to Axis2 client fix
+ * 20070612 192047 sandakith@wso2.com - Lahiru Sandakith, 192047
+ * 20070612 192047 kathy@ca.ibm.com - Kathy Chan
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080622 241170 samindaw@wso2.com - Saminda Wijeratne, Axis2 preferences respected when click finish in 1st page
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.DefaultCodegenUtil;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
+
+public class Axis2ClientDefaultingCommand extends AbstractDataModelOperation {
+
+ DataModel model;
+ private IWebServiceClient ws;
+ IStatus status;
+
+ public Axis2ClientDefaultingCommand(DataModel model, IWebServiceClient ws){
+ this.model=model;
+ this.ws=ws;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ //Default Settings for the Codegeneration
+
+ String wsdlURL = ws.getWebServiceClientInfo().getWsdlURL();
+ model.setWsdlURI(wsdlURL);
+
+ DefaultCodegenUtil defaultCodegenUtil = new DefaultCodegenUtil(model);
+ defaultCodegenUtil.populateModelParamsFromWSDL();
+
+ status = Status.OK_STATUS;
+ return status;
+ }
+
+ public DataModel getWebServiceDataModel(){
+ return model;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientOutputCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientOutputCommand.java
new file mode 100644
index 000000000..1d576186e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientOutputCommand.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc., 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20080621 210817 samindaw@wso2.com - Saminda Wijeratne, Setting the proxyBean and proxyEndPoint values
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.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 Axis2ClientOutputCommand extends AbstractDataModelOperation {
+
+ private IWebServiceClient wsc_;
+ private String proxyBean_;
+ private String proxyEndpoint_;
+
+ /**
+ * Default CTOR
+ */
+ public Axis2ClientOutputCommand() {
+ }
+
+ public Axis2ClientOutputCommand(IWebServiceClient wsc, IContext context) {
+ wsc_ = wsc;
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
+ {
+ wsc_.getWebServiceClientInfo().setImplURL(proxyBean_);
+ wsc_.getWebServiceClientInfo().setProxyEndpoint(proxyEndpoint_);
+ return Status.OK_STATUS;
+ }
+
+ public void setProxyBean(String proxyBean) {
+ this.proxyBean_ = proxyBean;
+ }
+
+ public void setProxyEndpoint(String proxyEndpoint) {
+ this.proxyEndpoint_ = proxyEndpoint;
+ }
+
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientTestCaseIntegrateCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientTestCaseIntegrateCommand.java
new file mode 100644
index 000000000..1ea808839
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2ClientTestCaseIntegrateCommand.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20070608 191055 sandakith@wso2.com - Lahiru Sandakith, Duplicate classpath entry fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to separate file
+ * 20071121 205227 sandakith@wso2.com - Lahiru Sandakith, jUnit problem with project export
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.command;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.commands.ExecutionException;
+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.Path;
+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.jdt.internal.core.JavaProject;
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.ContentCopyUtils;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.wst.common.environment.IEnvironment;
+import org.eclipse.wst.common.environment.IStatusHandler;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.common.BundleUtils;
+
+
+/**
+ * This Class will first check whether Axis2 Client will generate the TestCase
+ * and if so then it will integrate that test to the initiated dynamic web project
+ *
+ */
+public class Axis2ClientTestCaseIntegrateCommand extends AbstractDataModelOperation {
+
+ private DataModel model;
+ private IProject project;
+ private boolean testClassPathExists;
+
+ public Axis2ClientTestCaseIntegrateCommand(IProject project_,DataModel model_){
+ this.model = model_;
+ this.project = project_;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
+ String workspaceDirectory = ResourcesPlugin.getWorkspace().getRoot().
+ getLocation().toOSString();
+ // Check whether the service generate test case is enabled
+ if(model.isTestCaseCheck()){
+ try{
+ // Then add the latest junit.jar from to the project class path
+ CopyJUnitJarToProject(workspaceDirectory,monitor);
+
+ // make the test folder as source folder.
+ // Get the Project Handler
+ IJavaProject javaProj = new JavaProject(project,null);
+ // to get existing class path entries
+ IClasspathEntry[] classpathEntries = javaProj.getRawClasspath();
+ // increase the class path entries array by 1 to make room for the new source directory
+ // where path is the new source directory
+ IClasspathEntry newClasspathEntry = JavaCore
+ .newSourceEntry(getPathToTestFolder(project,workspaceDirectory));
+
+ //Check test directory already in the classpath entries.
+ for (int i = 0; i < classpathEntries.length; i++) {
+ if (classpathEntries[i].equals(newClasspathEntry)){
+ testClassPathExists = true;
+ }
+ }
+
+ int classPathLength = classpathEntries.length;
+ if(!testClassPathExists){
+ classPathLength+=1;
+ }
+ IClasspathEntry[] newClasspathEntryArray = new IClasspathEntry[classPathLength];
+
+ for (int i = 0; i < classpathEntries.length; i++) {
+ newClasspathEntryArray[i]= classpathEntries[i];
+ }
+ // if not already exist add new Class Path Entry test directory
+ if(!testClassPathExists){
+ newClasspathEntryArray[classPathLength-1] = newClasspathEntry;
+ }
+ javaProj.setRawClasspath(newClasspathEntryArray,monitor);
+
+ } catch (JavaModelException e) {
+ throw new ExecutionException(e.getMessage());
+ } catch (IOException e) {
+ throw new ExecutionException(e.getMessage());
+ }
+ }
+
+ return status;
+
+ }
+
+ /**
+ * Copy the JUnit jar from the framework location to the project classpath.
+ * @param workspace
+ * @return absolute path location of the copying file
+ * @throws ExecutionException
+ * @throws IOException
+ */
+ private String CopyJUnitJarToProject(String workspace, IProgressMonitor monitor)
+ throws ExecutionException, IOException {
+ File relativeWebInfJunitFile = new File(FileUtils.addAnotherNodeToPath(
+ J2EEUtils.getWebInfPath(project).toOSString(),
+ Axis2Constants.DIR_LIB+File.separator+
+ Axis2Constants.JUNIT_JAR));
+
+ File obsaluteWebInfJunitFile = new File(FileUtils.addAnotherNodeToPath(
+ workspace,
+ relativeWebInfJunitFile.toString()));
+ IEnvironment environment = getEnvironment();
+ IStatusHandler statusHandler = environment.getStatusHandler();
+ ContentCopyUtils contentCopyUtils = new ContentCopyUtils(getEnvironment());
+ contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
+ getFrameworkJunitFile().getAbsolutePath(),
+ obsaluteWebInfJunitFile.getAbsolutePath(),
+ monitor, statusHandler);
+ return obsaluteWebInfJunitFile.getAbsolutePath();
+ }
+
+ /**
+ * returns the Framework JUnit File location.
+ * @return
+ * @throws ExecutionException
+ */
+ private File getFrameworkJunitFile() throws ExecutionException {
+ IPath junitJarPath=BundleUtils.getJarredPluginPath(Axis2Constants.JUNIT_BUNDLE);
+ if (junitJarPath != null){
+ return new File(FileUtils.addAnotherNodeToPath(junitJarPath.toOSString(),
+ Axis2Constants.JUNIT_JAR));
+ }else{
+ throw new ExecutionException(Axis2ConsumptionUIMessages.ERROR_JUNIT_JAR_NOT_FOUND);
+ }
+ }
+
+ /**
+ * returns the path to the newly generated test folder
+ * @param project
+ * @param workspace
+ * @return IPath to the test folder
+ */
+ private IPath getPathToTestFolder(IProject project, String workspace) {
+ String pathToTest = project.getFullPath().toOSString() + File.separator
+ + Axis2Constants.DIR_TEST;
+ IPath pathToTestFolder = new Path(pathToTest);
+ return pathToTestFolder;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2WebservicesServerCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2WebservicesServerCommand.java
new file mode 100644
index 000000000..f9acee7e2
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/command/Axis2WebservicesServerCommand.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20080114 209411 sandakith@wso2.com - Lahiru Sandakith, Fix for the 209411, ?wsdl not update
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2WebservicesServerCommand extends
+AbstractDataModelOperation {
+
+ String project;
+ DataModel model;
+ public Axis2WebservicesServerCommand(DataModel model, String project){
+ this.model=model;
+ this.project = project;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
+ model.setWebProjectName(project);
+ return status;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/DataModel.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/DataModel.java
new file mode 100644
index 000000000..889dc1281
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/DataModel.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.data;
+
+public class DataModel extends Model{
+
+ //Consumption DataModel Parameters
+
+ private String serviceClass;
+ private String databindingType;
+ private String namespaseToPackageMapping;
+ //Default setting is to generate both sync and async
+ private boolean Sync = false;
+ private boolean ASync = false;
+ private boolean generateAllCheck = false;
+ private boolean testCaseCheck = false;
+
+
+ public String getDatabindingType() {
+ return databindingType;
+ }
+ public void setDatabindingType(String databindingType) {
+ this.databindingType = databindingType;
+ }
+ public boolean isGenerateAllCheck() {
+ return generateAllCheck;
+ }
+ public void setGenerateAllCheck(boolean generateAllCheck) {
+ this.generateAllCheck = generateAllCheck;
+ }
+ public String getNamespaseToPackageMapping() {
+ return namespaseToPackageMapping;
+ }
+ public void setNamespaseToPackageMapping(String namespaseToPackageMapping) {
+ this.namespaseToPackageMapping = namespaseToPackageMapping;
+ }
+
+ public String getPackageText() {
+ return super.getPackageText();
+ }
+
+ public void setPackageText(String packageText) {
+ super.setPackageText(packageText);
+ }
+
+ public String getPortName() {
+ return super.getPortName();
+ }
+
+ public void setPortName(String portName) {
+ super.setPortName(portName);
+ }
+
+ public String getServiceClass() {
+ return serviceClass;
+ }
+ public void setServiceClass(String serviceClass) {
+ this.serviceClass = serviceClass;
+ }
+
+ public String getServiceName() {
+ return super.getServiceName();
+ }
+
+ public String getWsdlURI() {
+ return super.getWsdlURI();
+ }
+
+ public void setWsdlURI(String wsdlURI) {
+ super.setWsdlURI(wsdlURI);
+ }
+
+ public boolean isASync() {
+ return ASync;
+ }
+ public void setASync(boolean async) {
+ ASync = async;
+ }
+ public boolean isSync() {
+ return Sync;
+ }
+ public void setSync(boolean sync) {
+ Sync = sync;
+ }
+ public boolean isTestCaseCheck() {
+ return testCaseCheck;
+ }
+ public void setTestCaseCheck(boolean testCaseCheck) {
+ this.testCaseCheck = testCaseCheck;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/Model.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/Model.java
new file mode 100644
index 000000000..457b1f387
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/data/Model.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.data;
+
+import java.lang.reflect.Method;
+
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+
+public class Model {
+
+ private String webProjectName;
+
+ private boolean serverStatus;
+ private String wsdlURI;
+ private String portName;
+ private String serviceName;
+ private Object serviceQName;
+ private String packageText;
+ private Object wsdlDefinitionInstance=null;
+ private String wsdlLocation="";
+
+ public String getPackageText() {
+ return packageText;
+ }
+ public void setPackageText(String packageText) {
+ this.packageText = packageText;
+ }
+ public String getPortName() {
+ return portName;
+ }
+ public void setPortName(String portName) {
+ this.portName = portName;
+ }
+ public String getServiceName() {
+ return serviceName;
+ }
+ private void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public String getWsdlURI() {
+ return wsdlURI;
+ }
+ public void setWsdlURI(String wsdlURI) {
+ this.wsdlURI = wsdlURI;
+ }
+ public boolean getServerStatus() {
+ return serverStatus;
+ }
+ public void setServerStatus(boolean b) {
+ this.serverStatus = b;
+ }
+
+ public String getWebProjectName() {
+ return webProjectName;
+ }
+ public void setWebProjectName(String webProjectName) {
+ this.webProjectName = webProjectName;
+ }
+
+ public void setWsdlDefinitionInstance(Object wsdlDefinitionInstance, String wsdlLocation) {
+ if (wsdlDefinitionInstance!=null){
+ this.wsdlDefinitionInstance = wsdlDefinitionInstance;
+ this.wsdlLocation = wsdlLocation;
+ }
+ }
+
+ public Object getWsdlDefinitionInstance() {
+ return wsdlDefinitionInstance;
+ }
+
+ public boolean isWsdlAlreadyLoaded(String filepath) {
+ return wsdlLocation.equalsIgnoreCase(filepath);
+ }
+ /**
+ * @param setServiceQName the setServiceQName to set
+ */
+ public void setServiceQName(Object serviceQName) {
+ this.serviceQName = serviceQName;
+ try{
+ Class QNameClass = ClassLoadingUtil.loadClassFromAntClassLoader("javax.xml.namespace.QName");
+ Method GetLocalPartMethod = QNameClass.getMethod("getLocalPart", null);
+ Object resultLocalPart = GetLocalPartMethod.invoke(serviceQName, null);
+ setServiceName(resultLocalPart.toString());
+ }catch(Exception e){
+ setServiceName(serviceQName.toString());
+ }
+ }
+ /**
+ * @return the setServiceQName
+ */
+ public Object getServiceQName() {
+ return serviceQName;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUI.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUI.properties
new file mode 100644
index 000000000..6d9826599
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUI.properties
@@ -0,0 +1,43 @@
+###############################################################################
+# Copyright (c) 2007, 2008 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduce the Axis2
+# runtime to the framework for 168762
+# 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+# 20070517 187307 sandakith@wso2.com - Lahiru Sandakith
+# 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+# 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+# 20080116 209411 sandakith@wso2.com - Lahiru Sandakith, Introduced for the Fix 209411
+# 20080130 216997 katep@wso2.com - Kate Price
+###############################################################################
+
+
+LABEL_SERVICE_NAME_CAPTION=Service Name
+LABEL_GENERATE_TESTCASE_CAPTION=Generate a JUnit test case to test the service
+LABEL_DATABINDING_CAPTION=Databinding
+LABEL_PORTNAME=Port Name
+LABEL_GENERATE_ALL=Generate all types for all elements referred to by schemas
+LABEL_PACKEGE_NAME=Custom package name
+LABEL_NAMESPACE=Namespace
+LABEL_PACKAGE=Package
+LABEL_CLIENT_SIDE=Client mode
+LABEL_SYNC_AND_ASYNC=Generate a client which supports both synchronous and asynchronous invocation
+LABEL_SYNC=Generate a synchronous client
+LABEL_ASYNC=Generate an asynchronous client
+
+PAGE_TITLE_WS_AXIS2_PROXY=Axis2 Client Web Service Configuration
+PAGE_DESC_WS_AXIS2_PROXY=Select the appropriate code generation settings
+
+ERROR_INVALID_FILE_READ_WRITEL=Exception occurred while reading or writing files {0}
+ERROR_INVALID_WSDL_FILE_READ_WRITEL=Exception occurred while reading or writing WSDL {0}
+ERROR_CODEGEN_EXCEPTION=Exception occurred during code generation for WSDL {0}
+ERROR_JUNIT_JAR_NOT_FOUND=Exception occurred while copying junit.jar
+ERROR_WSDL_PING_TIME_OUT=Could not retrieve the WSDL. Timeout occurred.
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUIMessages.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUIMessages.java
new file mode 100644
index 000000000..cc3d2ef01
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/messages/Axis2ConsumptionUIMessages.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+ * 20070517 187307 sandakith@wso2.com - Lahiru Sandakith
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080116 sandakith@wso2.com - Lahiru Sandakith, Introduced for the Fix 209411
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Axis2ConsumptionUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME =
+ "org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUI";//$NON-NLS-1$
+
+ private Axis2ConsumptionUIMessages() {
+ // Do not instantiate
+ }
+
+ public static String LABEL_SERVICE_NAME_CAPTION;
+ public static String LABEL_GENERATE_TESTCASE_CAPTION;
+ public static String LABEL_DATABINDING_CAPTION;
+ public static String LABEL_PORTNAME;
+ public static String LABEL_GENERATE_ALL;
+ public static String LABEL_PACKEGE_NAME;
+ public static String LABEL_NAMESPACE;
+ public static String LABEL_PACKAGE;
+ public static String LABEL_CLIENT_SIDE;
+ public static String LABEL_SYNC_AND_ASYNC;
+ public static String LABEL_SYNC;
+ public static String LABEL_ASYNC;
+
+ public static String PAGE_TITLE_WS_AXIS2_PROXY;
+ public static String PAGE_DESC_WS_AXIS2_PROXY;
+
+ public static String ERROR_INVALID_FILE_READ_WRITEL;
+ public static String ERROR_INVALID_WSDL_FILE_READ_WRITEL;
+ public static String ERROR_CODEGEN_EXCEPTION;
+ public static String ERROR_JUNIT_JAR_NOT_FOUND;
+ public static String ERROR_WSDL_PING_TIME_OUT;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Axis2ConsumptionUIMessages.class);
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/plugin/WebServiceAxis2ConsumptionCorePlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/plugin/WebServiceAxis2ConsumptionCorePlugin.java
new file mode 100644
index 000000000..669cbc2d9
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/plugin/WebServiceAxis2ConsumptionCorePlugin.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.plugin;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceAxis2ConsumptionCorePlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.consumption.core";
+
+ // The shared instance
+ private static WebServiceAxis2ConsumptionCorePlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public WebServiceAxis2ConsumptionCorePlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static WebServiceAxis2ConsumptionCorePlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ContentCopyUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ContentCopyUtils.java
new file mode 100644
index 000000000..8ad9f41ca
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ContentCopyUtils.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070118 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+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.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
+import org.eclipse.wst.command.internal.env.eclipse.BaseEclipseEnvironment;
+import org.eclipse.wst.common.environment.IEnvironment;
+import org.eclipse.wst.common.environment.IStatusHandler;
+
+public class ContentCopyUtils {
+
+ private List fileAndDirectoriesList = new ArrayList();
+ private IEnvironment environment;
+ FileInputStream finStream = null;
+
+ public ContentCopyUtils(IEnvironment env){
+ environment= env ;
+ }
+ /**
+ * This method will copy the source directory into the eclipse workspace according
+ * to the Eclipse Framework API
+ * @param sourceDir
+ * @param destinationDir
+ * @param monitor
+ * @param statusHandler
+ * @return
+ */
+ public IStatus copyDirectoryRecursivelyIntoWorkspace(String sourceDir,
+ String destinationDir,
+ IProgressMonitor monitor,
+ IStatusHandler statusHandler) {
+ IStatus status = Status.OK_STATUS;
+ fileAndDirectoriesList.clear();
+ File axis2WebappFolder = new File(sourceDir);
+ visitAllDirsAndFiles(axis2WebappFolder);
+ List deployFiles = new ArrayList();
+ deployFiles= fileAndDirectoriesList;
+
+ try {
+
+ //Import the axis2 dependency plugin according to the Resources API of eclipse
+ ResourceContext context;
+ if (environment==null)
+ context = WebServicePlugin.getInstance().getResourceContext();
+ else
+ context = ((BaseEclipseEnvironment) environment).getResourceContext();
+
+ IPath outputPath = new Path (destinationDir);
+
+ String fileName;
+ IPath targetPath=null;
+ boolean isDirectory = false;
+
+ String deployFile;
+ Iterator iterator;
+
+ String tempOutputDir = axis2WebappFolder.toString();
+ iterator = deployFiles.iterator();
+ while (iterator.hasNext()) {
+ deployFile = (String) iterator.next();
+ File source = new File(deployFile);
+ if (source.isDirectory()) {
+ isDirectory =true;
+ }else{
+ isDirectory=false;
+ finStream = new FileInputStream(source);
+ }
+
+ if (deployFile.startsWith(tempOutputDir)) {
+ fileName = deployFile.substring(tempOutputDir.length());
+ targetPath = outputPath.append(fileName).makeAbsolute();
+ if (isDirectory){
+ org.eclipse.wst.command.internal.env.common.FileResourceUtils
+ .makeFolderPathAtLocation(context,
+ targetPath,
+ monitor,
+ statusHandler);
+ }else{
+ if (finStream != null) {
+ org.eclipse.wst.command.internal.env.common.FileResourceUtils
+ .createFileAtLocation(context,
+ targetPath,
+ finStream,
+ monitor,
+ statusHandler);
+ }
+ finStream.close();
+ }
+ }
+ }
+ } catch (IOException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2ConsumptionUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ } catch (CoreException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2ConsumptionUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ }
+
+ return status;
+
+ }
+
+ // Process all files and directories under dir
+ private void visitAllDirsAndFiles(File dir) {
+
+ fileAndDirectoriesList.add(dir.getAbsolutePath());
+
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ visitAllDirsAndFiles(new File(dir, children[i]));
+ }
+ }
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/DefaultCodegenUtil.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/DefaultCodegenUtil.java
new file mode 100644
index 000000000..86a52b10e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/DefaultCodegenUtil.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070206 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.utils;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.data.Model;
+import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+
+public class DefaultCodegenUtil {
+
+ private WSDLPropertyReader reader;
+ private Model model;
+ private List serviceQNameList = null;
+ IStatus status;
+
+ public DefaultCodegenUtil(org.eclipse.jst.ws.axis2.consumption.core.data.DataModel model){
+ this.model=model;
+ }
+
+ public DefaultCodegenUtil(org.eclipse.jst.ws.axis2.creation.core.data.DataModel model){
+ this.model=model;
+ }
+
+ /**
+ * populate the model for the default scenario from the wsdl url
+ */
+ public void populateModelParamsFromWSDL() {
+ status = Status.OK_STATUS;
+ if (reader == null)
+ reader = new WSDLPropertyReader(model);
+ try {
+ String lname = model.getWsdlURI();
+ if (!"".equals(lname.trim())) {
+
+ reader.readWSDL(model.getWebProjectName(), lname);
+
+ this.serviceQNameList = reader.getServiceList();
+ if (!serviceQNameList.isEmpty()) {
+ // add the local part of the
+ Object serviceQnameInstance = serviceQNameList.get(0);
+// Class QNameClass = ClassLoadingUtil
+// .loadClassFromAntClassLoader("javax.xml.namespace.QName");
+// Method GetLocalPartMethod = QNameClass.getMethod("getLocalPart", null);
+// Object resultLocalPart = GetLocalPartMethod.invoke(serviceQnameInstance, null);
+ model.setServiceQName(serviceQnameInstance);
+ // load the ports
+ loadPortNames();
+ }
+ populatePackageName();
+ //populate the namespacess
+ //loadNamespaces(reader.getDefinitionNamespaceMap());
+ }
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(NLS.bind(
+ Axis2ConsumptionUIMessages.ERROR_INVALID_WSDL_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ }
+ }
+
+ private void loadPortNames() {
+ java.util.List ports = reader.getPortNameList(serviceQNameList.get(0));
+ // add the local part of the
+ model.setPortName(ports.get(0).toString());
+ }
+
+ private void populatePackageName() {
+ model.setPackageText(reader.packageFromTargetNamespace());
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ServicePingUtil.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ServicePingUtil.java
new file mode 100644
index 000000000..542b59812
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/ServicePingUtil.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20080116 sandakith@wso2.com - Lahiru Sandakith, Introduced for the Fix 209411
+ * WSDL retrieval issue
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.utils;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+
+/**
+ * Utility class for the service ping
+ */
+public class ServicePingUtil {
+ /**
+ * WSDL Retrieve Timeout
+ */
+ int timeTORetrieveWSDL = 10000 ; // Default is 10 sec
+
+ /**
+ * Utility method to connect to a particular URL
+ * @param url
+ */
+ public void connectToURL(String urlString) throws Exception{
+ URL url = new URL(urlString);
+ long start = System.currentTimeMillis();
+ while (true) {
+ try {
+ URLConnection urlCon;
+ urlCon = url.openConnection();
+ // TODO handle the HTTPS scenario as well.
+ if (urlCon instanceof HttpURLConnection) {
+ HttpURLConnection httpCon = (HttpURLConnection)urlCon;
+ httpCon.setDoOutput(true);
+ httpCon.setDoInput(true);
+ httpCon.setUseCaches(false);
+ httpCon.setRequestMethod("GET");
+ HttpURLConnection.setFollowRedirects(true);
+ httpCon.setReadTimeout(timeTORetrieveWSDL);
+ httpCon.connect(); // try to connect to WSDL
+ httpCon.disconnect();
+ } else {
+ // Do nothing
+ // Assume that this is in the local file system
+ }
+ break;
+ } catch (IOException e) {
+ if(System.currentTimeMillis() - start >= timeTORetrieveWSDL){
+ throw new IOException(Axis2ConsumptionUIMessages.ERROR_WSDL_PING_TIME_OUT);
+ }
+ Thread.sleep(1000);
+ }
+ }
+ }
+
+ /**
+ * Set the WSDL read timeout
+ * @param timeTORetrieveWSDL
+ */
+ public void setTimeTORetrieveWSDL(int timeTORetrieveWSDL) {
+ this.timeTORetrieveWSDL = timeTORetrieveWSDL;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDL2JavaGenerator.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDL2JavaGenerator.java
new file mode 100644
index 000000000..b96985a5d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDL2JavaGenerator.java
@@ -0,0 +1,413 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070118 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184729 sandakith@wso2.com - Lahiru Sandakith
+ * 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.consumption.core.utils;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+
+public class WSDL2JavaGenerator {
+
+ /**
+ * Maps a string containing the name of a language to a constant defined in
+ * CommandLineOptionConstants.LanguageNames
+ * @param UILangValue a string containg a language, e.g. "java", "cs", "cpp" or "vb"
+ * @return a normalized string constant
+ */
+ private String mapLanguagesWithCombo(String UILangValue) {
+ return UILangValue;
+ }
+ /**
+ * Creates a list of parameters for the code generator based on the decisions made by
+ * the user on the OptionsPage(page2). For each setting, there is a Command-Line option for
+ * the Axis2 code generator.
+ * @return a Map with keys from CommandLineOptionConstants with the values entered
+ * by the user on the Options Page.
+ */
+ public Map fillOptionMap(boolean isAyncOnly,
+ boolean isSyncOnly,
+ boolean isServerSide,
+ boolean isServerXML,
+ boolean isTestCase,
+ boolean isGenerateAll,
+ String serviceName,
+ String portName,
+ String databindingName,
+ String WSDLURI,
+ String packageName,
+ String selectedLanguage,
+ String outputLocation,
+ String sourceFolder,
+ String namespace2packageList,
+ boolean isServerSideInterface
+ ){
+ Map optionMap = new HashMap();
+
+ try{
+ //Reflection invocatin resources
+ Class CommandLineOptionConstantsClass = ClassLoadingUtil.loadClassFromAntClassLoader(
+ "org.apache.axis2.util.CommandLineOptionConstants$WSDL2JavaConstants");
+ Class CommandLineOptionClass = ClassLoadingUtil.loadClassFromAntClassLoader(
+ "org.apache.axis2.util.CommandLineOption");
+ Constructor CommandLineOptionConstructor = CommandLineOptionClass.getConstructor(
+ new Class[]{String.class,String[].class});
+ //WSDL file name
+
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION,
+ // getStringArray(WSDLURI)));
+
+ //Reflection Invocation
+ Field WSDL_LOCATION_URI_OPTION_FIELD = CommandLineOptionConstantsClass.getField(
+ "WSDL_LOCATION_URI_OPTION");
+ optionMap.put((String)WSDL_LOCATION_URI_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)WSDL_LOCATION_URI_OPTION_FIELD.get(String.class),
+ getStringArray(WSDLURI)}));
+
+ //Async only
+ if (isAyncOnly)
+ {
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION,
+ // new String[0]));
+
+ //Reflection Invocation
+ Field CODEGEN_ASYNC_ONLY_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("CODEGEN_ASYNC_ONLY_OPTION");
+ optionMap.put((String)CODEGEN_ASYNC_ONLY_OPTION_FIELD.get(
+ String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)CODEGEN_ASYNC_ONLY_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ }
+
+ //sync only
+ if (isSyncOnly)
+ {
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION,
+ // new String[0]));
+ //Reflection Invocation
+ Field CODEGEN_SYNC_ONLY_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("CODEGEN_SYNC_ONLY_OPTION");
+ optionMap.put((String)CODEGEN_SYNC_ONLY_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)CODEGEN_SYNC_ONLY_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ }
+ //serverside
+ if (isServerSide)
+ {
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION,
+ // new String[0]));
+ //Reflection Invocation
+ Field SERVER_SIDE_CODE_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("SERVER_SIDE_CODE_OPTION");
+ optionMap.put((String)SERVER_SIDE_CODE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)SERVER_SIDE_CODE_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ //server xml
+ if (isServerXML)
+ {
+ //optionMap.put(
+ // CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION,
+ // new String[0]));
+ Field GENERATE_SERVICE_DESCRIPTION_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("GENERATE_SERVICE_DESCRIPTION_OPTION");
+ optionMap.put((String)GENERATE_SERVICE_DESCRIPTION_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)GENERATE_SERVICE_DESCRIPTION_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ }
+ if (isGenerateAll){
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_ALL_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_ALL_OPTION,
+ // new String[0]));
+ Field GENERATE_ALL_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("GENERATE_ALL_OPTION");
+ optionMap.put((String)GENERATE_ALL_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)GENERATE_ALL_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ }
+ }
+ //test case
+ if (isTestCase)
+ {
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION,
+ // new String[0]));
+ Field GENERATE_TEST_CASE_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("GENERATE_TEST_CASE_OPTION");
+ optionMap.put((String)GENERATE_TEST_CASE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)GENERATE_TEST_CASE_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ }
+ //package name
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.PACKAGE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.PACKAGE_OPTION,
+ // getStringArray(packageName)));
+ Field PACKAGE_OPTION_FIELD = CommandLineOptionConstantsClass.getField("PACKAGE_OPTION");
+ optionMap.put((String)PACKAGE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)PACKAGE_OPTION_FIELD.get(String.class),
+ getStringArray(packageName)}));
+
+ //selected language
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.STUB_LANGUAGE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.STUB_LANGUAGE_OPTION,
+ // getStringArray(mapLanguagesWithCombo(selectedLanguage))));
+ Field STUB_LANGUAGE_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("STUB_LANGUAGE_OPTION");
+ optionMap.put((String)STUB_LANGUAGE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)STUB_LANGUAGE_OPTION_FIELD.get(String.class),
+ getStringArray(mapLanguagesWithCombo(selectedLanguage))}));
+
+ //output location
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.OUTPUT_LOCATION_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.OUTPUT_LOCATION_OPTION,
+ // getStringArray(outputLocation)));
+ Field OUTPUT_LOCATION_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("OUTPUT_LOCATION_OPTION");
+ optionMap.put((String)OUTPUT_LOCATION_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)OUTPUT_LOCATION_OPTION_FIELD.get(String.class),
+ getStringArray(outputLocation)}));
+
+ //databinding
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION,
+ // getStringArray(databindingName)));
+ Field DATA_BINDING_TYPE_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("DATA_BINDING_TYPE_OPTION");
+ optionMap.put((String)DATA_BINDING_TYPE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)DATA_BINDING_TYPE_OPTION_FIELD.get(String.class),
+ getStringArray(databindingName)}));
+
+ //port name
+ if (portName!=null){
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.PORT_NAME_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.PORT_NAME_OPTION,
+ // getStringArray(portName)));
+ Field PORT_NAME_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("PORT_NAME_OPTION");
+ optionMap.put((String)PORT_NAME_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)PORT_NAME_OPTION_FIELD.get(String.class),
+ getStringArray(portName)}));
+ }
+ //service name
+ if (serviceName!= null){
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.SERVICE_NAME_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.SERVICE_NAME_OPTION,
+ // getStringArray(serviceName)));
+ Field SERVICE_NAME_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("SERVICE_NAME_OPTION");
+ optionMap.put((String)SERVICE_NAME_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)SERVICE_NAME_OPTION_FIELD.get(String.class),
+ getStringArray(serviceName)}));
+ }
+ //ns2pkg mapping
+ if (namespace2packageList!= null){
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION
+ // , getStringArray(namespace2packageList)));
+ Field NAME_SPACE_TO_PACKAGE_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("NAME_SPACE_TO_PACKAGE_OPTION");
+ optionMap.put((String)NAME_SPACE_TO_PACKAGE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)NAME_SPACE_TO_PACKAGE_OPTION_FIELD.get(String.class),
+ getStringArray(namespace2packageList)}));
+ }
+
+
+ if (namespace2packageList!= null){
+ Field SOURCE_FOLDER_NAME_OPTION = CommandLineOptionConstantsClass
+ .getField("SOURCE_FOLDER_NAME_OPTION");
+ optionMap.put((String)SOURCE_FOLDER_NAME_OPTION.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)SOURCE_FOLDER_NAME_OPTION.get(String.class),
+ getStringArray(sourceFolder)}));
+ }
+
+ //server side interface mapping
+ if (isServerSideInterface){
+ // optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION,
+ // new CommandLineOption(
+ // CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION,
+ // new String[0]));
+ Field SERVER_SIDE_INTERFACE_OPTION_FIELD = CommandLineOptionConstantsClass
+ .getField("SERVER_SIDE_INTERFACE_OPTION");
+ optionMap.put((String)SERVER_SIDE_INTERFACE_OPTION_FIELD.get(String.class),
+ CommandLineOptionConstructor.newInstance(
+ new Object[]{(String)SERVER_SIDE_INTERFACE_OPTION_FIELD.get(String.class),
+ new String[0]}));
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+ return optionMap;
+
+ }
+
+ public String getBaseUri(String wsdlURI){
+
+ try {
+ URL url;
+ if (wsdlURI.indexOf("://")==-1){
+ url = new URL("file","",wsdlURI);
+ }else{
+ url = new URL(wsdlURI);
+ }
+
+
+ String baseUri;
+ if ("file".equals(url.getProtocol())){
+ baseUri = new File(url.getFile()).getParentFile().toURL().toExternalForm();
+ }else{
+ baseUri = url.toExternalForm().substring(0,
+ url.toExternalForm().lastIndexOf("/")
+ );
+ }
+
+
+ return baseUri;
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Reads the WSDL Object Model from the given location.
+ *
+ * @param wsdlURI the filesystem location (full path) of the WSDL file to read in.
+ * @return the WSDLDescription object containing the WSDL Object Model of the given WSDL file
+ * @throws WSDLException when WSDL File is invalid
+ * @throws IOException on errors reading the WSDL file
+ */
+ public Object getAxisService(String wsdlURI, Object serviceQName, String portName) throws Exception{
+
+ URL url;
+ if (wsdlURI.indexOf("://")==-1){
+ url = new URL("file","",wsdlURI);
+ }if (wsdlURI.indexOf(":/")==-1){
+ url = new URL("file","",wsdlURI);
+ }
+ else{
+ url = new URL(wsdlURI);
+ }
+
+ //FIXME @author soi -
+ // This quick fix assume that the wsdlURI points to a wsdl 1.1 version.
+ // A better fix should be to determine which builder to use based on the wsdl version.
+ // The current implementation of the wsdl builder classes did not allow for this.
+ // I will suggestthat the determination of which builder to use should be done in
+ // the builder classes, preferably in the parent builder class. Accessable through a
+ // static reference to a method like getBuilderInstance(String wsdlURI) in the parent
+ //builder class or through a builder Abstract Factor or Abstract factory methods.
+
+
+ //WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(
+ // url.openConnection().getInputStream());
+ // builder.setBaseUri(getBaseUri(wsdlURI));
+ // return builder.populateService();
+
+ //Reflection invocation
+ //Class WSDL11ToAxisServiceBuilderClass = ClassLoadingUtil.loadClassFromAxis2LibPath(
+ // projectName,
+ // "org.apache.axis2.description.WSDL11ToAxisServiceBuilder");
+ Class WSDL11ToAxisServiceBuilderClass = ClassLoadingUtil.loadClassFromAntClassLoader(
+ "org.apache.axis2.description.WSDL11ToAxisServiceBuilder");
+ Class QNameClass = ClassLoadingUtil.loadClassFromAntClassLoader("javax.xml.namespace.QName");
+ Constructor constructor = WSDL11ToAxisServiceBuilderClass.getConstructor(
+ new Class[]{InputStream.class, QNameClass, String.class});
+ Object WSDL11ToAxisServiceBuilderInstance = constructor.newInstance(
+ new Object[]{url.openConnection().getInputStream(),serviceQName,portName});
+ Method setBaseUriMethod = WSDL11ToAxisServiceBuilderClass.getMethod(
+ "setBaseUri",
+ new Class[]{String.class});
+ setBaseUriMethod.invoke(
+ WSDL11ToAxisServiceBuilderInstance,
+ new Object[]{wsdlURI});
+
+ //Fix for the Axis2 1.2
+ //builder.setCodegen(true);
+ Method setCodegenMethod = WSDL11ToAxisServiceBuilderClass.getMethod(
+ "setCodegen",
+ new Class[]{boolean.class});
+ setCodegenMethod.invoke(
+ WSDL11ToAxisServiceBuilderInstance,
+ new Object[]{true});
+
+ Method populateServiceMethod = WSDL11ToAxisServiceBuilderClass.getMethod(
+ "populateService",
+ null);
+ return populateServiceMethod.invoke(WSDL11ToAxisServiceBuilderInstance, null);
+
+ //return this import org.apache.axis2.description.AxisService;
+ }
+
+ /**
+ * Converts a single String into a String Array
+ *
+ * @param value a single string
+ * @return an array containing only one element
+ */
+ private String[] getStringArray(String value)
+ {
+ String[] values = new String[1];
+ values[0] = value;
+ return values;
+ }
+}
+
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDLPropertyReader.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDLPropertyReader.java
new file mode 100644
index 000000000..6f9b8859e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/consumption/core/utils/WSDLPropertyReader.java
@@ -0,0 +1,250 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070118 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184729 sandakith@wso2.com - Lahiru Sandakith
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.axis2.consumption.core.utils;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jst.ws.axis2.consumption.core.data.Model;
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+
+
+/**
+ * This class presents a convenient way of reading the
+ * WSDL file(url) and producing a useful set of information
+ * It does NOT use any of the standard WSDL classes from
+ * Axis2, rather it uses wsdl4j to read the wsdl and extract
+ * the properties (This is meant as a convenience for the UI
+ * only. We may not need the whole conversion the WSDLpump
+ * goes through)
+ * One would need to change this to suit a proper WSDL
+ */
+public class WSDLPropertyReader {
+
+
+ //private Definition wsdlDefinition = null;
+ private Object DefinitionInstance = null;
+ private Class DefinitionClass = null;
+ private Class ServiceClass = null;
+ private Model model;
+
+ public WSDLPropertyReader(Model model){
+ this.model=model;
+ }
+
+ public void readWSDL(String projectName, String filepath) throws Exception {
+
+ ClassLoadingUtil.init(projectName);
+
+ DefinitionClass = ClassLoadingUtil.loadClassFromAntClassLoader("javax.wsdl.Definition");
+
+ // WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+ // wsdlDefinition = reader.readWSDL(filepath);
+
+ if (!model.isWsdlAlreadyLoaded(filepath)){
+ Class WSDLFactoryClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("javax.wsdl.factory.WSDLFactory");
+ Method newInstanceMethod = WSDLFactoryClass.getMethod("newInstance", null);
+ Object WSDLFactoryObject = newInstanceMethod.invoke(null, null);
+ Class WSDLFactoryImplClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader(WSDLFactoryObject.getClass().getName());
+ Method newWSDLReaderMethod = WSDLFactoryImplClass.getMethod("newWSDLReader", null);
+ Object WSDLReaderObject = newWSDLReaderMethod.invoke(WSDLFactoryObject, null);
+ Class WSDLReaderClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader(WSDLReaderObject.getClass().getName());
+ Method readWSDLMethod = WSDLReaderClass.getMethod("readWSDL", new Class[]{String.class});
+ model.setWsdlDefinitionInstance(
+ readWSDLMethod.invoke(WSDLReaderObject, new Object[]{filepath}),filepath);
+ }
+
+ DefinitionInstance = model.getWsdlDefinitionInstance();
+ }
+
+ /**
+ * Returns the namespace map from definition
+ * @return
+ */
+ public Map getDefinitionNamespaceMap(){
+ //return wsdlDefinition.getNamespaces();
+ Map map = null;
+ try {
+ Method getNamespacesMethod = DefinitionClass.getMethod("getNamespaces", null);
+ map = (Map)getNamespacesMethod.invoke(DefinitionInstance, null);
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return map;
+ }
+
+ /**
+ * get the default package derived by the targetNamespace
+ */
+ public String packageFromTargetNamespace(){
+ //return URLProcessor.makePackageName(wsdlDefinition.getTargetNamespace());
+ String returnString = null;
+ try{
+ Method getTargetNamespaceMethod = DefinitionClass.getMethod("getTargetNamespace", null);
+ String packageName = (String)getTargetNamespaceMethod.invoke(DefinitionInstance, null);
+ Class URLProcessorClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.util.URLProcessor");
+ Method makePackageNameMethod = URLProcessorClass
+ .getMethod("makePackageName", new Class[]{String.class});
+ returnString = (String)makePackageNameMethod.invoke(null, new Object[]{packageName});
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+
+ return returnString;
+ }
+
+ /**
+ * Returns a list of service names
+ * the names are QNames
+ * @return
+ */
+ public List getServiceList(){
+ //Service service = null;
+ //Map serviceMap = wsdlDefinition.getServices();
+ //service = (Service)serviceIterator.next();
+ //returnList.add(service.getQName());
+ List returnList = new ArrayList();
+ try{
+ Object serviceInstance;
+ Method getServicesMethod = DefinitionClass.getMethod("getServices", null);
+ Map serviceMap = (Map)getServicesMethod.invoke(DefinitionInstance, null);
+
+ if(serviceMap!=null && !serviceMap.isEmpty()){
+ Iterator serviceIterator = serviceMap.values().iterator();
+ while(serviceIterator.hasNext()){
+ ServiceClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("javax.wsdl.Service");
+ Method getQNameMethod = ServiceClass.getMethod("getQName", null);
+ serviceInstance = (Object)serviceIterator.next();
+ returnList.add(getQNameMethod.invoke(serviceInstance, null));
+ }
+ }
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return returnList;
+ }
+
+ /**
+ * Returns a list of ports for a particular service
+ * the names are QNames
+ * @return
+ */
+ public List getPortNameList(Object serviceName){
+ //List returnList = new ArrayList();
+ //Service service = wsdlDefinition.getService(serviceName);
+ //Port port = null;
+ //if(service!=null){
+ // Map portMap = service.getPorts();
+ // if (portMap!=null && !portMap.isEmpty()){
+ // Iterator portIterator = portMap.values().iterator();
+ // while(portIterator.hasNext()){
+ // port = (Port)portIterator.next();
+ // returnList.add(port.getName());
+ // }
+ // }
+ //}
+ //return returnList;
+
+ List returnList = new ArrayList();
+ try{
+ Method getServiceMethod = DefinitionClass
+ .getMethod("getService", new Class[]{serviceName.getClass()});
+ Object serviceInstance = getServiceMethod
+ .invoke(DefinitionInstance, new Object[]{serviceName});
+ Object portInstance = null;
+ if(serviceInstance!=null){
+ Method getPortsMethod = ServiceClass.getMethod("getPorts", null);
+ Map portMap = (Map)getPortsMethod.invoke(serviceInstance, null);
+ if (portMap!=null && !portMap.isEmpty()){
+ Iterator portIterator = portMap.values().iterator();
+ while(portIterator.hasNext()){
+ portInstance = (Object)portIterator.next();
+ Class PortClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("javax.wsdl.Port");
+ Method getNameMethod = PortClass.getMethod("getName", null);
+ returnList.add(getNameMethod.invoke(portInstance,null));
+ }
+ }
+
+ }
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return returnList;
+ }
+
+ /**
+ * public method to get loaded wsdl Definition Instance
+ * @return
+ */
+ public Object getWsdlDefinitionInstance() {
+ return DefinitionInstance;
+ }
+
+ /**
+ * public method to get loaded Definition Class
+ * @return
+ */
+ public Class getWsdlDefinitionClass() {
+ return DefinitionClass;
+ }
+
+}
+
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/creation/core/data/DataModel.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/creation/core/data/DataModel.java
new file mode 100644
index 000000000..166593365
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.core/src/org/eclipse/jst/ws/axis2/creation/core/data/DataModel.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.data;
+
+import org.eclipse.jst.ws.axis2.consumption.core.data.Model;
+
+public class DataModel extends Model{
+
+ //Client Side
+ private String serviceClass;
+ private boolean generateServicesXML;
+ private boolean servicesXML;
+ private boolean generateAAR;
+ private String pathToServicesXML;
+ private String pathToWebServicesTempDir;
+
+ //Server Side
+ private boolean generateServerSideInterface;
+ private boolean serverXMLCheck;
+ private boolean generateAllCheck;
+ private String databindingType;
+ private String namespaseToPackageMapping;
+
+
+ public boolean isGenerateServicesXML(){
+ return generateServicesXML;
+ }
+
+ public void setGenerateServicesXML(boolean generateServicesXML){
+ this.generateServicesXML = generateServicesXML;
+ }
+
+ public String getPathToServicesXML(){
+ return pathToServicesXML;
+ }
+
+ public void setPathToServicesXML(String pathToServicesXML){
+ this.pathToServicesXML = pathToServicesXML;
+ }
+
+ public boolean isGenerateAAR() {
+ return generateAAR;
+ }
+
+ public void setGenerateAAR(boolean generateAAR) {
+ this.generateAAR = generateAAR;
+ }
+
+ public boolean isServicesXML() {
+ return servicesXML;
+ }
+
+ public void setServicesXML(boolean servicesXML) {
+ this.servicesXML = servicesXML;
+ }
+
+ public String getPathToWebServicesTempDir() {
+ return pathToWebServicesTempDir;
+ }
+
+ public void setPathToWebServicesTempDir(String pathToWebServicesTempDir) {
+ this.pathToWebServicesTempDir = pathToWebServicesTempDir;
+ }
+
+ public String getWsdlURI() {
+ return super.getWsdlURI();
+ }
+
+ public void setWsdlURI(String wsdlURI) {
+ super.setWsdlURI(wsdlURI);
+ }
+
+ public String getDatabindingType() {
+ return databindingType;
+ }
+
+ public void setDatabindingType(String databindingType) {
+ this.databindingType = databindingType;
+ }
+
+ public boolean isGenerateAllCheck() {
+ return generateAllCheck;
+ }
+
+ public void setGenerateAllCheck(boolean generateAllCheck) {
+ this.generateAllCheck = generateAllCheck;
+ }
+
+ public boolean isGenerateServerSideInterface() {
+ return generateServerSideInterface;
+ }
+
+ public void setGenerateServerSideInterface(boolean generateServerSideInterface) {
+ this.generateServerSideInterface = generateServerSideInterface;
+ }
+
+ public String getPortName() {
+ return super.getPortName();
+ }
+
+ public void setPortName(String portName) {
+ super.setPortName(portName);
+ }
+
+ public boolean isServerXMLCheck() {
+ return serverXMLCheck;
+ }
+
+ public void setServerXMLCheck(boolean serverXMLCheck) {
+ this.serverXMLCheck = serverXMLCheck;
+ }
+
+ public String getServiceName() {
+ return super.getServiceName();
+ }
+
+ public String getPackageText() {
+ return super.getPackageText();
+ }
+
+ public void setPackageText(String packageText) {
+ super.setPackageText(packageText);
+ }
+
+ public String getServiceClass() {
+ return serviceClass;
+ }
+
+ public void setServiceClass(String serviceClass) {
+ this.serviceClass = serviceClass;
+ }
+
+ public String getNamespaseToPackageMapping() {
+ return namespaseToPackageMapping;
+ }
+
+ public void setNamespaseToPackageMapping(String namespaseToPackageMapping) {
+ this.namespaseToPackageMapping = namespaseToPackageMapping;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.classpath b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.cvsignore b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.cvsignore
new file mode 100644
index 000000000..19b6a8421
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.cvsignore
@@ -0,0 +1,5 @@
+build.xml
+javaCompiler...args
+@dot
+org.eclipse.jst.ws.axis2.consumption.ui_1.0.101.200804020204.jar
+temp.folder
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.project b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.project
new file mode 100644
index 000000000..46d662e22
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.consumption.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.core.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..5f5c3d42b
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#Sun May 06 17:33:23 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+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=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+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.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=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=ignore
+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.unusedLabel=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=ignore
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.ui.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..05b7c7cab
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Wed Feb 21 10:48:27 LKT 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\n<templates/>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/META-INF/MANIFEST.MF b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..f6b90b999
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.consumption.ui;singleton:=true
+Bundle-Version: 1.0.200.qualifier
+Bundle-Activator: org.eclipse.jst.ws.internal.axis2.consumption.ui.plugin.WebServiceAxis2ConsumptionUIPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.wst.ws.parser,
+ org.eclipse.jst.ws,
+ org.eclipse.jst.ws.ui,
+ org.eclipse.jst.ws.consumption,
+ org.eclipse.jst.ws.consumption.ui,
+ org.eclipse.wst.ws,
+ org.eclipse.wst.command.env,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.wsdl,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.environment,
+ org.eclipse.jst.ws.axis2.consumption.core,
+ org.eclipse.jst.ws.axis2.ui,
+ org.eclipse.jst.ws.axis2.core
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %PLUGIN_PROVIDER
+Export-Package: org.eclipse.jst.ws.internal.axis2.consumption.ui.plugin,
+ org.eclipse.jst.ws.internal.axis2.consumption.ui.widgets,
+ org.eclipse.jst.ws.internal.axis2.consumption.ui.wizard.client,
+ org.eclipse.jst.ws.internal.axis2.consumption.ui.wsrt
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/about.html b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/about.html
new file mode 100644
index 000000000..0799bdb88
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/build.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/build.properties
new file mode 100644
index 000000000..98cccde3f
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc 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:
+# WSO2 Inc - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+# Axis2 runtime to the framework for 168762
+# 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ plugin.xml,\
+ META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.properties
new file mode 100644
index 000000000..427d720a8
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.properties
@@ -0,0 +1,31 @@
+###############################################################################
+# Copyright (c) 2007, 2010 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070118 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+# 20070501 184617 sandakith@wso2.com - Lahiru Sandakith, Provide plugin details
+# 20080530 234841 kathy@ca.ibm.com - Kathy Chan, Change plugin provider to Eclipse.org
+###############################################################################
+#
+
+#
+# Messages in plugin.xml.
+#
+PLUGIN_NAME=Webservice Axis2 Consumption UI Plug-in
+PLUGIN_PROVIDER=Eclipse Web Tools Platform
+
+WEBSERVICECLIENTTYPE_NAME_JAVA_AXIS=Java proxy
+LABEL_RUNTIME_AXIS_11=Apache Axis2
+DESC_RUNTIME_AXIS_11=Apache Axis2
+#
+# Web Services Preferance Pages
+#
+# Categories
+PREFERENCE_CATEGORY_AXIS2_EMITTER=Axis2 Emitter
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.xml
new file mode 100644
index 000000000..fd14ae2e3
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
+ <widgetFactory
+ id="Axis2ClientConfig"
+ insertBeforeCommandId="org.eclipse.jst.ws.axis2.consumption.core.command.Axis2WebservicesServerCommand"
+ class="org.eclipse.jst.ws.internal.axis2.consumption.ui.wsrt.Axis2ClientConfigWidgetFactory"/>
+ </extension>
+ <extension point="org.eclipse.wst.command.env.antDataMapping">
+ <map
+ key="ClientProjectName"
+ operation="org.eclipse.jst.ws.axis2.creation.core.command.Axis2ClientDefaultingCommand"
+ property="ClientProject"
+ transform="org.eclipse.jst.ws.internal.common.StringToIProjectTransformer"/>
+ </extension>
+
+</plugin> \ No newline at end of file
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/pom.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/pom.xml
new file mode 100644
index 000000000..3a2636726
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.consumption.ui</artifactId>
+ <version>1.0.200-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/plugin/WebServiceAxis2ConsumptionUIPlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/plugin/WebServiceAxis2ConsumptionUIPlugin.java
new file mode 100644
index 000000000..3dc912b75
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/plugin/WebServiceAxis2ConsumptionUIPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc 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:
+ * WSO2 Inc - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+ * Axis2 runtime to the framework for 168762
+ * 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.plugin;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceAxis2ConsumptionUIPlugin extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.consumption.ui";
+
+ // The shared instance
+ private static WebServiceAxis2ConsumptionUIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public WebServiceAxis2ConsumptionUIPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static WebServiceAxis2ConsumptionUIPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java
new file mode 100644
index 000000000..e544bc1d3
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/task/DefaultsForHTTPBasicAuthCommand.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc 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:
+ * WSO2 Inc - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+ * Axis2 runtime to the framework for 168762
+ * 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.task;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class DefaultsForHTTPBasicAuthCommand extends AbstractDataModelOperation {
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
+ return status;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/widgets/Axis2ProxyWidget.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/widgets/Axis2ProxyWidget.java
new file mode 100644
index 000000000..7c76c996f
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/widgets/Axis2ProxyWidget.java
@@ -0,0 +1,565 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070513 186430 sandakith@wso2.com - Lahiru Sandakith, fix for 186430
+ * Text not accessible on AXIS2 wizard pages.
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070823 200413 sandakith@wso2.com - Lahiru Sandakith, Namespace to Package table fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20071030 207618 zina@ca.ibm.com - Zina Mostafia, Page GUI sequence using tab is not correct ( violates Accessibility)
+ * 20080319 207616 makandre@ca.ibm.com - Andrew Mak, Table in Axis2 Web Service Skeleton Java Bean Configuration Page not Accessible
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.widgets;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.WSDLPropertyReader;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+import org.eclipse.jst.ws.axis2.ui.plugin.WebServiceAxis2UIPlugin;
+import org.eclipse.jst.ws.internal.ui.common.UIUtils;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
+
+public class Axis2ProxyWidget extends SimpleWidgetDataContributor {
+
+ DataModel model;
+ IStatus status = Status.OK_STATUS;
+
+
+ public Axis2ProxyWidget(DataModel model) {
+ this.model=model;
+ }
+
+ //private String pluginId_ = "org.eclipse.jst.ws.axis2.consumption.ui";
+
+ private Button genProxyCheckbox_;
+ private Button syncAndAsyncRadioButton;
+ private Button syncOnlyRadioButton;
+ private Button asyncOnlyRadioButton;
+ //private Button testCaseCheckBoxButton;
+ //private Button generateAllCheckBoxButton;
+ private Combo databindingTypeCombo;
+ private Combo portNameCombo;
+ private Combo serviceNameCombo;
+ private Text packageText;
+
+ //private java.util.List serviceQNameList2 = null;
+ private Table namespace2packageTable = null;
+ private Button generateAllCheckBoxButton;
+ private Button testCaseCheckBoxButton;
+
+ private WSDLPropertyReader reader;
+ private List serviceQNameList = null;
+ Axis2EmitterContext context;
+
+
+ public WidgetDataEvents addControls( Composite parent, Listener statusListener )
+ {
+ context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+ UIUtils uiUtils = new UIUtils(WebServiceAxis2UIPlugin.PLUGIN_ID);
+
+ Composite topComp = uiUtils.createComposite(parent, 2 );
+
+ // service name
+ serviceNameCombo = uiUtils.createCombo(topComp, Axis2ConsumptionUIMessages.LABEL_SERVICE_NAME_CAPTION, null, null, SWT.READ_ONLY);
+ serviceNameCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ //loadPortNames();
+ int selectionIndex = serviceNameCombo.getSelectionIndex();
+ if (selectionIndex != -1) {
+ Object object = reader.getServiceList().get(selectionIndex);
+ model.setServiceQName(object);
+ }
+ loadPortNames();
+ populatePackageName();
+ loadNamespaces(reader.getDefinitionNamespaceMap());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // port name
+ portNameCombo = uiUtils.createCombo(topComp, Axis2ConsumptionUIMessages.LABEL_PORTNAME, null, null, SWT.READ_ONLY);
+ portNameCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setPortName(portNameCombo.getText());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // Databinding
+ databindingTypeCombo = uiUtils.createCombo(topComp, Axis2ConsumptionUIMessages.LABEL_DATABINDING_CAPTION, null, null, SWT.READ_ONLY);
+ fillDatabinderCombo();
+ databindingTypeCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setDatabindingType(databindingTypeCombo.getText());
+ };
+ public void widgetDefaultSelected(SelectionEvent e) {
+ };
+ });
+
+ // package name
+ packageText = uiUtils.createText(topComp, Axis2ConsumptionUIMessages.LABEL_PACKEGE_NAME, null, null,SWT.BORDER);
+ packageText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ model.setPackageText(packageText.getText());
+ }
+ });
+
+ //Client type label
+ Group clientTypeGroup = uiUtils.createGroup(parent, Axis2ConsumptionUIMessages.LABEL_CLIENT_SIDE, null, null);
+
+ syncAndAsyncRadioButton = uiUtils.createRadioButton(clientTypeGroup, Axis2ConsumptionUIMessages.LABEL_SYNC_AND_ASYNC, null, null);
+ syncAndAsyncRadioButton.setSelection(
+ ((context.isAsync() || context.isSync())==false)
+ ?true
+ :(context.isAsync() && context.isSync()));
+ syncAndAsyncRadioButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ //Because default setting in axis2 to be both false in thie case
+ //File a JIRA to fix this.
+ model.setSync(!syncAndAsyncRadioButton.getSelection());
+ model.setASync(!syncAndAsyncRadioButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ syncOnlyRadioButton = uiUtils.createRadioButton(clientTypeGroup, Axis2ConsumptionUIMessages.LABEL_SYNC, null, null);
+ syncOnlyRadioButton.setSelection(context.isSync() && !context.isAsync());
+ syncOnlyRadioButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setSync(syncOnlyRadioButton.getSelection());
+ model.setASync(!syncOnlyRadioButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ asyncOnlyRadioButton = uiUtils.createRadioButton(clientTypeGroup, Axis2ConsumptionUIMessages.LABEL_ASYNC, null, null);
+ asyncOnlyRadioButton.setSelection(context.isAsync() && !context.isSync());
+ asyncOnlyRadioButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setASync(asyncOnlyRadioButton.getSelection());
+ model.setSync(!asyncOnlyRadioButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ //Set the sync async to default
+ model.setSync(context.isSync());
+ model.setASync(context.isAsync());
+
+ // generate test case option
+
+ Composite checkBoxes = uiUtils.createComposite(parent, 1);
+ testCaseCheckBoxButton = uiUtils.createCheckbox(checkBoxes, Axis2ConsumptionUIMessages.LABEL_GENERATE_TESTCASE_CAPTION, null, null);
+ testCaseCheckBoxButton.setSelection(context.isClientTestCase());
+ model.setTestCaseCheck(context.isClientTestCase());
+ testCaseCheckBoxButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setTestCaseCheck(testCaseCheckBoxButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+
+ // generate all
+ generateAllCheckBoxButton = uiUtils.createCheckbox(checkBoxes, Axis2ConsumptionUIMessages.LABEL_GENERATE_ALL, null, null);
+ generateAllCheckBoxButton.setSelection(context.isClientGenerateAll());
+ generateAllCheckBoxButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setGenerateAllCheck(generateAllCheckBoxButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+
+ new Label(parent,SWT.HORIZONTAL);
+ namespace2packageTable = new Table(parent,SWT.BORDER|SWT.FULL_SELECTION);
+ namespace2packageTable.setLinesVisible(true);
+ namespace2packageTable.setHeaderVisible(true);
+ namespace2packageTable.setEnabled(true);
+
+ declareColumn(namespace2packageTable,
+ 350, //a default width until we adjust
+ Axis2ConsumptionUIMessages.LABEL_NAMESPACE);
+ declareColumn(namespace2packageTable,
+ 200,//a default width until we adjust
+ Axis2ConsumptionUIMessages.LABEL_PACKAGE);
+
+ namespace2packageTable.setVisible(true);
+
+ // add the table editor
+ final TableEditor editor = new TableEditor(namespace2packageTable);
+ editor.horizontalAlignment = SWT.LEFT;
+ editor.grabHorizontal = true;
+
+ namespace2packageTable.addListener(SWT.MouseDown, new Listener() {
+ public void handleEvent(Event event) {
+ Rectangle clientArea = namespace2packageTable.getClientArea();
+ Point pt = new Point(event.x, event.y);
+ int index = namespace2packageTable.getTopIndex();
+ while (index < namespace2packageTable.getItemCount()) {
+ boolean visible = false;
+ TableItem item = namespace2packageTable.getItem(index);
+ Rectangle rect = item.getBounds(1);
+ if (rect.contains(pt)) {
+ editCell(item, editor);
+ return;
+ }
+ if (!visible && rect.intersects(clientArea)) {
+ visible = true;
+ }
+ if (!visible)
+ return;
+ index++;
+ }
+ }
+ });
+
+ namespace2packageTable.addFocusListener(new FocusAdapter() {
+ public void focusGained(FocusEvent e) {
+ if (namespace2packageTable.getSelectionIndex() == -1)
+ namespace2packageTable.setSelection(0);
+ }
+ });
+
+ namespace2packageTable.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (e.keyCode != 32)
+ return;
+
+ TableItem[] item = namespace2packageTable.getSelection();
+ if (item.length != 1)
+ return;
+
+ editCell(item[0], editor);
+ }
+ });
+
+// UIUtils uiUtils = new UIUtils( pluginId_ );
+// parent.setToolTipText( Axis2ConsumptionUIMessages.TOOLTIP_PPAE_PAGE );
+// PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, pluginId_ + "." + this.pluginId_);
+
+ populateParamsFromWSDL();
+ populateModel();
+
+ return this;
+ }
+
+ private void editCell(final TableItem item, TableEditor editor) {
+
+ final Text textEdit = new Text(namespace2packageTable, SWT.NONE);
+ textEdit.setText(item.getText(1));
+ textEdit.selectAll();
+ textEdit.setFocus();
+
+ textEdit.addFocusListener(new FocusAdapter() {
+ public void focusLost(FocusEvent e) {
+ item.setText(1, textEdit.getText());
+ textEdit.dispose();
+ }
+ });
+
+ textEdit.addTraverseListener(new TraverseListener() {
+ public void keyTraversed(TraverseEvent e) {
+ switch (e.detail) {
+ case SWT.TRAVERSE_RETURN:
+ item.setText(1, textEdit.getText());
+ case SWT.TRAVERSE_ESCAPE:
+ textEdit.dispose();
+ e.doit = false;
+ }
+ }
+ });
+
+ textEdit.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (e.keyCode == 32) {
+ item.setText(1, textEdit.getText());
+ textEdit.dispose();
+ }
+ }
+ });
+
+ textEdit.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ model.setNamespaseToPackageMapping(getNs2PkgMapping());
+ }
+ });
+
+ editor.setEditor(textEdit, item, 1);
+ }
+
+ /**
+ * A util method to create a new column
+ * @param table
+ * @param width
+ * @param colName
+ */
+ private void declareColumn(Table table, int width,String colName){
+ TableColumn column = new TableColumn(table,SWT.NONE);
+ column.setWidth(width);
+ column.setText(colName);
+ }
+
+ /**
+ * get the package to namespace mappings
+ * @return
+ */
+ public String getNs2PkgMapping(){
+ String returnList="";
+ TableItem[] items = namespace2packageTable.getItems();
+ String packageValue;
+ for (int i=0;i<items.length;i++){
+ packageValue = items[i].getText(1);
+ if (packageValue!=null && !"".equals(packageValue)){
+ returnList = returnList +
+ ("".equals(returnList)?"":",") +
+ items[i].getText(0)+ "=" + packageValue;
+ }
+
+ }
+ return "".equals(returnList)?null:returnList;
+ }
+
+ public boolean isGenProxy() {
+ //boolean enabled = genProxyCheckbox_.getSelection();
+ return true; //always
+
+ }
+
+ public void setGenerateProxy( Boolean genProxy ){
+ genProxyCheckbox_.setSelection( genProxy.booleanValue() );
+ }
+
+ /**
+ * Fill the combo with proper databinding names
+ */
+ private void fillDatabinderCombo() {
+ databindingTypeCombo.add(Axis2Constants.DATA_BINDING_ADB);
+ databindingTypeCombo.add(Axis2Constants.DATA_BINDING_XMLBEANS);
+ databindingTypeCombo.add(Axis2Constants.DATA_BINDING_NONE);
+ int selected = databindingTypeCombo.indexOf(context.getClientDatabinding().toUpperCase());
+ if (selected==-1)
+ databindingTypeCombo.select(0);
+ else
+ databindingTypeCombo.select(selected);
+ }
+
+ private void populateModel() {
+ int selectionIndex = serviceNameCombo.getSelectionIndex();
+ if (selectionIndex != -1) {
+ Object object = reader.getServiceList().get(selectionIndex);
+ model.setServiceQName(object);
+ }
+ model.setPortName(portNameCombo.getText());
+ model.setPackageText(packageText.getText());
+ model.setDatabindingType(databindingTypeCombo.getText());
+ //model.setASync(asyncOnlyRadioButton.getSelection());
+ //model.setSync(syncOnlyRadioButton.getSelection());
+ if (syncAndAsyncRadioButton.getSelection()){
+ model.setASync(!syncAndAsyncRadioButton.getSelection());
+ model.setSync(!syncAndAsyncRadioButton.getSelection());
+ }
+ model.setGenerateAllCheck(generateAllCheckBoxButton.getSelection());
+ model.setTestCaseCheck(testCaseCheckBoxButton.getSelection());
+ model.setNamespaseToPackageMapping(getNs2PkgMapping());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.command.env.ui.widgets.WidgetContributor#getStatus()
+ */
+ public IStatus getStatus()
+ {
+ IStatus result = null;
+ return result;
+ }
+
+ private void populatePackageName() {
+ this.packageText.setText(reader.packageFromTargetNamespace());
+ }
+
+ /**
+ * populate the service and the port from the WSDL this needs to be public
+ * since the WSDLselection page may call this
+ */
+ public void populateParamsFromWSDL() {
+ if (reader == null)
+ reader = new WSDLPropertyReader(model);
+ try {
+ String lname = model.getWsdlURI();
+ if (!"".equals(lname.trim())) {
+
+ reader.readWSDL(model.getWebProjectName(), lname);
+
+ this.serviceQNameList = reader.getServiceList();
+ if (!serviceQNameList.isEmpty()) {
+ serviceNameCombo.removeAll();
+ for (int i = 0; i < serviceQNameList.size(); i++) {
+ // add the local part of the
+ Object serviceQnameInstance = serviceQNameList.get(i);
+ Class QNameClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("javax.xml.namespace.QName");
+ Method GetLocalPartMethod = QNameClass.getMethod("getLocalPart", null);
+ Object resultLocalPart = GetLocalPartMethod
+ .invoke(serviceQnameInstance, null);
+ serviceNameCombo.add(resultLocalPart.toString());
+ }
+ ;
+ // select the first one as the default
+ serviceNameCombo.select(0);
+
+ // load the ports
+ loadPortNames();
+
+ } else {
+ // service name list being empty means we are switching to
+ // the interface mode
+ if (serviceNameCombo!=null) serviceNameCombo.removeAll();
+ if (portNameCombo!=null) portNameCombo.removeAll();
+
+ }
+
+ populatePackageName();
+
+ //populate the namespacess
+ loadNamespaces(reader.getDefinitionNamespaceMap());
+ }
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(NLS.bind(
+ Axis2ConsumptionUIMessages.ERROR_INVALID_WSDL_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ }
+ }
+
+ /**
+ * Loads the namespaces
+ * @param namespaceMap
+ */
+ private void loadNamespaces(Map namespaceMap){
+ Iterator namespaces = namespaceMap.values().iterator();
+ namespace2packageTable.removeAll();
+ TableItem[] items = new TableItem[namespaceMap.size()]; // An item for each field
+
+ int i = 0;
+ while(namespaces.hasNext()){
+
+ items[i] = new TableItem(namespace2packageTable, SWT.NULL);
+ String namespace = (String)namespaces.next();
+ items[i].setText(0,namespace);
+ items[i].setText(1,getPackageFromNamespace(namespace));
+ i++;
+ }
+
+ namespace2packageTable.setVisible(true);
+
+ }
+
+ private void loadPortNames() {
+ int selectionIndex = serviceNameCombo.getSelectionIndex();
+ if (selectionIndex != -1) {
+ java.util.List ports = reader.getPortNameList( serviceQNameList
+ .get(selectionIndex));
+ if (!ports.isEmpty()) {
+ portNameCombo.removeAll();
+ for (int i = 0; i < ports.size(); i++) {
+ // add the local part of the
+ portNameCombo.add(ports.get(i).toString());
+ }
+ portNameCombo.select(0);
+ model.setPortName(portNameCombo.getText());
+ } else {
+ // error no ports found
+ }
+ }
+ }
+
+ /**
+ * get the package derived by Namespace
+ */
+ public String getPackageFromNamespace(String namespace){
+ // Use reflection to invoke org.apache.axis2.util.URLProcessor
+ // makePackageName(namespace) statically
+ Object stringReturn = null;
+ try {
+ Class URLProcessorClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.util.URLProcessor");
+ Method makePackageNameMethod = URLProcessorClass
+ .getMethod("makePackageName", new Class[]{String.class});
+ stringReturn = makePackageNameMethod.invoke(null, new Object[]{namespace});
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return (String)stringReturn;
+
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wizard/client/WebServiceClientAxis2Type.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wizard/client/WebServiceClientAxis2Type.java
new file mode 100644
index 000000000..f0cff69c8
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wizard/client/WebServiceClientAxis2Type.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.wizard.client;
+
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.consumption.core.messages.Axis2ConsumptionUIMessages;
+import org.eclipse.jst.ws.internal.axis2.consumption.ui.widgets.Axis2ProxyWidget;
+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;
+
+public class WebServiceClientAxis2Type implements CommandWidgetBinding {
+
+ DataModel model;
+
+ public WebServiceClientAxis2Type(DataModel model){
+ this.model = model;
+ }
+
+
+ /* (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( Axis2ClientDefaultingCommand.class,
+ // "CustomizeClientMappings", Axis2ProxyWidget.class );
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.command.env.ui.widgets.CommandWidgetBinding#registerWidgetMappings
+ * (org.eclipse.wst.command.env.ui.widgets.WidgetRegistry)
+ */
+ public void registerWidgetMappings(WidgetRegistry widgetRegistry) {
+
+ widgetRegistry.add( "AxisClientStart",
+ Axis2ConsumptionUIMessages.PAGE_TITLE_WS_AXIS2_PROXY,
+ Axis2ConsumptionUIMessages.PAGE_DESC_WS_AXIS2_PROXY,
+ new WidgetContributorFactory()
+ {
+ public WidgetContributor create()
+ {
+ return new Axis2ProxyWidget(model);
+ }
+ } );
+
+ //widgetRegistry.add( "AxisClientBeanMapping",
+ // Axis2ConsumptionUIMessages.PAGE_TITLE_WS_XML2PROXY,
+ // Axis2ConsumptionUIMessages.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){
+ }
+
+ public void setWebServiceDataModel( DataModel model ){
+ this.model = model;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2ClientConfigWidgetFactory.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2ClientConfigWidgetFactory.java
new file mode 100644
index 000000000..0d1471d0b
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2ClientConfigWidgetFactory.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070230 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.wsrt;
+
+import org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientDefaultingCommand;
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.internal.axis2.consumption.ui.widgets.Axis2ProxyWidget;
+import org.eclipse.jst.ws.internal.axis2.consumption.ui.wizard.client.WebServiceClientAxis2Type;
+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 Axis2ClientConfigWidgetFactory implements INamedWidgetContributorFactory{
+ private INamedWidgetContributor proxyConfigWidget;
+ private INamedWidgetContributor mappingsWidget;
+ private Axis2ProxyWidget proxyWidget;
+ private WidgetBindingToWidgetFactoryAdapter adapter;
+ private DataModel model;
+ private WebServiceClientAxis2Type wsClientAxis2Type;
+ private DataMappingRegistry dataRegistry;
+
+ public Axis2ClientConfigWidgetFactory(){
+ }
+
+ public INamedWidgetContributor getFirstNamedWidget() {
+ init();
+ //wsClientAxis2Type.setWebServiceDataModel(model);
+ return proxyConfigWidget;
+ }
+
+ public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor widgetContributor) {
+ return widgetContributor == proxyConfigWidget && proxyWidget.isGenProxy()
+ ? mappingsWidget
+ : null;
+ }
+
+ public void registerDataMappings(DataMappingRegistry dataRegistry) {
+ this.dataRegistry=dataRegistry;
+ // Map the data model from the defaulting command to this widget factory.
+ // The framework will actually to the call to getWebServiceDataModel in
+ // the ExampleDefaultingCommand class and then call the setWebServiceDataModel
+ // method in this class.
+ dataRegistry.addMapping( Axis2ClientDefaultingCommand.class,
+ "WebServiceDataModel", //$NON-NLS-1$
+ Axis2ClientConfigWidgetFactory.class );
+ }
+
+ public void setWebServiceDataModel( DataModel model ){
+ this.model = model;
+ }
+
+ private void init(){
+ wsClientAxis2Type = new WebServiceClientAxis2Type(model);
+ adapter = new WidgetBindingToWidgetFactoryAdapter(wsClientAxis2Type );
+ proxyConfigWidget = adapter.getWidget( "AxisClientStart" ); //$NON-NLS-1$
+ proxyWidget = (Axis2ProxyWidget)proxyConfigWidget
+ .getWidgetContributorFactory().create();
+ mappingsWidget = adapter.getWidget( "AxisClientBeanMapping" ); //$NON-NLS-1$
+ adapter.registerDataMappings( dataRegistry );
+
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2WebServiceClient.java b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2WebServiceClient.java
new file mode 100644
index 000000000..bfafe5cc3
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.consumption.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/wsrt/Axis2WebServiceClient.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070230 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20080620 192527 samindaw@wso2.com - Saminda Wijeratne, Update the model information with the axis2 preference settings
+ * 20080621 210817 samindaw@wso2.com - Saminda Wijeratne, Setting the proxyBean and proxyEndPoint values
+ * 20080625 210817 samindaw@wso2.com - Saminda Wijeratne, Setting the proxyBean and proxyEndPoint values - Refactoring
+ * 20080622 241170 samindaw@wso2.com - Saminda Wijeratne, Axis2 preferences respected when click finish in 1st page
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.wsrt;
+
+import java.util.Vector;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientCodegenCommand;
+import org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientDefaultingCommand;
+import org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientOutputCommand;
+import org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientTestCaseIntegrateCommand;
+import org.eclipse.jst.ws.axis2.consumption.core.command.Axis2WebservicesServerCommand;
+import org.eclipse.jst.ws.axis2.consumption.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.PersistentAxis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.internal.axis2.consumption.ui.task.DefaultsForHTTPBasicAuthCommand;
+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 Axis2WebServiceClient extends AbstractWebServiceClient {
+
+ public Axis2WebServiceClient(WebServiceClientInfo info) {
+ super(info);
+ }
+
+ public ICommandFactory assemble(IEnvironment env, IContext ctx,
+ ISelection arg2, String arg3, String arg4) {
+ return null;
+ }
+
+ public ICommandFactory deploy(IEnvironment env, IContext ctx,
+ ISelection arg2, String arg3, String arg4) {
+ return null;
+ }
+
+ public ICommandFactory develop(IEnvironment env, IContext ctx,
+ ISelection sel, String project, String earProject) {
+ DataModel model = new DataModel();
+
+ EclipseEnvironment environment = (EclipseEnvironment)env;
+ registerDataMappings( environment.getCommandManager().getMappingRegistry());
+ model.setWebProjectName(project);
+ setupDataModelDefaultPreferenceValues(model);
+ Vector commands = new Vector();
+ commands.add(new Axis2ClientDefaultingCommand(model,this));
+ Axis2ClientOutputCommand axis2ClientOutputCommand = new Axis2ClientOutputCommand(this,ctx);
+ commands.add(axis2ClientOutputCommand);
+ commands.add(new Axis2WebservicesServerCommand(model, project));
+ commands.add(new Axis2ClientCodegenCommand(model));
+ commands.add(new Axis2ClientTestCaseIntegrateCommand(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project),model));
+ setProxyBeanAndEndPointValues(axis2ClientOutputCommand);
+ return new SimpleCommandFactory(commands);
+ }
+
+ public void setupDataModelDefaultPreferenceValues(DataModel model){
+ PersistentAxis2EmitterContext axis2Pref = PersistentAxis2EmitterContext.getInstance();
+ model.setASync(axis2Pref.isAsync());
+ model.setSync(axis2Pref.isSync());
+ model.setTestCaseCheck(axis2Pref.isClientTestCase());
+ model.setGenerateAllCheck(axis2Pref.isClientGenerateAll());
+ if ((axis2Pref.getServiceDatabinding()==null) || (axis2Pref.getServiceDatabinding().equalsIgnoreCase("")))
+ model.setDatabindingType(Axis2Constants.DATA_BINDING_ADB);
+ else
+ model.setDatabindingType(axis2Pref.getServiceDatabinding());
+ }
+
+
+ /**
+ * extract the proxyBean value and the proxyEndPoint value from the selected WSDL file and
+ * set those values in the Axis2ClientOutputCommand object
+ * @param axis2ClientOutputCommand
+ */
+ public void setProxyBeanAndEndPointValues(Axis2ClientOutputCommand axis2ClientOutputCommand){
+
+ String fileName;
+ //Get the valid filename
+ fileName=this.getWebServiceClientInfo().getWsdlURL();
+
+ String Stub="Stub";
+ String serviceName=Axis2CoreUtils.getServiceNameFromWSDL(fileName);
+ String proxyEndPoint=Axis2CoreUtils.getServiceEndPointFromWSDL(fileName, serviceName);
+
+ if (proxyEndPoint!=null){
+ String proxyBean=serviceName+Stub;
+ axis2ClientOutputCommand.setProxyBean(proxyBean);
+ axis2ClientOutputCommand.setProxyEndpoint(proxyEndPoint);
+ }
+ }
+
+
+ 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(Axis2ClientDefaultingCommand.class,
+ "WsdlURL",
+ DefaultsForHTTPBasicAuthCommand.class,
+ "WsdlServiceURL", null); //OK
+
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/.classpath b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/.cvsignore b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.cvsignore
new file mode 100644
index 000000000..628b6c5c6
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.cvsignore
@@ -0,0 +1,5 @@
+build.xml
+javaCompiler...args
+@dot
+org.eclipse.jst.ws.axis2.core_1.0.102.200804020204.jar
+temp.folder
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/.project b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.project
new file mode 100644
index 000000000..2230d2d09
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/.settings/org.eclipse.jdt.core.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..6e7793f40
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,57 @@
+#Tue Mar 20 10:45:04 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+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.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=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=ignore
+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.unusedLabel=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.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/META-INF/MANIFEST.MF b/axis2/bundles/org.eclipse.jst.ws.axis2.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..f507080fb
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/META-INF/MANIFEST.MF
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.core;singleton:=true
+Bundle-Version: 1.0.300.qualifier
+Bundle-Activator: org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin
+Bundle-Vendor: %PLUGIN_PROVIDER
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.apache.ant,
+ org.eclipse.ui,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.jst.j2ee.web,
+ org.eclipse.jst.j2ee,
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+ org.eclipse.jem,
+ org.eclipse.wst.command.env,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.jst.ws,
+ org.eclipse.wst.common.environment,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.validation;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.jdt.core
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.jst.ws.axis2.core.constant,
+ org.eclipse.jst.ws.axis2.core.context,
+ org.eclipse.jst.ws.axis2.core.plugin,
+ org.eclipse.jst.ws.axis2.core.plugin.messages,
+ org.eclipse.jst.ws.axis2.core.utils
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/about.html b/axis2/bundles/org.eclipse.jst.ws.axis2.core/about.html
new file mode 100644
index 000000000..0799bdb88
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/build.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.core/build.properties
new file mode 100644
index 000000000..46c3a9346
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+# 20080521 223453 kathy@ca.ibm.com - Kathy Chan
+# 20080924 248023 samindaw@wso2.com - Saminda Wijeratne - adding resources folder for export
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ resources/
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.properties
new file mode 100644
index 000000000..18108ab35
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.properties
@@ -0,0 +1,34 @@
+###############################################################################
+# Copyright (c) 2007, 2010 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070405 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to
+# introduse the Axis2 runtime to the framework for 168762
+# 20070501 184617 sandakith@wso2.com - Lahiru Sandakith, Provide plugin details
+# 20080130 216997 katep@wso2.com - Kate Price
+# 20080530 234841 kathy@ca.ibm.com - Kathy Chan, Change plugin provider to Eclipse.org
+###############################################################################
+#
+
+#
+# Messages in plugin.xml.
+#
+PLUGIN_NAME=Webservice Axis2 Core Plug-in
+PLUGIN_PROVIDER=Eclipse Web Tools Platform
+
+AXIS2_CATOGERY_LABEL=Axis2 Web Services
+AXIS2_CATOGERY_DISCRIPTION=Enables Web services generation through the Axis2 Web services engine.
+
+AXIS2_FACET_CORE_LABEL=Axis2 Web Services Core
+AXIS2_FACET_CORE_DISCRIPTION=Prepares the project for Web services generation through the Axis2 Web services engine.
+
+
+AXIS2_FACET_EXT_LABEL=Axis2 Web Services Extensions
+AXIS2_FACET_EXT_DISCRIPTION=Prepares the project for additional Web services support with the Axis2 Web services runtime.
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.xml
new file mode 100644
index 000000000..d666fd205
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/plugin.xml
@@ -0,0 +1,68 @@
+<plugin>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.facets">
+
+ <category id="axis2.category">
+ <label>%AXIS2_CATOGERY_LABEL</label>
+ <description>%AXIS2_CATOGERY_DISCRIPTION</description>
+ </category>
+
+ <project-facet id="axis2.core">
+ <label>%AXIS2_FACET_CORE_LABEL</label>
+ <description>%AXIS2_FACET_CORE_DISCRIPTION</description>
+ <member category="axis2.category "/>
+ </project-facet>
+
+ <project-facet-version facet="axis2.core" version="1.1">
+ <constraint>
+ <requires facet="jst.web" version="2.2,2.3,2.4,2.5"/>
+ </constraint>
+ <action type="INSTALL">
+ <delegate class="org.eclipse.jst.ws.axis2.facet.deligate.Axis2CoreFacetInstallDelegate"/>
+ </action>
+<!--
+ <action type="UNINSTALL">
+ <delegate class="org.eclipse.jst.ws.axis2.facet.deligate.Axis2CoreFacetUnInstallDelegate"/>
+ </action>
+-->
+ </project-facet-version>
+
+ <project-facet id="axis2.ext">
+ <label>%AXIS2_FACET_EXT_LABEL</label>
+ <description>%AXIS2_FACET_EXT_DISCRIPTION</description>
+ <member category="axis2.category" />
+ </project-facet>
+
+ <project-facet-version facet="axis2.ext" version="1.1">
+ <constraint>
+ <requires facet="axis2.core" version="1.1"/>
+ </constraint>
+ <action type="INSTALL">
+ <delegate class="org.eclipse.jst.ws.axis2.facet.deligate.Axis2ExtFacetInstallDelegate"/>
+ </action>
+<!--
+ <action type="UNINSTALL">
+ <delegate class="org.eclipse.jst.ws.axis2.facet.deligate.Axis2ExtFacetUnInstallDelegate"/>
+ </action>
+-->
+ </project-facet-version>
+
+ </extension>
+
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <supported>
+ <runtime-component
+ any="true"/>
+ <facet
+ id="axis2.core"
+ version="1.1"/>
+ <facet
+ id="axis2.ext"
+ version="1.1"/>
+ </supported>
+ </extension>
+
+
+</plugin> \ No newline at end of file
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/pom.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.core/pom.xml
new file mode 100644
index 000000000..75821b40f
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.core</artifactId>
+ <version>1.0.300-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/resources/services.xsd b/axis2/bundles/org.eclipse.jst.ws.axis2.core/resources/services.xsd
new file mode 100644
index 000000000..321cb5fb8
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/resources/services.xsd
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="serviceGroup">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="service"/>
+ <xs:element minOccurs="0" ref="parameter"/>
+ <xs:element minOccurs="0" ref="module"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element ref="module"/>
+ <xs:element ref="operation"/>
+ <xs:element ref="parameter"/>
+ <xs:element ref="description"/>
+ <xs:element ref="Description"/>
+ <xs:element ref="excludeOperations"/>
+ <xs:element ref="messageReceivers"/>
+ <xs:element ref="schema"/>
+ <xs:element ref="transports"/>
+ </xs:choice>
+ <xs:element minOccurs="0" ref="dataLocator"/>
+ </xs:sequence>
+ <xs:attribute name="class"/>
+ <xs:attribute name="name"/>
+ <xs:attribute name="scope" type="xs:NCName"/>
+ <xs:attribute name="targetNamespace" type="xs:anyURI"/>
+ <xs:attribute name="activate" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="description" type="xs:string"/>
+ <xs:element name="Description" type="xs:string"/>
+ <xs:element name="excludeOperations">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="operation" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="messageReceivers">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="messageReceiver"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="schema">
+ <xs:complexType>
+ <xs:attribute name="schemaNamespace" use="required" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="transports">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="transport"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="transport" type="xs:NCName"/>
+ <xs:element name="dataLocator">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="dialectLocator"/>
+ </xs:sequence>
+ <xs:attribute name="class"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="dialectLocator">
+ <xs:complexType>
+ <xs:attribute name="class" use="required"/>
+ <xs:attribute name="dialect" use="required" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="parameter">
+ <xs:complexType mixed="true">
+ <xs:attribute name="locked" type="xs:NMTOKEN"/>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="module">
+ <xs:complexType>
+ <xs:attribute name="ref" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="operation">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="messageReceiver"/>
+ <xs:element ref="module"/>
+ <xs:element ref="parameter"/>
+ <xs:element ref="actionMapping"/>
+ <xs:element ref="faultActionMapping"/>
+ <xs:element ref="message"/>
+ <xs:element ref="outputActionMapping"/>
+ </xs:choice>
+ <xs:attribute name="mep" type="xs:anyURI"/>
+ <xs:attribute name="name" type="xs:NCName"/>
+ <xs:attribute name="qname" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="actionMapping" type="xs:anyURI"/>
+ <xs:element name="faultActionMapping">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="faultName" use="required" type="xs:NCName"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="message">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="parameter"/>
+ </xs:sequence>
+ <xs:attribute name="label" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="outputActionMapping" type="xs:anyURI"/>
+ <xs:element name="messageReceiver">
+ <xs:complexType>
+ <xs:attribute name="class" use="required" type="xs:NCName"/>
+ <xs:attribute name="mep" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/constant/Axis2Constants.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/constant/Axis2Constants.java
new file mode 100644
index 000000000..ec5d38d04
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/constant/Axis2Constants.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20071011 205972 sandakith@wso2.com - Lahiru Sandakith, Axis2 Libraries License files fix
+ * 20071029 206967 sandakith@wso2.com - Lahiru Sandakith
+ * 20080521 231098 sandakith@wso2.com - Lahiru Sandakith, Fix for Axis2 1.4 dependency chenge
+ * 20080604 193371 samindaw@wso2.com - Saminda Wijeratne, creating a function to validate services.xml
+ * 20091207 192005 samindaw@wso2.com - merge the web.xml to have axis2 welcome file defined
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ * 20100308 282466 samindaw@wso2.com - Saminda Wijeratne, support for axis2 1.5
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.constant;
+
+public class Axis2Constants {
+
+ //Axis2 Core Plugin Constants
+ public static final String DIR_TEMPWAR="tempwar"; //$NON-NLS-1$
+ public static final String DIR_EXPLOADED_TEMPWAR="exploadedwar"; //$NON-NLS-1$
+ public static final String DIR_LIB="lib"; //$NON-NLS-1$
+ public static final String DIR_TEST="test"; //$NON-NLS-1$
+ public static final String FILE_AXIS2_WAR="axis2.war"; //$NON-NLS-1$
+ public static final String NULL=""; //$NON-NLS-1$
+ public static final String ADB="adb"; //$NON-NLS-1$
+ public static final String AAR="aar"; //$NON-NLS-1$
+ public static final String JAR="jar"; //$NON-NLS-1$
+ public static final String TXT="txt"; //$NON-NLS-1$
+ public static final String TEMP_AXIS2_FACET_DIR="org.apache.axis2.facet"; //$NON-NLS-1$
+ public static final String DIR_DOT_METADATA=".metadata"; //$NON-NLS-1$
+ public static final String DIR_DOT_PLUGINS=".plugins"; //$NON-NLS-1$
+ public static final String DIR_UNZIP="nzip"; //$NON-NLS-1$
+ public static final String LOCAL_SERVER_PORT="http://localhost:8080"; //$NON-NLS-1$
+ public static final String SERVICES="services"; //$NON-NLS-1$
+ public static final String WEBAPP_EXPLODED_SERVER_LOCATION_FILE=
+ "server.properties"; //$NON-NLS-1$
+ public static final String SERVER_STATUS_LOCATION_FILE="status.properties"; //$NON-NLS-1$
+ public static final String WAR_STATUS_LOCATION_FILE="war.properties"; //$NON-NLS-1$
+ public static final String PROPERTY_KEY_PATH="path"; //$NON-NLS-1$
+ public static final String PROPERTY_KEY_STATUS="status"; //$NON-NLS-1$
+ public static final String SERVER_STATUS_PASS="pass"; //$NON-NLS-1$
+ public static final String SERVER_STATUS_FAIL="fail"; //$NON-NLS-1$
+
+ //Axis2 Creation Plugin Constants
+ public static final String FILE_SERVICES_XML="services.xml"; //$NON-NLS-1$
+ public static final String FILE_XML="*.xml"; //$NON-NLS-1$
+ public static final String DIR_META_INF="META-INF"; //$NON-NLS-1$
+ public static final String DIR_BUILD="build"; //$NON-NLS-1$
+ public static final String DIR_SRC="src"; //$NON-NLS-1$
+ public static final String DIR_CLASSES="classes"; //$NON-NLS-1$
+ public static final String DIR_RESOURCES="resources"; //$NON-NLS-1$
+ public static final String DIR_WEB_INF="WEB-INF"; //$NON-NLS-1$
+ public static final String DIR_SERVICES="services"; //$NON-NLS-1$
+ public static final String DIR_WEBSERVICES="webservices"; //$NON-NLS-1$
+ public static final String DIR_WEBCONTENT="WebContent"; //$NON-NLS-1$
+ public static final String JAR_TASK="jar"; //$NON-NLS-1$
+ public static final String AXIS2_PROJECT="org.eclipse.jst.ws.axis2"; //$NON-NLS-1$
+ public static final String CODEGEN_RESULTS="codegen"; //$NON-NLS-1$
+ public static final String DATA_BINDING_ADB="ADB"; //$NON-NLS-1$
+ public static final String DATA_BINDING_XMLBEANS="XMLBEANS"; //$NON-NLS-1$
+ public static final String DATA_BINDING_NONE="NONE"; //$NON-NLS-1$
+ public static final String SKELETON_SUFFIX="Skeleton.java"; //$NON-NLS-1$
+ public static final String RESOURCE_FOLDER="resources"; //$NON-NLS-1$
+ public static final String SERVICES_XSD_SCHEMA_NAME="services.xsd"; //$NON-NLS-1$
+ public static final String XML_SCHEMA="http://www.w3.org/2001/XMLSchema"; //$NON-NLS-1$
+
+ //Axis2 Consumption Plugin Constants
+ public static final String JUNIT_JAR="junit.jar"; //$NON-NLS-1$
+ public static final String JUNIT_BUNDLE="org.junit"; //$NON-NLS-1$
+ public static final String DIR_AXIS2_WEB="axis2-web"; //$NON-NLS-1$
+ public static final String FILE_WEB_XML="web.xml"; //$NON-NLS-1$
+ public static final String AXIS2_WELCOME_FILE="/"+DIR_AXIS2_WEB+"/index.jsp";//$NON-NLS-1$
+ public static final String FILE_SERVLET_API="servletapi"; //$NON-NLS-1$
+ public static final String[] AXIS2_LIB_PREFIXES = { //$NON-NLS-1$
+ "ant",
+ "axiom",
+ "axis2",
+ "commons",
+ "log4j",
+ "neethi",
+ "stax",
+ "geronimo-stax-api_1.0_spec",
+ "wsdl4j",
+ "wstx",
+ "xbean",
+ "XmlSchema",
+ "woden",
+ "activation",
+ "annogen",
+ "backport-util",
+ "mex-impl",
+ "mail",
+ "xmlbeans",
+ "httpcore"
+ };
+}
+
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterContext.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterContext.java
new file mode 100644
index 000000000..7d7217256
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterContext.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc 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:
+ * WSO2 Inc - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.context;
+
+public interface Axis2EmitterContext {
+
+ /**
+ * This constant string is used to lookup the runtime location general
+ * preference from the plugins local preferences store.
+ */
+ public static final String PREFERENCE_AXIS2_RUNTIME_LOCATION = "axis2RuntimeLocation";
+ public static final String PREFERENCE_AXIS2_SERVER_IS_WAR = "axis2ServerPathRepresentsWar";
+ //Axis2 Preferences
+ //Service Code generation Options
+ public static final String PREFERENCE_SERVICE_DATABINDING = "serviceDatabinding";
+ public static final String PREFERENCE_SERVICE_INTERFACE_SKELETON = "serviceInterfaceSkeleton";
+ public static final String PREFERENCE_SERVICE_GENERATE_ALL = "serviceGenerateAll";
+
+ //Client Code generation Options
+ public static final String PREFERENCE_CLIENT_SYNC = "sync";
+ public static final String PREFERENCE_CLIENT_ASYNC = "async";
+ public static final String PREFERENCE_CLIENT_DATABINDING = "cleintDatabinding";
+ public static final String PREFERENCE_CLIENT_TESTCASE = "clientTestcase";
+ public static final String PREFERENCE_CLIENT_GENERATE_ALL = "clientGenerateAll";
+
+ //Service Archive Options
+ public static final String PREFERENCE_AAR_EXTENTION = "aarExtention";
+
+ /**
+ * @param selection set the axis2 runtime location.
+ */
+ public void setAxis2RuntimeLocation(String runtimeLocation);
+
+ /**
+ * @param returns the axis2 runtime location.
+ */
+ public String getAxis2RuntimeLocation();
+
+ public boolean isAxis2ServerPathRepresentsWar();
+
+ public void setAxis2ServerPathRepresentsWar(String isWar);
+
+ //Service Code generation Options
+
+ public void setServiceDatabinding(String serviceDatabinding);
+
+ public String getServiceDatabinding();
+
+ public void setServiceInterfaceSkeleton(boolean serviceInterfaceSkeleton);
+
+ public boolean isServiceInterfaceSkeleton();
+
+ public void setServiceGenerateAll(boolean serviceGenerateAll);
+
+ public boolean isServiceGenerateAll();
+
+
+ //Client Code generation Options
+ public void setSync(boolean clientSync);
+
+ public boolean isSync();
+
+ public void setAsync(boolean clientAsync);
+
+ public boolean isAsync();
+
+ public void setClientDatabinding(String clientDatabinding);
+
+ public String getClientDatabinding();
+
+ public void setClientTestCase(boolean clientTestCase);
+
+ public boolean isClientTestCase();
+
+ public void setClientGenerateAll(boolean clientGenerateAll);
+
+ public boolean isClientGenerateAll();
+
+ //AAR Options
+ public void setAarExtention(String aarExtention);
+
+ public String getAarExtention();
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterDefaults.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterDefaults.java
new file mode 100644
index 000000000..6fac9c81a
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/Axis2EmitterDefaults.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc 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:
+ * WSO2 Inc - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.context;
+
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+
+public class Axis2EmitterDefaults {
+
+ public static final String PREFERENCE_AXIS2_RUNTIME_LOCATION_DEFAULT = "";
+ public static final boolean PREFERENCE_AXIS2_SERVER_IS_WAR = false;
+
+ //Axis2 Preferences
+ //Service Code generation Options
+ public static final String PREFERENCE_SERVICE_DATABINDING_DEFAULT = Axis2Constants.ADB;
+ public static final boolean PREFERENCE_SERVICE_INTERFACE_SKELETON_DEFAULT = false;
+ public static final boolean PREFERENCE_SERVICE_GENERATE_ALL_DEFAULT = false;
+
+ //Client Code generation Options
+ public static final boolean PREFERENCE_CLIENT_SYNC_DEFAULT = false;
+ public static final boolean PREFERENCE_CLIENT_ASYNC_DEFAULT = false;
+ public static final String PREFERENCE_CLIENT_DATABINDING_DEFAULT = Axis2Constants.ADB;
+ public static final boolean PREFERENCE_CLIENT_TESTCASE_DEFAULT = false;
+ public static final boolean PREFERENCE_CLIENT_GENERATE_ALL_DEFAULT = false;
+
+ //Service Archive Options
+ private static String PREFERENCE_AAR_EXTENTION_DEFAULT = Axis2Constants.AAR; //aarExtention
+
+
+ /**
+ * @return returns the default setting for runtime location.
+ */
+ public static String getAxis2RuntimeLocation() {
+ return PREFERENCE_AXIS2_RUNTIME_LOCATION_DEFAULT;
+ }
+
+ public static boolean isAxis2ServerPathRepresentsWar() {
+ return PREFERENCE_AXIS2_SERVER_IS_WAR;
+ }
+
+
+ //Service Code generation Options
+
+ public static String getServiceDatabinding(){
+ return PREFERENCE_SERVICE_DATABINDING_DEFAULT;
+ }
+
+ public static boolean isServiceInterfaceSkeleton(){
+ return PREFERENCE_SERVICE_INTERFACE_SKELETON_DEFAULT;
+ }
+
+ public static boolean isServiceGenerateAll(){
+ return PREFERENCE_SERVICE_GENERATE_ALL_DEFAULT;
+ }
+
+
+ //Client Code generation Options
+
+ public static boolean isClientSync(){
+ return PREFERENCE_CLIENT_SYNC_DEFAULT;
+ }
+
+ public static boolean isClientAsync(){
+ return PREFERENCE_CLIENT_ASYNC_DEFAULT;
+ }
+
+ public static String getClientDatabinding(){
+ return PREFERENCE_CLIENT_DATABINDING_DEFAULT;
+ }
+
+ public static boolean isClientTestCase(){
+ return PREFERENCE_CLIENT_TESTCASE_DEFAULT;
+ }
+
+ public static boolean isClientGenerateAll(){
+ return PREFERENCE_CLIENT_GENERATE_ALL_DEFAULT;
+ }
+
+ //Service AAR Options
+ public static String getAarExtention(){
+ return PREFERENCE_AAR_EXTENTION_DEFAULT;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/PersistentAxis2EmitterContext.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/PersistentAxis2EmitterContext.java
new file mode 100644
index 000000000..b26fe1c04
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/PersistentAxis2EmitterContext.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc 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:
+ * WSO2 Inc - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.context;
+
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.wst.command.internal.env.context.PersistentContext;
+
+public class PersistentAxis2EmitterContext extends PersistentContext implements
+ Axis2EmitterContext {
+
+ private static PersistentAxis2EmitterContext context_ = null;
+
+ public static PersistentAxis2EmitterContext getInstance()
+ {
+ if (context_ == null) {
+ context_ = new PersistentAxis2EmitterContext();
+ context_.load();
+ }
+ return context_;
+ }
+
+ public void load(){
+ setDefault(PREFERENCE_AXIS2_RUNTIME_LOCATION, Axis2EmitterDefaults.getAxis2RuntimeLocation());
+ setDefault(PREFERENCE_AXIS2_SERVER_IS_WAR, Axis2EmitterDefaults.isAxis2ServerPathRepresentsWar());
+ //service defaults
+ setDefault(PREFERENCE_SERVICE_DATABINDING, Axis2EmitterDefaults.getServiceDatabinding());
+ setDefault(PREFERENCE_SERVICE_INTERFACE_SKELETON, Axis2EmitterDefaults.isServiceInterfaceSkeleton());
+ setDefault(PREFERENCE_SERVICE_GENERATE_ALL, Axis2EmitterDefaults.isServiceGenerateAll());
+ //client defaults
+ setDefault(PREFERENCE_CLIENT_SYNC, Axis2EmitterDefaults.isClientSync());
+ setDefault(PREFERENCE_CLIENT_ASYNC, Axis2EmitterDefaults.isClientAsync());
+ setDefault(PREFERENCE_CLIENT_DATABINDING, Axis2EmitterDefaults.getClientDatabinding());
+ setDefault(PREFERENCE_CLIENT_TESTCASE, Axis2EmitterDefaults.isClientTestCase());
+ setDefault(PREFERENCE_CLIENT_GENERATE_ALL, Axis2EmitterDefaults.isClientGenerateAll());
+ //AAR Defaults
+ setDefault(PREFERENCE_AAR_EXTENTION, Axis2EmitterDefaults.getAarExtention());
+
+ }
+
+ private PersistentAxis2EmitterContext() {
+ super(WebServiceAxis2CorePlugin.getInstance());
+ }
+
+ public String getAxis2RuntimeLocation() {
+ return getValueAsString(PREFERENCE_AXIS2_RUNTIME_LOCATION);
+ }
+
+ public void setAxis2RuntimeLocation(String runtimeLocation) {
+ setValue(PREFERENCE_AXIS2_RUNTIME_LOCATION, runtimeLocation);
+ }
+
+ public boolean isAxis2ServerPathRepresentsWar() {
+ return getValueAsBoolean(PREFERENCE_AXIS2_SERVER_IS_WAR);
+ }
+
+ public void setAxis2ServerPathRepresentsWar(String isWar) {
+ setValue(PREFERENCE_AXIS2_SERVER_IS_WAR, isWar);
+ }
+
+ //Service
+
+ public String getServiceDatabinding() {
+ return getValueAsString(PREFERENCE_SERVICE_DATABINDING);
+ }
+
+ public void setServiceDatabinding(String serviceDatabinding) {
+ setValue(PREFERENCE_SERVICE_DATABINDING, serviceDatabinding);
+ }
+
+ public boolean isServiceInterfaceSkeleton() {
+ return getValueAsBoolean(PREFERENCE_SERVICE_INTERFACE_SKELETON);
+ }
+
+ public void setServiceInterfaceSkeleton(boolean serviceInterfaceSkeleton) {
+ setValue(PREFERENCE_SERVICE_INTERFACE_SKELETON, serviceInterfaceSkeleton);
+ }
+
+ public boolean isServiceGenerateAll() {
+ return getValueAsBoolean(PREFERENCE_SERVICE_GENERATE_ALL);
+ }
+
+ public void setServiceGenerateAll(boolean serviceGenerateAll) {
+ setValue(PREFERENCE_SERVICE_GENERATE_ALL, serviceGenerateAll);
+ }
+
+
+ //Client
+
+ public boolean isSync() {
+ return getValueAsBoolean(PREFERENCE_CLIENT_SYNC);
+ }
+
+ public void setSync(boolean clientSync) {
+ setValue(PREFERENCE_CLIENT_SYNC, clientSync);
+ }
+
+ public boolean isAsync() {
+ return getValueAsBoolean(PREFERENCE_CLIENT_ASYNC);
+ }
+
+ public void setAsync(boolean clientAsync) {
+ setValue(PREFERENCE_CLIENT_ASYNC, clientAsync);
+ }
+
+ public String getClientDatabinding() {
+ return getValueAsString(PREFERENCE_CLIENT_DATABINDING);
+ }
+
+ public void setClientDatabinding(String clientDatabinding) {
+ setValue(PREFERENCE_CLIENT_DATABINDING, clientDatabinding);
+ }
+
+ public boolean isClientTestCase() {
+ return getValueAsBoolean(PREFERENCE_CLIENT_TESTCASE);
+ }
+
+ public void setClientTestCase(boolean clientTestCase) {
+ setValue(PREFERENCE_CLIENT_TESTCASE, clientTestCase);
+ }
+
+ public boolean isClientGenerateAll() {
+ return getValueAsBoolean(PREFERENCE_CLIENT_GENERATE_ALL);
+ }
+
+ public void setClientGenerateAll(boolean clientGenrateAll) {
+ setValue(PREFERENCE_CLIENT_GENERATE_ALL, clientGenrateAll);
+ }
+
+
+ //AAR Options
+
+ public String getAarExtention(){
+ return getValueAsString(PREFERENCE_AAR_EXTENTION);
+ }
+
+ public void setAarExtention(String aarExtention){
+ setValue(PREFERENCE_AAR_EXTENTION, aarExtention);
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java
new file mode 100644
index 000000000..b2b41a899
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/context/ServiceContext.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc 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:
+ * WSO2 Inc - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse
+ * the Axis2 runtime to the framework for 168762
+ * 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+ * 20070508 175030 sandakith@wso2.com - Lahiru Sandakith, Refactor BuServiceContext
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.context;
+
+public class ServiceContext {
+
+ private static ServiceContext instance;
+ private static String serviceName;
+
+ //singleton
+ private ServiceContext(){}
+
+ public static ServiceContext getInstance(){
+ if (instance == null) {
+ instance = new ServiceContext();
+ }
+ return instance;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ ServiceContext.serviceName = serviceName;
+ }
+
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/WebServiceAxis2CorePlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/WebServiceAxis2CorePlugin.java
new file mode 100644
index 000000000..5b3adee56
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/WebServiceAxis2CorePlugin.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.plugin;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.context.PersistentAxis2EmitterContext;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceAxis2CorePlugin extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.core";
+
+ // The shared instance
+ private static WebServiceAxis2CorePlugin instance_;
+
+
+ private PersistentAxis2EmitterContext axis2EmitterContext_;
+
+ /**
+ * The constructor
+ */
+ public WebServiceAxis2CorePlugin() {
+ super();
+ if (instance_ == null) {
+ instance_ = this;
+ }
+ }
+
+
+ public Axis2EmitterContext getAxisEmitterContext(){
+ if (axis2EmitterContext_ == null)
+ axis2EmitterContext_ = PersistentAxis2EmitterContext.getInstance();
+ return axis2EmitterContext_;
+ }
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ instance_ = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static WebServiceAxis2CorePlugin getDefault() {
+ return instance_;
+ }
+
+ // This method is needed to keep the logging from blowing up.
+ public String toString()
+ {
+ return PLUGIN_ID;
+ }
+
+ /**
+ * Returns the singleton instance of this plugin. Equivalent to calling
+ * (WebServiceWasConsumptionPlugin)Platform.getPlugin("org.eclipse.jst.ws.was.v5.tp");
+ * @return The WebServiceAxisConsumptionCorePlugin singleton.
+ */
+ static public WebServiceAxis2CorePlugin getInstance() {
+ return instance_;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUI.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUI.properties
new file mode 100644
index 000000000..77fad1ac2
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUI.properties
@@ -0,0 +1,54 @@
+###############################################################################
+# Copyright (c) 2007, 2008 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+# runtime to the framework for 168762
+# 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+# 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+# 20070508 184450 sandakith@wso2.com - Lahiru Sandakith fix 184450, more information for user
+# 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+# 20070510 172926 sandakith@wso2.com - Lahiru Sandakith, Fix 172926 Use Util Classes
+# 20070517 187307 sandakith@wso2.com - Lahiru Sandakith, Fix 187307 Property File Fix
+# 20070604 190067 pmoogk@ca.ibm.com - Peter Moogk
+# 20080130 216997 katep@wso2.com - Kate Price
+###############################################################################
+
+LABEL_BROUSE=Browse...
+LABEL_WEB_SERVICE_CODEGEN=Web service code generation options
+LABEL_WEB_SERVICE_CLIENT_CODEGEN=Web service client code generation options
+LABEL_WEB_SERVICE_AAR=Web service archive options
+LABEL_DATABINDING=Default Databinding:
+LABEL_AAR_EXTENTION=AAR default extension:
+LABEL_AXIS2_RUNTIME_LOAD=Axis2 runtime loaded successfully
+LABEL_AXIS2_RUNTIME_LOAD_ERROR=Error occurred while loading Axis2 runtime. Select the correct Axis2 runtime folder.
+LABEL_GENERATE_TESTCASE_CAPTION=Generate a JUnit test case to test the service
+LABEL_GENERATE_SERVERSIDE_INTERFACE=Generate an interface for the skeleton
+LABEL_GENERATE_ALL=Generate all types for all elements referred to by schemas
+LABEL_CLIENT_SIDE=Client mode
+LABEL_SYNC_AND_ASYNC=Generate a client which supports both synchronous and asynchronous invocation
+LABEL_SYNC=Generate a synchronous client
+LABEL_ASYNC=Generate an asynchronous client
+
+AXIS2_LOCATION=Axis2 Runtime
+AXIS2_RUNTIME=Axis2 Runtime
+AXIS2_PREFERENCES=Axis2 Preferences
+AXIS2_RUNTIME_TOOLTIP=Select the Axis2 binary distribution folder or the folder which contains the Axis2 war distribution
+AXIS2_PREFERENCES_TOOLTIP=Select the default preferences for Axis2 runtime
+AXIS2_RUNTIME_LOCATION=Axis2 runtime location:
+AXIS2_RUNTIME_PREFERENCES=Axis2 Runtime Preferences
+LABEL_AXIS2_RUNTIME_NOT_EXIT=Select the location of the Axis2 binary distribution or the folder which contains the Axis2 war distribution.
+ERROR_INVALID_AXIS2_SERVER_LOCATION=Invalid Axis2 runtime location
+
+ERROR_INVALID_FILE_READ_WRITEL=Exception occurred while reading or writing file {0}
+ERROR_SERVER_IS_NOT_SET=The Axis2 facets cannot be installed since the Axis2 runtime location has not been set. \nGo to the Web Services preference page and set the Axis2 runtime location under Axis2 Preferences.
+
+PROGRESS_INSTALL_AXIS2_RUNTIME=Installing Axis2 Runtime
+PROGRESS_UNINSTALL_AXIS2_RUNTIME=Uninstalling the Axis2 Runtime
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUIMessages.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUIMessages.java
new file mode 100644
index 000000000..741c5e4ef
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/plugin/messages/Axis2CoreUIMessages.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse
+ * the Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+ * 20070510 172926 sandakith@wso2.com - Lahiru Sandakith, Fix 172926 Use Util Classes
+ * 20070517 187307 sandakith@wso2.com - Lahiru Sandakith, Fix 187307 Property File Fix
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20070808 194906 sandakith@wso2.com - Lahiru Sandakith, Fixing 194906 Runtime lib issue
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.plugin.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Axis2CoreUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME =
+ "org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUI"; //$NON-NLS-1$
+
+ private Axis2CoreUIMessages() {
+ // Do not instantiate
+ }
+
+ public static String LABEL_BROUSE;
+ public static String LABEL_WEB_SERVICE_CODEGEN;
+ public static String LABEL_WEB_SERVICE_CLIENT_CODEGEN;
+ public static String LABEL_WEB_SERVICE_AAR;
+ public static String LABEL_AAR_EXTENTION;
+ public static String LABEL_DATABINDING;
+ public static String LABEL_AXIS2_RUNTIME_LOAD;
+ public static String LABEL_AXIS2_RUNTIME_LOAD_ERROR;
+ public static String LABEL_AXIS2_RUNTIME_NOT_EXIT;
+ public static String LABEL_GENERATE_TESTCASE_CAPTION;
+ public static String LABEL_GENERATE_SERVERSIDE_INTERFACE;
+ public static String LABEL_GENERATE_ALL;
+ public static String LABEL_CLIENT_SIDE;
+ public static String LABEL_SYNC_AND_ASYNC;
+ public static String LABEL_SYNC;
+ public static String LABEL_ASYNC;
+
+ public static String AXIS2_LOCATION;
+ public static String AXIS2_RUNTIME;
+ public static String AXIS2_PREFERENCES;
+ public static String AXIS2_RUNTIME_TOOLTIP;
+ public static String AXIS2_PREFERENCES_TOOLTIP;
+ public static String AXIS2_RUNTIME_LOCATION;
+ public static String AXIS2_RUNTIME_PREFERENCES;
+
+ public static String ERROR_INVALID_AXIS2_SERVER_LOCATION;
+ public static String ERROR_INVALID_FILE_READ_WRITEL;
+ public static String ERROR_SERVER_IS_NOT_SET;
+
+ public static String PROGRESS_INSTALL_AXIS2_RUNTIME;
+ public static String PROGRESS_UNINSTALL_AXIS2_RUNTIME;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Axis2CoreUIMessages.class);
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/Axis2CoreUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/Axis2CoreUtils.java
new file mode 100644
index 000000000..fef492d93
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/Axis2CoreUtils.java
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080625 210817 samindaw@wso2.com - Saminda Wijeratne, Setting the proxyBean and proxyEndPoint values - Refactoring
+ * 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.utils;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+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.jdt.internal.core.JavaProject;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
+public class Axis2CoreUtils {
+
+ private static boolean alreadyComputedTempAxis2Directory = false;
+ private static String tempAxis2Dir = null;
+
+ public static void addResourcesFolderAsClassPath(IProject project){
+ try {
+ IJavaProject javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID);
+ IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();
+ List list = new LinkedList(java.util.Arrays.asList(rawClasspath));
+ String resourceName = "resources";
+ IFolder resourcesFolder = project.getFolder(resourceName);
+ boolean isAlreadyAdded=false;
+ for(IClasspathEntry cpe:rawClasspath){
+ isAlreadyAdded=cpe.getPath().toOSString().equals(resourcesFolder.getFullPath().toOSString());
+ if (isAlreadyAdded) break;
+ }
+ if (!isAlreadyAdded){
+ IClasspathEntry jarEntry = JavaCore.newLibraryEntry(resourcesFolder.getFullPath(),null,null);
+ list.add(jarEntry);
+ }
+ IClasspathEntry[] newClasspath = (IClasspathEntry[])list.toArray(new IClasspathEntry[0]);
+ javaProject.setRawClasspath(newClasspath,null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public static String tempAxis2Directory() {
+ if (!alreadyComputedTempAxis2Directory){
+ String[] nodes = {Axis2Constants.DIR_DOT_METADATA,
+ Axis2Constants.DIR_DOT_PLUGINS,
+ Axis2Constants.TEMP_AXIS2_FACET_DIR};
+ tempAxis2Dir =FileUtils.addNodesToPath(
+ ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString(), nodes);
+ alreadyComputedTempAxis2Directory= true;
+ }
+ return tempAxis2Dir;
+ }
+
+ public static String tempAxis2WebappFileLocation() {
+ return
+ addAnotherNodeToPath(tempAxis2Directory(),
+ Axis2Constants.WEBAPP_EXPLODED_SERVER_LOCATION_FILE);
+ }
+
+
+ public static String tempRuntimeStatusFileLocation() {
+ return
+ addAnotherNodeToPath(tempAxis2Directory(),
+ Axis2Constants.SERVER_STATUS_LOCATION_FILE);
+ }
+
+ public static String tempWarStatusFileLocation() {
+ return
+ addAnotherNodeToPath(tempAxis2Directory(),
+ Axis2Constants.WAR_STATUS_LOCATION_FILE);
+ }
+
+ public static String addAnotherNodeToPath(String currentPath, String newNode) {
+ return currentPath + File.separator + newNode;
+ }
+
+ public static void writePropertyToFile(File file,String key, String value) throws IOException {
+ Writer out = new BufferedWriter(new OutputStreamWriter(
+ new FileOutputStream(file), "8859_1"));
+ out.write(key+"="+value+"\n");
+ out.close();
+ }
+
+ public static String getServiceEndPointFromWSDL(String fileName, String serviceName){
+ String proxyEndPoint=null;
+ try{
+ Document doc;
+ doc = Axis2CoreUtils.getDocumentFromLocation(fileName);
+ Element documentElement = doc.getDocumentElement();
+ HashMap<String, String> portElements=new HashMap<String, String>();
+
+ //Iterate the root element children to find service nodes
+ for (int i = 0; i < documentElement.getChildNodes().getLength(); i++) {
+ Node serviceElement = documentElement.getChildNodes().item(i);
+ if (serviceElement.getNodeName().equals("wsdl:service")){
+ if (serviceName.equalsIgnoreCase(serviceElement.getAttributes().getNamedItem("name").getNodeValue())){
+
+ //iterate the service node children to find wsdl:port nodes
+ for (int j = 0; j < serviceElement.getChildNodes().getLength(); j++) {
+ Node portElement = serviceElement.getChildNodes().item(j);
+ if (portElement.getNodeName().equals("wsdl:port")){
+ String portBinding=portElement.getAttributes().getNamedItem("binding").getNodeValue().toUpperCase();
+
+ //iterate the port node children to find the soap address node
+ for (int k = 0; k < portElement.getChildNodes().getLength(); k++) {
+ Node soapElement = portElement.getChildNodes().item(k);
+ if (!soapElement.getNodeName().equals("#text")){
+ String soapLocation=soapElement.getAttributes().getNamedItem("location").getNodeValue();
+ while (portElements.containsKey(portBinding))
+ portBinding="K"+portBinding;
+ portElements.put(portBinding, soapLocation);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ String portBindType="";
+ String soap11B="SOAP11Binding".toUpperCase();
+ String soap12B="SOAP12Binding".toUpperCase();
+ String httpB="HttpBinding".toUpperCase();
+ String https="https";
+
+ //iterating through all found end points to determine the required endpoint in the order soap11, soap12, http
+ for (String string : portElements.keySet()) {
+ if (proxyEndPoint==null){
+ proxyEndPoint=portElements.get(string);
+ portBindType=string;
+ }
+ if (string.endsWith(soap11B)){
+ if (proxyEndPoint.startsWith(https)||(!portBindType.endsWith(soap11B))){
+ proxyEndPoint=portElements.get(string);
+ portBindType=string;
+ }
+ }
+ if ((!portBindType.endsWith(soap11B))&&(string.endsWith(soap12B))){
+ if (proxyEndPoint.startsWith(https)||(!portBindType.endsWith(soap12B))){
+ proxyEndPoint=portElements.get(string);
+ portBindType=string;
+ }
+ }
+ if (!((portBindType.endsWith(soap11B))||(portBindType.endsWith(soap12B)))&&(string.endsWith(httpB))){
+ if (proxyEndPoint.startsWith(https)||(!portBindType.endsWith(httpB))){
+ proxyEndPoint=portElements.get(string);
+ portBindType=string;
+ }
+ }
+ }
+ }catch(Exception e){}
+ return proxyEndPoint;
+ }
+
+ public static String getServiceNameFromWSDL(String fileName){
+ String serviceName="";
+ try{
+ Document doc;
+ doc = Axis2CoreUtils.getDocumentFromLocation(fileName);
+ Element documentElement = doc.getDocumentElement();
+
+ //Iterate the root element children to find services
+ for (int i = 0; i < documentElement.getChildNodes().getLength(); i++) {
+ Node serviceElement = documentElement.getChildNodes().item(i);
+ if (serviceElement.getNodeName().equals("wsdl:service")){
+ serviceName=serviceElement.getAttributes().getNamedItem("name").getNodeValue();
+ }
+ }
+ }catch(Exception e){}
+ return serviceName;
+ }
+
+ private static Document getDocumentFromLocation(String location){
+ Document doc=null;
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setIgnoringElementContentWhitespace(true);
+ dbf.setNamespaceAware(false);
+ DocumentBuilder db;
+ try {
+ db = dbf.newDocumentBuilder();
+ if (location.toUpperCase().startsWith("HTTP:")){
+ URL url = new URL(location);
+ doc=db.parse(url.openStream());
+ }else{
+ if (location.toUpperCase().startsWith("FILE:")) location=location.substring(5,location.length());
+ doc=db.parse(new File(location));
+ }
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ //e.printStackTrace();
+ }
+ return doc;
+ }
+
+
+ public static String getSourceFolder(String projectName){
+ String src=Axis2Constants.DIR_SRC;
+ try {
+ String[] javaProjectSourceDirectories = getJavaProjectSourceDirectories(projectName);
+ src=javaProjectSourceDirectories[0];
+ } catch (JavaModelException e) {
+ } catch (CoreException e) {
+ }
+ return src;
+ }
+
+ public static String[] getJavaProjectSourceDirectories (String projectName) throws CoreException, JavaModelException{
+ ArrayList paths = new ArrayList();
+
+ IProject project =ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (project.isOpen() && JavaProject.hasJavaNature(project)) {
+ IJavaProject javaProject = JavaCore.create(project);
+
+ IClasspathEntry[] classpathEntries = null;
+ classpathEntries = javaProject.getResolvedClasspath(true);
+
+ for (int i = 0; i<classpathEntries.length;i++){
+ IClasspathEntry entry = classpathEntries[i];
+ if (entry.getContentKind() == IPackageFragmentRoot.K_SOURCE)
+ {
+ IPath path = entry.getPath();
+ String srcPath = path.segments()[path.segmentCount()-1];
+ paths.add(srcPath);
+ }
+ }
+ }
+ return (String[])paths.toArray(new String[0]);
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/ClassLoadingUtil.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/ClassLoadingUtil.java
new file mode 100644
index 000000000..06d6e364e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/ClassLoadingUtil.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070919 202299 sandakith@wso2.com - Lahiru Sandakith Fix for AIOB Exp
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.utils;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
+
+public class ClassLoadingUtil {
+
+ private static String[] axis2ClassPath = null;
+ private static String[] classLoadPath = null;
+ private static int libCount = 0;
+ private static AntClassLoader antClassLoader;
+ private static boolean libsLoaded = false;
+ private static URL[] urls = null;
+ private static boolean alreadyInit = false;
+ private static boolean initByClient = false;
+
+ public static void init(String project) {
+ if (!alreadyInit) {
+
+ //Obtain a ant class loader instance
+ if(antClassLoader==null){
+ antClassLoader = new AntClassLoader();
+ }
+
+ // Set the class loader to child first
+ antClassLoader.setParentFirst(false);
+
+ if ((classLoadPath ==null) || !libsLoaded){
+ classLoadPath = getAxis2Libs(project);
+ }
+
+ if(urls == null){
+ urls= new URL[classLoadPath.length];
+ }else if(urls != null && (urls.length)!=(classLoadPath.length)){
+ urls= new URL[classLoadPath.length];
+ }
+
+ Path classpath = new Path(new Project());
+
+ try{
+ for (int i = 0; i < classLoadPath.length; i++) {
+ //Create a File object on the root of the directory containing the class file
+ if(classLoadPath[i]!=null){
+ File file = new File(classLoadPath[i]);
+ // Convert File to a URL
+ URL url = file.toURL();
+ urls[i]= url;
+ classpath.setPath(classLoadPath[i]);
+ }
+ }
+
+ }catch(MalformedURLException e){
+ e.printStackTrace();
+ }
+ antClassLoader.setClassPath(classpath);
+ alreadyInit = true;
+ }
+ }
+
+
+
+ public static Class loadClassFromAntClassLoader(String fillyQualifiedClassName){
+
+ Class cls = null;
+ try{
+ cls = antClassLoader.loadClass(fillyQualifiedClassName);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ return cls;
+ }
+
+
+ private static String[] getAxis2Libs(String project){
+ File webContainerPath = new File(FacetContainerUtils.pathToWebProjectContainerLib(project));
+ axis2ClassPath = new String[webContainerPath.list().length];
+ libCount = 0;
+ visitAllFiles(webContainerPath);
+ return axis2ClassPath;
+ }
+
+
+ public static void visitAllFiles(File dir) {
+ if(!dir.toString().endsWith(".txt")){
+ if (dir.isDirectory()) {
+
+ String[] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ visitAllFiles(new File(dir, children[i]));
+ }
+
+ } else {
+ axis2ClassPath[libCount]=dir.getAbsolutePath();
+ libCount+=1;
+ }
+
+ }
+ libsLoaded = true;
+ }
+
+ public static void cleanAntClassLoader(){
+ if(initByClient){
+ antClassLoader.cleanup();
+ alreadyInit = false;
+ }
+}
+ public static void setInitByClient(boolean status){
+ initByClient = status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FacetContainerUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FacetContainerUtils.java
new file mode 100644
index 000000000..980c16c44
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FacetContainerUtils.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070222 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070510 172926 sandakith@wso2.com - Lahiru Sandakith, Fix 172926 Use Util Classes
+ * 20070606 177421 sandakith@wso2.com - fix web.xml wiped out when Axis2 facet
+ * 20070612 192047 sandakith@wso2.com - Lahiru Sandakith, 192047
+ * 20070612 192047 kathy@ca.ibm.com - Kathy Chan
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20100308 282466 samindaw@wso2.com - Saminda Wijeratne, support for axis2 1.5
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.utils;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.jst.ws.internal.common.ServerUtils;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+
+public class FacetContainerUtils {
+
+ public static IPath getWorkspace(){
+ return ResourcesPlugin.getWorkspace().getRoot().getLocation();
+ }
+
+ public static IProject getProjectName(String project){
+ String projectString = replaceEscapecharactors(project.toString());
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(
+ getProjectNameFromFramewokNameString(projectString));
+ }
+
+ public static IPath getProjectRoot(String project){
+ String projectString = replaceEscapecharactors(project.toString());
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(
+ getProjectNameFromFramewokNameString(projectString)).getLocation();
+ }
+
+ public static String pathToWebProjectContainer(String project) {
+ IPath projectRoot = getProjectRoot(project);
+ IPath currentDynamicWebProjectDir = J2EEUtils.getWebContentPath(
+ getProjectName(project));
+ IPath currentDynamicWebProjectDirWithoutProjectRoot = J2EEUtils.getWebContentPath(
+ getProjectName(project)).removeFirstSegments(1).makeAbsolute();
+ if(projectRoot.toOSString().contains(getWorkspace().toOSString())){
+ return getWorkspace()
+ .append(currentDynamicWebProjectDir).toOSString();
+ }else{
+ return projectRoot
+ .append(currentDynamicWebProjectDirWithoutProjectRoot).toOSString();
+ }
+
+ }
+
+ public static String pathToWebProjectContainerWEBINF(String project) {
+ IPath projectRoot = getProjectRoot(project);
+ IPath webContainerWEBINFDir = J2EEUtils.getWebInfPath(
+ getProjectName(project));
+ IPath webContainerWEBINFDirWithoutProjectRoot = J2EEUtils.getWebInfPath(
+ getProjectName(project)).removeFirstSegments(1).makeAbsolute();
+ if(projectRoot.toOSString().contains(getWorkspace().toOSString())){
+ return getWorkspace()
+ .append(webContainerWEBINFDir).toOSString();
+ }else{
+ return projectRoot
+ .append(webContainerWEBINFDirWithoutProjectRoot).toOSString();
+ }
+ }
+
+ public static String pathToWebProjectContainerMETAINF(String project) {
+ String containerDirectory = pathToWebProjectContainer(project);
+ String webContainerMETAINF = Axis2Constants.DIR_META_INF;
+ String webContainerMETAINFString = Axis2CoreUtils.addAnotherNodeToPath(
+ containerDirectory,
+ webContainerMETAINF);
+ return webContainerMETAINFString;
+ }
+
+ public static String pathToWebProjectContainerAxis2Web(String project) {
+ String containerDirectory = pathToWebProjectContainer(project);
+ String webContainerAxis2Web = Axis2Constants.DIR_AXIS2_WEB;
+ String webContainerAxis2WebString = Axis2CoreUtils.addAnotherNodeToPath(
+ containerDirectory,
+ webContainerAxis2Web);
+ return webContainerAxis2WebString;
+ }
+
+ public static String pathToWebProjectContainerLib(String project){
+ String webContainerWEBINFString = pathToWebProjectContainerWEBINF(project);
+ return Axis2CoreUtils.addAnotherNodeToPath(
+ webContainerWEBINFString,
+ Axis2Constants.DIR_LIB);
+
+ }
+
+ public static String pathToWebProjectContainerWebXML(String project){
+ String webContainerWEBINFString = pathToWebProjectContainerWEBINF(project);
+ return Axis2CoreUtils.addAnotherNodeToPath(
+ webContainerWEBINFString,
+ "web.xml");
+ }
+
+ //Fix for the windows build not working
+ private static String replaceEscapecharactors(String vulnarableString){
+ if (vulnarableString.indexOf("/")!=-1){
+ vulnarableString = vulnarableString.replace('/', File.separator.charAt(0));
+ }
+ return vulnarableString;
+ }
+
+
+ private static String getProjectNameFromFramewokNameString(String frameworkProjectString){
+ if (frameworkProjectString.indexOf(getSplitCharactor())== -1){
+ return frameworkProjectString;
+ }else{
+ return frameworkProjectString.split(getSplitCharactors())[1];
+ }
+ }
+
+
+ private static String getSplitCharactor(){
+ //Windows check (because from inside wtp in return I received a hard coded path)
+ if (File.separatorChar == '\\'){
+ return "\\" ;
+ }else{
+ return File.separator;
+ }
+ }
+
+ public static String pathToAxis2CoreFacetTempDirectory(String project){
+ //
+ String pluginAxis2CoreTempDir = WebServiceAxis2CorePlugin
+ .getInstance().getStateLocation().toOSString();
+ String projectString = replaceEscapecharactors(project);
+ return FileUtils.addAnotherNodeToPath(pluginAxis2CoreTempDir, projectString);
+
+
+ }
+
+ private static String getSplitCharactors(){
+ //Windows check (because from inside wtp in return I received a hard coded path)
+ if (File.separatorChar == '\\'){
+ return "\\" + File.separator;
+ }else{
+ return File.separator;
+ }
+ }
+
+
+ public static String getDeployedWSDLURL(IProject serverProject,
+ String ServerFactoryId,
+ String ServerInstanceId,
+ String serviceName){
+ // Note that ServerCore.findServer() might return null if the server cannot be found and
+ // ServerUtils.getEncodedWebComponentURL() can handle null server properly (by using ServerFactoryId)
+ String deployedWSDLURLpath = null;
+ IServer server = null;
+ if (ServerInstanceId != null) {
+ server = ServerCore.findServer(ServerInstanceId);
+ }
+ deployedWSDLURLpath = ServerUtils.getEncodedWebComponentURL(serverProject,
+ ServerFactoryId, server);
+ if (deployedWSDLURLpath == null) {
+ deployedWSDLURLpath = Axis2Constants.LOCAL_SERVER_PORT;
+ }
+ String[] deployedWSDLURLParts = {Axis2Constants.SERVICES,serviceName};
+ return FileUtils.addNodesToURL(deployedWSDLURLpath, deployedWSDLURLParts)+"?wsdl";
+ }
+
+ public static String getAxis2WebContainerLibPath(IProject project){
+ return getAxis2WebContainerLibPath(FacetContainerUtils.pathToWebProjectContainer(
+ project.toString()));
+ }
+
+ public static String getAxis2WebContainerLibPath(String webcontainerPath){
+ return FileUtils.addAnotherNodeToPath(getAxis2WebContainerWEB_INFPath(webcontainerPath),
+ Axis2Constants.DIR_LIB);
+ }
+
+ public static String getAxis2WebContainerwebinfClassPath(IProject project){
+ return getAxis2WebContainerwebinfClassPath(FacetContainerUtils.pathToWebProjectContainer(
+ project.toString()));
+ }
+
+ public static String getAxis2WebContainerwebinfClassPath(String webcontainerPath){
+ return FileUtils.addAnotherNodeToPath(getAxis2WebContainerWEB_INFPath(webcontainerPath),
+ Axis2Constants.DIR_CLASSES);
+ }
+
+ public static String getAxis2WebContainerRepositoryPath(String webcontainerPath){
+ return FileUtils.addAnotherNodeToPath(getAxis2WebContainerWEB_INFPath(webcontainerPath),
+ Axis2Constants.DIR_SERVICES);
+ }
+
+ public static String getAxis2WebContainerWEB_INFPath(String webcontainerPath){
+ return FileUtils.addAnotherNodeToPath(webcontainerPath,Axis2Constants.DIR_WEB_INF);
+ }
+
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FileUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FileUtils.java
new file mode 100644
index 000000000..7c9b19e23
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/FileUtils.java
@@ -0,0 +1,254 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation, WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * IBM Corporation, WSO2 Inc. - Initial API and implementation
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+ * Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070730 194786 sandakith@wso2.com - Lahiru Sandakith, adding servletapi jar filter
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+public class FileUtils
+{
+ public FileUtils(){
+ 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) {
+ e.printStackTrace();
+ }
+ finally {
+ try {
+ fos.close();
+ is.close();
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ 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 boolean deleteDir(File dir) {
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ boolean success = deleteDir(new File(dir, children[i]));
+ if (!success) {
+ return false;
+ }
+ }
+ }
+ return dir.delete();
+ }
+
+ public static void deleteDirectories(File dir) {
+ 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();
+ }
+
+ public static void deleteDirectories(String dir) {
+ File directory = new File(dir);
+ deleteDirectories(directory);
+ }
+
+ 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())
+ {
+ FileUtils.createFileAndParentDirectories(targetFileName);
+ FileUtils.copyFile(sourceFileName, targetFileName);
+ }
+ }
+
+ public static boolean createDirectory(String directory){
+ // Create a directory; all ancestor directories must exist
+ boolean success = (new File(directory)).mkdir();
+ if (!success) {
+ // Directory creation failed
+ }
+ return success;
+ }
+
+ public static boolean createDirectorys(String directory){
+ // Create a directory; all ancestor directories must exist
+ boolean success = (new File(directory)).mkdirs();
+ if (!success) {
+ // Directory creation failed
+ }
+ return success;
+ }
+
+ //Copies all files under srcDir to dstDir.
+ // If dstDir does not exist, it will be created.
+ public static void copyDirectory(File srcDir, File dstDir) throws IOException {
+ if (srcDir.isDirectory()) {
+ if (!dstDir.exists()) {
+ dstDir.mkdir();
+ }
+
+ String[] children = srcDir.list();
+ for (int i=0; i<children.length; i++) {
+ copyDirectory(new File(srcDir, children[i]),
+ new File(dstDir, children[i]));
+ }
+ } else {
+ copy(srcDir, dstDir);
+ }
+ }
+
+ //Copies src file to dst file.
+ // If the dst file does not exist, it is created
+ public static void copy(File src, File dst) throws IOException {
+ InputStream in = new FileInputStream(src);
+ OutputStream out = new FileOutputStream(dst);
+
+ // Transfer bytes from in to out
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ in.close();
+ out.close();
+ }
+
+ public static String addAnotherNodeToPath(String currentPath, String newNode) {
+ return currentPath + File.separator + newNode;
+ }
+
+ public static String addNodesToPath(String currentPath, String[] newNode) {
+ String returnPath=currentPath;
+ for (int i = 0; i < newNode.length; i++) {
+ returnPath = returnPath + File.separator + newNode[i];
+ }
+ return returnPath;
+ }
+
+ public static String addNodesToPath(StringBuffer currentPath, String[] pathNodes) {
+ for (int i = 0; i < pathNodes.length; i++){
+ currentPath.append(File.separator);
+ currentPath.append(pathNodes[i]);
+ }
+ return currentPath.toString();
+ }
+
+ public static String addNodesToURL(String currentPath, String[] newNode) {
+ String returnPath=currentPath;
+ for (int i = 0; i < newNode.length; i++) {
+ returnPath = returnPath + "/" + newNode[i];
+ }
+ return returnPath;
+ }
+
+ /**
+ * Get the list of file with a prefix of <code>fileNamePrefix</code> &amp; an extension of
+ * <code>extension</code>
+ *
+ * @param sourceDir The directory in which to search the files
+ * @param fileNamePrefix The prefix to look for
+ * @param extension The extension to look for
+ * @return The list of file with a prefix of <code>fileNamePrefix</code> &amp; an extension of
+ * <code>extension</code>
+ */
+ public static File[] getMatchingFiles(String sourceDir, String fileNamePrefix, String extension) {
+ List fileList = new ArrayList();
+ File libDir = new File(sourceDir);
+ String libDirPath = libDir.getAbsolutePath();
+ String[] items = libDir.list();
+ if (items != null) {
+ for (int i = 0; i < items.length; i++) {
+ String item = items[i];
+ if (fileNamePrefix != null && extension != null) {
+ if (item.startsWith(fileNamePrefix) && item.endsWith(extension)) {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ } else if (fileNamePrefix == null && extension != null) {
+ if (item.endsWith(extension)) {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ } else if (fileNamePrefix != null && extension == null) {
+ if (item.startsWith(fileNamePrefix)) {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ } else {
+ fileList.add(new File(libDirPath + File.separator + item));
+ }
+ }
+ return (File[]) fileList.toArray(new File[fileList.size()]);
+ }
+ return new File[0];
+ }
+
+ /**
+ * Filter out files inside a <code>sourceDir</code> with matching <codefileNamePrefix></code>
+ * and <code>extension</code>
+ * @param sourceDir The directory to filter the files
+ * @param fileNamePrefix The filtering filename prefix
+ * @param extension The filtering file extension
+ */
+ public static void filterOutRestrictedFiles(String sourceDir, String fileNamePrefix, String extension){
+ File[] resultedMatchingFiles = getMatchingFiles(sourceDir, fileNamePrefix, extension);
+ for (int i = 0; i < resultedMatchingFiles.length; i++) {
+ File matchingFilePath = new File(resultedMatchingFiles[i].getAbsolutePath());
+ matchingFilePath.delete();
+ }
+ }
+
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/RuntimePropertyUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/RuntimePropertyUtils.java
new file mode 100644
index 000000000..cd3a291ff
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/core/utils/RuntimePropertyUtils.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.core.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
+
+public class RuntimePropertyUtils {
+ private static File PropertiesFileDir,serverPropertiesFile,statusPropertyFile,warPropertyFile;
+ private static IStatus status;
+ private static Properties properties;
+
+ private static void init(){
+ PropertiesFileDir = new File(Axis2CoreUtils.tempAxis2Directory());
+ if (!PropertiesFileDir.exists()){
+ PropertiesFileDir.mkdirs();
+ }
+ properties = new Properties();
+ }
+
+ private static void serverPropertiesFileInit() throws IOException{
+ serverPropertiesFile = new File(Axis2CoreUtils.tempAxis2WebappFileLocation());
+ if (!serverPropertiesFile.exists()){
+ serverPropertiesFile.createNewFile();
+ }
+ properties.load(new FileInputStream(serverPropertiesFile));
+ }
+
+ private static void statusPropertiesFileInit() throws IOException{
+ statusPropertyFile = new File(Axis2CoreUtils.tempRuntimeStatusFileLocation());
+ if (!statusPropertyFile.exists()){
+ statusPropertyFile.createNewFile();
+ }
+ properties.load(new FileInputStream(statusPropertyFile));
+ }
+
+ private static void warPropertiesFileInit() throws IOException{
+ warPropertyFile = new File(Axis2CoreUtils.tempWarStatusFileLocation());
+ if (!warPropertyFile.exists()){
+ warPropertyFile.createNewFile();
+ }
+ properties.load(new FileInputStream(warPropertyFile));
+ }
+
+
+
+ public static IStatus writeServerPathToPropertiesFile(String axis2Path) {
+ //Fix for properties file skipping the File seperator charactor
+ // on windows when loading again
+ String axis2PathNew = null;
+ if ((axis2Path.indexOf("\\")) != -1) {
+ axis2PathNew = axis2Path.replace(File.separator, File.separator+File.separator);;
+ }else{
+ axis2PathNew=axis2Path;
+ }
+ try {
+ init();
+ serverPropertiesFileInit();
+ if(! (properties.size()== 0)){
+ if(properties.containsKey(Axis2Constants.PROPERTY_KEY_PATH)){
+ properties.remove(Axis2Constants.PROPERTY_KEY_PATH);
+ }
+ }
+ Axis2CoreUtils.writePropertyToFile(serverPropertiesFile,
+ Axis2Constants.PROPERTY_KEY_PATH,
+ axis2PathNew);
+ } catch (FileNotFoundException e) {
+ updateStatusError();
+ } catch (IOException e) {
+ updateStatusError();
+ }
+
+ return status;
+ }
+
+ public static String getServerPathFromPropertiesFile(){
+ init();
+ String serverPath = null;
+ serverPropertiesFile = new File(Axis2CoreUtils.tempAxis2WebappFileLocation());
+ if (!serverPropertiesFile.exists()){
+ updateStatusError();
+ }
+ try {
+ properties.load(new FileInputStream(serverPropertiesFile));
+ if(properties.containsKey(Axis2Constants.PROPERTY_KEY_PATH)){
+ serverPath = properties.getProperty(Axis2Constants.PROPERTY_KEY_PATH);
+ }
+ } catch (FileNotFoundException e) {
+ updateStatusError();
+ } catch (IOException e) {
+ updateStatusError();
+ }
+ return serverPath;
+ }
+
+
+ public static IStatus writeServerStausToPropertiesFile(String runtimeStatus) {
+ try {
+ init();
+ statusPropertiesFileInit();
+ if(! (properties.size()== 0)){
+ if(properties.containsKey(Axis2Constants.PROPERTY_KEY_STATUS)){
+ properties.remove(Axis2Constants.PROPERTY_KEY_STATUS);
+ }
+ }
+ Axis2CoreUtils.writePropertyToFile(statusPropertyFile,
+ Axis2Constants.PROPERTY_KEY_STATUS,
+ runtimeStatus);
+ } catch (FileNotFoundException e) {
+ updateStatusError();
+ } catch (IOException e) {
+ updateStatusError();
+ }
+
+ return status;
+ }
+
+ public static IStatus writeWarStausToPropertiesFile(boolean warStatus) {
+ try {
+ init();
+ warPropertiesFileInit();
+ if(! (properties.size()== 0)){
+ if(properties.containsKey(Axis2Constants.PROPERTY_KEY_STATUS)){
+ properties.remove(Axis2Constants.PROPERTY_KEY_STATUS);
+ }
+ }
+ Axis2CoreUtils.writePropertyToFile(warPropertyFile,
+ Axis2Constants.PROPERTY_KEY_STATUS,
+ String.valueOf(warStatus));
+ } catch (FileNotFoundException e) {
+ updateStatusError();
+ } catch (IOException e) {
+ updateStatusError();
+ }
+
+ return status;
+ }
+
+ public static boolean getWarStatusFromPropertiesFile(){
+ init();
+ boolean warStatus = false;
+ warPropertyFile = new File(Axis2CoreUtils.tempWarStatusFileLocation());
+ if (!warPropertyFile.exists()){
+ updateStatusError();
+ }
+ try {
+ properties.load(new FileInputStream(warPropertyFile));
+ if(properties.containsKey(Axis2Constants.PROPERTY_KEY_STATUS)){
+ warStatus = Boolean.parseBoolean(
+ properties.getProperty(Axis2Constants.PROPERTY_KEY_STATUS));
+ }
+ } catch (FileNotFoundException e) {
+ updateStatusError();
+ } catch (IOException e) {
+ updateStatusError();
+ }
+ return warStatus;
+ }
+
+ private static void updateStatusError(){
+ status = new Status( IStatus.ERROR,
+ "id",
+ 0,
+ Axis2CoreUIMessages.ERROR_INVALID_AXIS2_SERVER_LOCATION,
+ null );
+ }
+
+ }
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/Axis2WebservicesServerCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/Axis2WebservicesServerCommand.java
new file mode 100644
index 000000000..f8d661879
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/Axis2WebservicesServerCommand.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070606 177421 sandakith@wso2.com - fix web.xml wiped out when Axis2 facet
+ * 20070808 194906 sandakith@wso2.com - Lahiru Sandakith, Fixing 194906 Runtime lib issue
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20071011 205972 sandakith@wso2.com - Lahiru Sandakith, Axis2 Libraries License files fix
+ * 20080528 186429 sandakith@wso2.com - Lahiru Sandakith, Axis2 webapp jsp's validation fix
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ * 20100308 282466 samindaw@wso2.com - Saminda Wijeratne, support for axis2 1.5
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.commands;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.core.utils.RuntimePropertyUtils;
+import org.eclipse.jst.ws.axis2.facet.utils.Axis2RuntimeUtils;
+import org.eclipse.jst.ws.axis2.facet.utils.Axis2WebappUtils;
+import org.eclipse.jst.ws.axis2.facet.utils.ContentCopyUtils;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.validation.ValidationFramework;
+
+public class Axis2WebservicesServerCommand extends
+AbstractDataModelOperation {
+
+ IProject project;
+ Axis2EmitterContext context;
+
+ public Axis2WebservicesServerCommand(IProject project){
+ context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+ this.project = project;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ return Status.OK_STATUS;
+ }
+
+ public IStatus executeOverride(IProgressMonitor monitor) {
+ //Copy the axis2 facet in to this project
+ IStatus status =null;
+ String runtimeLocation = null;
+ ContentCopyUtils contentCopyUtils = new ContentCopyUtils(getEnvironment());
+ try {
+ if(context.isAxis2ServerPathRepresentsWar()
+ || RuntimePropertyUtils.getWarStatusFromPropertiesFile()){
+ runtimeLocation = Axis2RuntimeUtils.copyAxis2War(
+ monitor,
+ Axis2Constants.PROPERTY_KEY_PATH);
+ }else{
+
+ runtimeLocation = Axis2WebappUtils.copyAxis2War(
+ monitor,
+ Axis2Constants.PROPERTY_KEY_PATH);
+ }
+ } catch (FileNotFoundException e) {
+ return handleExceptionStatus(e);
+ } catch (IOException e) {
+ return handleExceptionStatus(e);
+ } catch (Exception e) {
+ return handleExceptionStatus(e);
+ }
+
+ //First Setting the libs folder as ignored and then copy the content of the runtime
+ IPath libPath = new Path(runtimeLocation);
+ libPath = libPath.append(Axis2Constants.DIR_WEB_INF);
+ libPath = libPath.append(Axis2Constants.DIR_LIB);
+ List<String> ignoreList = new ArrayList<String>();
+ ignoreList.add(libPath.toOSString());
+ contentCopyUtils.updateCheckList(ignoreList);
+
+ //Related issue 186429, Solution is to disable the validation of the Axis2 JSP container location.
+ ValidationFramework validationFrameworkInstance = ValidationFramework.getDefault();
+ String[] node = {Axis2Constants.DIR_AXIS2_WEB};
+ IPath pathForAxis2JSPContainer = new Path(
+ FileUtils.addNodesToPath(J2EEUtils.getWebContentPath(project).toOSString(), node));
+ validationFrameworkInstance.disableValidation(
+ project.getWorkspace().getRoot().getFolder(pathForAxis2JSPContainer));
+
+ status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
+ runtimeLocation,
+ FacetContainerUtils.pathToWebProjectContainer(project.toString()),
+ monitor,
+ false
+ );
+
+ // After that copy the nesessery set of libraries to the project again
+ List<String> includeList = new ArrayList<String>();
+ contentCopyUtils.updateCheckList(loadIncludeListWithAxis2Libs(libPath.toOSString(),
+ includeList));
+ status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
+ libPath.toOSString(), FacetContainerUtils.getAxis2WebContainerLibPath(project),
+ monitor,
+ true
+ );
+
+ //Merge web.xml Files
+ MergeWEBXMLCommand mergeWebXMLCommand = new MergeWEBXMLCommand();
+ mergeWebXMLCommand.setExtraAxis2TagsAdded(false);
+ mergeWebXMLCommand.setServerProject(project);
+ mergeWebXMLCommand.exexuteOverride(monitor);
+
+ //clean up tempery files
+ File tempFacetDirectory = new File(runtimeLocation);
+ if (tempFacetDirectory.exists() && context.isAxis2ServerPathRepresentsWar()) {
+ FileUtils.deleteDir(tempFacetDirectory);
+ }
+ status = Status.OK_STATUS;
+ return status;
+ }
+
+ private void cleanupIfFacetStatusFailed(String runtimeLocation){
+ File tempFacetDirectory = new File(runtimeLocation);
+ if (tempFacetDirectory.exists()) {
+ FileUtils.deleteDir(tempFacetDirectory);
+ }
+ }
+
+ private IStatus handleExceptionStatus(Exception e){
+ IStatus status = null;
+ status = new Status(1,project.toString(),1,Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET,e);
+ cleanupIfFacetStatusFailed(Axis2CoreUtils.tempAxis2Directory());
+ return status;
+ }
+
+ /**
+ * Load the exact libraries list from the axis2 jars with the correct versions to the
+ * <code>path</code>. Doing it this way introduce the scalability to the solution
+ * where the need comes in the future releases to include additional libraries and
+ * if needed filter out some libraries.
+ * @param runtimeLocation
+ * @param includeList
+ * @return loaded list
+ */
+ private List loadIncludeListWithAxis2Libs(String path, List includeList){
+ for (int i = 0; i < Axis2Constants.AXIS2_LIB_PREFIXES.length; i++) {
+ File[] jarFileList = FileUtils.getMatchingFiles(path,
+ Axis2Constants.AXIS2_LIB_PREFIXES[i],
+ Axis2Constants.JAR);
+ for (int j = 0; j < jarFileList.length; j++) {
+ includeList.add(jarFileList[j].getAbsolutePath());
+ }
+ //Fix for the 205972
+ File[] licenseFileList = FileUtils.getMatchingFiles(path,
+ Axis2Constants.AXIS2_LIB_PREFIXES[i],
+ Axis2Constants.TXT);
+ for (int k = 0; k < licenseFileList.length; k++) {
+ includeList.add(licenseFileList[k].getAbsolutePath());
+ }
+ }
+ return includeList;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/MergeWEBXMLCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/MergeWEBXMLCommand.java
new file mode 100644
index 000000000..08a3ad4eb
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/commands/MergeWEBXMLCommand.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 WSO2 Inc, 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
+ * WSO2 Inc. - modified and fix web.xml wiped out when Axis2 facet
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20060515 115225 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20070606 177421 sandakith@wso2.com - fix web.xml wiped out when Axis2 facet
+ * 20091207 192005 samindaw@wso2.com - merge the web.xml to have axis2 welcome file defined
+ * 20100308 282466 samindaw@wso2.com - Saminda Wijeratne, support for axis2 1.5
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.commands;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage;
+import org.eclipse.jst.j2ee.webapplication.Servlet;
+import org.eclipse.jst.j2ee.webapplication.ServletMapping;
+import org.eclipse.jst.j2ee.webapplication.ServletType;
+import org.eclipse.jst.j2ee.webapplication.WebApp;
+import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
+import org.eclipse.jst.javaee.core.DisplayName;
+import org.eclipse.jst.javaee.core.JavaeeFactory;
+import org.eclipse.jst.javaee.core.UrlPatternType;
+import org.eclipse.jst.javaee.web.WebFactory;
+import org.eclipse.jst.javaee.web.WelcomeFileList;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.facet.utils.Axis2RuntimeUtils;
+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 MergeWEBXMLCommand extends AbstractDataModelOperation {
+
+ private IProject serverProject;
+ private boolean extraAxis2TagsAdded = false;
+
+ public MergeWEBXMLCommand( ) {
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ){
+ return Status.OK_STATUS;
+ }
+
+ public IStatus exexuteOverride( IProgressMonitor monitor){
+ IEnvironment environment = getEnvironment();
+ if (serverProject != null) {
+ IStatus status = null;
+ status = mergeWebXML(getAxisServletDescriptor());
+ if (status.getSeverity() == Status.ERROR) {
+ environment.getStatusHandler().reportError(status);
+ return status;
+ }
+ status = mergeWebXML(getAdmintServletDescriptor());
+ if (status.getSeverity() == Status.ERROR) {
+ environment.getStatusHandler().reportError(status);
+ return status;
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+ private IStatus mergeWebXML(final ServletDescriptor servletDescriptor){
+ IStatus status = Status.OK_STATUS;
+ final IModelProvider provider = ModelProviderManager.getModelProvider(serverProject);
+ provider.modify(new Runnable(){
+ public void run() {
+ Object object = provider.getModelObject();
+ if (object instanceof org.eclipse.jst.javaee.web.WebApp){
+ org.eclipse.jst.javaee.web.WebApp javaeeWebApp =
+ (org.eclipse.jst.javaee.web.WebApp) object;
+ addJavaeeServlet(serverProject, servletDescriptor, javaeeWebApp);
+ }
+ if (object instanceof org.eclipse.jst.j2ee.webapplication.WebApp){
+ WebApp webApp = (WebApp) object;
+ addServlet(serverProject, servletDescriptor, webApp);
+ }
+ }
+
+ }, null);
+ return status;
+ }
+
+ private ServletDescriptor getAxisServletDescriptor() {
+
+ ServletDescriptor sd = new ServletDescriptor();
+ sd._name = "AxisServlet"; //$NON-NLS-1$
+ sd._displayName = "Apache-Axis Servlet"; //$NON-NLS-1$
+ sd._className = "org.apache.axis2.transport.http.AxisServlet"; //$NON-NLS-1$
+ sd._mappings = new String[] { "/servlet/AxisServlet", //$NON-NLS-1$
+ "*.jws", //$NON-NLS-1$
+ "/services/*" }; //$NON-NLS-1$
+ //sd._loadOnStartup = new Integer(1);
+ return sd;
+ }
+
+ private ServletDescriptor getAdmintServletDescriptor() {
+ ServletDescriptor sd = new ServletDescriptor();
+ sd._name = "AxisAdminServlet"; //$NON-NLS-1$
+ sd._displayName = "Apache-Axis Admin Servlet Web Admin"; //$NON-NLS-1$
+ sd._className = Axis2RuntimeUtils.getAxis2ServletAdminClass(serverProject);
+ sd._mappings = new String[] { "/axis2-admin/*" }; //$NON-NLS-1$
+ sd._loadOnStartup = new Integer(100);
+ return sd;
+ }
+
+
+ public IStatus addServlet(IProject webProject, ServletDescriptor servletDescriptor,
+ WebApp webapp) {
+ try {
+ List theServlets = webapp.getServlets();
+ for (int i = 0; i < theServlets.size(); i++) {
+ Servlet aServlet = (Servlet) theServlets.get(i);
+ if (aServlet.getServletName().equals(servletDescriptor._name)) {
+ return Status.OK_STATUS;
+ }
+ }
+
+ WebapplicationFactory factory = WebapplicationFactory.eINSTANCE;
+
+ Servlet servlet = factory.createServlet();
+ ServletType servletType = factory.createServletType();
+ servlet.setWebType(servletType);
+ servlet.setServletName(servletDescriptor._name);
+ servletType.setClassName(servletDescriptor._className);
+ if(servletDescriptor._displayName != null){
+ servlet.setDisplayName(servletDescriptor._displayName);
+ }
+ if(servletDescriptor._loadOnStartup != null){
+ servlet.setLoadOnStartup(servletDescriptor._loadOnStartup);
+ }
+ if(servletDescriptor._params != null){
+ Properties properties = servlet.getParamsAsProperties();
+ properties.putAll(servletDescriptor._params);
+ }
+ webapp.getServlets().add(servlet);
+
+ if(servletDescriptor._mappings != null){
+ for(int i=0; i<servletDescriptor._mappings.length; i++){
+ ServletMapping servletMapping = factory.createServletMapping();
+ servletMapping.setServlet(servlet);
+ servletMapping.setUrlPattern(servletDescriptor._mappings[i]);
+ webapp.getServletMappings().add(servletMapping);
+ }
+ }
+
+ if (!extraAxis2TagsAdded) {
+ //add the welcome file list
+ webapp.getFileList().addFileNamed("/axis2-web/index.jsp");
+
+ //add the error pages
+ ErrorCodeErrorPage errorPage404 = factory.createErrorCodeErrorPage();
+ errorPage404.setErrorCode("404");
+ errorPage404.setLocation("/axis2-web/Error/error404.jsp");
+ webapp.getErrorPages().add(errorPage404);
+
+ ErrorCodeErrorPage errorPage500 = factory.createErrorCodeErrorPage();
+ errorPage500.setErrorCode("500");
+ errorPage500.setLocation("/axis2-web/Error/error500.jsp");
+ webapp.getErrorPages().add(errorPage500);
+ extraAxis2TagsAdded = true;
+ }
+
+ return Status.OK_STATUS;
+ } catch (Exception e) {
+
+ return StatusUtils.errorStatus(
+ "MSG_ERROR_UPDATE_WEB_XML",
+ e);
+ }
+ }
+
+ private void addJavaeeServlet(IProject webProject, ServletDescriptor servletDescriptor,
+ org.eclipse.jst.javaee.web.WebApp webapp) {
+ List theServlets = webapp.getServlets();
+ for (int i = 0; i < theServlets.size(); i++) {
+ org.eclipse.jst.javaee.web.Servlet aServlet =
+ (org.eclipse.jst.javaee.web.Servlet) theServlets.get(i);
+ if (aServlet.getServletName().equals(servletDescriptor._name)) {
+ return;
+ }
+ }
+ WebFactory factory = WebFactory.eINSTANCE;
+ org.eclipse.jst.javaee.web.Servlet servlet = factory.createServlet();
+ servlet.setServletName(servletDescriptor._name);
+ servlet.setServletClass(servletDescriptor._className);
+ if(servletDescriptor._displayName != null){
+ DisplayName displayNameObj = JavaeeFactory.eINSTANCE.createDisplayName();
+ displayNameObj.setValue(servletDescriptor._displayName);
+ servlet.getDisplayNames().add(displayNameObj);
+ }
+ if(servletDescriptor._loadOnStartup != null){
+ servlet.setLoadOnStartup(servletDescriptor._loadOnStartup);
+ }
+ webapp.getServlets().add(servlet);
+ if(servletDescriptor._mappings != null){
+ for(int i=0; i<servletDescriptor._mappings.length; i++){
+ org.eclipse.jst.javaee.web.ServletMapping servletMapping =
+ factory.createServletMapping();
+ servletMapping.setServletName(servlet.getServletName());
+ UrlPatternType url = JavaeeFactory.eINSTANCE.createUrlPatternType();
+ url.setValue(servletDescriptor._mappings[i]);
+ servletMapping.getUrlPatterns().add(url);
+ webapp.getServletMappings().add(servletMapping);
+ }
+ }
+ List welcomeFileLists = webapp.getWelcomeFileLists();
+ if (welcomeFileLists!=null){
+ for (Object list : welcomeFileLists) {
+ if (list instanceof WelcomeFileList){
+ WelcomeFileList welcomeList=(WelcomeFileList) list;
+ if (!welcomeList.getWelcomeFiles().contains(Axis2Constants.AXIS2_WELCOME_FILE))
+ welcomeList.getWelcomeFiles().add(Axis2Constants.AXIS2_WELCOME_FILE);
+ }
+ }
+ }
+ }
+
+
+ public void setServerProject(IProject serverProject) {
+ this.serverProject = serverProject;
+ }
+
+ public void setExtraAxis2TagsAdded(boolean flag) {
+ this.extraAxis2TagsAdded = flag;
+ }
+
+ public class ServletDescriptor {
+ String _name;
+ String _className;
+ String _displayName;
+ Map _params;
+ String[] _mappings;
+ Integer _loadOnStartup;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetInstallDelegate.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetInstallDelegate.java
new file mode 100644
index 000000000..a2d68ef8e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetInstallDelegate.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070606 177421 sandakith@wso2.com - fix web.xml wiped out when Axis2 facet
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20071010 204182 kathy@ca.ibm.com - Kathy Chan, check for Xalan TransformerFactoryImpl
+ * 20080213 218910 kathy@ca.ibm.com - Kathy Chan
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.deligate;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
+import org.eclipse.jst.ws.axis2.core.utils.RuntimePropertyUtils;
+import org.eclipse.jst.ws.axis2.facet.commands.Axis2WebservicesServerCommand;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+public class Axis2CoreFacetInstallDelegate implements IDelegate {
+
+ private IStatus status;
+
+ public void execute(IProject project, IProjectFacetVersion arg1, Object arg2,
+ IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask(Axis2CoreUIMessages.PROGRESS_INSTALL_AXIS2_RUNTIME, 2 );
+
+ Axis2WebservicesServerCommand command = new Axis2WebservicesServerCommand(project);
+ status = command.executeOverride(monitor);
+ if (status.getCode() == Status.OK_STATUS.getCode() ){
+ RuntimePropertyUtils.writeServerStausToPropertiesFile(
+ Axis2Constants.SERVER_STATUS_PASS);
+ }else{
+ RuntimePropertyUtils.writeServerStausToPropertiesFile(
+ Axis2Constants.SERVER_STATUS_FAIL);
+ throw new CoreException(status);
+ }
+ monitor.worked( 1 );
+ monitor.done();
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetUnInstallDelegate.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetUnInstallDelegate.java
new file mode 100644
index 000000000..e6104c54e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2CoreFacetUnInstallDelegate.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * 20070611 192002 kathy@ca.ibm.com - Kathy Chan
+ * facet to the framework for 168766
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.deligate;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+public class Axis2CoreFacetUnInstallDelegate implements IDelegate {
+
+ private IStatus status;
+
+ public void execute(IProject project, IProjectFacetVersion arg1, Object arg2,
+ IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask(Axis2CoreUIMessages.PROGRESS_UNINSTALL_AXIS2_RUNTIME, 2 );
+ // TODO rollback the dynamic web project to the previous state.
+ status = Status.OK_STATUS;
+ monitor.worked( 1 );
+ }
+
+ public IStatus getStatus(){
+ return status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetInstallDelegate.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetInstallDelegate.java
new file mode 100644
index 000000000..5d7f5cbff
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetInstallDelegate.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.deligate;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+public class Axis2ExtFacetInstallDelegate implements IDelegate {
+
+ public void execute(IProject arg0, IProjectFacetVersion arg1, Object arg2,
+ IProgressMonitor arg3) throws CoreException {
+ //TODO This will include the more requirements that needed to be automated
+ // when we cover the other RFE s in future.
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetUnInstallDelegate.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetUnInstallDelegate.java
new file mode 100644
index 000000000..edc71cfa0
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/deligate/Axis2ExtFacetUnInstallDelegate.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.deligate;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+public class Axis2ExtFacetUnInstallDelegate implements IDelegate {
+
+ public void execute(IProject arg0, IProjectFacetVersion arg1, Object arg2,
+ IProgressMonitor arg3) throws CoreException {
+ //TODO This will include the more requirements that needed to be automated
+ // when we cover the other RFE s in future.
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUI.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUI.properties
new file mode 100644
index 000000000..ccd183922
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUI.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070214 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse
+# the Axis2 facet to the framework for 168762
+# 20070517 187307 sandakith@wso2.com - Lahiru Sandakith, Fix 187307 Property File Fix
+###############################################################################
+
+
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUIMessages.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUIMessages.java
new file mode 100644
index 000000000..41e0a26f6
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/messages/Axis2FacetUIMessages.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070517 187307 sandakith@wso2.com - Lahiru Sandakith, Fix 187307 Property File Fix
+ * 20070606 177421 sandakith@wso2.com - fix web.xml wiped out when Axis2 facet
+ * 20070730 194786 sandakith@wso2.com - Lahiru Sandakith, adding servletapi jar filter
+ * 20070808 194906 sandakith@wso2.com - Lahiru Sandakith, Fixing 194906 Runtime lib issue
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Axis2FacetUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME =
+ "org.eclipse.jst.ws.axis2.facet.messages.Axis2FacetUI";//$NON-NLS-1$
+
+ private Axis2FacetUIMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Axis2FacetUIMessages.class);
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/model/FacetModel.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/model/FacetModel.java
new file mode 100644
index 000000000..ba0d68e2b
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/model/FacetModel.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070222 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.model;
+
+public class FacetModel {
+
+ private static String webFacetConinerDir;
+
+ public static String getWebFacetConinerDir() {
+ return webFacetConinerDir;
+ }
+
+ public static void setWebFacetConinerDir(String inputWebFacetConinerDir) {
+ webFacetConinerDir = inputWebFacetConinerDir;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/plugin/Axis2FacetPlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/plugin/Axis2FacetPlugin.java
new file mode 100644
index 000000000..c95e133a2
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/plugin/Axis2FacetPlugin.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.plugin;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Axis2FacetPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.apache.axis2.facet";
+
+ // The shared instance
+ private static Axis2FacetPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public Axis2FacetPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static Axis2FacetPlugin getDefault() {
+ return plugin;
+ }
+
+ public static Axis2FacetPlugin getInstance() {
+ return plugin;
+ }
+
+ public static void log( final Exception e ){
+ final String msg = e.getMessage() + "";
+ log( new Status( IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, e ) );
+ }
+
+ public static void log( final IStatus status ){
+ getInstance().getLog().log( status );
+ }
+
+ public static void log( final String msg ){
+ log( new Status( IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, null ) );
+ }
+
+ public static IStatus createErrorStatus( final String msg ){
+ return createErrorStatus( msg, null );
+ }
+
+ public static IStatus createErrorStatus( final String msg,
+ final Exception e ){
+ return new Status( IStatus.ERROR, PLUGIN_ID, 0, msg, e );
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2RuntimeUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2RuntimeUtils.java
new file mode 100644
index 000000000..fd8773b21
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2RuntimeUtils.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20100308 282466 samindaw@wso2.com - Saminda Wijeratne, support for axis2 1.5
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.channels.FileChannel;
+import java.util.Enumeration;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.Project;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+
+public class Axis2RuntimeUtils {
+
+ public static final int ZIP=0, UNZIP = 1;
+ protected static int mode = UNZIP;
+ static ZipFile zipFile;
+ protected static byte[] b;
+ static SortedSet createdDirs;
+ static String outputPath;
+ static Axis2EmitterContext context;
+
+ public static String copyAxis2War(IProgressMonitor monitor, String Axis2Home)
+ throws FileNotFoundException, IOException{
+ context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+ String tempWarFile = null;
+ String tempWarLocation = null;
+ String tempUnzipLocation = null;
+ try {
+ if (new File (Axis2CoreUtils.tempAxis2Directory()).isDirectory()) {
+ tempWarLocation = Axis2CoreUtils.addAnotherNodeToPath(
+ Axis2CoreUtils.tempAxis2Directory(),
+ Axis2Constants.DIR_TEMPWAR);
+ File tempWarLocationFile= new File(tempWarLocation);
+ if (tempWarLocationFile.exists()) {
+ FileUtils.deleteDirectories(tempWarLocationFile);
+ }
+ tempWarLocationFile.mkdirs();
+ tempWarFile = Axis2CoreUtils.addAnotherNodeToPath(
+ tempWarLocation,
+ Axis2Constants.FILE_AXIS2_WAR);
+ new File(tempWarFile).createNewFile();
+ String axis2RuntimrLocation = null;
+ if(context.getAxis2RuntimeLocation()!=null){
+ axis2RuntimrLocation = context.getAxis2RuntimeLocation();
+ }else{
+ Axis2EmitterContext context = WebServiceAxis2CorePlugin
+ .getDefault().getAxisEmitterContext();
+ axis2RuntimrLocation = context.getAxis2RuntimeLocation();
+
+ }
+ String axis2WarFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2RuntimrLocation,
+ Axis2Constants.FILE_AXIS2_WAR);
+ FileChannel srcChannel = new FileInputStream(axis2WarFile).getChannel();
+ FileChannel dstChannel = new FileOutputStream(tempWarFile).getChannel();
+ // Copy file contents from source to destination
+ dstChannel.transferFrom(srcChannel, 0, srcChannel.size());
+ // Close the channels
+ srcChannel.close();
+ dstChannel.close();
+
+ //unzip this into another foulder
+ tempUnzipLocation = FileUtils.addAnotherNodeToPath(tempWarLocation,
+ Axis2Constants.DIR_UNZIP);
+ File tempUnzipLocationFile= new File(tempUnzipLocation);
+ if (!tempUnzipLocationFile.exists()) {
+ tempUnzipLocationFile.mkdirs();
+ }
+ unzipAxis2War(tempWarFile,tempUnzipLocation );
+
+ }
+
+ IPath tempWebXMLLocationPath = new Path(tempUnzipLocation)
+ .append(Axis2Constants.DIR_WEB_INF)
+ .append(Axis2Constants.FILE_WEB_XML);
+ //delete the axis2 web.xml File(DWP already have)
+ new File(tempWebXMLLocationPath.toOSString()).delete();
+
+ //} else {
+ //Throws an error message
+ //}
+ } catch (FileNotFoundException e) {
+ throw e;
+ } catch (IOException e) {
+ throw e;
+ }
+
+ return tempUnzipLocation;
+ }
+
+
+ private static void unzipAxis2War(String fileName,String outputPath){
+ b = new byte[8092];
+ setOutputPath(outputPath);
+ if (fileName.endsWith(".war") )
+ unZip(fileName);
+ else
+ throw new IllegalStateException("Wrong file type" + fileName);
+ }
+
+ /** For a given Zip file, process each entry. */
+ public static void unZip(String fileName) {
+
+ createdDirs = new TreeSet();
+ try {
+ zipFile = new ZipFile(fileName);
+ Enumeration all = zipFile.entries();
+ while (all.hasMoreElements()) {
+ unzipFile((ZipEntry) all.nextElement());
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ protected static void unzipFile(ZipEntry e) throws IOException {
+
+ boolean warnedMkDir = false;
+ String zipName = e.getName();
+ switch (mode) {
+ case UNZIP:
+ if (zipName.startsWith("/")) {
+ if (!warnedMkDir)
+ warnedMkDir = true;
+ zipName = zipName.substring(1);
+ }
+ if (zipName.endsWith("/")) {
+ return;
+ }
+ int ix = zipName.lastIndexOf('/');
+ if (ix > 0) {
+ String dirName = zipName.substring(0, ix);
+ if (!createdDirs.contains(dirName)) {
+ File d = new File(getOutputPath()+File.separator+dirName);
+ if (!(d.exists() && d.isDirectory())) {
+ if (!d.mkdirs()) {
+ throw new IllegalStateException("Warning: unable to mkdir " + dirName);
+ }
+ createdDirs.add(dirName);
+ }
+ }
+ }
+ FileOutputStream os = new FileOutputStream(getOutputPath()+File.separator+zipName);
+ InputStream is = zipFile.getInputStream(e);
+ int n = 0;
+ while ((n = is.read(b)) > 0)
+ os.write(b, 0, n);
+ is.close();
+ os.close();
+ break;
+ default:
+ throw new IllegalStateException("mode value (" + mode + ") bad");
+ }
+ }
+
+
+
+ public static String getOutputPath() {
+ return outputPath;
+ }
+
+
+ public static void setOutputPath(String outputPath) {
+ Axis2RuntimeUtils.outputPath = outputPath;
+ }
+
+ public static String getAxis2ServletAdminClass(IProject project){
+ String[] classNames=new String[]{"org.apache.axis2.transport.http.AxisAdminServlet" ,
+ "org.apache.axis2.webapp.AxisAdminServlet"};//$NON-NLS-1$
+ String defaultClassName=classNames[0];
+ String selectedClassName=null;
+ String axis2WCLibPath = FacetContainerUtils.getAxis2WebContainerLibPath(project);
+ File libFolder = new File(axis2WCLibPath);
+ File[] libs = libFolder.listFiles();
+ AntClassLoader antClassLoader = new AntClassLoader();
+ antClassLoader.setParentFirst(false);
+ org.apache.tools.ant.types.Path path = new org.apache.tools.ant.types.Path(new Project());
+ path.setPath(FacetContainerUtils.getAxis2WebContainerwebinfClassPath(project));
+ for (File lib : libs) {
+ if (lib.getName().toLowerCase().endsWith(".jar")){
+ path.setPath(lib.getAbsolutePath());
+ antClassLoader.setClassPath(path);
+ for(String className:classNames){
+ try{
+ Class.forName(className, false, antClassLoader);
+ selectedClassName=className;
+ }catch (NoClassDefFoundError e1){
+ if (!e1.getMessage().contains(className) && !e1.getCause().getMessage().contains(className)) //dependent class is not found
+ selectedClassName=className;
+ //class not found
+ }catch(Exception e){
+ //the class is not found
+ }
+ if (selectedClassName!=null) break;
+ }
+ }
+ if (selectedClassName!=null) break;
+ }
+ antClassLoader.cleanup();
+ if (selectedClassName==null) selectedClassName=defaultClassName;
+ return selectedClassName;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2WebappUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2WebappUtils.java
new file mode 100644
index 000000000..a153888c5
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/Axis2WebappUtils.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070410 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070730 194786 sandakith@wso2.com - Lahiru Sandakith, adding servletapi jar filter
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20071120 205228 sandakith@wso2.com - Lahiru Sandakith, Axis2 Runtime change issue.
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.utils;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+
+public class Axis2WebappUtils {
+
+ private static String tempWarLocation = null;
+ private static boolean alreadyWarExist = false;
+ private static Axis2EmitterContext context;
+ private static String axis2HomeLocation = null;
+
+ public static String copyAxis2War(IProgressMonitor monitor, String Axis2Home)
+ throws FileNotFoundException, IOException{
+ context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+
+ if( ! ( alreadyWarExist && context.getAxis2RuntimeLocation().equals(axis2HomeLocation) )){
+ if(context.getAxis2RuntimeLocation() != null){
+ axis2HomeLocation = context.getAxis2RuntimeLocation();
+ }
+ File tempAxis2Directory = new File (Axis2CoreUtils.tempAxis2Directory());
+ if(!tempAxis2Directory.exists()){
+ tempAxis2Directory.mkdirs();
+ }
+ if (tempAxis2Directory.isDirectory()) {
+ tempWarLocation = Axis2CoreUtils.addAnotherNodeToPath(
+ Axis2CoreUtils.tempAxis2Directory(),
+ Axis2Constants.DIR_EXPLOADED_TEMPWAR);
+ File tempWarLocationFile= new File(tempWarLocation);
+ if (tempWarLocationFile.exists()) {
+ FileUtils.deleteDirectories(tempWarLocationFile);
+ }
+ tempWarLocationFile.mkdirs();
+
+ String axis2WebappLocation = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2HomeLocation,
+ "webapp");
+ String axis2LibFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2HomeLocation,
+ "lib");
+ String axis2ConfFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2HomeLocation,
+ "conf");
+ String axis2RepositoryFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2HomeLocation,
+ "repository");
+ String axis2TempWebInfFile = Axis2CoreUtils.addAnotherNodeToPath(
+ tempWarLocation,
+ "WEB-INF");
+ String axis2TempWebInfLibFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2TempWebInfFile,
+ "lib");
+ String axis2TempWebInfConfFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2TempWebInfFile,
+ "conf");
+ String axis2TempWebBuildFile = Axis2CoreUtils.addAnotherNodeToPath(
+ tempWarLocation,
+ "build.xml");
+ String axis2TempWebXMLFile = Axis2CoreUtils.addAnotherNodeToPath(
+ axis2TempWebInfFile,
+ Axis2Constants.FILE_WEB_XML);
+
+ //Copy the webapp content
+ FileUtils.copyDirectory(new File(axis2WebappLocation), tempWarLocationFile);
+ ////delete the axis2 web.xml File(DWP already have)
+ new File(axis2TempWebBuildFile).delete();
+ //delete the web.xml File
+ new File(axis2TempWebXMLFile).delete();
+ //Copy libs
+ FileUtils.copyDirectory(new File(axis2LibFile),
+ new File(axis2TempWebInfLibFile));
+ //copy conf/axis2.xml
+ FileUtils.copyDirectory(new File(axis2ConfFile),
+ new File(axis2TempWebInfConfFile));
+ //Copy modules and services
+ FileUtils.copyDirectory(new File(axis2RepositoryFile),
+ new File(axis2TempWebInfFile));
+ //Filter out the servletapi jars
+ FileUtils.filterOutRestrictedFiles(axis2TempWebInfLibFile,
+ Axis2Constants.FILE_SERVLET_API,"jar");
+
+ alreadyWarExist= true;
+ }
+
+ }
+ return tempWarLocation;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/ContentCopyUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/ContentCopyUtils.java
new file mode 100644
index 000000000..19b1dcc5e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.core/src/org/eclipse/jst/ws/axis2/facet/utils/ContentCopyUtils.java
@@ -0,0 +1,410 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation, WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * IBM Corporation, WSO2 Inc. - initial API and implementation
+ * WSO2 Inc. - initial extended API and implementation
+ * 20070213 168766 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * facet to the framework for 168766
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070606 177421 sandakith@wso2.com - fix web.xml wiped out when Axis2 facet
+ * 20070808 194906 sandakith@wso2.com - Lahiru Sandakith, Fixing 194906 Runtime lib issue
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.facet.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+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.axis2.core.plugin.messages.Axis2CoreUIMessages;
+import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.command.internal.env.core.context.ResourceContext;
+import org.eclipse.wst.command.internal.env.eclipse.BaseEclipseEnvironment;
+import org.eclipse.wst.common.environment.IEnvironment;
+
+public class ContentCopyUtils {
+
+ private static IWorkspaceRoot root_ = null;
+ private static IWorkspace workspace_ = null;
+ private List fileAndDirectoriesList = new ArrayList();
+ FileInputStream finStream = null;
+ private List checkList = null;
+ private IEnvironment environment;
+
+ public ContentCopyUtils(IEnvironment env){
+ environment = env;
+ }
+ /**
+ * This method will copy the source directory into the eclipse workspace
+ * according to the Eclipse Framework API
+ * @param sourceDir
+ * @param destinationDir
+ * @param monitor
+ * @param statusHandler
+ * @return IStatus : Status of the operation
+ */
+ public IStatus copyDirectoryRecursivelyIntoWorkspace(String sourceDir,
+ String destinationDir,IProgressMonitor monitor, boolean includeListSet) {
+ IStatus status = Status.OK_STATUS;
+ //First of all clear the content in the targeted list
+ fileAndDirectoriesList.clear();
+ File axis2WebappFolder = new File(sourceDir);
+ if (includeListSet) {
+ visitAllDirsAndFilesWithIncludeList(axis2WebappFolder,checkList);
+ }else{
+ visitAllDirsAndFilesWithIgnoreList(axis2WebappFolder,checkList);
+ }
+
+ List deployFiles = new ArrayList();
+ deployFiles= fileAndDirectoriesList;
+
+ try {
+
+ //Import the axis2 dependency plugin according to the Resources API of eclipse
+ ResourceContext context;
+ if (environment==null)
+ context = WebServicePlugin.getInstance().getResourceContext();
+ else
+ context = ((BaseEclipseEnvironment) environment).getResourceContext();
+
+ IPath outputPath = new Path (destinationDir);
+
+ String fileName;
+ IPath targetPath=null;
+ boolean isDirectory = false;
+
+ String deployFile;
+ Iterator iterator;
+
+ String tempOutputDir = axis2WebappFolder.toString();
+ iterator = deployFiles.iterator();
+ while (iterator.hasNext()) {
+ deployFile = (String) iterator.next();
+ File source = new File(deployFile);
+ if (source.isDirectory()) {
+ isDirectory =true;
+ }else{
+ isDirectory=false;
+ finStream = new FileInputStream(source);
+ }
+
+ if (deployFile.startsWith(tempOutputDir)) {
+ fileName = deployFile.substring(tempOutputDir.length());
+ targetPath = outputPath.append(fileName).makeAbsolute();
+ if (isDirectory){
+ makeFolderPathAtLocation(context,
+ targetPath,
+ monitor);
+ }else{
+ if (finStream != null) {
+ createFileAtLocation(context,
+ targetPath,
+ finStream,
+ monitor);
+ }
+ finStream.close();
+ }
+ }
+ }
+ } catch (IOException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CoreUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ } catch (CoreException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CoreUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ }
+
+ return status;
+
+ }
+
+ public void updateCheckList(List list){
+ checkList = list;
+ }
+
+ /**
+ * Load the list with directory contents (files/folders) excluding the ignore list
+ * @param dir
+ * @param ignoreList
+ */
+ private void visitAllDirsAndFilesWithIgnoreList(File dir, List ignoreList) {
+ if(!checkCheckListHit(dir,ignoreList)){
+ fileAndDirectoriesList.add(dir.getAbsolutePath());
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ visitAllDirsAndFilesWithIgnoreList(new File(dir, children[i]),ignoreList);
+ }
+ }
+ }
+ }
+
+ /**
+ * Load the list with directory contents (files/folders) only match with the include list
+ * @param dir
+ * @param includeList
+ */
+ private void visitAllDirsAndFilesWithIncludeList(File dir, List includeList) {
+ if(checkCheckListHit(dir,includeList)){
+ fileAndDirectoriesList.add(dir.getAbsolutePath());
+ }
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ visitAllDirsAndFilesWithIncludeList(new File(dir, children[i]),includeList);
+ }
+ }
+ }
+
+ /**
+ * Check the <code>file</code> pass in, matches a file in the <code>list</code>
+ * @param file
+ * @param list
+ * @return result of the check
+ */
+ private boolean checkCheckListHit(File file, List list){
+ if(list != null){
+ Iterator iterator = list.iterator();
+ while (iterator.hasNext()) {
+ String elem = (String) iterator.next();
+ if(elem.equals(file.getAbsoluteFile().toString())){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private static IFolder makeFolder (
+ ResourceContext resourceContext,
+ IContainer parent,
+ String folderName,
+ IProgressMonitor progressMonitor )
+
+ throws CoreException
+ {
+ IResource child = parent.findMember(folderName);
+ if( child == null )
+ {
+ IFolder folder = parent.getFolder(new Path(folderName));
+ folder.create(true,true,null);
+ return folder;
+ }
+ else if( child.getType() == IResource.FOLDER )
+ {
+ return (IFolder)child;
+ }
+ else
+ {
+ throw new CoreException(
+ new Status( IStatus.ERROR,
+ "ResourceUtils",
+ 0,
+ NLS.bind("ERROR",//EnvironmentMessages.MSG_ERROR_RESOURCE_NOT_FOLDER,
+ new Object[]{ parent.getFullPath().append(folderName).toString() }),
+ null ) );
+ }
+ }
+
+
+ public static IContainer makeFolderPathAtLocation (
+ ResourceContext resourceContext,
+ IContainer resource,
+ IProgressMonitor progressMonitor )
+
+ throws CoreException
+ {
+ if (resource.exists())
+ {
+ if (resource instanceof IContainer)
+ {
+ return (IContainer) resource;
+ }
+ else
+ {
+ throw new CoreException(
+ new Status( IStatus.ERROR,
+ "ResourceUtils",
+ 0,
+ NLS.bind("ERROR",
+ new Object[]{ resource.getFullPath().toString() }),
+ null ) );
+ }
+ }
+ else
+ {
+ IContainer parent = makeFolderPathAtLocation(resourceContext,
+ resource.getParent(),
+ progressMonitor );
+ String folderName = resource.getName();
+
+ return makeFolder(resourceContext, parent, folderName, progressMonitor );
+ }
+ }
+
+
+ /**
+ * Creates a path of folders.
+ * Do not call with an absolutePath of less than one segment.
+ * @param resourceContext the resource context for making folders.
+ * @param absolutePath the path of folders that will be created.
+ * @param progressMonitor the progress monitor to be used.
+ * @param statusHandler the status handler.
+ * @return returns the IContainer of the created folder.
+ */
+ public static IContainer makeFolderPathAtLocation (
+ ResourceContext resourceContext,
+ IPath absolutePath,
+ IProgressMonitor progressMonitor )
+
+ throws CoreException
+ {
+ return makeFolderPathAtLocation(resourceContext,
+ getWorkspaceRoot().getContainerForLocation(absolutePath),
+ //getWorkspaceRoot().getContainerForLocation(new Path("/home/sandakith/temp/Test/Test/WebContent")),
+ //"/home/sandakith/Eclipse_Workspace/workspace/testThis"
+ progressMonitor);
+ }
+
+
+ public static IWorkspaceRoot getWorkspaceRoot ()
+ {
+ if (root_ == null)
+ {
+ root_ = ResourcesPlugin.getWorkspace().getRoot();
+ }
+ return root_;
+ }
+
+ public static IFile createFileAtLocation (
+ ResourceContext resourceContext,
+ IPath absolutePath,
+ InputStream inputStream,
+ IProgressMonitor progressMonitor )
+
+ throws CoreException
+ {
+ if (!absolutePath.isAbsolute())
+ {
+ throw new CoreException(new Status(IStatus.ERROR, "ResourceUtils",0,
+ NLS.bind("ERROR",//EnvironmentMessages.MSG_ERROR_PATH_NOT_ABSOLUTE,
+ new Object[] {absolutePath.toString()}),null));
+ }
+ if (absolutePath.segmentCount() < 1)
+ {
+ throw new CoreException(new Status(IStatus.ERROR,"ResourceUtils",0,
+ NLS.bind("ERROR",//EnvironmentMessages.MSG_ERROR_PATH_EMPTY,
+ new Object[] {absolutePath.toString()}),null));
+ }
+ if (absolutePath.segmentCount() < 2)
+ {
+ throw new CoreException(new Status(IStatus.ERROR,"ResourceUtils",0,
+ NLS.bind("ERROR",//EnvironmentMessages.MSG_ERROR_PATH_NOT_FOLDER,
+ new Object[] {absolutePath.toString()}),null));
+ }
+ IContainer parent = makeFolderPathAtLocation(resourceContext,
+ absolutePath.removeLastSegments(1), progressMonitor);
+ String fileName = absolutePath.lastSegment();
+
+ return makeFile(resourceContext, parent, fileName, inputStream, progressMonitor);
+ }
+
+
+ private static IFile makeFile (
+ ResourceContext resourceContext,
+ IContainer parent,
+ String fileName,
+ InputStream inputStream,
+ IProgressMonitor progressMonitor )
+
+ throws CoreException
+ {
+ IResource child = parent.findMember(fileName);
+
+ if( child != null )
+ {
+ if( child.getType() == IResource.FILE )
+ {
+
+ //We have permission to overwrite so check if file is read-only
+ if(child.getResourceAttributes()!=null &&
+ child.getResourceAttributes().isReadOnly() )
+ {
+ IFile[] files = new IFile[1];
+ files[0] = (IFile)child;
+ }
+
+ //Change the contents of the existing file.
+ IFile file = parent.getFile( new Path(fileName) );
+ file.setContents( inputStream, true, true, null );
+
+ return file;
+
+ }
+ else
+ {
+ throw new CoreException(
+ new Status( IStatus.ERROR,
+ "ResourceUtils",
+ 0,
+ NLS.bind("ERROR",
+ new Object[] {parent.getFullPath().append(fileName)}),
+ null ) );
+ }
+ }
+ else
+ {
+ //Create a new file.
+ IFile file = parent.getFile( new Path(fileName) );
+ file.create( inputStream, true, null);
+
+ return file;
+ }
+ }
+
+ public static IWorkspace getWorkspace ()
+ {
+ if (workspace_ == null)
+ {
+ if (root_ == null)
+ {
+ root_ = ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ workspace_ = root_.getWorkspace();
+ }
+
+ return workspace_;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.classpath b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.cvsignore b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.cvsignore
new file mode 100644
index 000000000..0b1e63f90
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.cvsignore
@@ -0,0 +1,5 @@
+build.xml
+javaCompiler...args
+@dot
+org.eclipse.jst.ws.axis2.creation.core_1.0.102.200804020204.jar
+temp.folder
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.project b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.project
new file mode 100644
index 000000000..b1c0d65a6
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.creation.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.core.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..5c552aa80
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#Sun May 06 17:33:38 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+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=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+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.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=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=ignore
+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.unusedLabel=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=ignore
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.ui.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..8322bb74f
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Wed Feb 21 10:49:06 LKT 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\n<templates/>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/META-INF/MANIFEST.MF b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..4280d72db
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.creation.core
+Bundle-Version: 1.0.200.qualifier
+Bundle-Activator: org.eclipse.jst.ws.axis2.creation.core.plugin.WebServiceAxis2CreationCorePlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.wst.command.env,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.ws,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.wst.command.env.infopop,
+ org.eclipse.core.commands,
+ org.eclipse.wst.common.environment,
+ org.eclipse.jst.ws,
+ org.eclipse.jdt.core,
+ org.eclipse.jst.ws.axis2.consumption.core,
+ org.eclipse.jst.ws.axis2.core,
+ org.apache.ant
+Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.ws.axis2.creation.core.command,
+ org.eclipse.jst.ws.axis2.creation.core.messages,
+ org.eclipse.jst.ws.axis2.creation.core.plugin,
+ org.eclipse.jst.ws.axis2.creation.core.utils
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %PLUGIN_PROVIDER
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/about.html b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/about.html
new file mode 100644
index 000000000..0799bdb88
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/build.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/build.properties
new file mode 100644
index 000000000..948ed9a6d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/plugin.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/plugin.properties
new file mode 100644
index 000000000..9caaea8cd
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/plugin.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2007, 2010 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070428 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+# Axis2 runtime to the framework for 168762
+# 20070501 184617 sandakith@wso2.com - Lahiru Sandakith, Provide plugin details
+# 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
+# 20080530 234841 kathy@ca.ibm.com - Kathy Chan, Change plugin provider to Eclipse.org
+###############################################################################
+
+#
+# Messages in plugin.xml.
+#
+PLUGIN_NAME=Webservice Axis2 Creation Core Plug-in
+PLUGIN_PROVIDER=Eclipse Web Tools Platform
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/pom.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/pom.xml
new file mode 100644
index 000000000..11627c024
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.creation.core</artifactId>
+ <version>1.0.200-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUCommand.java
new file mode 100644
index 000000000..bd5ffe100
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUCommand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+
+public class Axis2BUCommand extends AbstractDataModelOperation
+{
+ private DataModel model;
+
+ public Axis2BUCommand( DataModel model )
+ {
+ this.model = model;
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
+ {
+ IStatus status ;
+ // Check for the nessesary data are available for the scenario to begin
+ if (model.getServiceClass() == null){
+ status = StatusUtils.errorStatus(Axis2CreationUIMessages.ERROR_INVALID_SERVICE_CREATION);
+ }else {
+ status = Status.OK_STATUS; // Ok to proceed
+ }
+ return status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUServiceCreationCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUServiceCreationCommand.java
new file mode 100644
index 000000000..33ee39783
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BUServiceCreationCommand.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070625 192522 sandakith@wso2.com - Lahiru Sandakith, fix the build path problem
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.core.commands.ExecutionException;
+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.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.axis2.creation.core.utils.CommonUtils;
+import org.eclipse.jst.ws.axis2.creation.core.utils.ServiceXMLCreator;
+import org.eclipse.jst.ws.internal.common.ResourceUtils;
+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.wsrt.IWebService;
+
+public class Axis2BUServiceCreationCommand extends
+ AbstractDataModelOperation {
+
+ private DataModel model;
+ private IWebService ws;
+ private String project;
+
+ public Axis2BUServiceCreationCommand( DataModel model,IWebService ws, String project )
+ {
+ this.model = model;
+ this.ws=ws;
+ this.project= project;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
+ IEnvironment environment = getEnvironment();
+ //The full Qulalified Service Class
+ String serviceClass = ws.getWebServiceInfo().getImplURL();
+ try {
+
+ String workspaceDirectory = ResourcesPlugin.getWorkspace()
+ .getRoot().getLocation().toOSString();
+ String matadataDir = FileUtils.addAnotherNodeToPath(workspaceDirectory,
+ Axis2Constants.DIR_DOT_METADATA);
+ String matadataPluginsDir = FileUtils.addAnotherNodeToPath(matadataDir,
+ Axis2Constants.DIR_DOT_PLUGINS);
+ String matadataAxis2Dir = FileUtils.addAnotherNodeToPath(matadataPluginsDir,
+ Axis2Constants.AXIS2_PROJECT);
+ String webservicesDir = FileUtils.addAnotherNodeToPath(matadataAxis2Dir,
+ Axis2Constants.DIR_WEBSERVICES);
+ model.setPathToWebServicesTempDir(webservicesDir);
+
+ //Get the Service name from the class name
+ String serviceName = CommonUtils.classNameFromQualifiedName(serviceClass);
+ //String servicePackage = CommonUtils.packageNameFromQualifiedName(serviceClass);
+
+ String servicesDirectory = FileUtils.addAnotherNodeToPath(webservicesDir, serviceName);
+ String serviceXMLDirectory = FileUtils.addAnotherNodeToPath(servicesDirectory,
+ Axis2Constants.DIR_META_INF);
+
+ //Create the directories
+ //Create the Webservices stuff on the workspace .matadata directory
+ FileUtils.createDirectorys(servicesDirectory);
+ FileUtils.createDirectorys(serviceXMLDirectory);
+
+ //create the services.xml file
+ File serviceXMLFile;
+ if (model.isGenerateServicesXML()){
+ ServiceXMLCreator serviceXMLCreator = new ServiceXMLCreator(serviceName,
+ serviceClass,
+ null);
+ serviceXMLFile = new File(serviceXMLDirectory + File.separator +
+ Axis2Constants.FILE_SERVICES_XML);
+ FileWriter serviceXMLFileWriter;
+
+ serviceXMLFileWriter = new FileWriter(serviceXMLFile, false);
+ BufferedWriter writer = new BufferedWriter(serviceXMLFileWriter) ;
+ writer.write(serviceXMLCreator.toString()) ;
+ writer.close() ;
+ }else {
+ String pathToServicesXML = model.getPathToServicesXML();
+ if (pathToServicesXML == null){
+ status = StatusUtils
+ .errorStatus(Axis2CreationUIMessages.ERROR_INVALID_SERVICES_XML);
+ environment.getStatusHandler().reportError(status);
+ }else{
+ serviceXMLFile = new File(pathToServicesXML);
+ File targetServicesXMLFile = new File(serviceXMLDirectory + File.separator +
+ Axis2Constants.FILE_SERVICES_XML);
+ FileUtils.copy(serviceXMLFile, targetServicesXMLFile);
+ }
+
+ }
+
+ //Copy the classes directory to the sevices directory
+ String classesDirectory = null;
+ IPath projectRoot = FacetContainerUtils.getProjectRoot(project);
+ IPath defaultClassesSubDirectory = ResourceUtils.getJavaOutputLocation(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project));
+ IPath defaultClassesSubDirectoryWithoutProjectRoot = ResourceUtils.getJavaOutputLocation(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project))
+ .removeFirstSegments(1).makeAbsolute();
+ if(projectRoot.toOSString().contains(FacetContainerUtils.getWorkspace().toOSString())){
+ classesDirectory = FacetContainerUtils.getWorkspace()
+ .append(defaultClassesSubDirectory).toOSString();
+ }else{
+ classesDirectory = projectRoot
+ .append(defaultClassesSubDirectoryWithoutProjectRoot).toOSString();
+ }
+
+ //TODO copy only the relevent .classes to the aar
+ FileUtils.copyDirectory(new File(classesDirectory),
+ new File(servicesDirectory));
+
+// //Create the .aar file
+// String aarDirString = FileUtils.addAnotherNodeToPath(webservicesDir,
+// Axis2CreationUIMessages.DIR_AAR);
+// File aarDir = new File(aarDirString);
+// FileUtils.createDirectorys(aarDirString);
+// AARFileWriter aarFileWriter = new AARFileWriter();
+// File serviseDir = new File(servicesDirectory);
+// aarFileWriter.writeAARFile(aarDir, serviceName +
+// Axis2CreationUIMessages.FILE_AAR, serviseDir);
+
+ //Import all the stuff form the .matadata directory to inside the current web project
+ } catch (IOException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CreationUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ environment.getStatusHandler().reportError(status);
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CreationUIMessages.ERROR_INVALID_SERVICE_CREATION,
+ new String[]{e.getLocalizedMessage()}), e);
+ environment.getStatusHandler().reportError(status);
+ }
+
+
+
+ return status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BuildProjectCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BuildProjectCommand.java
new file mode 100644
index 000000000..626dccd9f
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2BuildProjectCommand.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+//import org.apache.xerces.impl.validation.ValidationManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+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.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2BuildProjectCommand extends
+ AbstractDataModelOperation {
+
+// private ValidationManager validationManager;
+ private IProject project;
+ private boolean forceBuild;
+
+ /**
+ * Default CTOR;
+ */
+ public Axis2BuildProjectCommand(){
+ }
+
+ public Axis2BuildProjectCommand(IProject project){
+ this.project = project;
+ }
+
+ public Axis2BuildProjectCommand(IProject project, boolean forceBuild){
+ this.project = project;
+ this.forceBuild = forceBuild;
+ }
+
+ /**
+ * Execute the command
+ */
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
+ {
+ try
+ {
+ if (forceBuild)
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
+// else if (validationManager == null)
+// project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
+// else if (validationManager.getWorkspaceAutoBuildPreference())
+// project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
+ }
+ catch (Exception e){
+ }
+
+ try{
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD,
+ new NullProgressMonitor());
+ }
+ catch (InterruptedException ie){
+ // continue execution
+ }
+ catch (OperationCanceledException oce){
+ // continue execution
+ }
+
+ return Status.OK_STATUS;
+ }
+ /**
+ * @param forceBuild The forceBuild to set.
+ */
+ public void setForceBuild(boolean forceBuild) {
+ this.forceBuild = forceBuild;
+ }
+
+ /**
+ * @param project The project to set.
+ */
+ public void setProject(IProject project) {
+ this.project = project;
+ }
+
+// /**
+// * @param validationManager The validationManager to set.
+// */
+// public void setValidationManager(ValidationManager validationManager) {
+// this.validationManager = validationManager;
+// }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ChengeBuildPathCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ChengeBuildPathCommand.java
new file mode 100644
index 000000000..1fb540ae1
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ChengeBuildPathCommand.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070125 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+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.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2ChengeBuildPathCommand extends AbstractDataModelOperation {
+
+ private IProject project;
+ private String srcDir;
+ private String outDir;
+
+ public Axis2ChengeBuildPathCommand(IProject project, String srcDir, String outDir) {
+ this.project = project;
+ this.srcDir = srcDir;
+ this.outDir = outDir;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ IPath srcPath = new Path(srcDir);
+ IPath outPath = new Path(outDir);
+
+ IStatus status = Status.OK_STATUS;
+ final IJavaProject jproj = JavaCore.create(project);
+ final IClasspathEntry[] cp = {JavaCore.newSourceEntry(srcPath)};
+
+ try {
+ jproj.setRawClasspath(cp, outPath, null);
+ jproj.save(null, true);
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ }
+ return status;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2CleanupCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2CleanupCommand.java
new file mode 100644
index 000000000..b4bb82ca3
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2CleanupCommand.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070314 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse
+ * the Axis2 runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.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;
+
+
+public class Axis2CleanupCommand extends AbstractDataModelOperation
+{
+
+ public Axis2CleanupCommand(){
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
+ {
+ // Cleanup the reflection over head by increasing the priority to the garbage thread
+ System.gc();
+ return Status.OK_STATUS;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java
new file mode 100644
index 000000000..ffd5b2324
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2DefaultingCommand.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070206 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070508 175030 sandakith@wso2.com - Lahiru Sandakith, WSDL not passed to Axis2 client fix
+ * 20070612 192047 sandakith@wso2.com - Lahiru Sandakith, 192047
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+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.axis2.consumption.core.utils.DefaultCodegenUtil;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.ServiceContext;
+import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.utils.CommonUtils;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.wsrt.IWebService;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+
+public class Axis2DefaultingCommand extends AbstractDataModelOperation
+{
+ private DataModel model;
+ private IWebService ws;
+ private int scenario;
+ IStatus status;
+
+ public Axis2DefaultingCommand( DataModel model ,IWebService ws, int scenario)
+ {
+ this.model = model;
+ this.ws=ws;
+ this.scenario=scenario;
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ){
+ //Check wether the current dynamic Web Project is properly build to invoke web service
+ Properties properties = new Properties();
+ try {
+ properties.load(new FileInputStream(Axis2CoreUtils.tempRuntimeStatusFileLocation()));
+ if (properties.containsKey(Axis2Constants.PROPERTY_KEY_STATUS)){
+ status = Status.OK_STATUS;
+ model.setServerStatus(true);
+ }else{
+ status = StatusUtils.errorStatus(Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET);
+ }
+ } catch (FileNotFoundException e) {
+ status = StatusUtils.errorStatus(Axis2CoreUIMessages.ERROR_INVALID_FILE_READ_WRITEL+
+ Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET);
+ } catch (IOException e) {
+ status = StatusUtils.errorStatus(Axis2CoreUIMessages.ERROR_INVALID_FILE_READ_WRITEL+
+ Axis2CoreUIMessages.ERROR_SERVER_IS_NOT_SET);
+ }
+
+ if (scenario == WebServiceScenario.TOPDOWN) {
+ model.setWsdlURI(ws.getWebServiceInfo().getWsdlURL());
+ model.setDatabindingType(Axis2Constants.DATA_BINDING_ADB);
+ DefaultCodegenUtil defaultCodegenUtil = new DefaultCodegenUtil(model);
+ defaultCodegenUtil.populateModelParamsFromWSDL();
+ model.setServicesXML(true);
+ model.setServerXMLCheck(true);
+ ServiceContext.getInstance().setServiceName(model.getServiceName());
+ }else if (scenario == WebServiceScenario.BOTTOMUP) {
+ model.setServiceClass(ws.getWebServiceInfo().getImplURL());
+ //set the service name inside BUServiceContext for used by client if invoke together
+ ServiceContext.getInstance().setServiceName(
+ CommonUtils.classNameFromQualifiedName(ws.getWebServiceInfo().getImplURL())
+ );
+
+ model.setGenerateServicesXML(true);
+ }else{
+ //never come here
+ }
+
+ // Fix for the Bugzilla Bug 175030
+ // Axis2: WSDL representing Web service not passed to Axis2 client
+ // After setting the initial wsdlURL return from the framework to the data model,
+ // replace it with the deployed wsdlURL
+ String deployedWSDLURL = FacetContainerUtils.getDeployedWSDLURL(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(model.getWebProjectName()),
+ ws.getWebServiceInfo().getServerFactoryId(),
+ ws.getWebServiceInfo().getServerInstanceId(),
+ ServiceContext.getInstance().getServiceName());
+
+ ws.getWebServiceInfo().setWsdlURL(deployedWSDLURL);
+
+ return status;
+ }
+
+ public DataModel getWebServiceDataModel()
+ {
+ return model;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ServicesXMLValidationCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ServicesXMLValidationCommand.java
new file mode 100644
index 000000000..974dcef9d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2ServicesXMLValidationCommand.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2ServicesXMLValidationCommand extends
+ AbstractDataModelOperation {
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ //Here write the code to validate the services.xml
+ IStatus status = Status.OK_STATUS;
+ return status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2SkelImplCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2SkelImplCommand.java
new file mode 100644
index 000000000..d21f541e5
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2SkelImplCommand.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070123 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import java.net.MalformedURLException;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.axis2.creation.core.utils.CommonUtils;
+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.wsrt.WebServiceInfo;
+
+public class Axis2SkelImplCommand extends AbstractDataModelOperation {
+
+ private WebServiceInfo webServiceInfo;
+ private DataModel model;
+
+ public Axis2SkelImplCommand(WebServiceInfo webServiceInfo, DataModel model){
+ this.webServiceInfo = webServiceInfo;
+ this.model=model;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ IStatus status = Status.OK_STATUS;
+ IEnvironment environment = getEnvironment();
+
+ String workspaceDirectory = ResourcesPlugin.getWorkspace().getRoot().
+ getLocation().toOSString();
+ String currentDynamicWebProjectDir = FileUtils.addAnotherNodeToPath(
+ workspaceDirectory,
+ model.getWebProjectName());
+ String projectSrcDir = FileUtils.addAnotherNodeToPath(
+ currentDynamicWebProjectDir,
+ Axis2CoreUtils.getSourceFolder(model.getWebProjectName()));
+
+ String packagePath = CommonUtils.packgeName2PathName(model.getPackageText());
+ String packageDir = FileUtils.addAnotherNodeToPath(projectSrcDir, packagePath);
+ String serviceSkeletonImpl = FileUtils.addAnotherNodeToPath(packageDir, model.
+ getServiceName());
+
+ String serviceSkeletonImplURL = serviceSkeletonImpl + Axis2Constants.SKELETON_SUFFIX;
+ IPath serviceSkeletonImplURLPath = new Path(serviceSkeletonImplURL);
+ try {
+ //webServiceInfo.setImplURL(serviceSkeletonImplURLPath.toFile().toURL().toString());
+ //String[] implURLArray = {serviceSkeletonImplURL};
+ //webServiceInfo.setImplURLs( implURLArray);
+
+ String serviceSkeletonImplURLString =
+ serviceSkeletonImplURLPath.toFile().toURL().toString();
+
+ webServiceInfo.setImplURL(serviceSkeletonImplURLString);
+ String[] implURLArray = {serviceSkeletonImplURLString};
+ webServiceInfo.setImplURLs( implURLArray);
+
+
+ } catch (MalformedURLException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CreationUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ environment.getStatusHandler().reportError(status);
+ }
+
+ return status;
+
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDCommand.java
new file mode 100644
index 000000000..e07e7d0a7
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDCommand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+
+public class Axis2TDCommand extends AbstractDataModelOperation
+{
+ private DataModel model;
+
+ public Axis2TDCommand( DataModel model )
+ {
+ this.model = model;
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
+ {
+ IStatus status = Status.OK_STATUS;
+ // Check for the nessesary data are available for the scenario to begin
+ if (model.getWsdlURI() == null){
+ status = StatusUtils.errorStatus(Axis2CreationUIMessages.ERROR_INVALID_SERVICE_CREATION);
+ }else {
+ status = Status.OK_STATUS; // Ok to proceed
+ }
+ return status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java
new file mode 100644
index 000000000..dc4e477b5
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184740 sandakith@wso2.com - Lahiru Sandakith
+ * 20070625 192522 sandakith@wso2.com - Lahiru Sandakith, fix the build path problem
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.commands.ExecutionException;
+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.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.internal.common.ResourceUtils;
+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.wsrt.IWebService;
+
+public class Axis2TDServiceCreationCommand extends
+AbstractDataModelOperation {
+
+ private DataModel model;
+ private String project;
+
+ public Axis2TDServiceCreationCommand( DataModel model,IWebService ws, String project ) {
+ this.model = model;
+ this.project = project;
+ }
+
+public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IStatus status = Status.OK_STATUS;
+ IEnvironment environment = getEnvironment();
+
+ try {
+
+ String workspaceDirectory = ResourcesPlugin.getWorkspace()
+ .getRoot().getLocation().toOSString();
+ String currentDynamicWebProjectDir = FacetContainerUtils.getProjectRoot(
+ model.getWebProjectName()).toOSString();
+ String matadataDir = FileUtils.addAnotherNodeToPath(workspaceDirectory,
+ Axis2Constants.DIR_DOT_METADATA);
+ String matadataPluginsDir = FileUtils.addAnotherNodeToPath(matadataDir,
+ Axis2Constants.DIR_DOT_PLUGINS);
+ String matadataAxis2Dir = FileUtils.addAnotherNodeToPath(matadataPluginsDir,
+ Axis2Constants.AXIS2_PROJECT);
+ String tempServicesDir = FileUtils.addAnotherNodeToPath(matadataAxis2Dir,
+ Axis2Constants.DIR_SERVICES);
+
+ model.setPathToWebServicesTempDir(tempServicesDir);
+
+ //Exploded temperory services directory
+ String currentservicesDirectory = FileUtils.addAnotherNodeToPath(tempServicesDir,
+ model.getServiceName());
+ String metaInfDirectory = FileUtils.addAnotherNodeToPath(currentservicesDirectory,
+ Axis2Constants.DIR_META_INF);
+
+ //Create the directories
+ //Create the Webservices stuff on the workspace .matadata directory
+ FileUtils.createDirectorys(currentservicesDirectory);
+ FileUtils.createDirectorys(metaInfDirectory);
+
+
+ //copy the generated resources (services.xml .wsdl ) files
+ //at resources/service.xml
+ String currentProjectResourcesDirString = FileUtils
+ .addAnotherNodeToPath(currentDynamicWebProjectDir,
+ Axis2Constants.DIR_RESOURCES);
+ File currentProjectResourcesDir = new File(currentProjectResourcesDirString);
+ if(!currentProjectResourcesDir.exists()){
+ currentProjectResourcesDir.mkdir();
+ }
+ FileUtils.copyDirectory(currentProjectResourcesDir, new File(metaInfDirectory));
+
+ //Copy the classes directory to the sevices directory
+ String classesDirectory = null;
+ IPath projectRoot = FacetContainerUtils.getProjectRoot(project);
+ IPath defaultClassesSubDirectory = ResourceUtils.getJavaOutputLocation(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project));
+ IPath defaultClassesSubDirectoryWithoutProjectRoot = ResourceUtils.getJavaOutputLocation(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project))
+ .removeFirstSegments(1).makeAbsolute();
+ if(projectRoot.toOSString().contains(FacetContainerUtils.getWorkspace().toOSString())){
+ classesDirectory = FacetContainerUtils.getWorkspace()
+ .append(defaultClassesSubDirectory).toOSString();
+ }else{
+ classesDirectory = projectRoot
+ .append(defaultClassesSubDirectoryWithoutProjectRoot).toOSString();
+ }
+
+ //TODO copy only the relevent .classes to the aar
+ FileUtils.copyDirectory(new File(classesDirectory),
+ new File(currentservicesDirectory));
+
+// //Create the .aar file
+// String aarDirString = FileUtils.addAnotherNodeToPath(webservicesDir,
+// Axis2CreationUIMessages.DIR_AAR);
+// File aarDir = new File(aarDirString);
+// FileUtils.createDirectorys(aarDirString);
+// AARFileWriter aarFileWriter = new AARFileWriter();
+// File serviseDir = new File(servicesDirectory);
+// aarFileWriter.writeAARFile(aarDir, serviceName +
+// Axis2CreationUIMessages.FILE_AAR, serviseDir);
+
+
+ //Import all the stuff form the .matadata directory to inside the current web project
+ } catch (IOException e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CreationUIMessages.ERROR_INVALID_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ environment.getStatusHandler().reportError(status);
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CreationUIMessages.ERROR_INVALID_SERVICE_CREATION,
+ new String[]{e.getLocalizedMessage()}), e);
+ environment.getStatusHandler().reportError(status);
+ }
+
+
+
+ return status;
+}
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WSDL2JavaCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WSDL2JavaCommand.java
new file mode 100644
index 000000000..3f651422c
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WSDL2JavaCommand.java
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070118 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184729 sandakith@wso2.com - Lahiru Sandakith
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20070814 187840 sandakith@wso2.com - Lahiru Sandakith, Fixing 187840 ITE message
+ * 20070814 193593 sandakith@wso2.com - Lahiru Sandakith, custom package name fix
+ * 20080213 218910 kathy@ca.ibm.com - Kathy Chan
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ * 20080924 247929 samindaw@wso2.com - Saminda Wijeratne, source folder not correctly set
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFolder;
+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.axis2.consumption.core.utils.ContentCopyUtils;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.WSDL2JavaGenerator;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.WSDLPropertyReader;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.axis2.creation.core.utils.PathLoadingUtil;
+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.environment.IStatusHandler;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2WSDL2JavaCommand extends AbstractDataModelOperation {
+
+ private DataModel model;
+
+ public Axis2WSDL2JavaCommand( DataModel model ){
+ this.model = model;
+ }
+
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ IStatus status = Status.OK_STATUS;
+ IEnvironment environment = getEnvironment();
+ IStatusHandler statusHandler = environment.getStatusHandler();
+
+ PathLoadingUtil.init(model);
+ String tempCodegenOutputLocation =PathLoadingUtil.getTempCodegenOutputLocation();
+ String currentDynamicWebProjectDir = FacetContainerUtils.getProjectRoot(
+ model.getWebProjectName()).toOSString();
+
+ File tempCodegenLocationFile = new File(tempCodegenOutputLocation);
+ if (tempCodegenLocationFile.exists())FileUtils.deleteDirectories(tempCodegenOutputLocation);
+ FileUtils.createDirectorys(tempCodegenOutputLocation);
+ WSDL2JavaGenerator generator = new WSDL2JavaGenerator();
+
+ //AxisService service;
+ Object axisServiceInstance;
+
+ String transformerFactory = null;
+ boolean transformerFactoryModified = false;
+
+ try {
+ // use the xalan transformer factory if loadable
+ try {
+ transformerFactory = System.getProperty("javax.xml.transform.TransformerFactory");
+ Class.forName("org.apache.xalan.processor.TransformerFactoryImpl");
+ String modifiedTransformerFactory = "org.apache.xalan.processor.TransformerFactoryImpl";
+ if (!modifiedTransformerFactory.equals(transformerFactory)) {
+ System.setProperty("javax.xml.transform.TransformerFactory", modifiedTransformerFactory);
+ transformerFactoryModified = true;
+ }
+ }
+ catch (ClassNotFoundException e) {
+ // If class not found, keep using the default transformer factory.
+ }
+
+ //service = generator.getAxisService(model.getWsdlURI());
+ ClassLoadingUtil.init(model.getWebProjectName());
+ axisServiceInstance = generator.getAxisService(model.getWsdlURI(),model.getServiceQName(),model.getPortName());
+ Map optionsMap = generator.fillOptionMap(
+ false, //async always false
+ false, //sync always false
+ true, //is serverside true
+ model.isServerXMLCheck(),
+ false, //No test case with out stub
+ model.isGenerateAllCheck(),
+ (model.getServiceName()!=null)?model.getServiceName():null,
+ (model.getPortName()!=null)?model.getPortName():null,
+ (model.getDatabindingType().toLowerCase()!=null)?
+ model.getDatabindingType().toLowerCase():
+ null,
+ (model.getWsdlURI()!=null)?model.getWsdlURI():null,
+ (model.getPackageText()!=null)?model.getPackageText():null,
+ "java",
+ tempCodegenOutputLocation,
+ Axis2CoreUtils.getSourceFolder(model.getWebProjectName()),
+ model.getNamespaseToPackageMapping(),
+ model.isGenerateServerSideInterface()
+ );
+
+
+ //CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
+ Class CodeGenConfigurationClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.wsdl.codegen.CodeGenConfiguration");
+
+ //-----------------------------------------------------------------------------------//
+ //Fix for the Axis2 1.2
+ //Constructor CodeGenConfigurationConstructor = CodeGenConfigurationClass
+ // .getConstructor(new Class[]{axisServiceInstance.getClass(),Map.class});
+ //Object CodeGenConfigurationInstance = CodeGenConfigurationConstructor
+ // .newInstance(new Object[]{axisServiceInstance,optionsMap});
+
+ Constructor CodeGenConfigurationConstructor = CodeGenConfigurationClass
+ .getConstructor(new Class[]{Map.class});
+ Object CodeGenConfigurationInstance = CodeGenConfigurationConstructor
+ .newInstance(new Object[]{optionsMap});
+
+ // codegenConfig.addAxisService(service);
+ Method addAxisServiceMethod = CodeGenConfigurationClass
+ .getMethod("addAxisService", new Class[]{ axisServiceInstance.getClass()});
+ addAxisServiceMethod.invoke(CodeGenConfigurationInstance,
+ new Object[]{axisServiceInstance});
+
+ //set the wsdl definision for codegen config for skeleton generarion.
+ WSDLPropertyReader reader = new WSDLPropertyReader(model);
+ reader.readWSDL(model.getWebProjectName(),model.getWsdlURI());
+ Object wsdlDefinitionInstance = reader.getWsdlDefinitionInstance();
+ //Class DefinitionClass = ClassLoadingUtil.loadClassFromAntClassLoader("javax.wsdl.Definition");
+ //codegenConfig.setWsdlDefinition(wsdlDefinition);
+ Method setWsdlDefinitionMethod = CodeGenConfigurationClass
+ .getMethod("setWsdlDefinition", new Class[]{reader.getWsdlDefinitionClass()});
+ setWsdlDefinitionMethod.invoke(CodeGenConfigurationInstance,
+ new Object[]{wsdlDefinitionInstance});
+
+ //-----------------------------------------------------------------------------------//
+
+ //set the baseURI
+ //codegenConfig.setBaseURI(generator.getBaseUri(model.getWsdlURI()));
+
+ Method setBaseURIMethod = CodeGenConfigurationClass
+ .getMethod("setBaseURI", new Class[]{ String.class});
+ setBaseURIMethod.invoke(CodeGenConfigurationInstance,
+ new Object[]{generator.getBaseUri(model.getWsdlURI())});
+
+ //Get the namespace from the AxisService and set it in the configuration
+ Class AxisServiceClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.description.AxisService");
+ Method getTargetNamespaceMethod = AxisServiceClass.getMethod("getTargetNamespace", null);
+ Object targetNamespace = getTargetNamespaceMethod.invoke(axisServiceInstance, null);
+
+ Object stringReturn = null;
+ if(model.getPackageText()!=null){
+ stringReturn = model.getPackageText();
+ }else{
+ Class URLProcessorClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.util.URLProcessor");
+ Method makePackageNameMethod = URLProcessorClass
+ .getMethod("makePackageName", new Class[]{String.class});
+ stringReturn = makePackageNameMethod.invoke(null, new Object[]{targetNamespace});
+ }
+
+ model.setPackageText(stringReturn.toString());
+
+ Method setPackageNameMethod = CodeGenConfigurationClass
+ .getMethod("setPackageName", new Class[]{String.class});
+ setPackageNameMethod.invoke(CodeGenConfigurationInstance, new Object[]{stringReturn});
+
+ //new CodeGenerationEngine(codegenConfig).generate();
+ Class CodeGenerationEngineClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.wsdl.codegen.CodeGenerationEngine");
+ Constructor CodeGenerationEngineConstructor = CodeGenerationEngineClass
+ .getConstructor(new Class[]{CodeGenConfigurationInstance.getClass()});
+ Object CodeGenerationEngineInstance = CodeGenerationEngineConstructor
+ .newInstance(new Object[]{CodeGenConfigurationInstance});
+
+ //Invoke Codegen Method
+ Method generateMethod = CodeGenerationEngineClass.getMethod("generate", null);
+ generateMethod.invoke(CodeGenerationEngineInstance, null);
+
+
+ //Copy the existing codegen results to the current project
+ ContentCopyUtils contentCopyUtils = new ContentCopyUtils(getEnvironment());
+ status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
+ tempCodegenOutputLocation,
+ currentDynamicWebProjectDir,
+ monitor,
+ statusHandler);
+
+ IProject project = FacetContainerUtils.getProjectName(model.getWebProjectName());
+ IFolder folder = project.getFolder("resources");
+ if (folder.exists()){
+ Axis2CoreUtils.addResourcesFolderAsClassPath(project);
+ }
+ } catch (Exception e) {
+ status = StatusUtils.errorStatus(NLS.bind(
+ Axis2CreationUIMessages.ERROR_CODEGEN_EXCEPTION,
+ new String[]{" : "+e.getCause()}),
+ e);
+ e.printStackTrace();
+ environment.getStatusHandler().reportError(status);
+ } finally {
+ if (transformerFactoryModified) {
+ // restore to the original TransformerFactory
+ if (transformerFactory == null) {
+ System.clearProperty("javax.xml.transform.TransformerFactory");
+ } else {
+ System.setProperty("javax.xml.transform.TransformerFactory", transformerFactory);
+ }
+ }
+ }
+
+ return status;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WebservicesServerCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WebservicesServerCommand.java
new file mode 100644
index 000000000..c05c50887
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2WebservicesServerCommand.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070510 172926 sandakith@wso2.com - Lahiru Sandakith, Fix 172926 Use Util Classes
+ * 20070813 196173 sandakith@wso2.com - Lahiru Sandakith, Fix 196173, DWP custom location fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080616 237363 samindaw@wso2.com - Saminda Wijeratne, get ResourceContext from environment instead of preference
+ * 20100308 282466 samindaw@wso2.com - Saminda Wijeratne, support for axis2 1.5
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.ContentCopyUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FacetContainerUtils;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.wst.common.environment.IEnvironment;
+import org.eclipse.wst.common.environment.IStatusHandler;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+
+public class Axis2WebservicesServerCommand extends AbstractDataModelOperation {
+
+ private DataModel model;
+ private int scenario;
+
+ public Axis2WebservicesServerCommand( DataModel model, int scenario ){
+ this.model = model;
+ this.scenario = scenario;
+ }
+
+ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+
+ IStatus status = Status.OK_STATUS;
+ IEnvironment environment = getEnvironment();
+ IStatusHandler statusHandler = environment.getStatusHandler();
+
+
+
+ ContentCopyUtils contentCopyUtils = new ContentCopyUtils(getEnvironment());
+
+ //Check for the server status
+ if (model.getServerStatus()){
+ if (scenario == WebServiceScenario.BOTTOMUP || scenario == WebServiceScenario.TOPDOWN){
+ String webContainerDirString = FacetContainerUtils.pathToWebProjectContainer(
+ model.getWebProjectName());
+ String repositoryString = FacetContainerUtils.getAxis2WebContainerRepositoryPath(
+ webContainerDirString);
+ String webserviceTempDirString = model.getPathToWebServicesTempDir();
+ //Copy the existing services to the repository
+ status = contentCopyUtils.copyDirectoryRecursivelyIntoWorkspace(
+ webserviceTempDirString,
+ repositoryString,
+ monitor,
+ statusHandler);
+ FileUtils.deleteDirectories(webserviceTempDirString);
+ }
+ status = Status.OK_STATUS;
+ }else{
+ status = Status.CANCEL_STATUS;
+ }
+
+ return status;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUI.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUI.properties
new file mode 100644
index 000000000..0f03d4ef2
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUI.properties
@@ -0,0 +1,49 @@
+###############################################################################
+# Copyright (c) 2007, 2008 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+# runtime to the framework for 168762
+# 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+# 20070517 187307 sandakith@wso2.com - Lahiru Sandakith, Fix 187307 Property File Fix
+# 20070529 188742 sandakith@wso2.com - Lahiru Sandakith, fix for 188742
+# 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+# 20080130 216997 katep@wso2.com - Kate Price
+###############################################################################
+#
+# Axis2 server component type labels
+#
+LABEL_HAVE_SERVICES_XML_FILE=Use an existing services.xml file
+LABEL_DEFAULT_SERVICES_XML_FILE=Generate a default services.xml file
+LABEL_AXIS2_PREFERENCE_PAGE=Axis2 Web Service Java Bean Configuration
+LABEL_AXIS2_PREFERENCE_PAGE_HEADING=Axis2 Web Service Java Bean Configuration
+LABEL_AXIS2_PREFERENCE_PAGE_SUB_HEADING=Customize your Web service
+LABEL_BROWSE=&Browse
+LABEL_JAVA_2_WSDL_PAGE_HEADING=Axis2 Web Service Skeleton Java Bean Configuration
+LABEL_JAVA_2_WSDL_PAGE_SUB_HEADING=Select the appropriate code generation settings
+LABEL_SERVICE_NAME_CAPTION=Service Name
+LABEL_GENERATE_TESTCASE_CAPTION=Generate a JUnit test case to test the service
+LABEL_DATABINDING_CAPTION=Databinding
+LABEL_PORTNAME=Port Name
+LABEL_GENERATE_ALL=Generate all types for all elements referred by schemas
+LABEL_GENERATE_SERVERSIDE_INTERFACE=Generate an interface for the skeleton
+LABEL_PACKEGE_NAME=Custom package name
+LABEL_NAMESPACE=Namespace
+LABEL_PACKAGE=Package
+LABEL_NAMESPACE_TO_PACKAGE=Namespace to package mappings
+
+#
+# Axis2 server component type error
+#
+ERROR_INVALID_SERVICES_XML=You must select a valid services.xml file
+ERROR_INVALID_FILE_READ_WRITEL=Exception occurred while reading or writing file {0}
+ERROR_INVALID_WSDL_FILE_READ_WRITEL=Exception occurred while reading or writing WSDL {0}
+ERROR_INVALID_SERVICE_CREATION=Exception occurred during service creation
+ERROR_CODEGEN_EXCEPTION=Exception occurred during code generation for the WSDL {0}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUIMessages.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUIMessages.java
new file mode 100644
index 000000000..13249f8e1
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/messages/Axis2CreationUIMessages.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+ * 20070517 187307 sandakith@wso2.com - Lahiru Sandakith, Fix 187307 Property File Fix
+ * 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Axis2CreationUIMessages extends NLS {
+
+ //get the lables from this massages to the properties file
+ private static final String BUNDLE_NAME =
+ "org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUI"; //$NON-NLS-1$
+
+ private Axis2CreationUIMessages() {
+ // Do not instantiate
+ }
+ //labels
+ public static String LABEL_HAVE_SERVICES_XML_FILE;
+ public static String LABEL_DEFAULT_SERVICES_XML_FILE;
+ public static String LABEL_AXIS2_PREFERENCE_PAGE;
+ public static String LABEL_AXIS2_PREFERENCE_PAGE_HEADING;
+ public static String LABEL_AXIS2_PREFERENCE_PAGE_SUB_HEADING;
+ public static String LABEL_BROWSE;
+ public static String LABEL_JAVA_2_WSDL_PAGE_HEADING;
+ public static String LABEL_JAVA_2_WSDL_PAGE_SUB_HEADING;
+ public static String LABEL_SERVICE_NAME_CAPTION;
+ public static String LABEL_GENERATE_TESTCASE_CAPTION;
+ public static String LABEL_DATABINDING_CAPTION;
+ public static String LABEL_PORTNAME;
+ public static String LABEL_GENERATE_ALL;
+ public static String LABEL_GENERATE_SERVERSIDE_INTERFACE;
+ public static String LABEL_PACKEGE_NAME;
+ public static String LABEL_NAMESPACE;
+ public static String LABEL_PACKAGE;
+ public static String LABEL_NAMESPACE_TO_PACKAGE;
+
+ //error
+ public static String ERROR_INVALID_SERVICES_XML;
+ public static String ERROR_INVALID_FILE_READ_WRITEL;
+ public static String ERROR_INVALID_WSDL_FILE_READ_WRITEL;
+ public static String ERROR_INVALID_SERVICE_CREATION;
+ public static String ERROR_CODEGEN_EXCEPTION;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Axis2CreationUIMessages.class);
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/plugin/WebServiceAxis2CreationCorePlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/plugin/WebServiceAxis2CreationCorePlugin.java
new file mode 100644
index 000000000..f19af8ed0
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/plugin/WebServiceAxis2CreationCorePlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.plugin;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceAxis2CreationCorePlugin extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.creation.core";
+
+ // The shared instance
+ private static WebServiceAxis2CreationCorePlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public WebServiceAxis2CreationCorePlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static WebServiceAxis2CreationCorePlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/AARFileWriter.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/AARFileWriter.java
new file mode 100644
index 000000000..72eebb248
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/AARFileWriter.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.utils;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Jar;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+
+public class AARFileWriter extends Jar{
+
+ public AARFileWriter() {
+ this.setProject(new Project());
+ this.getProject().init();
+ this.setTaskType(Axis2Constants.JAR_TASK);
+ this.setTaskName(Axis2Constants.JAR_TASK);
+ this.setOwningTarget(new org.apache.tools.ant.Target());
+ }
+
+ public void writeAARFile(File outputFolder,
+ String outputFileName,
+ File inputFileFolder) throws IOException,Exception {
+
+ if (!outputFolder.exists()){
+ outputFolder.mkdir(); //create the output path
+ }else{
+ if (!outputFolder.isDirectory())
+ return;
+ }
+
+ File targetFile = new File(outputFolder,outputFileName);
+ this.setBasedir(inputFileFolder);
+ this.setDestFile(targetFile);
+
+ //run the task
+ this.perform();
+ }
+
+} \ No newline at end of file
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/CommonUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/CommonUtils.java
new file mode 100644
index 000000000..c1d04fdfa
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/CommonUtils.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.utils;
+
+
+public class CommonUtils {
+
+ public static String classNameFromQualifiedName(String qualifiedCalssName){
+ //This was done due to not splitting with . Strange
+ qualifiedCalssName = qualifiedCalssName.replace('.', ':');
+ String[] parts = qualifiedCalssName.split(":");
+ if (parts.length == 0){
+ return "";
+ }
+ return parts[parts.length-1];
+ }
+
+ public static String packageNameFromQualifiedName(String qualifiedCalssName){
+ //This was done due to not splitting with . Strange
+ qualifiedCalssName = qualifiedCalssName.replace('.', ':');
+ String[] parts = qualifiedCalssName.split(":");
+ StringBuffer packageName = new StringBuffer();
+ for (int i = 0; i < parts.length-1; i++) {
+ packageName.append(parts[i]);
+ if (! (i == parts.length-2)){
+ packageName.append(".");
+ }
+ }
+ return packageName.toString();
+ }
+
+
+ public static String packgeName2PathName(String packageName){
+ packageName = packageName.replace('.', '/');
+ return packageName;
+ }
+
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java
new file mode 100644
index 000000000..59260119b
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070330 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184740 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.utils;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+
+public class PathLoadingUtil {
+
+ //Model
+ private static DataModel model = null;
+
+ //Paths
+ private static String tempCodegenOutputLocation = null;
+ private static String currentDynamicWebProjectDir = null;
+ private static String workspaceDirectory = null;
+ private static String currentProjectWebProjectName = null;
+
+ //Already Computed
+ private static boolean alreadyInit = false;
+ private static boolean alreadyComputeTempCodegenOutputLocation = false;
+ private static boolean alreadyComputeCurrentDynamicWebProjectDir = false;
+ private static boolean alreadyComputeWorkspaceDirectory = false;
+ private static boolean requireToupdateModel = false;
+
+ public static void init(DataModel inputModel){
+ requireToupdateModel = !alreadyInit ||
+ !currentProjectWebProjectName.equals(inputModel.getWebProjectName());
+ if(requireToupdateModel){
+ model = inputModel;
+ currentProjectWebProjectName = inputModel.getWebProjectName();
+ }
+ }
+
+ public static String getWorkspaceDirectory() {
+ if (!alreadyComputeWorkspaceDirectory){
+ workspaceDirectory = ResourcesPlugin.getWorkspace().getRoot()
+ .getLocation().toOSString();
+ alreadyComputeWorkspaceDirectory = true;
+ }
+ return workspaceDirectory;
+ }
+
+ public static String getCurrentDynamicWebProjectDir(){
+ if (!alreadyComputeCurrentDynamicWebProjectDir || requireToupdateModel){
+ currentDynamicWebProjectDir = FileUtils.addAnotherNodeToPath(
+ getWorkspaceDirectory(), model.getWebProjectName());
+ alreadyComputeCurrentDynamicWebProjectDir = true;
+ }
+ return currentDynamicWebProjectDir;
+ }
+
+
+ public static String getTempCodegenOutputLocation() {
+ if (!alreadyComputeTempCodegenOutputLocation){
+ String[] nodes = {
+ Axis2Constants.DIR_DOT_METADATA,
+ Axis2Constants.DIR_DOT_PLUGINS,
+ Axis2Constants.AXIS2_PROJECT,
+ Axis2Constants.CODEGEN_RESULTS};
+ tempCodegenOutputLocation = FileUtils.addNodesToPath(getWorkspaceDirectory(), nodes);
+ alreadyComputeTempCodegenOutputLocation = true;
+ }
+ return tempCodegenOutputLocation;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PluginLocationFinderUtil.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PluginLocationFinderUtil.java
new file mode 100644
index 000000000..88a4aa69e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PluginLocationFinderUtil.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.utils;
+
+
+public class PluginLocationFinderUtil {
+// /**
+// *
+// * @return returns a Vector containing PluginData objects.
+// * Each PluginData object represents a Plugin found under any of the following
+// * plugin directories
+// * a. the targetPlatformLocation\eclipse\plugins directory,
+// * b. other plugin directories as specified by *.link files under
+// * targetPlatform\eclipse\links directory
+// **/
+// public static Vector getPluginsInTargetPlatform(){
+// /**
+// //step1: Get path of target platform.
+// //step2: Prepare path of links folder.
+// //step3: Get list of files in links folder.
+// //step4: Parse each link file and get the path of linked Eclipse folder.
+// //step5: Prepare a list of all plugin root folders
+// // (Eclipse plugins and linked Eclipse plugins).
+// //step6: 6a. For each plugin root folder,
+// // 6b. go to each plugin directory and get path of plugin.xml.
+// //step7: Parse the plugin.xml file to get plugin id, plugin version,
+// // and store in vectors, lists, etc.
+// //step8: Go back to step 6 to continue with next plugin directory.
+// **/
+//
+// //step1: Get path of target platform.
+// //Fall back to Eclipse install location if targetplatform in not set.
+// URL platFormURL = Platform.getInstallLocation().getURL();
+// Location location = Platform.getInstallLocation();
+// IPath eclipsePath = null ;
+//
+// //Get path of target platform against which the users of this tool
+// //will compile their code.
+//// IPath targetPlatFormLocation = new Path(getTargetPlatformPath(true));
+//// IPath targetPlatFormLocation = new Path(System.getProperty("user.dir"));
+//
+//// if(_useTargetPlatform == false)
+// eclipsePath = new Path(platFormURL.getPath());
+//// else
+//// eclipsePath = targetPlatFormLocation;
+//
+//// showMessage("Considering target platform to be: " +
+//// eclipsePath.toString());
+//
+// //step2: Prepare path of links folder.
+// //step3: Get list of files in links folder.
+// //step4: Parse each link file and get the path of linked Eclipse folder.
+// IPath linksPath = new Path( eclipsePath.toString() ).append("/links");
+// String linkedPaths[] = getLinkedPaths(linksPath.toString());
+// int linkedPathLength = 0;
+// if(null != linkedPaths){
+// linkedPathLength = linkedPaths.length;
+// }
+//
+// //step5: Prepare a list of all plugin root folders
+// // (Eclipse plugins and linked Eclipse plugins).
+// IPath eclipsePluginRootFolders[] = new IPath[linkedPathLength + 1];
+// eclipsePluginRootFolders[0] =
+// new Path( eclipsePath.toString() ).append("/plugins");
+// if(null != linkedPaths){
+// for(int i=0; i<linkedPaths.length; i++){
+// eclipsePluginRootFolders[i+1] =
+// new Path(linkedPaths[i]).append("/eclipse/plugins");
+// }
+// }
+//
+// //step6: 6a. For each plugin root folder,
+// // 6b. go to each plugin directory and get path of plugin.xml.
+// //step7: Parse the plugin.xml file to get plugin id, plugin version,
+// // and store in vectors, lists, etc.
+// Vector vectorsInThisVector = new Vector();
+// for(int i=0; i<eclipsePluginRootFolders.length; i++){
+// System.out.println("\n========plugin IDs and Versions in " +
+// eclipsePluginRootFolders[i] + "========");
+// Vector pluginDataObjs =
+// getPluginDataForAllPlugins(
+// eclipsePluginRootFolders[i].toString());
+// vectorsInThisVector.add(pluginDataObjs);
+// System.out.println(pluginDataObjs);
+// System.out.println("\n===========|||=== end ===|||===========");
+// }
+//
+// Vector pluginData = new Vector();
+// Iterator outerIterator = vectorsInThisVector.iterator();
+// while(outerIterator.hasNext()){
+// Vector pluginDataObjs = (Vector)outerIterator.next();
+// Iterator innerIterator = pluginDataObjs.iterator();
+// while(innerIterator.hasNext()){
+// PluginData pd = (PluginData)innerIterator.next();
+// String pluginIdKey = pd.getPluginID();
+// String versionValue = pd.getPluginVersion();
+// String pluginPath = pd.getPluginLocation();
+// pluginData.add(pd);
+// }
+// }
+//
+// int breakpoint=0;
+//
+// return pluginData;
+// }
+//
+//
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServiceXMLCreator.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServiceXMLCreator.java
new file mode 100644
index 000000000..1927e0d6d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServiceXMLCreator.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070620 193441 sandakith@wso2.com - Lahiru Sandakith, fix for the discription not attach to service
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.creation.core.utils;
+
+import java.util.ArrayList;
+
+public class ServiceXMLCreator {
+ private String serviceName;
+ private String serviceClass;
+ private ArrayList operations;
+
+ public ServiceXMLCreator(String serviceName, String serviceClass, ArrayList operations) {
+ this.serviceName = serviceName;
+ this.serviceClass = serviceClass;
+ this.operations = operations;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public String getServiceClass() {
+ return serviceClass;
+ }
+
+ public ArrayList getOperations() {
+ return operations;
+ }
+
+ public String toString() {
+ String serviceXML = "<service name=\"" + serviceName + "\" >\n" +
+ "\t<Description>\n" +
+ "\t\tPlease Type your service description here\n" +
+ "\t</Description>\n" +
+ "\t<messageReceivers>\n" +
+ "\t\t<messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-only\" " +
+ "class=\"org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver\" />\n" +
+ "\t\t<messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-out\" " +
+ "class=\"org.apache.axis2.rpc.receivers.RPCMessageReceiver\"/>\n" +
+ "\t</messageReceivers>\n" +
+ "\t<parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n" ;
+ serviceXML = serviceXML + "</service>\n";
+ return serviceXML;
+ }
+
+} \ No newline at end of file
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServicesXMLUtils.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServicesXMLUtils.java
new file mode 100644
index 000000000..8d347ed2e
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/ServicesXMLUtils.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20080604 193371 samindaw@wso2.com - Saminda Wijeratne, creating a function to validate services.xml
+ * 20090120 248023 samindaw@wso2.com - Saminda Wijeratne, the xsd resource path string was not valid for windows
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.axis2.creation.core.utils;
+import java.io.File;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.utils.FileUtils;
+
+public class ServicesXMLUtils {
+
+ public ServicesXMLUtils(){
+ }
+
+ /**
+ * Validates the given xml file against the axis2 services schema.
+ * @return return true if the xml is valid
+ */
+ public static boolean isServicesXMLValid(String servicesXmlPath){
+ SchemaFactory factory =
+ SchemaFactory.newInstance(Axis2Constants.XML_SCHEMA);
+
+ try {
+ String resourcePath=Axis2Constants.RESOURCE_FOLDER+"/"+Axis2Constants.SERVICES_XSD_SCHEMA_NAME;
+ Schema schema = factory.newSchema(
+ WebServiceAxis2CorePlugin.getInstance().getBundle().getResource(resourcePath));
+ Validator validator = schema.newValidator();
+ Source source = new StreamSource(new File(servicesXmlPath));
+ validator.validate(source);
+ return true;
+ }
+ catch (Exception ex) {
+ return false;
+ }
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.classpath b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.cvsignore b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.cvsignore
new file mode 100644
index 000000000..a37bbf008
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.cvsignore
@@ -0,0 +1,5 @@
+build.xml
+javaCompiler...args
+@dot
+org.eclipse.jst.ws.axis2.creation.ui_1.0.102.200804020204.jar
+temp.folder
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.project b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.project
new file mode 100644
index 000000000..b48462aa4
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.creation.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.settings/org.eclipse.jdt.core.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..e81617daa
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,57 @@
+#Sun May 06 17:33:53 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+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.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=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=ignore
+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.unusedLabel=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=ignore
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/META-INF/MANIFEST.MF b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..67423d814
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.creation.ui;singleton:=true
+Bundle-Version: 1.0.200.qualifier
+Bundle-Activator: org.eclipse.jst.ws.internal.axis2.creation.ui.plugin.WebServiceAxis2CreationUIPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jst.ws.consumption.ui,
+ org.eclipse.wst.ws,
+ org.eclipse.wst.common.environment,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.emf.common,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.jst.ws,
+ org.eclipse.wst.command.env,
+ org.eclipse.jdt.core,
+ org.eclipse.jst.ws.axis2.creation.core,
+ org.eclipse.jst.ws.axis2.consumption.ui,
+ org.eclipse.jst.ws.axis2.consumption.core,
+ org.eclipse.jst.ws.axis2.core,
+ org.eclipse.jst.ws.ui
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.ws.internal.axis2.creation.ui.widgets.bean,
+ org.eclipse.jst.ws.internal.axis2.creation.ui.widgets.skeleton,
+ org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %PLUGIN_PROVIDER
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/about.html b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/about.html
new file mode 100644
index 000000000..0799bdb88
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/build.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/build.properties
new file mode 100644
index 000000000..6313a1d5c
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc 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:
+# WSO2 Inc - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the
+# Axis2 runtime to the framework for 168762
+# 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.properties
new file mode 100644
index 000000000..9af27671a
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2007, 2010 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070501 184617 sandakith@wso2.com - Lahiru Sandakith, Provide plugin details
+# 20080530 234841 kathy@ca.ibm.com - Kathy Chan, Change plugin provider to Eclipse.org
+###############################################################################
+
+#
+# Messages in plugin.xml.
+#
+PLUGIN_NAME=Webservice Axis2 Creation UI Plug-in
+PLUGIN_PROVIDER=Eclipse Web Tools Platform
+
+LABEL_RUNTIME_AXIS_2=Apache Axis2
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.xml
new file mode 100644
index 000000000..5004d5868
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
+ <widgetFactory
+ id="BeanExampleConfig"
+ insertBeforeCommandId="org.eclipse.jst.ws.axis2.creation.core.command.Axis2BUCommand"
+ class="org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt.Axis2BeanConfigWidgetFactory"/>
+ </extension>
+
+ <extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
+ <widgetFactory
+ id="SkelExampleConfig"
+ insertBeforeCommandId="org.eclipse.jst.ws.axis2.creation.core.command.Axis2TDCommand"
+ class="org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt.Axis2SkelConfigWidgetFactory" />
+ </extension>
+
+ <extension point="org.eclipse.jst.ws.consumption.ui.runtimes">
+ <runtime
+ id="org.eclipse.jst.ws.axis2.creation.axis2WebServiceRT"
+ label="%LABEL_RUNTIME_AXIS_2"
+ serverRequired="false"/>
+ </extension>
+
+
+ <!-- define support for Axis2 Java bean bottom up and top-down support in web projects -->
+ <extension point="org.eclipse.jst.ws.consumption.ui.serviceRuntimes">
+ <serviceRuntime
+ id="org.eclipse.jst.ws.axis2.creation.java"
+ serviceImplementationTypeId="org.eclipse.jst.ws.wsImpl.java"
+ runtimeId="org.eclipse.jst.ws.axis2.creation.axis2WebServiceRT"
+ bottomUp="true"
+ topDown="true"
+ class="org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt.Axis2WebServiceRuntime">
+
+ <required-facet-version facet="jst.web" version="2.3" allow-newer="true"/>
+ <required-facet-version facet="axis2.core" version="1.1" allow-newer="true" />
+ <required-facet-version facet="axis2.ext" version="1.1" allow-newer="true" />
+
+ </serviceRuntime>
+ </extension>
+
+ <!-- define support for Axis Java clients in Web projects -->
+ <extension point="org.eclipse.jst.ws.consumption.ui.clientRuntimes">
+ <clientRuntime
+ id="org.eclipse.jst.ws.axis2.consumption.web"
+ clientImplementationTypeId="org.eclipse.jst.ws.client.type.java"
+ runtimeId="org.eclipse.jst.ws.axis2.creation.axis2WebServiceRT"
+ class="org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt.Axis2WebServiceRuntime">
+
+ <required-facet-version facet="jst.web" version="2.3" allow-newer="true" />
+ <required-facet-version facet="axis2.core" version="1.1" allow-newer="true" />
+ <required-facet-version facet="axis2.ext" version="1.1" allow-newer="true" />
+
+ </clientRuntime>
+ </extension>
+
+</plugin>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/pom.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/pom.xml
new file mode 100644
index 000000000..4db4cf4c5
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.creation.ui</artifactId>
+ <version>1.0.200-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/plugin/WebServiceAxis2CreationUIPlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/plugin/WebServiceAxis2CreationUIPlugin.java
new file mode 100644
index 000000000..1ebe6f5b4
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/plugin/WebServiceAxis2CreationUIPlugin.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.creation.ui.plugin;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceAxis2CreationUIPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.creation.ui";
+
+ // The shared instance
+ private static WebServiceAxis2CreationUIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public WebServiceAxis2CreationUIPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * @return the shared instance
+ */
+ public static WebServiceAxis2CreationUIPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java
new file mode 100644
index 000000000..2909e51a9
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070513 186430 sandakith@wso2.com - Lahiru Sandakith, fix for 186430
+ * Text not accessible on AXIS2 wizard pages.
+ * 20070529 188742 sandakith@wso2.com - Lahiru Sandakith, fix for 188742
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20071030 207621 zina@ca.ibm.com - Zina Mostafia, Page GUI sequence using tab is not correct ( violates Accessibility)
+ * 20080604 193371 samindaw@wso2.com - Saminda Wijeratne, browsing only xml files in the workspace
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.creation.ui.widgets.bean;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+import org.eclipse.jst.ws.axis2.creation.core.utils.*;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.internal.axis2.consumption.ui.plugin.WebServiceAxis2ConsumptionUIPlugin;
+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.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.jst.ws.internal.ui.common.*;
+import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
+
+
+public class ServicesXMLSelectBeanWidget extends SimpleWidgetDataContributor
+{
+ private DataModel model;
+ private Button browseButton;
+ private Text servicesXMLPath;
+ private Button generateServicesXML;
+ private Button haveServicesXML;
+
+ public ServicesXMLSelectBeanWidget( DataModel model )
+ {
+ this.model = model;
+ }
+
+ public WidgetDataEvents addControls( Composite parent, final Listener statusListener )
+ {
+ UIUtils uiUtils = new UIUtils(WebServiceAxis2ConsumptionUIPlugin.PLUGIN_ID);
+
+ Text label = new Text(parent, SWT.READ_ONLY);
+ label.setText( Axis2CreationUIMessages.LABEL_AXIS2_PREFERENCE_PAGE );
+
+ model.setGenerateServicesXML(true);
+ model.setServicesXML(false);
+
+ final Composite radioComp = uiUtils.createComposite(parent, 1);
+
+ haveServicesXML = uiUtils.createRadioButton(radioComp,
+ Axis2CreationUIMessages.LABEL_HAVE_SERVICES_XML_FILE, null, null );
+ haveServicesXML.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent e)
+ {
+ if (haveServicesXML.getSelection()){
+ haveServicesXML.setSelection(true);
+ generateServicesXML.setSelection(false);
+ enableServicesXMLBrowse();
+ }else{
+ if (!generateServicesXML.getSelection()){
+ haveServicesXML.setSelection(true);
+ generateServicesXML.setSelection(false);
+ enableServicesXMLBrowse();
+ }else{
+ haveServicesXML.setSelection(false);
+ disableServicesXMLBrowse();
+ }
+ }
+ model.setGenerateServicesXML(false);
+ model.setServicesXML(true);
+
+ // Need to trigger a validation at this point to ensure
+ // that the next button is enabled properly just in case
+ // this is the last page in the wizard.
+ statusListener.handleEvent( null );
+ }
+ });
+
+ final Composite pathComp = uiUtils.createComposite(radioComp, 3);
+ servicesXMLPath = uiUtils.createText(pathComp, "", null, null, SWT.BORDER );
+ servicesXMLPath.addModifyListener( new ModifyListener()
+ {
+ public void modifyText(ModifyEvent e)
+ {
+ model.setPathToServicesXML( servicesXMLPath.getText() );
+ // Need to trigger a validation at this point to ensure
+ // that the next button is enabled properly just in case
+ // this is the last page in the wizard.
+ statusListener.handleEvent( null );
+ }
+ });
+
+
+ browseButton = uiUtils.createPushButton(pathComp,
+ Axis2CreationUIMessages.LABEL_BROWSE, null, null );
+ browseButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent e)
+ {
+ handleBrowse(pathComp.getShell());
+ // Need to trigger a validation at this point to ensure
+ // that the next button is enabled properly just in case
+ // this is the last page in the wizard.
+ statusListener.handleEvent( null );
+ }
+ });
+
+
+ generateServicesXML = uiUtils.createRadioButton(radioComp,
+ Axis2CreationUIMessages.LABEL_DEFAULT_SERVICES_XML_FILE, null, null);
+ generateServicesXML.setSelection(true);
+ generateServicesXML.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent e)
+ {
+ if (generateServicesXML.getSelection()){
+ generateServicesXML.setSelection(true);
+ haveServicesXML.setSelection(false);
+ disableServicesXMLBrowse();
+ }else{
+ if (!haveServicesXML.getSelection()){
+ generateServicesXML.setSelection(true);
+ haveServicesXML.setSelection(false);
+ }else{
+ generateServicesXML.setSelection(false);
+ }
+ }
+ model.setGenerateServicesXML(true);
+ model.setServicesXML(false);
+ // Need to trigger a validation at this point to ensure
+ // that the next button is enabled properly just in case
+ // this is the last page in the wizard.
+ statusListener.handleEvent( null );
+ }
+ });
+
+ disableServicesXMLBrowse();
+
+ return this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.command.env.ui.widgets.WidgetContributor#getStatus()
+ */
+ public IStatus getStatus()
+ {
+ IStatus result = null;
+ String serviceXMLPathLocation = servicesXMLPath.getText();
+ if (haveServicesXML.getSelection()
+ && (serviceXMLPathLocation.equals("")
+ || !(new File(serviceXMLPathLocation).exists()))) {
+ result = new Status(IStatus.ERROR, "id", 0,
+ Axis2CreationUIMessages.ERROR_INVALID_SERVICES_XML,
+ null);
+ }
+
+ return result;
+ }
+
+ /**
+ * enable the services.xml text and browse button
+ */
+ private void enableServicesXMLBrowse(){
+ browseButton.setEnabled(true);
+ servicesXMLPath.setEnabled(true);
+ }
+
+ /**
+ * disable the services.xml text and browse button
+ */
+ private void disableServicesXMLBrowse(){
+ browseButton.setEnabled(false);
+ servicesXMLPath.setEnabled(false);
+ }
+
+ /**
+ * Pops up the file browse dialog box
+ */
+ private void handleBrowse(Shell parent) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ FileExtensionFilter fileExtensionFilter = new FileExtensionFilter(new String[] {"xml"});
+ DialogResourceBrowser dialog = new DialogResourceBrowser(
+ parent.getShell(), root, fileExtensionFilter);
+ boolean isShowDialog = true;
+ while (isShowDialog){
+ if (dialog.open() == org.eclipse.jface.window.Window.CANCEL){
+ break;
+ }
+ IResource res = dialog.getFirstSelection();
+ if( res != null )
+ {
+ String fileLocation = res.getLocation().toOSString();
+
+ //since the xml file exist now check whether it is a valid services.xsd file
+ if (ServicesXMLUtils.isServicesXMLValid(fileLocation)){
+ servicesXMLPath.setText(fileLocation);
+ model.setPathToServicesXML(fileLocation);
+ isShowDialog = false;
+ }else{
+ MessageBox messageBox = new MessageBox(parent,SWT.OK);
+ messageBox.setMessage(Axis2CreationUIMessages.ERROR_INVALID_SERVICES_XML);
+ messageBox.open();
+ }
+ }
+ }
+ }
+}
+
+
+
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java
new file mode 100644
index 000000000..7b45f018d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java
@@ -0,0 +1,567 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070425 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070518 187311 sandakith@wso2.com - Lahiru Sandakith, Fixing test resource addition
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070823 200413 sandakith@wso2.com - Lahiru Sandakith, Namespace to Package table fix
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20080319 207616 makandre@ca.ibm.com - Andrew Mak, Table in Axis2 Web Service Skeleton Java Bean Configuration Page not Accessible
+ * 20080621 200069 samindaw@wso2.com - Saminda Wijeratne, saving the retrieved WSDL so no need to retrieve it again
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ * 20091207 193996 samindaw@wso2.com - Saminda Wijeratne, selecting a specific service/portname
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.creation.ui.widgets.skeleton;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.WSDLPropertyReader;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+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.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
+
+
+public class WSDL2JAVASkelConfigWidget extends SimpleWidgetDataContributor
+{
+ private DataModel model;
+ IStatus status = Status.OK_STATUS;
+
+ //controls
+ //check box for server side interface
+ private Button generateServerSideInterfaceCheckBoxButton;
+ private Button generateAllCheckBoxButton;
+ private Combo databindingTypeCombo;
+ // Text box to have the portname
+ private Combo portNameCombo;
+ //Text box to have the service name
+ private Combo serviceNameCombo;
+ private WSDLPropertyReader reader;
+ private java.util.List serviceQNameList = null;
+ private Table namespace2packageTable = null;
+ //Label holding the full qualified package name for generated code
+ private Text packageText;
+ //Checkbox to enable the generation of test case classes
+ // for the generated implementation of the webservice.
+ Label label, fillLabel, fillLabel1, fillLabel2, fillLabel3, fillLabel4, fillLabel5, fillLabel6;
+ Axis2EmitterContext context;
+
+ public WSDL2JAVASkelConfigWidget( DataModel model ) {
+ context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+ this.model = model;
+ }
+
+ public WidgetDataEvents addControls( Composite parent, final Listener statusListener ){
+ Composite mainComp = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout();
+ mainComp.setLayout(layout);
+
+ layout.numColumns = 3;
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ mainComp.setLayoutData( gd );
+
+ // service name
+ label = new Label(mainComp, SWT.NULL);
+ label.setText(Axis2CreationUIMessages.LABEL_SERVICE_NAME_CAPTION);
+
+ serviceNameCombo = new Combo(mainComp, SWT.DROP_DOWN | SWT.BORDER
+ | SWT.READ_ONLY);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ serviceNameCombo.setLayoutData(gd);
+ serviceNameCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ int selectionIndex = serviceNameCombo.getSelectionIndex();
+ if (selectionIndex != -1) {
+ Object object = reader.getServiceList().get(selectionIndex);
+ model.setServiceQName(object);
+ }
+ loadPortNames();
+ populatePackageName();
+ loadNamespaces(reader.getDefinitionNamespaceMap());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // port name
+ label = new Label(mainComp, SWT.NULL);
+ label.setText(Axis2CreationUIMessages.LABEL_PORTNAME);
+ portNameCombo = new Combo(mainComp, SWT.DROP_DOWN | SWT.BORDER
+ | SWT.READ_ONLY);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ portNameCombo.setLayoutData(gd);
+ portNameCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setPortName(portNameCombo.getText());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // Databinding
+ label = new Label(mainComp, SWT.NULL);
+ label.setText(Axis2CreationUIMessages.LABEL_DATABINDING_CAPTION);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ databindingTypeCombo = new Combo(mainComp, SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
+ databindingTypeCombo.setLayoutData(gd);
+ fillDatabinderCombo();
+ databindingTypeCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setDatabindingType(databindingTypeCombo.getText());
+ };
+ public void widgetDefaultSelected(SelectionEvent e) {
+ };
+ });
+
+ // package name
+ label = new Label(mainComp, SWT.NULL);
+ label.setText(Axis2CreationUIMessages.LABEL_PACKEGE_NAME);
+ packageText = new Text(mainComp, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+
+ packageText.setLayoutData(gd);
+ packageText.setText(""); // get this text from the
+ packageText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ model.setPackageText(packageText.getText());
+ }
+ });
+
+ //filling label
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ fillLabel = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+ //filling label
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ fillLabel2 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+ //filling label
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ fillLabel3 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+ //filling label
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ fillLabel4 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+ model.setServerXMLCheck(true);
+
+ //the server side interface option
+ generateServerSideInterfaceCheckBoxButton = new Button(mainComp, SWT.CHECK);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ generateServerSideInterfaceCheckBoxButton.setLayoutData(gd);
+ generateServerSideInterfaceCheckBoxButton
+ .setSelection(context.isServiceInterfaceSkeleton());
+ generateServerSideInterfaceCheckBoxButton.setText(Axis2CreationUIMessages.
+ LABEL_GENERATE_SERVERSIDE_INTERFACE);
+ model.setGenerateAllCheck(context.isServiceInterfaceSkeleton());
+ generateServerSideInterfaceCheckBoxButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setGenerateServerSideInterface(
+ generateServerSideInterfaceCheckBoxButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // generate all
+ generateAllCheckBoxButton = new Button(mainComp, SWT.CHECK);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ generateAllCheckBoxButton.setLayoutData(gd);
+ generateAllCheckBoxButton.setSelection(context.isServiceGenerateAll());
+ generateAllCheckBoxButton.setText(Axis2CreationUIMessages.LABEL_GENERATE_ALL);
+ generateAllCheckBoxButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ model.setGenerateAllCheck(generateAllCheckBoxButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ //filling label
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ fillLabel5 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+ //filling label
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ fillLabel6 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+ //add a table to set namespace to package mapping
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 3;
+ gd.verticalSpan = 5;
+
+ namespace2packageTable = new Table(mainComp,SWT.BORDER|SWT.FULL_SELECTION);
+ namespace2packageTable.setLinesVisible(true);
+ namespace2packageTable.setHeaderVisible(true);
+ namespace2packageTable.setEnabled(true);
+ namespace2packageTable.setLayoutData(gd);
+
+ declareColumn(namespace2packageTable,
+ 350, //a default width until we adjust
+ Axis2CreationUIMessages.LABEL_NAMESPACE);
+ declareColumn(namespace2packageTable,
+ 200,//a default width until we adjust
+ Axis2CreationUIMessages.LABEL_PACKAGE);
+
+ namespace2packageTable.setVisible(true);
+
+ // add the table editor
+ final TableEditor editor = new TableEditor(namespace2packageTable);
+ editor.horizontalAlignment = SWT.LEFT;
+ editor.grabHorizontal = true;
+
+ namespace2packageTable.addListener(SWT.MouseDown, new Listener() {
+ public void handleEvent(Event event) {
+ Rectangle clientArea = namespace2packageTable.getClientArea();
+ Point pt = new Point(event.x, event.y);
+ int index = namespace2packageTable.getTopIndex();
+ while (index < namespace2packageTable.getItemCount()) {
+ boolean visible = false;
+ TableItem item = namespace2packageTable.getItem(index);
+ Rectangle rect = item.getBounds(1);
+ if (rect.contains(pt)) {
+ editCell(item, editor);
+ return;
+ }
+ if (!visible && rect.intersects(clientArea)) {
+ visible = true;
+ }
+ if (!visible)
+ return;
+ index++;
+ }
+ }
+ });
+
+ namespace2packageTable.addFocusListener(new FocusAdapter() {
+ public void focusGained(FocusEvent e) {
+ if (namespace2packageTable.getSelectionIndex() == -1)
+ namespace2packageTable.setSelection(0);
+ }
+ });
+
+ namespace2packageTable.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (e.keyCode != 32)
+ return;
+
+ TableItem[] item = namespace2packageTable.getSelection();
+ if (item.length != 1)
+ return;
+
+ editCell(item[0], editor);
+ }
+ });
+
+ populateParamsFromWSDL();
+ populateModel();
+
+ return this;
+ }
+
+ private void editCell(final TableItem item, TableEditor editor) {
+
+ final Text textEdit = new Text(namespace2packageTable, SWT.NONE);
+ textEdit.setText(item.getText(1));
+ textEdit.selectAll();
+ textEdit.setFocus();
+
+ textEdit.addFocusListener(new FocusAdapter() {
+ public void focusLost(FocusEvent e) {
+ item.setText(1, textEdit.getText());
+ textEdit.dispose();
+ }
+ });
+
+ textEdit.addTraverseListener(new TraverseListener() {
+ public void keyTraversed(TraverseEvent e) {
+ switch (e.detail) {
+ case SWT.TRAVERSE_RETURN:
+ item.setText(1, textEdit.getText());
+ case SWT.TRAVERSE_ESCAPE:
+ textEdit.dispose();
+ e.doit = false;
+ }
+ }
+ });
+
+ textEdit.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (e.keyCode == 32) {
+ item.setText(1, textEdit.getText());
+ textEdit.dispose();
+ }
+ }
+ });
+
+ textEdit.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ model.setNamespaseToPackageMapping(getNs2PkgMapping());
+ }
+ });
+
+ editor.setEditor(textEdit, item, 1);
+ }
+
+ private void populateModel() {
+ int selectionIndex = serviceNameCombo.getSelectionIndex();
+ if (selectionIndex != -1) {
+ Object object = reader.getServiceList().get(selectionIndex);
+ model.setServiceQName(object);
+ }
+ model.setPortName(portNameCombo.getText());
+ model.setPackageText(packageText.getText());
+ model.setDatabindingType(databindingTypeCombo.getText());
+ model.setGenerateAllCheck(generateAllCheckBoxButton.getSelection());
+ model.setGenerateServerSideInterface(
+ generateServerSideInterfaceCheckBoxButton.getSelection());
+ model.setNamespaseToPackageMapping(getNs2PkgMapping());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.command.env.ui.widgets.WidgetContributor#getStatus()
+ */
+ public IStatus getStatus()
+ {
+ IStatus result = null;
+ return result;
+ }
+
+ private void populatePackageName() {
+ this.packageText.setText(reader.packageFromTargetNamespace());
+ }
+
+ /**
+ * populate the service and the port from the WSDL this needs to be public
+ * since the WSDLselection page may call this
+ */
+ public void populateParamsFromWSDL() {
+ if (reader == null)
+ reader = new WSDLPropertyReader(model);
+ try {
+ String lname = model.getWsdlURI();
+ if (!"".equals(lname.trim())) {
+
+ reader.readWSDL(model.getWebProjectName(), lname);
+
+ this.serviceQNameList = reader.getServiceList();
+ if (!serviceQNameList.isEmpty()) {
+ serviceNameCombo.removeAll();
+ for (int i = 0; i < serviceQNameList.size(); i++) {
+ // add the local part of the
+ Object serviceQnameInstance = serviceQNameList.get(i);
+ Class QNameClass = ClassLoadingUtil
+ .loadClassFromAntClassLoader("javax.xml.namespace.QName");
+ Method GetLocalPartMethod = QNameClass.getMethod("getLocalPart", null);
+ Object resultLocalPart = GetLocalPartMethod
+ .invoke(serviceQnameInstance, null);
+ serviceNameCombo.add(resultLocalPart.toString());
+ }
+ ;
+ // select the first one as the default
+ serviceNameCombo.select(0);
+
+ // load the ports
+ loadPortNames();
+
+ } else {
+ // service name list being empty means we are switching to
+ // the interface mode
+ if (serviceNameCombo!=null) serviceNameCombo.removeAll();
+ if (portNameCombo!=null) portNameCombo.removeAll();
+
+ }
+
+ populatePackageName();
+
+ //populate the namespacess
+ loadNamespaces(reader.getDefinitionNamespaceMap());
+ }
+ } catch (Exception e) {
+ if (e.getClass().getName().equals("javax.wsdl.WSDLException"))
+ status = StatusUtils.errorStatus(
+ NLS.bind(Axis2CreationUIMessages.ERROR_INVALID_WSDL_FILE_READ_WRITEL,
+ new String[]{e.getLocalizedMessage()}), e);
+ }
+ }
+
+ private void loadPortNames() {
+ int selectionIndex = serviceNameCombo.getSelectionIndex();
+ if (selectionIndex != -1) {
+ java.util.List ports = reader.getPortNameList(serviceQNameList
+ .get(selectionIndex));
+ if (!ports.isEmpty()) {
+ portNameCombo.removeAll();
+ for (int i = 0; i < ports.size(); i++) {
+ // add the local part of the
+ portNameCombo.add(ports.get(i).toString());
+ }
+ portNameCombo.select(0);
+ model.setPortName(portNameCombo.getText());
+ } else {
+ // TODO error no ports found
+ }
+ }
+ }
+
+ /**
+ * Fill the combo with proper databinding names
+ */
+ private void fillDatabinderCombo() {
+ databindingTypeCombo.add(Axis2Constants.DATA_BINDING_ADB);
+ databindingTypeCombo.add(Axis2Constants.DATA_BINDING_XMLBEANS);
+ databindingTypeCombo.add(Axis2Constants.DATA_BINDING_NONE);
+ int selected = databindingTypeCombo.indexOf(context.getServiceDatabinding().toUpperCase());
+ if (selected==-1)
+ databindingTypeCombo.select(0);
+ else
+ databindingTypeCombo.select(selected);
+ }
+
+
+ /**
+ * A util method to create a new column
+ * @param table
+ * @param width
+ * @param colName
+ */
+ private void declareColumn(Table table, int width,String colName){
+ TableColumn column = new TableColumn(table,SWT.NONE);
+ column.setWidth(width);
+ column.setText(colName);
+ }
+
+ /**
+ * Loads the namespaces
+ * @param namespaceMap
+ */
+ private void loadNamespaces(Map namespaceMap){
+ Iterator namespaces = namespaceMap.values().iterator();
+ namespace2packageTable.removeAll();
+ TableItem[] items = new TableItem[namespaceMap.size()]; // An item for each field
+ int i = 0;
+ while(namespaces.hasNext()){
+
+ items[i] = new TableItem(namespace2packageTable, SWT.NULL);
+ String namespace = (String)namespaces.next();
+ items[i].setText(0,namespace);
+ items[i].setText(1,getPackageFromNamespace(namespace));
+ i++;
+ }
+ namespace2packageTable.setVisible(true);
+ }
+
+ /**
+ * get the package to namespace mappings
+ * @return
+ */
+ public String getNs2PkgMapping(){
+ String returnList="";
+ TableItem[] items = namespace2packageTable.getItems();
+ String packageValue;
+ for (int i=0;i<items.length;i++){
+ packageValue = items[i].getText(1);
+ if (packageValue!=null && !"".equals(packageValue)){
+ returnList = returnList +
+ ("".equals(returnList)?"":",") +
+ items[i].getText(0)+ "=" + packageValue;
+ }
+
+ }
+ return "".equals(returnList)?null:returnList;
+ }
+
+
+ /**
+ * get the package derived by Namespace
+ */
+ public String getPackageFromNamespace(String namespace){
+
+ Object result = null;
+ try {
+ //Class URLProcessor = Class.forName("org.apache.axis2.util.URLProcessor");
+ Class URLProcessor = ClassLoadingUtil
+ .loadClassFromAntClassLoader("org.apache.axis2.util.URLProcessor");
+ Class parameterTypes[] = new Class[1];
+ parameterTypes[0] = String.class;
+ Method makePackageNameMethod = URLProcessor
+ .getMethod("makePackageName", parameterTypes);
+ Object args[] = new Object[1];
+ args[0] = namespace;
+ result = makePackageNameMethod.invoke(makePackageNameMethod, args);
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return (String)result;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2BeanConfigWidgetFactory.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2BeanConfigWidgetFactory.java
new file mode 100644
index 000000000..3cae7fb12
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2BeanConfigWidgetFactory.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070425 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt;
+
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2DefaultingCommand;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.internal.axis2.creation.ui.widgets.bean.ServicesXMLSelectBeanWidget;
+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.SimpleWidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
+
+public class Axis2BeanConfigWidgetFactory implements INamedWidgetContributorFactory {
+
+ private SimpleWidgetContributor servicesXMLSelectWidgetContrib;
+ private DataModel model;
+
+ public Axis2BeanConfigWidgetFactory(){
+ }
+
+ public INamedWidgetContributor getFirstNamedWidget(){
+ if( servicesXMLSelectWidgetContrib == null ) init();
+ return servicesXMLSelectWidgetContrib;
+ }
+
+ public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor widgetContributor){
+ if( servicesXMLSelectWidgetContrib == null ) init();
+ INamedWidgetContributor nextWidgetContrib = null;
+ return nextWidgetContrib;
+ }
+
+ public void registerDataMappings(DataMappingRegistry dataRegistry)
+ {
+ // Map the data model from the defaulting command to this widget factory.
+ // The framework will actually to the call to getWebServiceDataModel in
+ // the ExampleDefaultingCommand class and then call the setWebServiceDataModel
+ // method in this class.
+ dataRegistry.addMapping( Axis2DefaultingCommand.class,
+ "WebServiceDataModel", //$NON-NLS-1$
+ Axis2BeanConfigWidgetFactory.class );
+ }
+
+ public void setWebServiceDataModel( DataModel model ){
+ this.model = model;
+ }
+
+ private void init(){
+ //Pages of Axis2 Web Services Java Bean Scenario
+ ServicesXMLSelectBeanWidget servicesXMLSelectWidget =
+ new ServicesXMLSelectBeanWidget(model);
+ servicesXMLSelectWidgetContrib = createWidgetContributor(
+ Axis2CreationUIMessages.LABEL_AXIS2_PREFERENCE_PAGE_HEADING,
+ Axis2CreationUIMessages.LABEL_AXIS2_PREFERENCE_PAGE_SUB_HEADING,
+ servicesXMLSelectWidget );
+ }
+
+ private SimpleWidgetContributor createWidgetContributor(String title,
+ String description,
+ final WidgetDataContributor contributor){
+ SimpleWidgetContributor widgetContrib = new SimpleWidgetContributor();
+ widgetContrib.setTitle(title);
+ widgetContrib.setDescription(description);
+ widgetContrib.setFactory( new WidgetContributorFactory(){
+ public WidgetContributor create(){
+ return contributor;
+ }
+ });
+ return widgetContrib;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2CheckWSDLCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2CheckWSDLCommand.java
new file mode 100644
index 000000000..cb4d3ac21
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2CheckWSDLCommand.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20080129 209411 kathy@ca.ibm.com - Kathy Chan
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.ws.axis2.consumption.core.utils.ServicePingUtil;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+
+public class Axis2CheckWSDLCommand extends AbstractDataModelOperation{
+
+ private Axis2WebService ws_;
+
+ private String wsdlURI_;
+
+ public Axis2CheckWSDLCommand() {
+ }
+
+ public Axis2CheckWSDLCommand(Axis2WebService ws) {
+ ws_ = ws;
+
+ }
+
+ public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable )
+ {
+
+ wsdlURI_ = ws_.getWebServiceInfo().getWsdlURL();
+ try {
+ ServicePingUtil servicePingUtil = new ServicePingUtil();
+ servicePingUtil.connectToURL(wsdlURI_);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ if (e instanceof IOException) {
+ try {
+ throw new ExecutionException(e.getMessage());
+ } catch (ExecutionException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ } else {
+ e.printStackTrace();
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+
+
+ public String getWsdlURI() {
+ return wsdlURI_;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2SkelConfigWidgetFactory.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2SkelConfigWidgetFactory.java
new file mode 100644
index 000000000..c21706f39
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2SkelConfigWidgetFactory.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070601 190505 pmoogk@ca.ibm.com - Peter Moogk
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt;
+
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2DefaultingCommand;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.jst.ws.axis2.creation.core.messages.Axis2CreationUIMessages;
+import org.eclipse.jst.ws.internal.axis2.creation.ui.widgets.skeleton.WSDL2JAVASkelConfigWidget;
+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.SimpleWidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
+
+public class Axis2SkelConfigWidgetFactory implements INamedWidgetContributorFactory {
+
+ private SimpleWidgetContributor skelConfig1WidgetContrib;
+ private DataModel model;
+
+ public Axis2SkelConfigWidgetFactory(){
+ }
+
+ public INamedWidgetContributor getFirstNamedWidget(){
+ if( skelConfig1WidgetContrib == null ) init();
+ return skelConfig1WidgetContrib;
+ }
+
+ public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor widgetContributor){
+ if( skelConfig1WidgetContrib == null ) init();
+ INamedWidgetContributor nextWidgetContrib = null;
+ return nextWidgetContrib;
+ }
+
+ public void registerDataMappings(DataMappingRegistry dataRegistry){
+ // Map the data model from the defaulting command to this widget factory.
+ // The framework will actually to the call to getWebServiceDataModel in
+ // the ExampleDefaultingCommand class and then call the setWebServiceDataModel
+ // method in this class.
+ dataRegistry.addMapping( Axis2DefaultingCommand.class,
+ "WebServiceDataModel", //$NON-NLS-1$
+ Axis2SkelConfigWidgetFactory.class );
+ }
+
+ public void setWebServiceDataModel( DataModel model ){
+ this.model = model;
+ }
+
+ private void init(){
+ WSDL2JAVASkelConfigWidget skel1 = new WSDL2JAVASkelConfigWidget( model );
+
+ skelConfig1WidgetContrib = createWidgetContributor(
+ Axis2CreationUIMessages.LABEL_JAVA_2_WSDL_PAGE_HEADING,
+ Axis2CreationUIMessages.LABEL_JAVA_2_WSDL_PAGE_SUB_HEADING,
+ skel1 );
+ }
+
+ private SimpleWidgetContributor createWidgetContributor(String title,
+ String description,
+ final WidgetDataContributor contributor){
+ SimpleWidgetContributor widgetContrib = new SimpleWidgetContributor();
+ widgetContrib.setTitle(title);
+ widgetContrib.setDescription(description);
+ widgetContrib.setFactory( new WidgetContributorFactory(){
+ public WidgetContributor create(){
+ return contributor;
+ }
+ });
+
+ return widgetContrib;
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebService.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebService.java
new file mode 100644
index 000000000..db8111e22
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebService.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+ * 20070425 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070815 187840 sandakith@wso2.com - Lahiru Sandakith
+ * 20080129 209411 kathy@ca.ibm.com - Kathy Chan
+ * 20080620 192527 samindaw@wso2.com - Saminda Wijeratne, Update the model information with the axis2 preference settings
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt;
+
+import java.util.Vector;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jst.ws.axis2.core.context.PersistentAxis2EmitterContext;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2BUCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2BUServiceCreationCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2BuildProjectCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2CleanupCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2DefaultingCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2ServicesXMLValidationCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2SkelImplCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2TDCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2TDServiceCreationCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2WSDL2JavaCommand;
+import org.eclipse.jst.ws.axis2.creation.core.command.Axis2WebservicesServerCommand;
+import org.eclipse.jst.ws.axis2.creation.core.data.DataModel;
+import org.eclipse.wst.command.internal.env.core.ICommandFactory;
+import org.eclipse.wst.command.internal.env.core.SimpleCommandFactory;
+import org.eclipse.wst.common.environment.IEnvironment;
+import org.eclipse.wst.ws.internal.wsrt.AbstractWebService;
+import org.eclipse.wst.ws.internal.wsrt.IContext;
+import org.eclipse.wst.ws.internal.wsrt.ISelection;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+
+public class Axis2WebService extends AbstractWebService
+{
+// private Axis2WebServiceInfo axis2WebServiceInfo;
+
+ public Axis2WebService(WebServiceInfo info)
+ {
+ super(info);
+ }
+
+ public ICommandFactory assemble(IEnvironment env, IContext ctx,
+ ISelection sel, String project, String earProject)
+ {
+ return null;
+ }
+
+ public ICommandFactory deploy(IEnvironment env, IContext ctx, ISelection sel,
+ String project, String earProject)
+ {
+ return null;
+ }
+
+ public ICommandFactory develop(IEnvironment env, IContext ctx, ISelection sel,
+ String project, String earProject)
+ {
+ Vector commands = new Vector();
+ DataModel model = new DataModel();
+ //EclipseEnvironment environment = (EclipseEnvironment)env;
+
+ model.setWebProjectName(project);
+ setupDataModelDefaultPreferenceValues(model);
+ if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP) {
+ commands.add(new Axis2DefaultingCommand( model,this, ctx.getScenario().getValue() ) );
+ commands.add(new Axis2BUCommand( model ) );
+ commands.add(new Axis2ServicesXMLValidationCommand());
+ commands.add(new Axis2BUServiceCreationCommand(model,this,project));
+ commands.add(new Axis2WebservicesServerCommand(model, ctx.getScenario().getValue() ));
+ //Including command to build for the fix 187840
+ commands.add( new Axis2BuildProjectCommand(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project),true));
+ }
+ else if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) {
+ commands.add(new Axis2DefaultingCommand( model,this, ctx.getScenario().getValue() ) );
+ commands.add(new Axis2TDCommand( model) );
+ commands.add(new Axis2WSDL2JavaCommand( model) );
+ commands.add( new Axis2BuildProjectCommand(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project),true));
+ commands.add(new Axis2TDServiceCreationCommand(model,this,project));
+ commands.add(new Axis2WebservicesServerCommand(model, ctx.getScenario().getValue()));
+ //yes, again invoke the build command to redeploy the service after complete full build
+ commands.add( new Axis2BuildProjectCommand(
+ ResourcesPlugin.getWorkspace().getRoot().getProject(project),true));
+ commands.add(new Axis2SkelImplCommand(this.getWebServiceInfo(),model));
+ commands.add(new Axis2CleanupCommand());
+ }
+ else
+ {
+ return null;
+ }
+
+ return new SimpleCommandFactory(commands);
+ }
+
+ public void setupDataModelDefaultPreferenceValues(DataModel model){
+ PersistentAxis2EmitterContext axis2Pref = PersistentAxis2EmitterContext.getInstance();
+ model.setGenerateServerSideInterface(axis2Pref.isServiceInterfaceSkeleton());
+ model.setGenerateAllCheck(axis2Pref.isServiceGenerateAll());
+ }
+
+ public ICommandFactory install(IEnvironment env, IContext ctx, ISelection sel,
+ String project, String earProject)
+ {
+ return null;
+ }
+
+ public ICommandFactory run(IEnvironment env, IContext ctx, ISelection sel,
+ String project, String earProject)
+ {
+ Vector commands = new Vector();
+
+
+ commands.add(new Axis2CheckWSDLCommand(this));
+
+
+ return new SimpleCommandFactory(commands);
+
+ }
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceInfo.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceInfo.java
new file mode 100644
index 000000000..5235e9dc1
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceInfo.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt;
+
+public class Axis2WebServiceInfo {
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceRuntime.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceRuntime.java
new file mode 100644
index 000000000..0dfb583bd
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.ui/src/org/eclipse/jst/ws/internal/axis2/creation/ui/wsrt/Axis2WebServiceRuntime.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070110 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.internal.axis2.creation.ui.wsrt;
+
+import org.eclipse.jst.ws.internal.axis2.consumption.ui.wsrt.Axis2WebServiceClient;
+import org.eclipse.wst.ws.internal.wsrt.AbstractWebServiceRuntime;
+import org.eclipse.wst.ws.internal.wsrt.IWebService;
+import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceClientInfo;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
+
+public class Axis2WebServiceRuntime extends AbstractWebServiceRuntime
+{
+
+ public IWebService getWebService(WebServiceInfo info){
+ return new Axis2WebService(info);
+ }
+
+ public IWebServiceClient getWebServiceClient(WebServiceClientInfo info){
+ return new Axis2WebServiceClient(info);
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.classpath b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.cvsignore b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.cvsignore
new file mode 100644
index 000000000..2990aa58d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.cvsignore
@@ -0,0 +1,5 @@
+build.xml
+javaCompiler...args
+@dot
+org.eclipse.jst.ws.axis2.ui_1.0.201.200804020204.jar
+temp.folder
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.project b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.project
new file mode 100644
index 000000000..acc7e1775
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.settings/org.eclipse.jdt.core.prefs b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..c69c26a11
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,57 @@
+#Tue Mar 20 10:45:38 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+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.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=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=ignore
+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.unusedLabel=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.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/META-INF/MANIFEST.MF b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..faf2e0bc4
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %PLUGIN_NAME
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.ui;singleton:=true
+Bundle-Version: 1.0.400.qualifier
+Bundle-Activator: org.eclipse.jst.ws.axis2.ui.plugin.WebServiceAxis2UIPlugin
+Bundle-Vendor: %PLUGIN_PROVIDER
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jst.ws.axis2.core,
+ org.eclipse.jst.ws,
+ org.eclipse.jst.ws.ui
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.ws.axis2.ui.plugin,
+ org.eclipse.jst.ws.internal.axis2.consumption.ui.preferences
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.html b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.html
new file mode 100644
index 000000000..0799bdb88
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.ini b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.ini
new file mode 100644
index 000000000..68af2913d
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.ini
@@ -0,0 +1,12 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=icons/WTP_icon_x32_v2.png
+
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.mappings b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.mappings
new file mode 100644
index 000000000..bddaab431
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@ \ No newline at end of file
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.properties
new file mode 100644
index 000000000..8f6039683
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2005, 2009 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
+###############################################################################
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse XML Editors and Tools\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others 2005, 2009. All rights reserved.\n\
+Visit http://www.eclipse.org/webtools
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/build.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/build.properties
new file mode 100644
index 000000000..ac57ad020
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/build.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc 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:
+# WSO2 Inc - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial API Contribution
+# 20070502 184302 sandakith@wso2.com - Lahiru Sandakith, Fix copyright for Axis2 plugins
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html,\
+ icons/,\
+ about.properties,\
+ about.mappings,\
+ about.ini
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/icons/WTP_icon_x32_v2.png b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/icons/WTP_icon_x32_v2.png
new file mode 100644
index 000000000..6f09c2a70
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/icons/WTP_icon_x32_v2.png
Binary files differ
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.properties b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.properties
new file mode 100644
index 000000000..2d4701b66
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2007 WSO2 Inc. 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:
+# WSO2 Inc. - initial API and implementation
+# yyyymmdd bug Email and other contact information
+# -------- -------- -----------------------------------------------------------
+# 20070118 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2 runtime to the framework for 168762
+# 20070501 184617 sandakith@wso2.com - Lahiru Sandakith, Provide plugin details
+# 20080530 234841 kathy@ca.ibm.com - Kathy Chan, Change plugin provider to Eclipse.org
+###############################################################################
+#
+
+#
+# Messages in plugin.xml.
+PLUGIN_NAME=Axis2 Tools
+PLUGIN_PROVIDER=Eclipse Web Tools Platform
+
+# Web Services Preferance Pages
+# Categories
+PREFERENCE_CATEGORY_AXIS2_RUNTIME=Axis2 Preferences
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.xml
new file mode 100644
index 000000000..5f22106b7
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/plugin.xml
@@ -0,0 +1,12 @@
+<plugin>
+
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ name="%PREFERENCE_CATEGORY_AXIS2_RUNTIME"
+ category="org.eclipse.wst.ws.internal.ui.preferences.name"
+ class="org.eclipse.jst.ws.internal.axis2.consumption.ui.preferences.Axis2RuntimePreferencePage"
+ id="org.eclipse.jst.ws.internal.axis2.consumption.ui.preferences.Axis2RuntimePreferencePage">
+ </page>
+ </extension>
+
+</plugin> \ No newline at end of file
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/pom.xml b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/pom.xml
new file mode 100644
index 000000000..59b3fe695
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.ui</artifactId>
+ <version>1.0.400-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/axis2/ui/plugin/WebServiceAxis2UIPlugin.java b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/axis2/ui/plugin/WebServiceAxis2UIPlugin.java
new file mode 100644
index 000000000..adba846ec
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/axis2/ui/plugin/WebServiceAxis2UIPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070425 183046 sandakith@wso2.com - Lahiru Sandakith
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.ui.plugin;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceAxis2UIPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.ui";
+
+ // The shared instance
+ private static WebServiceAxis2UIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public WebServiceAxis2UIPlugin() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static WebServiceAxis2UIPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/preferences/Axis2RuntimePreferencePage.java b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/preferences/Axis2RuntimePreferencePage.java
new file mode 100644
index 000000000..84548b823
--- /dev/null
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.ui/src/org/eclipse/jst/ws/internal/axis2/consumption/ui/preferences/Axis2RuntimePreferencePage.java
@@ -0,0 +1,350 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 WSO2 Inc. 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:
+ * WSO2 Inc. - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20070130 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
+ * runtime to the framework for 168762
+ * 20070425 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070501 180284 sandakith@wso2.com - Lahiru Sandakith
+ * 20070511 186440 sandakith@wso2.com - Lahiru Sandakith fix 186440
+ * 20070513 186430 sandakith@wso2.com - Lahiru Sandakith, fix for 186430
+ * Text not accessible on AXIS2 wizard pages.
+ * 20070516 183147 sandakith@wso2.com - Lahiru Sandakith Fix for the persisting DBCS paths
+ * 20070523 174876 sandakith@wso2.com - Lahiru Sandakith, Persist Preferences inside Framework
+ * 20070603 188740 sandakith@wso2.com - Lahiru Sandakith,
+ * 20070604 190505 sandakith@wso2.com - Lahiru Sandakith,
+ * 20070604 190067 pmoogk@ca.ibm.com - Peter Moogk
+ * 20070824 200515 sandakith@wso2.com - Lahiru Sandakith, NON-NLS move to seperate file
+ * 20070827 188732 sandakith@wso2.com - Lahiru Sandakith, Restore defaults for preferences
+ * 20071030 207618 zina@ca.ibm.com - Zina Mostafia, Page GUI sequence using tab is not correct ( violates Accessibility)
+ * 20080522 233154 samindaw@wso2.com - Saminda Wijeratne, UI rendering problem where textboxes used as labels had white background
+ * 20090307 196954 samindaw@wso2.com - Saminda Wijeratne, Support XMLBeans data binding
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.axis2.consumption.ui.preferences;
+
+import java.io.File;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jst.ws.axis2.core.constant.Axis2Constants;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterDefaults;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.axis2.core.plugin.messages.Axis2CoreUIMessages;
+import org.eclipse.jst.ws.axis2.core.utils.Axis2CoreUtils;
+import org.eclipse.jst.ws.axis2.core.utils.RuntimePropertyUtils;
+import org.eclipse.jst.ws.axis2.ui.plugin.WebServiceAxis2UIPlugin;
+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.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+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.DirectoryDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class Axis2RuntimePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ private Text axis2Path;
+ private Text statusLabel;
+ private Combo aarExtensionCombo;
+ private Combo serviceDatabindingCombo;
+ private Combo clientDatabindingCombo;
+ private Button generateServerSideInterfaceCheckBoxButton;
+ private Button generateAllCheckBoxButton;
+ private Button syncAndAsyncRadioButton;
+ private Button syncOnlyRadioButton;
+ private Button asyncOnlyRadioButton;
+ private Button clientTestCaseCheckBoxButton;
+ private Button clientGenerateAllCheckBoxButton;
+
+ protected Control createContents(Composite superparent) {
+
+ UIUtils uiUtils = new UIUtils(WebServiceAxis2UIPlugin.PLUGIN_ID);
+ final Composite mainComp = uiUtils.createComposite(superparent, 1);
+
+ TabFolder axis2PreferenceTab = new TabFolder(mainComp, SWT.WRAP);
+ axis2PreferenceTab.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH) );
+ axis2PreferenceTab.setBackground(mainComp.getBackground());
+
+ //-----------------------------Axis2 Runtime Location Group------------------------------//
+ TabItem runtimeInstalLocationItem = new TabItem(axis2PreferenceTab, SWT.WRAP);
+ runtimeInstalLocationItem.setText(Axis2CoreUIMessages.AXIS2_RUNTIME);
+ runtimeInstalLocationItem.setToolTipText(Axis2CoreUIMessages.AXIS2_RUNTIME_TOOLTIP);
+
+ Composite runtimeTab = uiUtils.createComposite(axis2PreferenceTab, 1);
+ runtimeTab.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH ) );
+ Composite runtimeGroup = uiUtils.createComposite(runtimeTab, 3);
+ runtimeTab.setBackground(axis2PreferenceTab.getBackground());
+
+ runtimeInstalLocationItem.setControl(runtimeTab);
+ runtimeTab.setToolTipText(Axis2CoreUIMessages.AXIS2_RUNTIME_TOOLTIP);
+
+ axis2Path = uiUtils.createText(runtimeGroup, Axis2CoreUIMessages.AXIS2_RUNTIME_LOCATION , null, null , SWT.BORDER);
+
+ Button browseButton = uiUtils.createPushButton(runtimeGroup, Axis2CoreUIMessages.LABEL_BROUSE, null, null);
+ browseButton.addSelectionListener( new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse(mainComp.getShell());
+ }
+ });
+
+ axis2Path.addModifyListener( new ModifyListener(){
+ public void modifyText(ModifyEvent e){
+ statusUpdate(runtimeExist(axis2Path.getText()));
+ // runtimeTab.layout();
+ }
+ });
+ new org.eclipse.swt.widgets.Label(runtimeTab, SWT.HORIZONTAL); // Leave some vertical space.
+ statusLabel = new Text(runtimeTab, SWT.BACKGROUND | SWT.READ_ONLY | SWT.CENTER | SWT.WRAP | SWT.H_SCROLL);
+ statusLabel.setLayoutData( new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH) );
+ statusLabel.setBackground(axis2PreferenceTab.getBackground());
+
+ //--------------------------------Axis2 Runtime Preferences------------------------------//
+
+ TabItem codegenPreferencesItem = new TabItem(axis2PreferenceTab, SWT.WRAP);
+ codegenPreferencesItem.setText(Axis2CoreUIMessages.AXIS2_PREFERENCES);
+ codegenPreferencesItem.setToolTipText(Axis2CoreUIMessages.AXIS2_PREFERENCES_TOOLTIP);
+
+ Composite codegenGroup = uiUtils.createComposite(axis2PreferenceTab, 1);
+ codegenPreferencesItem.setControl(codegenGroup);
+ codegenGroup.setToolTipText(Axis2CoreUIMessages.AXIS2_PREFERENCES_TOOLTIP);
+ codegenGroup.setBackground(mainComp.getBackground());
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ //Service Codegen Options
+ Composite serviceCodegenGroup = uiUtils.createComposite(codegenGroup, 1);
+
+ Text serviceCodegenGroupLabel= new Text(serviceCodegenGroup, SWT.READ_ONLY |SWT.WRAP);
+ serviceCodegenGroupLabel.setText(Axis2CoreUIMessages.LABEL_WEB_SERVICE_CODEGEN);
+ serviceCodegenGroupLabel.setBackground(axis2PreferenceTab.getBackground());
+
+ Composite dataBindComp = uiUtils.createComposite(serviceCodegenGroup, 2);
+ //Data binding
+ serviceDatabindingCombo = uiUtils.createCombo(dataBindComp, Axis2CoreUIMessages.LABEL_DATABINDING, null, null, SWT.READ_ONLY);
+
+ //the server side interface option
+ generateServerSideInterfaceCheckBoxButton = uiUtils.createCheckbox(serviceCodegenGroup, Axis2CoreUIMessages.LABEL_GENERATE_SERVERSIDE_INTERFACE, null, null);
+
+ // generate all
+ generateAllCheckBoxButton = uiUtils.createCheckbox(serviceCodegenGroup, Axis2CoreUIMessages.LABEL_GENERATE_ALL, null,null);
+
+ uiUtils.createHorizontalSeparator(codegenGroup,2);
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ ///Client Codegen Options
+ Composite clientCodegenGroup = uiUtils.createComposite(codegenGroup, 1);
+ Text clientCodegenGroupLabel= new Text(clientCodegenGroup, SWT.READ_ONLY);
+ clientCodegenGroupLabel.setText(Axis2CoreUIMessages.LABEL_WEB_SERVICE_CLIENT_CODEGEN);
+ clientCodegenGroupLabel.setBackground(axis2PreferenceTab.getBackground());
+
+ Group clientModeRadioComp = uiUtils.createGroup(clientCodegenGroup, Axis2CoreUIMessages.LABEL_CLIENT_SIDE, null, null);
+
+ //client side buttons
+ syncAndAsyncRadioButton = uiUtils.createRadioButton(clientModeRadioComp, Axis2CoreUIMessages.LABEL_SYNC_AND_ASYNC, null, null);
+ syncOnlyRadioButton = uiUtils.createRadioButton(clientModeRadioComp,Axis2CoreUIMessages.LABEL_SYNC, null, null);
+ asyncOnlyRadioButton = uiUtils.createRadioButton(clientModeRadioComp, Axis2CoreUIMessages.LABEL_ASYNC, null, null);
+
+ Composite dataBind = uiUtils.createComposite(clientCodegenGroup, 2);
+ clientDatabindingCombo = uiUtils.createCombo(dataBind, Axis2CoreUIMessages.LABEL_DATABINDING, null, null, SWT.READ_ONLY);
+
+ // generate test case option
+ clientTestCaseCheckBoxButton = uiUtils.createCheckbox(clientCodegenGroup, Axis2CoreUIMessages.LABEL_GENERATE_TESTCASE_CAPTION, null, null);
+
+ // generate all
+ clientGenerateAllCheckBoxButton = uiUtils.createCheckbox(clientCodegenGroup, Axis2CoreUIMessages.LABEL_GENERATE_ALL, null, null);
+
+
+ uiUtils.createHorizontalSeparator(codegenGroup,2);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ ///AAR Options
+ Composite aarGroup = uiUtils.createComposite(codegenGroup,1);
+
+ Text arrGroupLabel= new Text(aarGroup, SWT.READ_ONLY);
+ arrGroupLabel.setText(Axis2CoreUIMessages.LABEL_WEB_SERVICE_AAR);
+ arrGroupLabel.setBackground(axis2PreferenceTab.getBackground());
+
+ Composite aarExtGroup = uiUtils.createComposite(aarGroup,2);
+
+ //aar extention
+ aarExtensionCombo = uiUtils.createCombo(aarExtGroup, Axis2CoreUIMessages.LABEL_AAR_EXTENTION, null, null, SWT.READ_ONLY );
+
+ initializeValues();
+ axis2PreferenceTab.setEnabled(true);
+ axis2PreferenceTab.setVisible(true);
+ return mainComp;
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+
+
+ /**
+ * Pops up the file browse dialog box
+ */
+ private void handleBrowse(Shell parent) {
+ DirectoryDialog fileDialog = new DirectoryDialog(parent);
+ String fileName = fileDialog.open();
+ if (fileName != null) {
+ axis2Path.setText(fileName);
+ }
+ }
+
+ private void statusUpdate(boolean status){
+ if(statusLabel != null){
+ if(!axis2Path.getText().equals("")){
+ if (status) {
+ statusLabel.setText(Axis2CoreUIMessages.LABEL_AXIS2_RUNTIME_LOAD);
+ } else {
+ statusLabel.setText(Axis2CoreUIMessages.LABEL_AXIS2_RUNTIME_LOAD_ERROR);
+ }
+ }else{
+ statusLabel.setText(Axis2CoreUIMessages.LABEL_AXIS2_RUNTIME_NOT_EXIT);
+ }
+ }
+ }
+
+ private boolean runtimeExist(String path){
+
+ File axis2HomeDir = new File(path);
+ if (!axis2HomeDir.isDirectory())
+ return false;
+
+ String axis2LibPath = Axis2CoreUtils.addAnotherNodeToPath(axis2HomeDir.getAbsolutePath(), "lib");
+ String axis2WebappPath = Axis2CoreUtils.addAnotherNodeToPath(axis2HomeDir.getAbsolutePath(), "webapp");
+ if (new File(axis2LibPath).isDirectory() && new File(axis2WebappPath).isDirectory())
+ return true;
+ else {
+ String axis2WarPath = Axis2CoreUtils.addAnotherNodeToPath( path, "axis2.war");
+ if (new File(axis2WarPath).isFile()) {
+ RuntimePropertyUtils.writeWarStausToPropertiesFile(true);
+ return true;
+ } else
+ return false;
+ }
+ }
+
+ private void storeValues(){
+ // set values in the persistent context
+ Axis2EmitterContext context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+ context.setAxis2RuntimeLocation( axis2Path.getText());
+ RuntimePropertyUtils.writeServerPathToPropertiesFile(axis2Path.getText());
+ context.setServiceDatabinding(serviceDatabindingCombo.getItem(serviceDatabindingCombo.getSelectionIndex()));
+ context.setServiceInterfaceSkeleton( generateServerSideInterfaceCheckBoxButton.getSelection());
+ context.setServiceGenerateAll(generateAllCheckBoxButton.getSelection());
+ context.setAsync(asyncOnlyRadioButton.getSelection());
+ context.setSync(syncOnlyRadioButton.getSelection());
+ context.setClientDatabinding(clientDatabindingCombo.getItem(clientDatabindingCombo.getSelectionIndex()));
+ context.setClientTestCase(clientTestCaseCheckBoxButton.getSelection());
+ context.setClientGenerateAll(clientGenerateAllCheckBoxButton.getSelection());
+ context.setAarExtention(aarExtensionCombo.getText());
+ }
+
+ /**
+ * Initializes states of the controls using default values
+ * in the preference store.
+ */
+ private void initializeDefaults() {
+ aarExtensionCombo.select(0);
+ serviceDatabindingCombo.select(0);
+ clientDatabindingCombo.select(0);
+ generateServerSideInterfaceCheckBoxButton.setSelection(Axis2EmitterDefaults.isServiceInterfaceSkeleton());
+ generateAllCheckBoxButton.setSelection(Axis2EmitterDefaults.isServiceGenerateAll());
+ syncAndAsyncRadioButton.setSelection(((Axis2EmitterDefaults.isClientSync() || Axis2EmitterDefaults.isClientAsync())==false)?true:
+ (Axis2EmitterDefaults.isClientSync()) && Axis2EmitterDefaults.isClientAsync());
+ syncOnlyRadioButton.setSelection( Axis2EmitterDefaults.isClientSync() && !Axis2EmitterDefaults.isClientAsync());
+ asyncOnlyRadioButton.setSelection(
+ Axis2EmitterDefaults.isClientAsync() && !Axis2EmitterDefaults.isClientSync());
+
+ clientTestCaseCheckBoxButton.setSelection(Axis2EmitterDefaults.isClientTestCase());
+ clientGenerateAllCheckBoxButton.setSelection(Axis2EmitterDefaults.isClientGenerateAll());
+ axis2Path.setText(Axis2EmitterDefaults.getAxis2RuntimeLocation());
+ }
+
+ private void initializeValues()
+ {
+ Axis2EmitterContext context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+
+ String[] databindingItems = {Axis2Constants.DATA_BINDING_ADB,Axis2Constants.DATA_BINDING_XMLBEANS};
+ serviceDatabindingCombo.setItems(databindingItems);
+ int selected = serviceDatabindingCombo.indexOf(context.getServiceDatabinding().toUpperCase());
+ if (selected==-1)
+ serviceDatabindingCombo.select(0);
+ else
+ serviceDatabindingCombo.select(selected);
+ clientDatabindingCombo.setItems(databindingItems);
+ selected = clientDatabindingCombo.indexOf(context.getClientDatabinding().toUpperCase());
+ if (selected==-1)
+ clientDatabindingCombo.select(0);
+ else
+ clientDatabindingCombo.select(selected);
+
+ generateServerSideInterfaceCheckBoxButton.setSelection( context.isServiceInterfaceSkeleton());
+ generateAllCheckBoxButton.setSelection(context.isServiceGenerateAll());
+
+ syncAndAsyncRadioButton.setSelection(((context.isSync() || context.isAsync())==false) ?true
+ :(context.isSync()) && context.isAsync());
+ syncOnlyRadioButton.setSelection(context.isSync() && !context.isAsync() );
+ asyncOnlyRadioButton.setSelection(context.isAsync() && !context.isSync());
+
+ clientTestCaseCheckBoxButton.setSelection(context.isClientTestCase());
+ clientGenerateAllCheckBoxButton.setSelection(context.isClientGenerateAll());
+
+ String[] aarExtentionItems = { Axis2Constants.AAR };
+ aarExtensionCombo.setItems(aarExtentionItems);
+ aarExtensionCombo.select(0);
+
+ String serverPath = context.getAxis2RuntimeLocation();
+ if ( serverPath != null){
+ axis2Path.setText(serverPath);
+ statusUpdate(runtimeExist(serverPath));
+ RuntimePropertyUtils.writeWarStausToPropertiesFile(false);
+ }
+ else
+ statusUpdate(false);
+ }
+
+ /**
+ * Default button has been pressed.
+ */
+ protected void performDefaults() {
+ super.performDefaults();
+ initializeDefaults();
+ }
+
+ /**
+ * Apply button has been pressed.
+ */
+ protected void performApply() {
+ performOk();
+ }
+
+ /**
+ * OK button has been pressed.
+ */
+ public boolean performOk() {
+ storeValues();
+ return true;
+ }
+
+}
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.cvsignore b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.cvsignore
new file mode 100644
index 000000000..2001592fd
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.cvsignore
@@ -0,0 +1,2 @@
+org.eclipse.jst.ws.axis2.ui.doc.user_*
+build.xml
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.project b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.project
new file mode 100644
index 000000000..dbc030d7a
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.ui.doc.user</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/DocBuild.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/DocBuild.xml
new file mode 100644
index 000000000..7235a1f4a
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/DocBuild.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ This script build the Help plug-in by transforming the DITA source files into HTML.
+
+ To use this script, you must install DITA-OT on your machine in the directory
+ defined by the dita.ot.dir property.
+
+ Run the default target after you edit the DITA source files to regenerate the HTML.
+
+ To customize this script for other Help plug-ins, modify the value of the args.input property
+ to be the DITA map file for the plug-in.
+
+ NOTE: This script assumes that links to sibling Help plug-ins have scope="peer", otherwise the
+ output directory structure will be shifted incorrectly.
+
+ NOTE: This script assumes that you hand code your plugin.xml file in myplugin.xml. This file
+ will be copied over the generated plugin.xml which is currently not being generated correctly
+ by DITA-OT.
+
+ ChangeLog:
+ 2006-04-05 Arthur Ryman <ryman@ca.ibm.com>
+ - Created.
+ 2008-01-09 Kate Price <katep@ca.ibm.com>
+ - modified for new DITA-OT version
+ 2008-05-05 Kate Price <katep@ca.ibm.com>
+ - modified to add generation of pre-built help index.
+ - Must delete /index folder before running build
+-->
+<project name="eclipsehelp" default="all">
+
+ <property name="dita.ot.dir" location="C:/DITA-OT1.2.2" />
+
+ <path id="dost.class.path">
+ <pathelement location="${dita.ot.dir}${file.separator}lib${file.separator}dost.jar" />
+ </path>
+
+ <taskdef name="integrate" classname="org.dita.dost.platform.IntegratorTask">
+ <classpath refid="dost.class.path" />
+ </taskdef>
+ <target name="all" depends="integrate, eclipsehelp">
+ </target>
+ <target name="integrate">
+ <integrate ditadir="${dita.ot.dir}" />
+ </target>
+
+ <!-- revise below here -->
+ <target name="eclipsehelp">
+ <ant antfile="${dita.ot.dir}${file.separator}conductor.xml" target="init" dir="${dita.ot.dir}">
+ <property name="args.copycss" value="no" />
+ <property name="args.csspath" value="../org.eclipse.wst.doc.user" />
+ <property name="args.eclipse.provider" value="Eclipse.org" />
+ <property name="args.eclipse.version" value="3.3.0" />
+ <property name="args.input" location="wsaxis2build_toc.ditamap" />
+ <property name="clean.temp" value="true" />
+ <property name="dita.extname" value=".dita" />
+ <property name="dita.temp.dir" location="temp" />
+ <property name="output.dir" location="" />
+ <property name="transtype" value="eclipsehelp" />
+ </ant>
+ <copy file="myplugin.xml" tofile="plugin.xml" overwrite="yes" />
+ </target>
+ <target name="build.index" description="Builds search index for the plug-in" if="eclipse.running">
+ <help.buildHelpIndex manifest="plugin.xml" destination="."/>
+ </target>
+</project>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/META-INF/MANIFEST.MF b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..13c9fa719
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.ui.doc.user;singleton:=true
+Bundle-Version: 1.0.200.qualifier
+Bundle-Vendor: %pluginProvider
+Bundle-Localization: plugin
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/about.html b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/about.html
new file mode 100644
index 000000000..2199df3f0
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/build.properties b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/build.properties
new file mode 100644
index 000000000..a2f574855
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/build.properties
@@ -0,0 +1,18 @@
+bin.includes = plugin.properties,\
+ plugin.xml,\
+ wsaxis2build_toc.xml,\
+ org.eclipse.jst.ws.axis2.ui.doc.userindex.xml,\
+ about.html,\
+ META-INF/,\
+ index/,\
+ topics/
+src.includes = *.maplist,\
+ *.ditamap,\
+ topics/,\
+ wsaxis2build_toc.xml,\
+ org.eclipse.jst.ws.axis2.ui.doc.userindex.xml,\
+ index/
+bin.excludes = DocBuild.xml,\
+ myPlugin*.xml,\
+ topics/*.dita
+generateSourceBundle=false
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/_4.cfs b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/_4.cfs
new file mode 100644
index 000000000..b77740d95
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/_4.cfs
Binary files differ
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/deletable b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/deletable
new file mode 100644
index 000000000..593f4708d
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/deletable
Binary files differ
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_contributions b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_contributions
new file mode 100644
index 000000000..78baff380
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_contributions
@@ -0,0 +1,3 @@
+#This is a generated file; do not edit.
+#Thu May 15 17:37:50 EDT 2008
+org.eclipse.jst.ws.axis2.ui.doc.user=org.eclipse.jst.ws.axis2.ui.doc.user\n1.0.0.qualifier
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_dependencies b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_dependencies
new file mode 100644
index 000000000..61b237ea3
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_dependencies
@@ -0,0 +1,4 @@
+#This is a generated file; do not edit.
+#Thu May 15 17:37:50 EDT 2008
+lucene=1.9.1.v200803061811
+analyzer=org.eclipse.help.base\#3.3.100.v20080425?locale\=en
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_docs b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_docs
new file mode 100644
index 000000000..01b890416
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/indexed_docs
@@ -0,0 +1,6 @@
+#This is a generated file; do not edit.
+#Thu May 15 17:37:50 EDT 2008
+/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.html=0
+/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.html=0
+/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.html=0
+/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.html=0
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/segments b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/segments
new file mode 100644
index 000000000..5fd9a5068
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/index/segments
Binary files differ
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/myplugin.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/myplugin.xml
new file mode 100644
index 000000000..82020b85f
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/myplugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.6"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!-- /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/ -->
+<plugin>
+
+ <extension point="org.eclipse.help.toc">
+ <toc file="wsaxis2build_toc.xml" />
+ <index path="index/"/>
+ </extension>
+
+ <extension point="org.eclipse.help.index">
+ <index file="org.eclipse.jst.ws.axis2.ui.doc.userindex.xml"/>
+</extension>
+
+</plugin> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.user.maplist b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.user.maplist
new file mode 100644
index 000000000..ab32d9eec
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.user.maplist
@@ -0,0 +1,8 @@
+<maplist version="3.6.2">
+ <nav>
+ <map file="wsaxis2build_toc.ditamap"/>
+ </nav>
+ <link>
+ <map file="wsaxis2_reltable_toc.ditamap"/>
+ </link>
+</maplist>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.userindex.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.userindex.xml
new file mode 100644
index 000000000..401cde76d
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/org.eclipse.jst.ws.axis2.ui.doc.userindex.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<index>
+ <entry keyword="Axis2 runtime environment">
+ <entry keyword="Web services">
+ <entry keyword="overview">
+ <topic href="topics/caxis2tover.html#axisoverview" title="Creating Web services with the Apache Axis2 runtime environments"/>
+ </entry>
+ <entry keyword="Java beans">
+ <topic href="topics/taxis2bu.html#twsbeana" title="Creating a Web service from a Java bean using the Apache Axis2 runtime environment"/>
+ </entry>
+ <entry keyword="skeleton">
+ <topic href="topics/taxis2td.html#tsklwsdla" title="Creating a Java bean skeleton from a WSDL document using the Apache Axis2 runtime environment"/>
+ </entry>
+ <entry keyword="clients">
+ <topic href="topics/taxis2client.html#tsampappa" title="Generating a Java client proxy and a sample application from a WSDL document using the Axis2 runtime environment"/>
+ </entry>
+ </entry>
+ </entry>
+ <entry keyword="Web services">
+ <entry keyword="Axis2 runtime environment">
+ <entry keyword="overview">
+ <topic href="topics/caxis2tover.html#axisoverview" title="Creating Web services with the Apache Axis2 runtime environments"/>
+ </entry>
+ <entry keyword="creating a Web service">
+ <topic href="topics/taxis2bu.html#twsbeana" title="Creating a Web service from a Java bean using the Apache Axis2 runtime environment"/>
+ </entry>
+ <entry keyword="skeleton Web services">
+ <topic href="topics/taxis2td.html#tsklwsdla" title="Creating a Java bean skeleton from a WSDL document using the Apache Axis2 runtime environment"/>
+ </entry>
+ <entry keyword="Web service clients">
+ <topic href="topics/taxis2client.html#tsampappa" title="Generating a Java client proxy and a sample application from a WSDL document using the Axis2 runtime environment"/>
+ </entry>
+ </entry>
+ </entry>
+</index> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.properties b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.properties
new file mode 100644
index 000000000..af302f413
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2001, 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# NLS_MESSAGEFORMAT_VAR
+# NLS_ENCODING=UTF-8
+
+pluginName = Axis2 Web services documentation
+pluginProvider = Eclipse.org
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.xml
new file mode 100644
index 000000000..82020b85f
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.6"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!-- /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/ -->
+<plugin>
+
+ <extension point="org.eclipse.help.toc">
+ <toc file="wsaxis2build_toc.xml" />
+ <index path="index/"/>
+ </extension>
+
+ <extension point="org.eclipse.help.index">
+ <index file="org.eclipse.jst.ws.axis2.ui.doc.userindex.xml"/>
+</extension>
+
+</plugin> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/pom.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/pom.xml
new file mode 100644
index 000000000..c0858dd93
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.ui.doc.user</artifactId>
+ <version>1.0.200-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.dita b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.dita
new file mode 100644
index 000000000..11269b3a6
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.dita
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Arbortext, Inc., 1988-2006, v.4002-->
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
+ "concept.dtd">
+<concept id="axisoverview" xml:lang="en-us">
+<title>Creating Web services with the Apache Axis2 runtime environments</title>
+<shortdesc>This runtime environment is for users who prefer to develop for
+the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web
+services tools.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm keyref="caxis2tover|1|AxisruntimeenvironmentWebservicesoverview"
+status="unchanged">Axis2 runtime environment<indexterm>Web services<indexterm>overview</indexterm></indexterm></indexterm>
+<indexterm keyref="caxis2tover|2|WebservicesAxisruntimeenvironment" status="unchanged">Web
+services<indexterm>Axis2 runtime environment<indexterm>overview</indexterm></indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<conbody>
+<section><title>Apache Axis2 Overview</title><p>Axis2 evolved from the Apache
+Axis1.x architecture and is more flexible, configurable, and efficient, while
+retaining the positive aspects of Apache Axis1.x architecture.</p><p>The Web
+service tools provided with this product support the following specifications
+when creating Apache Axis2 Web services and clients:<ul>
+<li>SOAP 1.1 and 1.2</li>
+<li>WSDL 1.1, including both SOAP and HTTP bindings </li>
+<li>HTTP transports</li>
+</ul>The levels of Axis2 currently supported by the tools is 1.2 and 1.3.
+Axis2 can be deployed to any server that supports <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> Servlet 2.2 specification or higher,
+including <tm tmclass="ibm" tmowner="IBM Corporation" tmtype="reg" trademark="IBM">IBM</tm> <tm
+tmclass="ibm" tmowner="IBM Corporation" tmtype="reg" trademark="WebSphere">WebSphere</tm> Application
+Server 6.1, and Apache Tomcat server. For more information on Axis2, refer
+to <xref format="html" href="http://ws.apache.org/axis2/" scope="external">http://ws.apache.org/axis2</xref>. </p><p>The
+support for Apache Axis2 is limited to validation that the application is
+invoking the Axis2 emitters correctly. Support for other Axis2 issues should
+be directed to <xref format="html" href="http://ws.apache.org/axis2/" scope="external">http://ws.apache.org/axis2</xref></p></section>
+<section><title>Installing the Apache Axis2 runtime</title><p>Unlike creating
+Web services in the Apache Axis1.x runtime, before creating a Web service
+using Apache Axis2 you must download the Axis2 runtime and install it the
+workbench using the Web services Axis2 preferences page.<ol>
+<li>Download Apache Axis2 v1.2 or v1.3 from the following site: <xref format="html"
+href="http://ws.apache.org/axis2/download.cgi" scope="external">http://ws.apache.org/axis2/download.cgi</xref>.</li>
+<li>Follow the instructions in the appropriate Apache Axis2 installation guide: <ul>
+<li>Apache Axis2 v1.2<xref format="html" href="http://ws.apache.org/axis2/1_2/installationguide.html"
+scope="external">http://ws.apache.org/axis2/1_2/installationguide.html</xref></li>
+<li>Apache Axis2 v1.3<xref format="html" href="http://ws.apache.org/axis2/1_3/installationguide.html"
+scope="external">http://ws.apache.org/axis2/1_3/installationguide.html</xref></li>
+</ul></li>
+<li>Once the Apache Axis2 runtime is installed, you need to associate it with
+the workbench. In the workbench, open <menucascade><uicontrol>Window</uicontrol>
+<uicontrol>Preferences</uicontrol><uicontrol>Web services</uicontrol><uicontrol>Axis2
+Preferences</uicontrol></menucascade>. On the <uicontrol>Axis2 Runtime</uicontrol> tab,
+browse to the location where you installed Apache Axis2. A message will display
+if the runtime is installed successfully.</li>
+</ol></p></section>
+<section><title>Creating projects for Axis2 Web services</title><p>The Web
+service wizards will automatically add the correct facets to a dynamic Web
+project. However if you want to manually create a dynamic Web project enabled
+for Axis2 Web service development complete the following:<ol>
+<li>Create the service Web project by clicking <uicontrol>File > New > Project
+> Dynamic Web project</uicontrol>. Enter the following information: <ol>
+<li>Project Name: Type a project name</li>
+<li>If you are deploying to a Tomcat server, ensure that <uicontrol>Add project
+to an EAR</uicontrol> is not selected. If you do not clear this checkbox you
+will be unable to select the Tomcat server. If you are deploying to <tm tmclass="ibm"
+tmowner="IBM Corporation" tmtype="reg" trademark="WebSphere">WebSphere</tm> Application
+server you will need to add the project to an EAR.</li>
+<li>Target runtime: Select the version of the server to which you will deploy
+your Web service. If it is not listed, click <uicontrol>New</uicontrol> and
+browse to the location where it is installed.</li>
+<li>Configurations: Select the default configuration for your server type.</li>
+<li>Click <uicontrol>Finish</uicontrol>.</li>
+</ol></li>
+<li>Add the Axis2 facet. Right-click your project and click <menucascade>
+<uicontrol>Properties</uicontrol><uicontrol>Project Facets</uicontrol><uicontrol>Modify
+project</uicontrol><uicontrol>Axis2 Web Services</uicontrol></menucascade>,
+and click <uicontrol>Finish</uicontrol>.</li>
+<li>If you have chosen to deploy to a server in which the Axis2 JAR files
+will reside on the server (such as WebSphere Application Server), you must
+change the classloading for the EAR from PARENT_FIRST to PARENT_LAST. Expand
+the EAR associated with your Axis2 project, and launch its deployment descriptor.
+On the <uicontrol>Deployment</uicontrol> tab, expand the <uicontrol>Application</uicontrol> section.
+Change the <uicontrol>Classloader mode</uicontrol> field to PARENT_LAST and
+save your changes.</li>
+</ol></p></section>
+</conbody>
+<related-links>
+<linklist><title>Related Concepts</title>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cws.dita" scope="peer">
+<linktext>Web services</linktext></link>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.dita" scope="peer">
+<linktext>Tools for Web services development</linktext></link>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cjaxrpc.dita" scope="peer">
+<linktext>JAX-RPC</linktext></link>
+</linklist>
+<linklist><title>Related Tasks</title>
+<link href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.dita" scope="peer">
+<linktext> Developing Web services</linktext></link>
+</linklist>
+</related-links>
+</concept>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.html b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.html
new file mode 100644
index 000000000..0959f2154
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/caxis2tover.html
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang="en-us" xml:lang="en-us">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
+<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
+<meta content="public" name="security" />
+<meta content="index,follow" name="Robots" />
+<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
+<meta content="concept" name="DC.Type" />
+<meta name="DC.Title" content="Creating Web services with the Apache Axis2 runtime environments" />
+<meta name="abstract" content="This runtime environment is for users who prefer to develop for the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web services tools." />
+<meta name="description" content="This runtime environment is for users who prefer to develop for the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web services tools." />
+<meta content="Axis2 runtime environment, Web services, overview, Web services" name="DC.subject" />
+<meta content="Axis2 runtime environment, Web services, overview, Web services" name="keywords" />
+<meta scheme="URI" name="DC.Relation" content="../topics/taxis2bu.html" />
+<meta scheme="URI" name="DC.Relation" content="../topics/taxis2td.html" />
+<meta scheme="URI" name="DC.Relation" content="../topics/taxis2client.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cws.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cjaxrpc.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/tasks/toverws.html" />
+<meta content="XHTML" name="DC.Format" />
+<meta content="axisoverview" name="DC.Identifier" />
+<meta content="en-us" name="DC.Language" />
+<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
+<title>Creating Web services with the Apache Axis2 runtime environments</title>
+</head>
+<body id="axisoverview"><a name="axisoverview"><!-- --></a>
+
+
+<h1 class="topictitle1">Creating Web services with the Apache Axis2 runtime environments</h1>
+
+
+
+<div><p>This runtime environment is for users who prefer to develop for
+the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web
+services tools.</p>
+
+<div class="section"><h4 class="sectiontitle">Apache Axis2 Overview</h4><p>Axis2 evolved from the Apache
+Axis1.x architecture and is more flexible, configurable, and efficient, while
+retaining the positive aspects of Apache Axis1.x architecture.</p>
+<div class="p">The Web
+service tools provided with this product support the following specifications
+when creating Apache Axis2 Web services and clients:<ul>
+<li>SOAP 1.1 and 1.2</li>
+
+<li>WSDL 1.1, including both SOAP and HTTP bindings </li>
+
+<li>HTTP transports</li>
+
+</ul>
+The levels of Axis2 currently supported by the tools is 1.2 and 1.3.
+Axis2 can be deployed to any server that supports Javaâ„¢ Servlet 2.2 specification or higher,
+including IBM<sup>®</sup> WebSphere<sup>®</sup> Application
+Server 6.1, and Apache Tomcat server. For more information on Axis2, refer
+to <a href="http://ws.apache.org/axis2/" target="_blank">http://ws.apache.org/axis2</a>. </div>
+<p>The
+support for Apache Axis2 is limited to validation that the application is
+invoking the Axis2 emitters correctly. Support for other Axis2 issues should
+be directed to <a href="http://ws.apache.org/axis2/" target="_blank">http://ws.apache.org/axis2</a></p>
+</div>
+
+<div class="section"><h4 class="sectiontitle">Installing the Apache Axis2 runtime</h4><div class="p">Unlike creating
+Web services in the Apache Axis1.x runtime, before creating a Web service
+using Apache Axis2 you must download the Axis2 runtime and install it the
+workbench using the Web services Axis2 preferences page.<ol>
+<li>Download Apache Axis2 v1.2 or v1.3 from the following site: <a href="http://ws.apache.org/axis2/download.cgi" target="_blank">http://ws.apache.org/axis2/download.cgi</a>.</li>
+
+<li>Follow the instructions in the appropriate Apache Axis2 installation guide: <ul>
+<li>Apache Axis2 v1.2<a href="http://ws.apache.org/axis2/1_2/installationguide.html" target="_blank">http://ws.apache.org/axis2/1_2/installationguide.html</a></li>
+
+<li>Apache Axis2 v1.3<a href="http://ws.apache.org/axis2/1_3/installationguide.html" target="_blank">http://ws.apache.org/axis2/1_3/installationguide.html</a></li>
+
+</ul>
+</li>
+
+<li>Once the Apache Axis2 runtime is installed, you need to associate it with
+the workbench. In the workbench, open <span class="menucascade"><span class="uicontrol">Window</span>
+ &gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Web services</span> &gt; <span class="uicontrol">Axis2
+Preferences</span></span>. On the <span class="uicontrol">Axis2 Runtime</span> tab,
+browse to the location where you installed Apache Axis2. A message will display
+if the runtime is installed successfully.</li>
+
+</ol>
+</div>
+</div>
+
+<div class="section"><h4 class="sectiontitle">Creating projects for Axis2 Web services</h4><div class="p">The Web
+service wizards will automatically add the correct facets to a dynamic Web
+project. However if you want to manually create a dynamic Web project enabled
+for Axis2 Web service development complete the following:<ol>
+<li>Create the service Web project by clicking <span class="uicontrol">File &gt; New &gt; Project
+&gt; Dynamic Web project</span>. Enter the following information: <ol type="a">
+<li>Project Name: Type a project name</li>
+
+<li>If you are deploying to a Tomcat server, ensure that <span class="uicontrol">Add project
+to an EAR</span> is not selected. If you do not clear this checkbox you
+will be unable to select the Tomcat server. If you are deploying to WebSphere Application
+server you will need to add the project to an EAR.</li>
+
+<li>Target runtime: Select the version of the server to which you will deploy
+your Web service. If it is not listed, click <span class="uicontrol">New</span> and
+browse to the location where it is installed.</li>
+
+<li>Configurations: Select the default configuration for your server type.</li>
+
+<li>Click <span class="uicontrol">Finish</span>.</li>
+
+</ol>
+</li>
+
+<li>Add the Axis2 facet. Right-click your project and click <span class="menucascade">
+<span class="uicontrol">Properties</span> &gt; <span class="uicontrol">Project Facets</span> &gt; <span class="uicontrol">Modify
+project</span> &gt; <span class="uicontrol">Axis2 Web Services</span></span>,
+and click <span class="uicontrol">Finish</span>.</li>
+
+<li>If you have chosen to deploy to a server in which the Axis2 JAR files
+will reside on the server (such as WebSphere Application Server), you must
+change the classloading for the EAR from PARENT_FIRST to PARENT_LAST. Expand
+the EAR associated with your Axis2 project, and launch its deployment descriptor.
+On the <span class="uicontrol">Deployment</span> tab, expand the <span class="uicontrol">Application</span> section.
+Change the <span class="uicontrol">Classloader mode</span> field to PARENT_LAST and
+save your changes.</li>
+
+</ol>
+</div>
+</div>
+
+</div>
+
+<div>
+<ul class="ullinks">
+<li class="ulchildlink"><strong><a href="../topics/taxis2bu.html">Creating a Web service from a Java bean using the Apache Axis2 runtime environment</a></strong><br />
+The Web Service wizard assists you in creating a new Web service, configuring it for deployment, and deploying the Web service to a server. Once your Web service is deployed, the wizard assists you in generating the client proxy and sample application to test the Web service. When you have completed testing, you can publish your Web service to a UDDI Business Registry using the Export wizard.</li>
+<li class="ulchildlink"><strong><a href="../topics/taxis2td.html">Creating a Java bean skeleton from a WSDL document using the Apache Axis2 runtime environment</a></strong><br />
+The Web service wizard assists you in creating a skeleton bean from an existing WSDL document. The skeleton bean contains a set of methods that correspond to the operations described in the WSDL document. When the bean is created, each method has a trivial implementation that you replace by editing the bean.</li>
+<li class="ulchildlink"><strong><a href="../topics/taxis2client.html">Generating a Java client proxy and a sample application from a WSDL document using the Axis2 runtime environment</a></strong><br />
+The Web Service Client wizard assists you in generating a Java bean proxy and a sample application. The sample Web application demonstrates how to code a proxy file.</li>
+</ul>
+
+<div class="linklist"><strong>Related Concepts</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cws.html">Web services</a></div>
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html">Tools for Web services development</a></div>
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cjaxrpc.html">JAX-RPC</a></div></div>
+
+<div class="linklist"><strong>Related Tasks</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.html"> Developing Web services</a></div></div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.dita b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.dita
new file mode 100644
index 000000000..1361f2bf7
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.dita
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Arbortext, Inc., 1988-2006, v.4002-->
+<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
+ "../../dtd/task.dtd">
+<task id="twsbeana" xml:lang="en-us">
+<title>Creating a Web service from a <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> bean using the Apache Axis2 runtime
+environment</title>
+<titlealts>
+<searchtitle>Creating a Web service from a Java bean using the Apache Axis2
+runtime environment</searchtitle>
+</titlealts>
+<shortdesc>The Web Service wizard assists you in creating a new Web service,
+configuring it for deployment, and deploying the Web service to a server.
+Once your Web service is deployed, the wizard assists you in generating the
+client proxy and sample application to test the Web service. When you have
+completed testing, you can publish your Web service to a UDDI Business Registry
+using the Export wizard.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm>Axis2 runtime environment<indexterm>Web services<indexterm>Java
+beans</indexterm></indexterm></indexterm><indexterm>Web services<indexterm>Axis2
+runtime environment<indexterm>creating a Web service</indexterm></indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<taskbody>
+<prereq><p>Prerequisites:<ol>
+<li id="installaxis2link">You must have installed the Apache Axis2 runtime
+environment as described in: <xref href="caxis2tover.dita" scope="local"></xref></li>
+<li id="createtomcatlink">If you are using the Apache Jakarta Tomcat servlet
+container as your server, you must install it, configure an instance of it,
+and create a Web project targeted to it as described in: <xref href="../../org.eclipse.jst.ws.axis.ui.doc.user/topics/ttomcatserv.dita"
+scope="peer">Creating an Apache Tomcat server and Web project</xref></li>
+<li>Create or import a bean into the <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> source folder of the Web project. To
+import, select the <b><tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> Resources: src</b> folder, and from
+the file menu select <menucascade><uicontrol>Import</uicontrol><uicontrol>General</uicontrol>
+<uicontrol>File System</uicontrol></menucascade> and browse to where your
+package is.</li>
+</ol></p></prereq>
+<context>To create a Web service from a bean using the Apache Axis2 runtime
+environment:</context>
+<steps>
+<step><cmd>Switch to the Java EE perspective (<uicontrol>Window > Open Perspective
+> Java EE</uicontrol>).</cmd></step>
+<step><cmd>In the Project Explorer view, select the bean that you created
+or imported into the source folder of your Web project.</cmd></step>
+<step><cmd>Click <uicontrol>File > New > Other</uicontrol>.</cmd><info>Select<uicontrol>Web
+Services</uicontrol> in order to display the various Web service wizards.
+Select the <uicontrol>Web Service</uicontrol> wizard. Click <uicontrol>Next</uicontrol>.</info>
+</step>
+<step><cmd>Web Services page: select <uicontrol>Bottom up Java bean Web service</uicontrol> as
+your Web service type, and select the <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> bean from which the service will be
+created.</cmd>
+<substeps id="createstep4ul">
+<substep><cmd>Select the stages of Web services development that you want
+to complete using the slider:</cmd><info><ul>
+<li>Develop: this will develop the WSDL definition and implementation of the
+Web service. This includes such tasks as creating the modules which will contain
+the generated code, WSDL files, deployment descriptors, and <tm tmclass="special"
+tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> files
+when appropriate.</li>
+<li>Assemble: this ensures the project that will host the Web service or client
+gets associated to an EAR when required by the target application server.</li>
+<li>Deploy: this will create the deployment code for the service.</li>
+<li>Install: this will install and configure the Web module and EARs on the
+target server.</li>
+<li>Start: this will start the server once the service has been installed
+on it. The server-config.wsdd file will be generated.</li>
+<li>Test: this will provide various options for testing the service, such
+as using the Web Service Explorer or sample JSPs.</li>
+</ul></info></substep>
+<substep><cmd>Select your server: the default server is displayed. If you
+want to deploy your service to a different server click the link to specify
+a different server.</cmd></substep>
+<substep><cmd>Select your runtime: ensure the Apache Axis2 runtime is selected.</cmd>
+</substep>
+<substep><cmd>Select the service project: the project selected in your workspace
+is displayed. To select a different project click on the project link. If
+you are deploying to <tm tmclass="ibm" tmowner="IBM Corporation" tmtype="reg"
+trademark="WebSphere">WebSphere</tm> Application Server you will also be asked
+to select the EAR associated with the project.</cmd><info>Ensure that the
+project selected as the Client Web Project is different from the Service Web
+Project, or the service will be overwritten by the client's generated artifacts.</info>
+</substep>
+<substep><cmd>If you want to create a client, select the type of proxy to
+be generated and repeat the above steps for the client.</cmd></substep>
+<substep><cmd>Publish the Web service: this will launch the Web Services Explorer
+to publish your Web service to a UDDI registry.</cmd></substep>
+<substep><cmd>Monitor the Web service: this will send the Web service traffic
+through the TCP/IP Monitor, which allows you to watch the SOAP traffic generated
+by the Web service and to test this traffic for WS-I compliance. Alternately
+you can manually set up a TCP/IP monitor as described in <xref href="../../org.eclipse.wst.wsi.ui.doc.user/tasks/tmonitor.dita"
+scope="peer">Using the TCP/IP Monitor to test Web services</xref></cmd></substep>
+</substeps>
+</step>
+<step><cmd>Axis2 Web Service <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> Bean Configuration page: If you have
+a custom services.xml file you can point to it on this page, or you can have
+the wizard create a default services.xml file for you.</cmd></step>
+<step><cmd>Web Service Test page: If you selected to test the Web service,
+select the test facility for the generated Web service.</cmd><info>This will
+open the Web service in the Web Services Explorer. Select the operation you
+want to test, enter the required information, and click<uicontrol>Go</uicontrol>.
+The result will display in the Status pane. Click <uicontrol>Next</uicontrol>.</info>
+</step>
+<step id="axis2clientpagelink"><cmd>Axis2 Client Web service configuration
+page: Use this page to select the following options: </cmd>
+<substeps>
+<substep><cmd>Service Name: accept the default.</cmd></substep>
+<substep><cmd>Port Name: accept the default.</cmd></substep>
+<substep><cmd>Databinding Name: only the Axis2 Databinding Framework (ADB)
+is supported at this time.</cmd></substep>
+<substep><cmd>Custom package name: You can change the package name in this
+field.</cmd></substep>
+<substep><cmd>Client mode: You can choose if the client is synchronous, asynchronous,
+or both.</cmd></substep>
+<substep><cmd>Generate test case to test the service: If you select this,
+the Axis2 emitter will generate JUnit testcases matching the WSDL provided
+to the client. These JUnit testcases will be generated to a newly added source
+directory to the client project called <uicontrol>test</uicontrol>. </cmd>
+</substep>
+<substep><cmd>Generate all types for all elements referred by schemas</cmd>
+</substep>
+<substep><cmd>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Web Service Client Test page: Use this page to select the following
+options: </cmd>
+<substeps>
+<substep><cmd>Select your test facility. You can test the generated proxy
+in the Web Service Explorer, or the Universal Test Client.</cmd></substep>
+<substep><cmd>Select <uicontrol>Run test on server</uicontrol> to start the
+server for you automatically.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Web Service Publication page: Select whether or not you want to
+publish this Web service to a UDDI registry. Click <uicontrol>Finish</uicontrol>.</cmd>
+</step>
+</steps>
+<result id="axiswscreateresult"><p>After the Web service has been created,
+the following may occur depending on the options you selected: <ul>
+<li>If you have selected to test the Web service using the Web Services Explorer,
+the Explorer will open. Select the operation you want to test, enter the required
+information, and click <b>Go</b>. The result will display in the Status pane.</li>
+<li>If you have selected to publish the Web service, the Web Services Explorer
+is launched displaying the page required to publish your Web service. Follow
+the instructions in <varname>Publishing the Web service</varname> to complete
+this task.</li>
+</ul></p></result>
+<postreq><p> <uicontrol>Important:</uicontrol> If your methods contain types,
+not supported by the sample, such as arrays, indexed properties, and collections,
+the methods will be omitted from the sample and you will receive a warning
+message.</p></postreq>
+</taskbody>
+<related-links>
+<linklist><title>Related Concepts</title>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.dita" scope="peer">
+<linktext> Tools for Web services development</linktext></link>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cws.dita" scope="peer">
+<linktext>Web services development</linktext></link>
+</linklist>
+<linklist><title>Related Tasks</title>
+<link href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.dita" scope="peer">
+<linktext> Developing Web services</linktext></link>
+<link href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.dita"
+scope="peer"><linktext> Using the Web Services Explorer</linktext></link>
+</linklist>
+</related-links>
+</task>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.html b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.html
new file mode 100644
index 000000000..a0f8c7b26
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2bu.html
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang="en-us" xml:lang="en-us">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
+<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
+<meta content="public" name="security" />
+<meta content="index,follow" name="Robots" />
+<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
+<meta content="task" name="DC.Type" />
+<meta name="DC.Title" content="Creating a Web service from a Java bean using the Apache Axis2 runtime environment" />
+<meta name="abstract" content="The Web Service wizard assists you in creating a new Web service, configuring it for deployment, and deploying the Web service to a server. Once your Web service is deployed, the wizard assists you in generating the client proxy and sample application to test the Web service. When you have completed testing, you can publish your Web service to a UDDI Business Registry using the Export wizard." />
+<meta name="description" content="The Web Service wizard assists you in creating a new Web service, configuring it for deployment, and deploying the Web service to a server. Once your Web service is deployed, the wizard assists you in generating the client proxy and sample application to test the Web service. When you have completed testing, you can publish your Web service to a UDDI Business Registry using the Export wizard." />
+<meta content="Axis2 runtime environment, Web services, Java beans, Axis2 runtime environment, creating a Web service" name="DC.subject" />
+<meta content="Axis2 runtime environment, Web services, Java beans, Axis2 runtime environment, creating a Web service" name="keywords" />
+<meta scheme="URI" name="DC.Relation" content="../topics/caxis2tover.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cws.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/tasks/toverws.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html" />
+<meta content="XHTML" name="DC.Format" />
+<meta content="twsbeana" name="DC.Identifier" />
+<meta content="en-us" name="DC.Language" />
+<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
+<title>Creating a Web service from a Java bean using the Apache Axis2
+runtime environment</title>
+</head>
+<body id="twsbeana"><a name="twsbeana"><!-- --></a>
+
+
+<h1 class="topictitle1">Creating a Web service from a Java bean using the Apache Axis2 runtime
+environment</h1>
+
+
+
+
+<div><p>The Web Service wizard assists you in creating a new Web service,
+configuring it for deployment, and deploying the Web service to a server.
+Once your Web service is deployed, the wizard assists you in generating the
+client proxy and sample application to test the Web service. When you have
+completed testing, you can publish your Web service to a UDDI Business Registry
+using the Export wizard.</p>
+
+<div class="p"><div class="p">Prerequisites:<ol>
+<li id="twsbeana__installaxis2link"><a name="twsbeana__installaxis2link"><!-- --></a>You must have installed the Apache Axis2 runtime
+environment as described in: <a href="caxis2tover.html" title="This runtime environment is for users who prefer to develop for&#10;the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web&#10;services tools.">Creating Web services with the Apache Axis2 runtime environments</a></li>
+
+<li id="twsbeana__createtomcatlink"><a name="twsbeana__createtomcatlink"><!-- --></a>If you are using the Apache Jakarta Tomcat servlet
+container as your server, you must install it, configure an instance of it,
+and create a Web project targeted to it as described in: <a href="../../org.eclipse.jst.ws.axis.ui.doc.user/topics/ttomcatserv.html">Creating an Apache Tomcat server and Web project</a></li>
+
+<li>Create or import a bean into the Javaâ„¢ source folder of the Web project. To
+import, select the <strong>Java Resources: src</strong> folder, and from
+the file menu select <span class="menucascade"><span class="uicontrol">Import</span> &gt; <span class="uicontrol">General</span>
+ &gt; <span class="uicontrol">File System</span></span> and browse to where your
+package is.</li>
+
+</ol>
+</div>
+</div>
+
+<div class="section">To create a Web service from a bean using the Apache Axis2 runtime
+environment:</div>
+
+<ol>
+<li class="stepexpand"><span>Switch to the Java EE perspective (<span class="uicontrol">Window &gt; Open Perspective
+&gt; Java EE</span>).</span></li>
+
+<li class="stepexpand"><span>In the Project Explorer view, select the bean that you created
+or imported into the source folder of your Web project.</span></li>
+
+<li class="stepexpand"><span>Click <span class="uicontrol">File &gt; New &gt; Other</span>.</span> Select<span class="uicontrol">Web
+Services</span> in order to display the various Web service wizards.
+Select the <span class="uicontrol">Web Service</span> wizard. Click <span class="uicontrol">Next</span>.
+</li>
+
+<li class="stepexpand"><span>Web Services page: select <span class="uicontrol">Bottom up Java bean Web service</span> as
+your Web service type, and select the Java bean from which the service will be
+created.</span>
+<a name="twsbeana__createstep4ul"><!-- --></a><ol type="a" id="twsbeana__createstep4ul">
+<li class="substepexpand"><span>Select the stages of Web services development that you want
+to complete using the slider:</span> <ul>
+<li>Develop: this will develop the WSDL definition and implementation of the
+Web service. This includes such tasks as creating the modules which will contain
+the generated code, WSDL files, deployment descriptors, and Java files
+when appropriate.</li>
+
+<li>Assemble: this ensures the project that will host the Web service or client
+gets associated to an EAR when required by the target application server.</li>
+
+<li>Deploy: this will create the deployment code for the service.</li>
+
+<li>Install: this will install and configure the Web module and EARs on the
+target server.</li>
+
+<li>Start: this will start the server once the service has been installed
+on it. The server-config.wsdd file will be generated.</li>
+
+<li>Test: this will provide various options for testing the service, such
+as using the Web Service Explorer or sample JSPs.</li>
+
+</ul>
+</li>
+
+<li class="substepexpand"><span>Select your server: the default server is displayed. If you
+want to deploy your service to a different server click the link to specify
+a different server.</span></li>
+
+<li class="substepexpand"><span>Select your runtime: ensure the Apache Axis2 runtime is selected.</span>
+</li>
+
+<li class="substepexpand"><span>Select the service project: the project selected in your workspace
+is displayed. To select a different project click on the project link. If
+you are deploying to WebSphere<sup>®</sup> Application Server you will also be asked
+to select the EAR associated with the project.</span> Ensure that the
+project selected as the Client Web Project is different from the Service Web
+Project, or the service will be overwritten by the client's generated artifacts.
+</li>
+
+<li class="substepexpand"><span>If you want to create a client, select the type of proxy to
+be generated and repeat the above steps for the client.</span></li>
+
+<li class="substepexpand"><span>Publish the Web service: this will launch the Web Services Explorer
+to publish your Web service to a UDDI registry.</span></li>
+
+<li class="substepexpand"><span>Monitor the Web service: this will send the Web service traffic
+through the TCP/IP Monitor, which allows you to watch the SOAP traffic generated
+by the Web service and to test this traffic for WS-I compliance. Alternately
+you can manually set up a TCP/IP monitor as described in <a href="../../org.eclipse.wst.wsi.ui.doc.user/tasks/tmonitor.html">Using the TCP/IP Monitor to test Web services</a></span></li>
+
+</ol>
+
+</li>
+
+<li class="stepexpand"><span>Axis2 Web Service Java Bean Configuration page: If you have
+a custom services.xml file you can point to it on this page, or you can have
+the wizard create a default services.xml file for you.</span></li>
+
+<li class="stepexpand"><span>Web Service Test page: If you selected to test the Web service,
+select the test facility for the generated Web service.</span> This will
+open the Web service in the Web Services Explorer. Select the operation you
+want to test, enter the required information, and click<span class="uicontrol">Go</span>.
+The result will display in the Status pane. Click <span class="uicontrol">Next</span>.
+</li>
+
+<li class="stepexpand" id="twsbeana__axis2clientpagelink"><a name="twsbeana__axis2clientpagelink"><!-- --></a><span>Axis2 Client Web service configuration
+page: Use this page to select the following options: </span>
+<ol type="a">
+<li><span>Service Name: accept the default.</span></li>
+
+<li><span>Port Name: accept the default.</span></li>
+
+<li><span>Databinding Name: only the Axis2 Databinding Framework (ADB)
+is supported at this time.</span></li>
+
+<li><span>Custom package name: You can change the package name in this
+field.</span></li>
+
+<li><span>Client mode: You can choose if the client is synchronous, asynchronous,
+or both.</span></li>
+
+<li><span>Generate test case to test the service: If you select this,
+the Axis2 emitter will generate JUnit testcases matching the WSDL provided
+to the client. These JUnit testcases will be generated to a newly added source
+directory to the client project called <span class="uicontrol">test</span>. </span>
+</li>
+
+<li><span>Generate all types for all elements referred by schemas</span>
+</li>
+
+<li><span>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</span></li>
+
+</ol>
+
+</li>
+
+<li class="stepexpand"><span>Web Service Client Test page: Use this page to select the following
+options: </span>
+<ol type="a">
+<li><span>Select your test facility. You can test the generated proxy
+in the Web Service Explorer, or the Universal Test Client.</span></li>
+
+<li><span>Select <span class="uicontrol">Run test on server</span> to start the
+server for you automatically.</span></li>
+
+</ol>
+
+</li>
+
+<li class="stepexpand"><span>Web Service Publication page: Select whether or not you want to
+publish this Web service to a UDDI registry. Click <span class="uicontrol">Finish</span>.</span>
+</li>
+
+</ol>
+
+<div class="section" id="twsbeana__axiswscreateresult"><a name="twsbeana__axiswscreateresult"><!-- --></a><div class="p">After the Web service has been created,
+the following may occur depending on the options you selected: <ul>
+<li>If you have selected to test the Web service using the Web Services Explorer,
+the Explorer will open. Select the operation you want to test, enter the required
+information, and click <strong>Go</strong>. The result will display in the Status pane.</li>
+
+<li>If you have selected to publish the Web service, the Web Services Explorer
+is launched displaying the page required to publish your Web service. Follow
+the instructions in <var class="varname">Publishing the Web service</var> to complete
+this task.</li>
+
+</ul>
+</div>
+</div>
+
+<div class="section"><p> <span class="uicontrol">Important:</span> If your methods contain types,
+not supported by the sample, such as arrays, indexed properties, and collections,
+the methods will be omitted from the sample and you will receive a warning
+message.</p>
+</div>
+
+</div>
+
+<div>
+<div class="familylinks">
+<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/caxis2tover.html" title="This runtime environment is for users who prefer to develop for the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web services tools.">Creating Web services with the Apache Axis2 runtime environments</a></div>
+</div>
+
+<div class="linklist"><strong>Related Concepts</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html"> Tools for Web services development</a></div>
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cws.html">Web services development</a></div></div>
+
+<div class="linklist"><strong>Related Tasks</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.html"> Developing Web services</a></div>
+<div><a href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html"> Using the Web Services Explorer</a></div></div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.dita b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.dita
new file mode 100644
index 000000000..fd84b2ce7
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.dita
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Arbortext, Inc., 1988-2006, v.4002-->
+<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
+ "task.dtd">
+<task id="tsampappa" xml:lang="en-us">
+<title>Generating a <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> client proxy and a sample application
+from a WSDL document using the Axis2 runtime environment</title>
+<titlealts>
+<searchtitle>Generating an Apache Axis2 Java client proxy from a WSDL document</searchtitle>
+</titlealts>
+<shortdesc>The Web Service Client wizard assists you in generating a <tm tmclass="special"
+tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> bean
+proxy and a sample application. The sample Web application demonstrates how
+to code a proxy file.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm keyref="taxis2client|1|Axis2runtimeenvironmentWebserviceclients"
+status="unchanged">Axis2 runtime environment<indexterm>Web services<indexterm>clients</indexterm></indexterm></indexterm>
+<indexterm keyref="taxis2client|2|WebservicesAxis2runtimeenvironmentWebserviceclients"
+status="unchanged">Web services<indexterm>Axis2 runtime environment<indexterm>Web
+service clients</indexterm></indexterm></indexterm></keywords>
+</metadata></prolog>
+<taskbody>
+<prereq><p>Prerequisites:</p><ol>
+<li conref="taxis2bu.dita#twsbeana/installaxis2link"></li>
+<li conref="taxis2bu.dita#twsbeana/createtomcatlink"></li>
+<li>Discover and import a WSDL document into the Web project. You can only
+use a WSDL file that contains a service element.</li>
+</ol></prereq>
+<context>To generate a <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> client proxy and a sample application
+from a discovered WSDL document:</context>
+<steps>
+<step><cmd>Switch to the Java EE perspective (<uicontrol>Window > Open Perspective
+> Java EE</uicontrol>).</cmd></step>
+<step><cmd>In the Navigator view, select the Web project in which you want
+to generate a sample application.</cmd></step>
+<step><cmd>Click <uicontrol>File > New > Other</uicontrol>. Select <uicontrol>Web
+Services</uicontrol> in order to display the various Web service wizards.
+Select the <uicontrol>Web Service Client</uicontrol> wizard. Click <uicontrol>Next</uicontrol>.</cmd>
+</step>
+<step><cmd>Web Services page: </cmd>
+<substeps>
+<substep><cmd>Enter the URI to the WSDL, WSIL, or HTML file that will be used
+to generate the client.</cmd></substep>
+<substep><cmd>Select the type of proxy to be generated</cmd></substep>
+<substep><cmd>Select the stages of Web services development that you want
+to complete using the slider:</cmd><info><ul>
+<li>Develop: this will develop the WSDL definition and implementation of the
+Web service. This includes such tasks as creating the modules which will contain
+the generated code and <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> files, as well as copying the Axis
+JARs..</li>
+<li>Assemble: this ensures the project that will host the Web service or client
+gets associated to an EAR when required by the target application server.</li>
+<li>Deploy: this will create the deployment code for the service.</li>
+<li>Install: this will install and configure the Web module and EARs on the
+target server.</li>
+<li>Start: this will start the server once the service has been installed
+on it. The server-config.wsdd file will be generated.</li>
+<li>Test: this will provide various options for testing the service, such
+as using the Web Service Explorer or sample JSPs.</li>
+</ul></info></substep>
+<substep><cmd>Select your server: the default server is displayed. If you
+want to deploy your client to a different server click the link to specify
+a different server.</cmd></substep>
+<substep><cmd>Select your runtime: ensure the Apache Axis2 runtime is selected.</cmd>
+</substep>
+<substep><cmd>Select the client project: the project containing the project
+selected in your workspace is displayed. To select a different project and
+EAR click on the project link.</cmd><info>Ensure that the project selected
+as the Client Web Project is different from the Service Web Project, or the
+service will be overwritten by the client's generated artifacts.</info></substep>
+<substep><cmd>Monitor the Web service: this will send the Web service traffic
+through the TCP/IP Monitor, which allows you to watch the SOAP traffic generated
+by the Web service and to test this traffic for WS-I compliance. Alternately
+you can manually set up a TCP/IP monitor as described in <xref href="../../org.eclipse.wst.wsi.ui.doc.user/tasks/tmonitor.dita"
+scope="peer">Using the TCP/IP Monitor to test Web services</xref></cmd></substep>
+</substeps>
+</step>
+<step conref="taxis2bu.dita#twsbeana/axis2clientpagelink"><cmd>Axis2 Client
+Web service configuration page: Use this page to select the following options: </cmd>
+<substeps>
+<substep><cmd>Service Name: </cmd></substep>
+<substep><cmd>Port Name: </cmd></substep>
+<substep><cmd>Databinding Name: Only the Axis2 Databinding Framework (ADB)
+is supported at this time.</cmd></substep>
+<substep><cmd>Custom package name: You can change the package name in this
+field.</cmd></substep>
+<substep><cmd>Client mode: You can choose if the client is synchronous, asynchronous,
+or both.</cmd></substep>
+<substep><cmd>Generate test case to test the service: If you select this,
+the Axis2 emitter will generate JUnit testcases matching the WSDL provided
+to the client. These JUnit testcases will be generated to a newly added source
+directory to the client project called <uicontrol>test</uicontrol>. </cmd>
+</substep>
+<substep><cmd>Generate all types for all elements referred by schemas:</cmd>
+</substep>
+<substep><cmd>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Web Service Client Test page: Use this page to select the following
+options: </cmd>
+<substeps>
+<substep><cmd>Select your test facility. You can test the generated proxy
+in the Web Service Explorer, or the Universal Test Client.</cmd></substep>
+<substep><cmd>Select <uicontrol>Run test on server</uicontrol> to start the
+server for you automatically.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Click <uicontrol>Finish</uicontrol>. If you have selected to test
+the proxy, the test client will open in a browser window.</cmd></step>
+</steps>
+<result><p>The generated <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> bean proxy provides a remote procedure
+call interface to the Web service. The sample Web application demonstrates
+how to code the proxy file.</p><p>Once you have generated your <tm tmclass="special"
+tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> client
+proxy, you may test the methods of the Web service through the proxy using
+Web Services sample JSPs or the Universal test client.</p><ul outputclass="wsclienttestoptions">
+<li>If you have selected to test the generated proxy using Web service JSPs,
+the proxy is launched in a Web browser at the following URL: <codeph>http://localhost: <varname>port</varname>/ <varname>WebProject</varname>Client/sample<i
+>BeanName</i>/ <varname>WebServiceName</varname>/TestClient.jsp</codeph> You
+can use this sample application to test the Web service by selecting a method,
+entering a value for the method, and clicking <uicontrol>Invoke</uicontrol>.
+The result of the method will display in the results pane.</li>
+<li>If you have selected to test the Web service using the Web Services Explorer,
+the Explorer will open. Select the operation you want to test, enter the required
+information, and click <b>Go</b>. The result will display in the Status pane.</li>
+</ul><p>For more information on creating a Web project, refer to the Web application
+development documentation.</p></result>
+</taskbody>
+<related-links>
+<linklist><title>Related Concepts</title>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.dita" scope="peer">
+<linktext> Tools for Web services development</linktext></link>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cws.dita" scope="peer">
+<linktext>Web services development</linktext></link>
+</linklist>
+<linklist><title>Related Tasks</title>
+<link href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.dita"
+scope="peer"><linktext> Using the Web Services Explorer</linktext></link>
+</linklist>
+</related-links>
+</task>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.html b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.html
new file mode 100644
index 000000000..a48864492
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2client.html
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang="en-us" xml:lang="en-us">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
+<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
+<meta content="public" name="security" />
+<meta content="index,follow" name="Robots" />
+<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
+<meta content="task" name="DC.Type" />
+<meta name="DC.Title" content="Generating a Java client proxy and a sample application from a WSDL document using the Axis2 runtime environment" />
+<meta name="abstract" content="The Web Service Client wizard assists you in generating a Java bean proxy and a sample application. The sample Web application demonstrates how to code a proxy file." />
+<meta name="description" content="The Web Service Client wizard assists you in generating a Java bean proxy and a sample application. The sample Web application demonstrates how to code a proxy file." />
+<meta content="Axis2 runtime environment, Web services, clients, Web service clients" name="DC.subject" />
+<meta content="Axis2 runtime environment, Web services, clients, Web service clients" name="keywords" />
+<meta scheme="URI" name="DC.Relation" content="../topics/caxis2tover.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cws.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html" />
+<meta content="XHTML" name="DC.Format" />
+<meta content="tsampappa" name="DC.Identifier" />
+<meta content="en-us" name="DC.Language" />
+<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
+<title>Generating an Apache Axis2 Java client proxy from a WSDL document</title>
+</head>
+<body id="tsampappa"><a name="tsampappa"><!-- --></a>
+
+
+<h1 class="topictitle1">Generating a Java client proxy and a sample application
+from a WSDL document using the Axis2 runtime environment</h1>
+
+
+
+
+<div><p>The Web Service Client wizard assists you in generating a Javaâ„¢ bean
+proxy and a sample application. The sample Web application demonstrates how
+to code a proxy file.</p>
+
+<div class="p"><p>Prerequisites:</p>
+<ol>
+<li>You must have installed the Apache Axis2 runtime
+environment as described in: <a href="caxis2tover.html" title="This runtime environment is for users who prefer to develop for&#10;the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web&#10;services tools.">Creating Web services with the Apache Axis2 runtime environments</a></li>
+
+<li>If you are using the Apache Jakarta Tomcat servlet
+container as your server, you must install it, configure an instance of it,
+and create a Web project targeted to it as described in: <a href="../../org.eclipse.jst.ws.axis.ui.doc.user/topics/ttomcatserv.html">Creating an Apache Tomcat server and Web project</a></li>
+
+<li>Discover and import a WSDL document into the Web project. You can only
+use a WSDL file that contains a service element.</li>
+
+</ol>
+</div>
+
+<div class="section">To generate a Java client proxy and a sample application
+from a discovered WSDL document:</div>
+
+<ol>
+<li><span>Switch to the Java EE perspective (<span class="uicontrol">Window &gt; Open Perspective
+&gt; Java EE</span>).</span></li>
+
+<li><span>In the Navigator view, select the Web project in which you want
+to generate a sample application.</span></li>
+
+<li><span>Click <span class="uicontrol">File &gt; New &gt; Other</span>. Select <span class="uicontrol">Web
+Services</span> in order to display the various Web service wizards.
+Select the <span class="uicontrol">Web Service Client</span> wizard. Click <span class="uicontrol">Next</span>.</span>
+</li>
+
+<li><span>Web Services page: </span>
+<ol type="a">
+<li class="substepexpand"><span>Enter the URI to the WSDL, WSIL, or HTML file that will be used
+to generate the client.</span></li>
+
+<li class="substepexpand"><span>Select the type of proxy to be generated</span></li>
+
+<li class="substepexpand"><span>Select the stages of Web services development that you want
+to complete using the slider:</span> <ul>
+<li>Develop: this will develop the WSDL definition and implementation of the
+Web service. This includes such tasks as creating the modules which will contain
+the generated code and Java files, as well as copying the Axis
+JARs..</li>
+
+<li>Assemble: this ensures the project that will host the Web service or client
+gets associated to an EAR when required by the target application server.</li>
+
+<li>Deploy: this will create the deployment code for the service.</li>
+
+<li>Install: this will install and configure the Web module and EARs on the
+target server.</li>
+
+<li>Start: this will start the server once the service has been installed
+on it. The server-config.wsdd file will be generated.</li>
+
+<li>Test: this will provide various options for testing the service, such
+as using the Web Service Explorer or sample JSPs.</li>
+
+</ul>
+</li>
+
+<li class="substepexpand"><span>Select your server: the default server is displayed. If you
+want to deploy your client to a different server click the link to specify
+a different server.</span></li>
+
+<li class="substepexpand"><span>Select your runtime: ensure the Apache Axis2 runtime is selected.</span>
+</li>
+
+<li class="substepexpand"><span>Select the client project: the project containing the project
+selected in your workspace is displayed. To select a different project and
+EAR click on the project link.</span> Ensure that the project selected
+as the Client Web Project is different from the Service Web Project, or the
+service will be overwritten by the client's generated artifacts.</li>
+
+<li class="substepexpand"><span>Monitor the Web service: this will send the Web service traffic
+through the TCP/IP Monitor, which allows you to watch the SOAP traffic generated
+by the Web service and to test this traffic for WS-I compliance. Alternately
+you can manually set up a TCP/IP monitor as described in <a href="../../org.eclipse.wst.wsi.ui.doc.user/tasks/tmonitor.html">Using the TCP/IP Monitor to test Web services</a></span></li>
+
+</ol>
+
+</li>
+
+<li><span>Axis2 Client Web service configuration
+page: Use this page to select the following options: </span>
+<ol type="a">
+<li><span>Service Name: accept the default.</span></li>
+
+<li><span>Port Name: accept the default.</span></li>
+
+<li><span>Databinding Name: only the Axis2 Databinding Framework (ADB)
+is supported at this time.</span></li>
+
+<li><span>Custom package name: You can change the package name in this
+field.</span></li>
+
+<li><span>Client mode: You can choose if the client is synchronous, asynchronous,
+or both.</span></li>
+
+<li><span>Generate test case to test the service: If you select this,
+the Axis2 emitter will generate JUnit testcases matching the WSDL provided
+to the client. These JUnit testcases will be generated to a newly added source
+directory to the client project called <span class="uicontrol">test</span>. </span>
+</li>
+
+<li><span>Generate all types for all elements referred by schemas</span>
+</li>
+
+<li><span>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</span></li>
+
+</ol>
+
+</li>
+
+<li><span>Web Service Client Test page: Use this page to select the following
+options: </span>
+<ol type="a">
+<li><span>Select your test facility. You can test the generated proxy
+in the Web Service Explorer, or the Universal Test Client.</span></li>
+
+<li><span>Select <span class="uicontrol">Run test on server</span> to start the
+server for you automatically.</span></li>
+
+</ol>
+
+</li>
+
+<li><span>Click <span class="uicontrol">Finish</span>. If you have selected to test
+the proxy, the test client will open in a browser window.</span></li>
+
+</ol>
+
+<div class="section"><p>The generated Java bean proxy provides a remote procedure
+call interface to the Web service. The sample Web application demonstrates
+how to code the proxy file.</p>
+<p>Once you have generated your Java client
+proxy, you may test the methods of the Web service through the proxy using
+Web Services sample JSPs or the Universal test client.</p>
+<ul class="wsclienttestoptions">
+<li>If you have selected to test the generated proxy using Web service JSPs,
+the proxy is launched in a Web browser at the following URL: <samp class="codeph">http://localhost: <var class="varname">port</var>/ <var class="varname">WebProject</var>Client/sample<em>BeanName</em>/ <var class="varname">WebServiceName</var>/TestClient.jsp</samp> You
+can use this sample application to test the Web service by selecting a method,
+entering a value for the method, and clicking <span class="uicontrol">Invoke</span>.
+The result of the method will display in the results pane.</li>
+
+<li>If you have selected to test the Web service using the Web Services Explorer,
+the Explorer will open. Select the operation you want to test, enter the required
+information, and click <strong>Go</strong>. The result will display in the Status pane.</li>
+
+</ul>
+<p>For more information on creating a Web project, refer to the Web application
+development documentation.</p>
+</div>
+
+</div>
+
+<div>
+<div class="familylinks">
+<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/caxis2tover.html" title="This runtime environment is for users who prefer to develop for the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web services tools.">Creating Web services with the Apache Axis2 runtime environments</a></div>
+</div>
+
+<div class="linklist"><strong>Related Concepts</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html"> Tools for Web services development</a></div>
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cws.html">Web services development</a></div></div>
+
+<div class="linklist"><strong>Related Tasks</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html"> Using the Web Services Explorer</a></div></div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.dita b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.dita
new file mode 100644
index 000000000..d8157069d
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.dita
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Arbortext, Inc., 1988-2006, v.4002-->
+<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
+ "../../dtd/task.dtd">
+<task id="tsklwsdla" xml:lang="en-us">
+<title>Creating a <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
+trademark="Java">Java</tm> bean skeleton from a WSDL document using the Apache
+Axis2 runtime environment</title>
+<titlealts>
+<searchtitle>Creating a Java bean skeleton from a WSDL document using the
+Apache Axis2 runtime environment</searchtitle>
+</titlealts>
+<shortdesc>The Web service wizard assists you in creating a skeleton bean
+from an existing WSDL document. The skeleton bean contains a set of methods
+that correspond to the operations described in the WSDL document. When the
+bean is created, each method has a trivial implementation that you replace
+by editing the bean.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm keyref="taxis2td|1|Axis2runtimeenvironmentskeletonWebservices"
+status="unchanged">Axis2 runtime environment<indexterm>Web services<indexterm>skeleton</indexterm></indexterm></indexterm>
+<indexterm keyref="taxis2td|2|WebservicesAxis2runtimeenvironmentskeletonWebservices"
+status="unchanged">Web services<indexterm>Axis2 runtime environment<indexterm>skeleton
+Web services</indexterm></indexterm></indexterm></keywords>
+</metadata></prolog>
+<taskbody>
+<prereq><p>Prerequisites:</p><ol>
+<li conref="taxis2bu.dita#twsbeana/installaxis2link"></li>
+<li conref="taxis2bu.dita#twsbeana/createtomcatlink"></li>
+<li>Create or import a WSDL file into the Web Content folder of the Web project.
+You can only use a WSDL file that contains a service element.</li>
+</ol></prereq>
+<context>To create a Web service from a WSDL file using the Apache Axis2 runtime
+environment:</context>
+<steps>
+<step><cmd>Switch to the Java EE perspective (<uicontrol>Window > Open Perspective
+> Java EE</uicontrol>).</cmd></step>
+<step><cmd>In the Project Explorer view, select the WSDL file that you created
+or imported into the Web Content folder of your Web project.</cmd></step>
+<step><cmd>Click <uicontrol>File > New > Other</uicontrol>. Select <uicontrol>Web
+Services</uicontrol> in order to display the various Web service wizards.
+Select the <uicontrol>Web Service</uicontrol> wizard. Click <uicontrol>Next</uicontrol>.</cmd>
+</step>
+<step><cmd>Web Services page: select <uicontrol>Top down Java bean Web service</uicontrol> as
+your Web service type, and enter the URI to the WSDL, WSIL, or HTML file that
+will be used to generate the service.</cmd>
+<substeps conref="taxis2bu.dita#twsbeana/createstep4ul">
+<substep><cmd></cmd></substep>
+</substeps>
+</step>
+<step><cmd>Axis2 Web Service Skeleton <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> Bean Configuration page: Select the
+folder where the generated <tm tmclass="special" tmowner="Sun Microsystems, Inc."
+tmtype="tm" trademark="Java">Java</tm> will be stored. If you want to review
+or edit the mappings between packages and namespaces, select the <uicontrol>Define
+custom mapping for namespace to package</uicontrol> check box. Click <uicontrol>Next</uicontrol>.</cmd>
+<substeps>
+<substep><cmd>Service Name: accept the default.</cmd></substep>
+<substep><cmd>Port Name:accept the default.</cmd></substep>
+<substep><cmd>Databinding Name: Only the Axis2 Databinding Framework (ADB)
+is supported at this time.</cmd></substep>
+<substep><cmd>Custom package name: You can change the package name in this
+field.</cmd></substep>
+<substep><cmd>Generate an Interface for Skeleton</cmd></substep>
+<substep><cmd>Generate all types for all elements referred by schemas</cmd>
+</substep>
+<substep><cmd>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Test Web Service page: If you selected to test the Web service,
+select the test facility for the generated Web service. This will open the
+Web service in the Web Services Explorer. Select the operation you want to
+test, enter the required information, and click <uicontrol>Go</uicontrol>.
+The result will display in the Status pane. Click <uicontrol>Next</uicontrol>.</cmd>
+</step>
+<step conref="taxis2bu.dita#twsbeana/axis2clientpagelink"><cmd>Axis2 Client
+Web service configuration page: Use this page to select the following options: </cmd>
+<substeps>
+<substep><cmd>Service Name: </cmd></substep>
+<substep><cmd>Port Name: </cmd></substep>
+<substep><cmd>Databinding Name: Only the Axis2 Databinding Framework (ADB)
+is supported at this time.</cmd></substep>
+<substep><cmd>Custom package name: You can change the package name in this
+field.</cmd></substep>
+<substep><cmd>Client mode: You can choose if the client is synchronous, asynchronous,
+or both.</cmd></substep>
+<substep><cmd>Generate test case to test the service: If you select this,
+the Axis2 emitter will generate JUnit testcases matching the WSDL provided
+to the client. These JUnit testcases will be generated to a newly added source
+directory to the client project called <uicontrol>test</uicontrol>. </cmd>
+</substep>
+<substep><cmd>Generate all types for all elements referred by schemas:</cmd>
+</substep>
+<substep><cmd>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Web Service Client Test page: Use this page to select the following
+options: </cmd>
+<substeps>
+<substep><cmd>Select your test facility. You can test the generated proxy
+in the Web Service Explorer, or the Universal Test Client.</cmd></substep>
+<substep><cmd>Select <uicontrol>Run test on server</uicontrol> to start the
+server for you automatically.</cmd></substep>
+</substeps>
+</step>
+<step><cmd>Web Service Publication page: If you have selected to publish your
+Web service to a UDDI registry, use this page to launch the Web Services Explorer
+and select the UDDI registry to which the Web service will be published. Click
+ <uicontrol>Finish</uicontrol>.</cmd></step>
+</steps>
+<result conref="taxis2bu.dita#twsbeana/axiswscreateresult">After the Web service
+has been created, the following may occur depending on the options you selected: <ul>
+<li>If you have selected to test the generated proxy using Web service JSPs,
+the proxy is launched in a Web browser at the following URL: <codeph>http://localhost: <varname>port</varname>/ <varname>WebProject</varname>Client/sample<i
+>BeanName</i>/<varname>WebServiceName</varname>/TestClient.jsp</codeph> You
+can use this sample application to test the Web service by selecting a method,
+entering a value for the method, and clicking <uicontrol>Invoke</uicontrol>.
+The result of the method will display in the results pane.</li>
+<li>If you have selected to test the Web service using the Web Services Explorer,
+the Explorer will open. Select the operation you want to test, enter the required
+information, and click <b>Go</b>. The result will display in the Status pane.</li>
+<li>If you have selected to publish the Web service, the Web Services Explorer
+is launched displaying the page required to publish your Web service. Follow
+the instructions in <varname>Publishing the Web service</varname> to complete
+this task.</li>
+</ul></result>
+</taskbody>
+<related-links>
+<linklist><title>Related Concepts</title>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.dita" scope="peer">
+<linktext> Tools for Web services development</linktext></link>
+<link href="../../org.eclipse.jst.ws.doc.user/concepts/cws.dita" scope="peer">
+<linktext>Web services development</linktext></link>
+</linklist>
+<linklist><title>Related Tasks</title>
+<link href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.dita" scope="peer">
+<linktext> Developing Web services</linktext></link>
+<link href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.dita"
+scope="peer"><linktext> Using the Web Services Explorer</linktext></link>
+</linklist>
+</related-links>
+</task>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.html b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.html
new file mode 100644
index 000000000..a0c49b38d
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/topics/taxis2td.html
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang="en-us" xml:lang="en-us">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
+<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
+<meta content="public" name="security" />
+<meta content="index,follow" name="Robots" />
+<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
+<meta content="task" name="DC.Type" />
+<meta name="DC.Title" content="Creating a Java bean skeleton from a WSDL document using the Apache Axis2 runtime environment" />
+<meta name="abstract" content="The Web service wizard assists you in creating a skeleton bean from an existing WSDL document. The skeleton bean contains a set of methods that correspond to the operations described in the WSDL document. When the bean is created, each method has a trivial implementation that you replace by editing the bean." />
+<meta name="description" content="The Web service wizard assists you in creating a skeleton bean from an existing WSDL document. The skeleton bean contains a set of methods that correspond to the operations described in the WSDL document. When the bean is created, each method has a trivial implementation that you replace by editing the bean." />
+<meta content="Axis2 runtime environment, Web services, skeleton, skeleton Web services" name="DC.subject" />
+<meta content="Axis2 runtime environment, Web services, skeleton, skeleton Web services" name="keywords" />
+<meta scheme="URI" name="DC.Relation" content="../topics/caxis2tover.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/concepts/cws.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.doc.user/tasks/toverws.html" />
+<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html" />
+<meta content="XHTML" name="DC.Format" />
+<meta content="tsklwsdla" name="DC.Identifier" />
+<meta content="en-us" name="DC.Language" />
+<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
+<title>Creating a Java bean skeleton from a WSDL document using the
+Apache Axis2 runtime environment</title>
+</head>
+<body id="tsklwsdla"><a name="tsklwsdla"><!-- --></a>
+
+
+<h1 class="topictitle1">Creating a Java bean skeleton from a WSDL document using the Apache
+Axis2 runtime environment</h1>
+
+
+
+
+<div><p>The Web service wizard assists you in creating a skeleton bean
+from an existing WSDL document. The skeleton bean contains a set of methods
+that correspond to the operations described in the WSDL document. When the
+bean is created, each method has a trivial implementation that you replace
+by editing the bean.</p>
+
+<div class="p"><p>Prerequisites:</p>
+<ol>
+<li>You must have installed the Apache Axis2 runtime
+environment as described in: <a href="caxis2tover.html" title="This runtime environment is for users who prefer to develop for&#10;the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web&#10;services tools.">Creating Web services with the Apache Axis2 runtime environments</a></li>
+
+<li>If you are using the Apache Jakarta Tomcat servlet
+container as your server, you must install it, configure an instance of it,
+and create a Web project targeted to it as described in: <a href="../../org.eclipse.jst.ws.axis.ui.doc.user/topics/ttomcatserv.html">Creating an Apache Tomcat server and Web project</a></li>
+
+<li>Create or import a WSDL file into the Web Content folder of the Web project.
+You can only use a WSDL file that contains a service element.</li>
+
+</ol>
+</div>
+
+<div class="section">To create a Web service from a WSDL file using the Apache Axis2 runtime
+environment:</div>
+
+<ol>
+<li><span>Switch to the Java EE perspective (<span class="uicontrol">Window &gt; Open Perspective
+&gt; Java EE</span>).</span></li>
+
+<li><span>In the Project Explorer view, select the WSDL file that you created
+or imported into the Web Content folder of your Web project.</span></li>
+
+<li><span>Click <span class="uicontrol">File &gt; New &gt; Other</span>. Select <span class="uicontrol">Web
+Services</span> in order to display the various Web service wizards.
+Select the <span class="uicontrol">Web Service</span> wizard. Click <span class="uicontrol">Next</span>.</span>
+</li>
+
+<li><span>Web Services page: select <span class="uicontrol">Top down Java bean Web service</span> as
+your Web service type, and enter the URI to the WSDL, WSIL, or HTML file that
+will be used to generate the service.</span>
+<ol type="a">
+<li class="substepexpand"><span>Select the stages of Web services development that you want
+to complete using the slider:</span> <ul>
+<li>Develop: this will develop the WSDL definition and implementation of the
+Web service. This includes such tasks as creating the modules which will contain
+the generated code, WSDL files, deployment descriptors, and Javaâ„¢ files
+when appropriate.</li>
+
+<li>Assemble: this ensures the project that will host the Web service or client
+gets associated to an EAR when required by the target application server.</li>
+
+<li>Deploy: this will create the deployment code for the service.</li>
+
+<li>Install: this will install and configure the Web module and EARs on the
+target server.</li>
+
+<li>Start: this will start the server once the service has been installed
+on it. The server-config.wsdd file will be generated.</li>
+
+<li>Test: this will provide various options for testing the service, such
+as using the Web Service Explorer or sample JSPs.</li>
+
+</ul>
+</li>
+
+<li class="substepexpand"><span>Select your server: the default server is displayed. If you
+want to deploy your service to a different server click the link to specify
+a different server.</span></li>
+
+<li class="substepexpand"><span>Select your runtime: ensure the Apache Axis2 runtime is selected.</span>
+</li>
+
+<li class="substepexpand"><span>Select the service project: the project selected in your workspace
+is displayed. To select a different project click on the project link. If
+you are deploying to WebSphere<sup>®</sup> Application Server you will also be asked
+to select the EAR associated with the project.</span> Ensure that the
+project selected as the Client Web Project is different from the Service Web
+Project, or the service will be overwritten by the client's generated artifacts.
+</li>
+
+<li class="substepexpand"><span>If you want to create a client, select the type of proxy to
+be generated and repeat the above steps for the client.</span></li>
+
+<li class="substepexpand"><span>Publish the Web service: this will launch the Web Services Explorer
+to publish your Web service to a UDDI registry.</span></li>
+
+<li class="substepexpand"><span>Monitor the Web service: this will send the Web service traffic
+through the TCP/IP Monitor, which allows you to watch the SOAP traffic generated
+by the Web service and to test this traffic for WS-I compliance. Alternately
+you can manually set up a TCP/IP monitor as described in <a href="../../org.eclipse.wst.wsi.ui.doc.user/tasks/tmonitor.html">Using the TCP/IP Monitor to test Web services</a></span></li>
+
+</ol>
+
+</li>
+
+<li><span>Axis2 Web Service Skeleton Java Bean Configuration page: Select the
+folder where the generated Java will be stored. If you want to review
+or edit the mappings between packages and namespaces, select the <span class="uicontrol">Define
+custom mapping for namespace to package</span> check box. Click <span class="uicontrol">Next</span>.</span>
+<ol type="a">
+<li><span>Service Name: accept the default.</span></li>
+
+<li><span>Port Name:accept the default.</span></li>
+
+<li><span>Databinding Name: Only the Axis2 Databinding Framework (ADB)
+is supported at this time.</span></li>
+
+<li><span>Custom package name: You can change the package name in this
+field.</span></li>
+
+<li><span>Generate an Interface for Skeleton</span></li>
+
+<li><span>Generate all types for all elements referred by schemas</span>
+</li>
+
+<li><span>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</span></li>
+
+</ol>
+
+</li>
+
+<li><span>Test Web Service page: If you selected to test the Web service,
+select the test facility for the generated Web service. This will open the
+Web service in the Web Services Explorer. Select the operation you want to
+test, enter the required information, and click <span class="uicontrol">Go</span>.
+The result will display in the Status pane. Click <span class="uicontrol">Next</span>.</span>
+</li>
+
+<li><span>Axis2 Client Web service configuration
+page: Use this page to select the following options: </span>
+<ol type="a">
+<li><span>Service Name: accept the default.</span></li>
+
+<li><span>Port Name: accept the default.</span></li>
+
+<li><span>Databinding Name: only the Axis2 Databinding Framework (ADB)
+is supported at this time.</span></li>
+
+<li><span>Custom package name: You can change the package name in this
+field.</span></li>
+
+<li><span>Client mode: You can choose if the client is synchronous, asynchronous,
+or both.</span></li>
+
+<li><span>Generate test case to test the service: If you select this,
+the Axis2 emitter will generate JUnit testcases matching the WSDL provided
+to the client. These JUnit testcases will be generated to a newly added source
+directory to the client project called <span class="uicontrol">test</span>. </span>
+</li>
+
+<li><span>Generate all types for all elements referred by schemas</span>
+</li>
+
+<li><span>Namespace to package mapping: Use this table to review or edit
+the mappings between packages and namespaces.</span></li>
+
+</ol>
+
+</li>
+
+<li><span>Web Service Client Test page: Use this page to select the following
+options: </span>
+<ol type="a">
+<li><span>Select your test facility. You can test the generated proxy
+in the Web Service Explorer, or the Universal Test Client.</span></li>
+
+<li><span>Select <span class="uicontrol">Run test on server</span> to start the
+server for you automatically.</span></li>
+
+</ol>
+
+</li>
+
+<li><span>Web Service Publication page: If you have selected to publish your
+Web service to a UDDI registry, use this page to launch the Web Services Explorer
+and select the UDDI registry to which the Web service will be published. Click
+ <span class="uicontrol">Finish</span>.</span></li>
+
+</ol>
+
+<div class="section"><div class="p">After the Web service has been created,
+the following may occur depending on the options you selected: <ul>
+<li>If you have selected to test the Web service using the Web Services Explorer,
+the Explorer will open. Select the operation you want to test, enter the required
+information, and click <strong>Go</strong>. The result will display in the Status pane.</li>
+
+<li>If you have selected to publish the Web service, the Web Services Explorer
+is launched displaying the page required to publish your Web service. Follow
+the instructions in <var class="varname">Publishing the Web service</var> to complete
+this task.</li>
+
+</ul>
+</div>
+</div>
+
+</div>
+
+<div>
+<div class="familylinks">
+<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/caxis2tover.html" title="This runtime environment is for users who prefer to develop for the open Apache Axis platform. Both Axis1 and Axis2 are supported by the Web services tools.">Creating Web services with the Apache Axis2 runtime environments</a></div>
+</div>
+
+<div class="linklist"><strong>Related Concepts</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cwsinwsa.html"> Tools for Web services development</a></div>
+<div><a href="../../org.eclipse.jst.ws.doc.user/concepts/cws.html">Web services development</a></div></div>
+
+<div class="linklist"><strong>Related Tasks</strong><br />
+
+<div><a href="../../org.eclipse.jst.ws.doc.user/tasks/toverws.html"> Developing Web services</a></div>
+<div><a href="../../org.eclipse.jst.ws.consumption.ui.doc.user/tasks/tuddiexp.html"> Using the Web Services Explorer</a></div></div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.ditamap b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.ditamap
new file mode 100644
index 000000000..0d7bd6b18
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.ditamap
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Arbortext, Inc., 1988-2006, v.4002-->
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
+ "map.dtd">
+<map id="axis2webservicesreltable" title="Reltable for Axis Web services docs">
+<reltable>
+<relheader>
+<relcolspec type="concept"></relcolspec>
+<relcolspec type="task"></relcolspec>
+<relcolspec type="reference"></relcolspec>
+</relheader>
+<relrow>
+<relcell collection-type="family">
+<topicref href="topics/caxis2tover.dita" navtitle="Creating Web services with the Apache Axis2 runtime environment">
+</topicref>
+</relcell>
+<relcell>
+<topicref href="topics/taxis2bu.dita" navtitle="Creating an Axis2 Web service from a Java bean">
+</topicref>
+<topicref href="topics/taxis2td.dita" navtitle="Creating an Axis2 Web service from WSDL">
+</topicref>
+<topicref href="topics/taxis2client.dita" navtitle="Creating an Axis2 Web service client">
+</topicref>
+</relcell>
+<relcell></relcell>
+</relrow>
+<relrow>
+<relcell>
+<topicref href="../org.eclipse.jst.ws.axis.ui.doc.user/topics/caxistover.dita"
+navtitle="Creating Web services with the Apache Axis1 runtime environment"
+scope="peer"></topicref>
+<topicref href="topics/caxis2tover.dita" navtitle="Creating Web services with the Apache Axis2 runtime environment"
+scope="local"></topicref>
+</relcell>
+<relcell></relcell>
+<relcell></relcell>
+</relrow>
+</reltable>
+</map>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.xml
new file mode 100644
index 000000000..2a520d318
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2_reltable_toc.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Reltable for Axis Web services docs"/>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.ditamap b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.ditamap
new file mode 100644
index 000000000..03970967e
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.ditamap
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Arbortext, Inc., 1988-2006, v.4002-->
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
+ "map.dtd">
+<map anchorref="../org.eclipse.jst.ws.doc.user/wscreationt1_toc.ditamap#wsaxis"
+id="wsaxis" title="wsaxis">
+<topicref href="topics/caxis2tover.dita" navtitle="Apache Axis2 runtime" toc="yes">
+<topicref href="topics/taxis2bu.dita" navtitle="Creating a Web service from a Java bean using the Apache Axis2 runtime environment"
+scope="local"></topicref>
+<topicref href="topics/taxis2td.dita" navtitle="Creating a Java bean skeleton from a WSDL document using the Apache Axis2 runtime environment"
+scope="local"></topicref>
+<topicref href="topics/taxis2client.dita" navtitle="Generating a Java client proxy and a sample application from a WSDL document using the Axis2 runtime environment"
+scope="local"></topicref>
+</topicref>
+</map>
diff --git a/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.xml b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.xml
new file mode 100644
index 000000000..7beafd206
--- /dev/null
+++ b/axis2/docs/org.eclipse.jst.ws.axis2.ui.doc.user/wsaxis2build_toc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc link_to="../org.eclipse.jst.ws.doc.user/wscreationt1_toc.xml#wsaxis" label="wsaxis" topic="topics/caxis2tover.html">
+<topic label="Creating Web services with the Apache Axis2 runtime environments" href="topics/caxis2tover.html">
+<topic label="Creating a Web service from a Java bean using the Apache Axis2 runtime environment" href="topics/taxis2bu.html"/>
+<topic label="Creating a Java bean skeleton from a WSDL document using the Apache Axis2 runtime environment" href="topics/taxis2td.html"/>
+<topic label="Generating a Java client proxy and a sample application from a WSDL document using the Axis2 runtime environment" href="topics/taxis2client.html"/>
+</topic>
+</toc>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/.cvsignore b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/.cvsignore
new file mode 100644
index 000000000..b1d6d303a
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/.cvsignore
@@ -0,0 +1,2 @@
+build.xml
+feature.temp.folder
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/.project b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/.project
new file mode 100644
index 000000000..062bfd073
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2tools.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/build.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/build.properties
new file mode 100644
index 000000000..bd7365d50
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ eclipse_update_120.jpg,\
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/eclipse_update_120.jpg b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/eclipse_update_120.jpg
new file mode 100644
index 000000000..bfdf708ad
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.properties
new file mode 100644
index 000000000..ad99103df
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.properties
@@ -0,0 +1,48 @@
+###############################################################################
+# Copyright (c) 2007, 2008 WSO2 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:
+# WSO2 - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Axis2 Tools
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Web Tools Platform
+
+
+# "description" property - description of the feature
+description=Axis2 Tools (Optional)
+
+# "copyright" property - text of the "Feature Update Copyright"
+feature.copyright=\
+Copyright (c) 2008 WSO2.\
+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\
+\n\
+Contributors:\n\
+ WSO2 - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+########### end of license property ##########################################
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.xml b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.xml
new file mode 100644
index 000000000..a9c0e9bcb
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/feature.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.jst.ws.axis2tools.feature"
+ label="%featureName"
+ version="1.1.301.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.jst.ws.axis2.ui"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.1.qualifier">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %feature.copyright
+ </copyright>
+
+ <license url="license.html">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.consumption.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.consumption.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.creation.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.creation.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jst.ws.axis2.ui.doc.user"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/pom.xml b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/pom.xml
new file mode 100644
index 000000000..9a8ca0379
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2tools.feature</artifactId>
+ <version>1.1.301-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <id>source-feature</id>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <plugin id="org.eclipse.jst.ws.axis2.ui.doc.user"/>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.html b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.html
new file mode 100644
index 000000000..fe81d46ac
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>June, 2008</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>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.ini b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.ini
new file mode 100644
index 000000000..fda5a40c8
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.ini
@@ -0,0 +1,31 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=wtp_prod32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
+
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.mappings b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.mappings
new file mode 100644
index 000000000..a28390a75
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.properties
new file mode 100644
index 000000000..5846a4f2b
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/about.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# 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
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+#
+# Do not translate any values surrounded by {}
+
+blurb=WTP Axis2 Tools Source\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) WSO2 contributors and others 2008. All rights reserved.\n\
+Visit http://www.eclipse.org/webtools
+
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/build.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/build.properties
new file mode 100644
index 000000000..ead512d68
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/build.properties
@@ -0,0 +1,2 @@
+bin.includes = about.html, about.ini, about.mappings, about.properties, wtp_prod32.png, plugin.properties, plugin.xml, src/**, META-INF/
+sourcePlugin = true
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/plugin.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 000000000..e05c9f382
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# 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
+###############################################################################
+pluginName=WTP Axis2 Tools Source
+providerName=Eclipse.org
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.gif b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.gif
new file mode 100644
index 000000000..eefb44a3a
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.gif
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.png b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.png
new file mode 100644
index 000000000..bfceab3da
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateBundle/wtp_prod32.png
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/build.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 000000000..be839a7bd
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# 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
+###############################################################################
+bin.includes =\
+eclipse_update_120.jpg,\
+feature.xml,\
+feature.properties,\
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/eclipse_update_120.jpg b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 000000000..bfdf708ad
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/feature.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 000000000..62ecba239
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,47 @@
+###############################################################################
+# Copyright (c) 2006, 2010 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
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=WTP Axis 2 Developer Resources
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Web Tools Platform
+
+
+# "description" property - description of the feature
+description=Source code for WTP Axis2 Tools.
+
+# "copyright" property - text of the "Feature Update Copyright"
+feature.copyright=\
+Copyright (c) 2008 WSO2 and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ WSO2 - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+########### end of license property ##########################################
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.html b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 000000000..fe81d46ac
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>June, 2008</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>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.ini b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 000000000..fda5a40c8
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,31 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=wtp_prod32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
+
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.mappings b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 000000000..a28390a75
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 000000000..5846a4f2b
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# 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
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+#
+# Do not translate any values surrounded by {}
+
+blurb=WTP Axis2 Tools Source\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) WSO2 contributors and others 2008. All rights reserved.\n\
+Visit http://www.eclipse.org/webtools
+
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/build.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 000000000..ead512d68
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,2 @@
+bin.includes = about.html, about.ini, about.mappings, about.properties, wtp_prod32.png, plugin.properties, plugin.xml, src/**, META-INF/
+sourcePlugin = true
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/plugin.properties b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 000000000..e05c9f382
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# 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
+###############################################################################
+pluginName=WTP Axis2 Tools Source
+providerName=Eclipse.org
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.gif b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.gif
new file mode 100644
index 000000000..eefb44a3a
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.gif
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.png b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.png
new file mode 100644
index 000000000..bfceab3da
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools.feature/sourceTemplatePlugin/wtp_prod32.png
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/.project b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/.project
new file mode 100644
index 000000000..a4c78de65
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2tools_sdk.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/build.properties b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/build.properties
new file mode 100644
index 000000000..9119b7081
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ eclipse_update_120.jpg
+
+generate.feature@org.eclipse.jst.ws.axis2tools.feature.source = org.eclipse.jst.ws.axis2tools.feature
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/eclipse_update_120.jpg b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/eclipse_update_120.jpg
new file mode 100644
index 000000000..bfdf708ad
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.properties b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.properties
new file mode 100644
index 000000000..650f2aeb5
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.properties
@@ -0,0 +1,48 @@
+###############################################################################
+# Copyright (c) 2007, 2008 WSO2 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:
+# WSO2 - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Axis2 Tools SDK
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Web Tools Platform
+
+
+# "description" property - description of the feature
+description=Axis2 Tools (Optional)
+
+# "copyright" property - text of the "Feature Update Copyright"
+feature.copyright=\
+Copyright (c) 2008 WSO2.\
+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\
+\n\
+Contributors:\n\
+ WSO2 - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+########### end of license property ##########################################
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.xml b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.xml
new file mode 100644
index 000000000..39b1fc43d
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/feature.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.jst.ws.axis2tools_sdk.feature"
+ label="%featureName"
+ version="1.1.301.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.1.qualifier">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %feature.copyright
+ </copyright>
+
+ <license url="license.html">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.jst.ws.axis2tools.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.jst.ws.axis2tools.feature.source"
+ version="0.0.0"/>
+
+</feature>
diff --git a/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/pom.xml b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/pom.xml
new file mode 100644
index 000000000..889ca5f09
--- /dev/null
+++ b/axis2/features/org.eclipse.jst.ws.axis2tools_sdk.feature/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2tools_sdk.feature</artifactId>
+ <version>1.1.301-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/axis2/pom.xml b/axis2/pom.xml
new file mode 100644
index 000000000..2330e7778
--- /dev/null
+++ b/axis2/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2014 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse</groupId>
+ <artifactId>wtp-parent</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../wtp-parent</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <properties>
+ <tycho.scmUrl>scm:git:git://git.eclipse.org/gitroot/webservices/webtools.webservices.axis2.git</tycho.scmUrl>
+ </properties>
+
+ <modules>
+ <module>bundles/org.eclipse.jst.ws.axis2.consumption.core</module>
+ <module>bundles/org.eclipse.jst.ws.axis2.consumption.ui</module>
+ <module>bundles/org.eclipse.jst.ws.axis2.core</module>
+ <module>bundles/org.eclipse.jst.ws.axis2.creation.core</module>
+ <module>bundles/org.eclipse.jst.ws.axis2.creation.ui</module>
+ <module>bundles/org.eclipse.jst.ws.axis2.ui</module>
+
+ <module>docs/org.eclipse.jst.ws.axis2.ui.doc.user</module>
+
+ <module>features/org.eclipse.jst.ws.axis2tools.feature</module>
+ <module>features/org.eclipse.jst.ws.axis2tools_sdk.feature</module>
+ </modules>
+</project> \ No newline at end of file
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.classpath b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.project b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.project
new file mode 100644
index 000000000..25d5af581
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.ws.axis2.tests.performance</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/META-INF/MANIFEST.MF b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..04f69d455
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.jst.ws.axis2.tests.performance
+Bundle-Version: 1.0.100.qualifier
+Bundle-Activator: org.eclipse.jst.ws.axis2.tests.performance.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.jst.ws,
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.wst.server.core,
+ org.junit;bundle-version="3.8.0",
+ org.eclipse.jst.ws.tests,
+ org.eclipse.jem.util,
+ org.eclipse.test.performance,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.wst.common.environment,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.emf.ecore,
+ org.eclipse.jst.ws.consumption,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.command.env,
+ org.eclipse.jst.ws.axis2.core,
+ org.eclipse.jst.ws.tests.performance
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr,
+ org.eclipse.jst.ws.axis2.tests.performance
+Bundle-Localization: plugin
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/about.html b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/about.html
new file mode 100644
index 000000000..2199df3f0
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/about.html
@@ -0,0 +1,34 @@
+<!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">
+
+<H3>About This Content</H3>
+
+<P>June, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/build.properties b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/build.properties
new file mode 100644
index 000000000..32b5b870c
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2009 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ bin/,\
+ plugin.properties
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/plugin.properties b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/plugin.properties
new file mode 100644
index 000000000..60c01a103
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2009 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
+###############################################################################
+
+#Properties file for org.eclipse.jst.ws.axis2.tests.performance
+Bundle-Vendor = Eclipse.org
+Bundle-Name = Axis2 Performance Tests \ No newline at end of file
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/pom.xml b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/pom.xml
new file mode 100644
index 000000000..eee13cdfe
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.webtools.webservices.axis2</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.webservices</groupId>
+ <artifactId>org.eclipse.jst.ws.axis2.tests.performance</artifactId>
+ <version>1.0.100-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/Activator.java b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/Activator.java
new file mode 100644
index 000000000..f73dc3b18
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/Activator.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * -------- -------- -----------------------------------------------------------
+ * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.axis2.tests.performance;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jst.ws.axis2.tests.performance";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/AllPerformanceTests.java b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/AllPerformanceTests.java
new file mode 100644
index 000000000..edc11c1d6
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/performance/AllPerformanceTests.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 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
+ * -------- -------- -----------------------------------------------------------
+ * 20070502 185208 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.tests.performance;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr.PerfmsrBUJavaAxis2TC55;
+import org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr.PerfmsrClientAxis2TC55;
+import org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr.PerfmsrTDJavaAxis2TC55;
+import org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr.PerfmsrBUJavaAxisTC50;
+import org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr.PerfmsrClientAxisTC50;
+import org.eclipse.jst.ws.tests.axis.tomcat.v50.perfmsr.PerfmsrTDJavaAxisTC50;
+
+public class AllPerformanceTests {
+
+ public static Test suite() {
+
+ TestSuite suite = new TestSuite("Test for org.eclipse.jst.ws.axis2.tests.performance");
+ //$JUnit-BEGIN$
+
+
+ // Check for Tomcat 5.5 server
+ String s = System.getProperty("org.eclipse.jst.server.tomcat.55");
+ if (s==null){
+ s = System.getProperty("tomcat55Dir");
+ }
+
+ if (s != null && s.length() > 0) {
+ suite.addTestSuite(PerfmsrBUJavaAxis2TC55.class);
+ suite.addTestSuite(PerfmsrTDJavaAxis2TC55.class);
+ suite.addTestSuite(PerfmsrClientAxis2TC55.class);
+ } else {
+ System.err.println("Warning: Tomcat 5.5 not found - performance tests skipped");
+ }
+
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/WSWizardTomcat55Test.java b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/WSWizardTomcat55Test.java
new file mode 100644
index 000000000..8715c3983
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/WSWizardTomcat55Test.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * -------- -------- -----------------------------------------------------------
+ * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
+ *******************************************************************************/
+
+package org.eclipse.jst.ws.axis2.tests.tomcat.v55;
+
+import org.eclipse.jst.ws.axis2.core.context.Axis2EmitterContext;
+import org.eclipse.jst.ws.axis2.core.plugin.WebServiceAxis2CorePlugin;
+import org.eclipse.jst.ws.tests.WSWizardTest;
+import org.eclipse.jst.ws.tests.util.JUnitUtils;
+
+public abstract class WSWizardTomcat55Test extends WSWizardTest {
+
+ protected final String SERVER_INSTALL_PATH = System.getProperty("org.eclipse.jst.server.tomcat.55");
+ protected final String RUNTIME_INSTALL_PATH = System.getProperty("org.eclipse.jst.runtime.axis2");
+ protected final String RUNTIMETYPEID_TC55 = "org.eclipse.jst.server.tomcat.runtime.55";
+ protected final String SERVERTYPEID_TC55 = "org.eclipse.jst.server.tomcat.55";
+
+
+ /* (non-Javadoc)
+ * @see com.ibm.etools.webservice.was.tests.WSWizardTest#installServerRuntime()
+ */
+ protected void installServerRuntime() throws Exception {
+
+ // create server runtime
+ serverRuntime_ = JUnitUtils.createServerRuntime(RUNTIMETYPEID_TC55, SERVER_INSTALL_PATH);
+
+ // set install locations
+ Axis2EmitterContext context = WebServiceAxis2CorePlugin.getDefault().getAxisEmitterContext();
+ if (context.getAxis2RuntimeLocation()==null || context.getAxis2RuntimeLocation().equals("")){
+ String runtimePath = RUNTIME_INSTALL_PATH;
+ if (runtimePath!=null) {
+ context.setAxis2RuntimeLocation(runtimePath);
+ }
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see com.ibm.etools.webservice.was.tests.WSWizardTest#installServer()
+ */
+ protected void installServer() throws Exception {
+
+ server_ = JUnitUtils.createServer("Apache Tomcat v55", SERVERTYPEID_TC55, serverRuntime_, env_, null );
+ }
+
+}
+
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrBUJavaAxis2TC55.java b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrBUJavaAxis2TC55.java
new file mode 100644
index 000000000..2e5b200d2
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrBUJavaAxis2TC55.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * -------- -------- -----------------------------------------------------------
+ * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jst.ws.axis2.tests.tomcat.v55.WSWizardTomcat55Test;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.jst.ws.internal.common.ResourceUtils;
+import org.eclipse.jst.ws.tests.performance.util.PerformanceJUnitUtils;
+import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
+import org.eclipse.jst.ws.tests.util.JUnitUtils;
+import org.eclipse.jst.ws.tests.util.ScenarioConstants;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
+
+/**
+ * Bottom up performance scenario with Axis2 and Tomcat v5.5
+ */
+public final class PerfmsrBUJavaAxis2TC55 extends WSWizardTomcat55Test {
+ // Constants
+ private final String WS_RUNTIMEID_AXIS = WSJUnitConstants.WS_RUNTIMEID_AXIS2;
+ private final String PROJECT_NAME = "BUAxis2Web";
+
+ private IFile sourceFile_;
+
+ /**
+ * Sets up the input data;
+ * - create project(s),
+ * - copy resources to workspace
+ */
+ protected void installInputData() throws Exception
+ {
+
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ IPath destPath = ResourceUtils.getJavaSourceLocation(webProject);
+ IFolder folder = (IFolder)ResourceUtils.findResource(destPath);
+ JUnitUtils.copyTestData("BUJava/src",folder,env_, null);
+ sourceFile_ = folder.getFile(new Path("foo/Echo.java"));
+ // Ensure that Echo.class is built in:
+ // <Web Project>/WebContent/WEB-INF/classes/foo/Echo.class
+ JUnitUtils.disableValidation(webProject);
+ JUnitUtils.syncBuildProject(webProject,env_, null);
+ //assertTrue(JUnitUtils.getClassesFolderForWebProject(WEB_PROJECT_NAME).getFile(new Path("foo/Echo.class")).exists());
+
+
+ }
+
+ protected void createProjects() throws Exception{
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ if (webProject==null || !webProject.exists()){
+ JUnitUtils.createWebModule(PROJECT_NAME, PROJECT_NAME, server_.getId(), SERVERTYPEID_TC55, "14", env_, new NullProgressMonitor());
+ }
+ }
+
+ /**
+ * Set the persistent server runtime context preferences
+ */
+ protected void initJ2EEWSRuntimeServerDefaults() throws Exception
+ {
+ // Set default preferences for Axis2 and Tomcat 5.5
+ JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC55);
+ JUnitUtils.setServiceScenarioDefault();
+ }
+
+ /**
+ * Set the initial selection
+ */
+ protected void initInitialSelection() throws Exception
+ {
+ initialSelection_ = new StructuredSelection(sourceFile_);
+ }
+
+ /**
+ * Launches the pop-up command to initiate the scenario
+ * @throws Exception
+ */
+ public void testBUJavaAxis2TC55() throws Exception
+ {
+ IStatus[] status;
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ JUnitUtils.disableWSIDialog(webProject);
+ JUnitUtils.enableOverwrite(true);
+ JUnitUtils.setRuntimePreference(WS_AXIS2_RUNTIME);
+
+
+ Performance perf= Performance.getDefault();
+ PerformanceMeter performanceMeter= perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
+ try {
+
+ performanceMeter.start();
+ status = PerformanceJUnitUtils.launchCreationWizard(ScenarioConstants.WIZARDID_BOTTOM_UP,ScenarioConstants.OBJECT_CLASS_ID_IFILE,initialSelection_);
+ performanceMeter.stop();
+
+ performanceMeter.commit();
+ perf.assertPerformance(performanceMeter);
+ }
+ finally {
+ if (performanceMeter==null)
+ performanceMeter.dispose();
+ }
+
+ verifyOutput(status);
+
+ }
+
+ /**
+ * Verify the scenario completed successfully
+ * @throws Exception
+ */
+ private final void verifyOutput(IStatus[] status) throws Exception
+ {
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ IFolder webContentFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
+
+ IFolder webInfFolder = webContentFolder.getFolder("WEB-INF");
+ IFolder servicesFolder = webInfFolder.getFolder("services");
+ assertTrue(servicesFolder.exists());
+ IFolder wsFolder = servicesFolder.getFolder("Echo");
+ assertTrue(wsFolder.exists());
+ assertTrue(wsFolder.members().length > 0);
+
+ AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
+ IStatus[] s = statusHandler.getErrorReports();
+ //show errors
+ if (s.length > 0){
+ for (int i=0;i<s.length;i++){
+ System.out.println("BUJava Error message for report #"+i+": "+s[i].getMessage());
+ }
+ }
+ assertTrue(s.length == 0);
+ }
+
+ /**
+ * Clear workspace if necessary
+ */
+ protected void deleteInputData() throws Exception
+ {
+ // Remove the EAR from the server.
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ //JUnitUtils.removeModuleFromServer(server_,webProject,env_);
+
+ // Delete the Web project.
+ webProject.delete(true,true, null);
+ assertFalse(webProject.exists());
+
+ }
+}
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrClientAxis2TC55.java b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrClientAxis2TC55.java
new file mode 100644
index 000000000..449b48be5
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrClientAxis2TC55.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * -------- -------- -----------------------------------------------------------
+ * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jst.ws.axis2.tests.tomcat.v55.WSWizardTomcat55Test;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.jst.ws.internal.common.ResourceUtils;
+import org.eclipse.jst.ws.tests.performance.util.PerformanceJUnitUtils;
+import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
+import org.eclipse.jst.ws.tests.util.JUnitUtils;
+import org.eclipse.jst.ws.tests.util.ScenarioConstants;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
+
+/**
+ * Client performance scenario with Axis2 and Tomcat v5.5
+ */
+public class PerfmsrClientAxis2TC55 extends WSWizardTomcat55Test {
+
+ private final String WS_RUNTIMEID_AXIS = WSJUnitConstants.WS_RUNTIMEID_AXIS2;
+
+ private final String CLIENT_PROJECT_NAME = "ClientAxis2Web";
+
+ private IFile sourceFile_;
+
+ protected void createProjects() throws Exception{
+ IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
+ if (!webProject.exists()){
+ JUnitUtils.createWebModule(CLIENT_PROJECT_NAME, CLIENT_PROJECT_NAME, server_.getId(),SERVERTYPEID_TC55, "14", env_, new NullProgressMonitor());
+ }
+ }
+
+ /**
+ * Sets up the input data;
+ * - create project(s),
+ * - copy resources to workspace
+ */
+ protected void installInputData() throws Exception {
+
+
+ IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
+ IFolder destFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
+ JUnitUtils.copyTestData("TDJava",destFolder,env_, null);
+ sourceFile_ = destFolder.getFile(new Path("Echo.wsdl"));
+ JUnitUtils.disableValidation(webProject);
+ JUnitUtils.syncBuildProject(webProject,env_, null);
+
+ }
+
+ /**
+ * Set the persistent server runtime context preferences
+ */
+ protected void initJ2EEWSRuntimeServerDefaults() throws Exception {
+ // Set default preferences for Axis and Tomcat 5.5
+ JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC55);
+ JUnitUtils.setClientScenarioDefault();
+ }
+
+ /**
+ * Set the initial selection
+ */
+ protected void initInitialSelection() throws Exception {
+ initialSelection_ = new StructuredSelection(sourceFile_);
+ }
+
+ /**
+ * Launches the pop-up command to initiate the scenario
+ * @throws Exception
+ */
+ public void testClientAxis2TC55() throws Exception
+ {
+ IStatus[] status;
+
+ JUnitUtils.enableProxyGeneration(true);
+ JUnitUtils.enableOverwrite(true);
+ JUnitUtils.setRuntimePreference(WS_AXIS2_RUNTIME);
+
+
+ Performance perf= Performance.getDefault();
+ PerformanceMeter performanceMeter= perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
+ try {
+
+ performanceMeter.start();
+ status = PerformanceJUnitUtils.launchCreationWizard(ScenarioConstants.WIZARDID_CLIENT,ScenarioConstants.OBJECT_CLASS_ID_IFILE,initialSelection_);
+ performanceMeter.stop();
+ performanceMeter.commit();
+ perf.assertPerformance(performanceMeter);
+ }
+ finally {
+ if (performanceMeter==null)
+ performanceMeter.dispose();
+ }
+
+ verifyOutput(status);
+
+
+ }
+
+ /**
+ * Verify the scenario completed succesfully
+ * @throws Exception
+ */
+ private final void verifyOutput(IStatus[] status) throws Exception {
+ IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
+
+ IPath destPath = ResourceUtils.getJavaSourceLocation(webProject);
+ IFolder srcFolder = (IFolder)ResourceUtils.findResource(destPath);
+
+ //IFolder srcFolder = JUnitUtils.getSourceFolderForWebProject(CLIENT_PROJECT_NAME);
+ IFolder folder = srcFolder.getFolder("foo");
+ assertTrue(folder.exists());
+ assertTrue(folder.members().length > 0);
+
+ AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
+ IStatus[] s = statusHandler.getErrorReports();
+ //
+ if (s.length > 0){
+ for (int i=0;i<s.length;i++){
+ System.out.println("Error message for report #"+i+": "+s[i].getMessage());
+ }
+ }
+ assertTrue(s.length == 0);
+
+ }
+
+ /**
+ * Remove workspace if necessary
+ */
+ protected void deleteInputData() throws Exception {
+
+ // Delete the Web project.
+ IProject webProject = ProjectUtilities.getProject(CLIENT_PROJECT_NAME);
+ webProject.delete(true,true, null);
+
+ }
+
+}
diff --git a/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrTDJavaAxis2TC55.java b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrTDJavaAxis2TC55.java
new file mode 100644
index 000000000..3953bbc94
--- /dev/null
+++ b/axis2/tests/org.eclipse.jst.ws.axis2.tests.performance/src/org/eclipse/jst/ws/axis2/tests/tomcat/v55/perfmsr/PerfmsrTDJavaAxis2TC55.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * -------- -------- -----------------------------------------------------------
+ * 20070705 195553 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20080313 126774 sengpl@ca.ibm.com - Seng Phung-Lu
+ * 20090402 263873 mahutch@ca.ibm.com - Mark Hutchinson, Move Axis2 peformance tests to new plugin
+ *******************************************************************************/
+package org.eclipse.jst.ws.axis2.tests.tomcat.v55.perfmsr;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jst.ws.axis2.tests.tomcat.v55.WSWizardTomcat55Test;
+import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.jst.ws.tests.performance.util.PerformanceJUnitUtils;
+import org.eclipse.jst.ws.tests.unittest.WSJUnitConstants;
+import org.eclipse.jst.ws.tests.util.JUnitUtils;
+import org.eclipse.jst.ws.tests.util.ScenarioConstants;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.eclipse.wst.command.internal.env.eclipse.AccumulateStatusHandler;
+
+/**
+ * Top down performance scenario with Axis2 and Tomcat v5.5
+ */
+public class PerfmsrTDJavaAxis2TC55 extends WSWizardTomcat55Test {
+
+ private final String WS_RUNTIMEID_AXIS = WSJUnitConstants.WS_RUNTIMEID_AXIS2;
+
+ private final String PROJECT_NAME = "TDAxis2Web";
+
+ private IFile sourceFile_;
+
+ protected void createProjects() throws Exception{
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ if (!webProject.exists()){
+ JUnitUtils.createWebModule(PROJECT_NAME, PROJECT_NAME, server_.getId(), SERVERTYPEID_TC55, "14", env_, new NullProgressMonitor());
+ }
+ }
+
+ /**
+ * Sets up the input data;
+ * - create project(s),
+ * - copy resources to workspace
+ */
+ protected void installInputData() throws Exception {
+
+
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ IFolder destFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
+ JUnitUtils.copyTestData("TDJava",destFolder,env_, null);
+ sourceFile_ = destFolder.getFile(new Path("Echo.wsdl"));
+ JUnitUtils.disableValidation(webProject);
+ JUnitUtils.syncBuildProject(webProject,env_, null);
+ }
+
+ /**
+ * Set the persistent server runtime context preferences
+ */
+ protected void initJ2EEWSRuntimeServerDefaults() throws Exception {
+ // Set default preferences for Axis and Tomcat v5.5 server
+ JUnitUtils.setWSRuntimeServer(WS_RUNTIMEID_AXIS, SERVERTYPEID_TC55);
+ JUnitUtils.setServiceScenarioDefault();
+ }
+
+ /**
+ * Set the initial selection
+ */
+ protected void initInitialSelection() throws Exception {
+ initialSelection_ = new StructuredSelection(sourceFile_);
+
+ }
+
+ /**
+ * Launches the pop-up command to initiate the scenario
+ * @throws Exception
+ */
+ public void testTDJavaAxis2TC55() throws Exception {
+
+ IStatus[] status;
+ JUnitUtils.enableOverwrite(true);
+ JUnitUtils.setRuntimePreference(WS_AXIS2_RUNTIME);
+
+
+ Performance perf= Performance.getDefault();
+ PerformanceMeter performanceMeter= perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
+ try {
+
+ performanceMeter.start();
+ status = PerformanceJUnitUtils.launchCreationWizard(ScenarioConstants.WIZARDID_TOP_DOWN,ScenarioConstants.OBJECT_CLASS_ID_IFILE,initialSelection_);
+ performanceMeter.stop();
+ performanceMeter.commit();
+ perf.assertPerformance(performanceMeter);
+ }
+ finally {
+ if (performanceMeter==null)
+ performanceMeter.dispose();
+ }
+
+ verifyOutput(status);
+
+
+ }
+
+ /**
+ * Verify the scenario completed successfully
+ * @throws Exception
+ */
+ private final void verifyOutput(IStatus[] status) throws Exception
+ {
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ IFolder webContentFolder = (IFolder)J2EEUtils.getWebContentContainer(webProject);
+
+ IFolder webInfFolder = webContentFolder.getFolder("WEB-INF");
+ IFolder servicesFolder = webInfFolder.getFolder("services");
+ assertTrue(servicesFolder.exists());
+ IFolder wsFolder = servicesFolder.getFolder("EchoService");
+ assertTrue(wsFolder.exists());
+ assertTrue(wsFolder.members().length > 0);
+
+ AccumulateStatusHandler statusHandler = new AccumulateStatusHandler(status);
+ IStatus[] s = statusHandler.getErrorReports();
+ //
+ if (s.length > 0){
+ for (int i=0;i<s.length;i++){
+ System.out.println("TDJava Error message for report #"+i+": "+s[i].getMessage());
+ }
+ }
+ assertTrue(s.length == 0);
+ }
+
+ /**
+ * Clear workspace if required
+ */
+ protected void deleteInputData() throws Exception {
+ // Delete the Web project.
+ IProject webProject = ProjectUtilities.getProject(PROJECT_NAME);
+ webProject.delete(true,true,null);
+
+ }
+
+}

Back to the top