Author: dennyxu
Date: 2008-05-22 07:22:53 -0400 (Thu, 22 May 2008)
New Revision: 8288
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java
Log:
JBIDE-2200: generate implmentation skeleton class for every port type interface
Modify web.xml to configure web service servlets
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-05-22
02:01:46 UTC (rev 8287)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-05-22
11:22:53 UTC (rev 8288)
@@ -24,7 +24,9 @@
org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.jdt.core,
- org.eclipse.jface.text
+ org.eclipse.jface.text,
+ org.eclipse.core.filebuffers,
+ org.eclipse.jdt.ui
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.ws.creation.core,
org.jboss.tools.ws.creation.core.commands,
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -55,6 +55,9 @@
return status;
}
+ /*
+ * just ensure that the file is a readable xml file to avoid breaking code generation
+ */
private IStatus validateXMLFile(XMLReader reader, String filename){
try {
InputSource is = new InputSource(filename);
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -1,10 +1,8 @@
package org.jboss.tools.ws.creation.core.commands;
import java.io.File;
-import java.io.StringBufferInputStream;
import java.util.ArrayList;
import java.util.List;
-import java.util.StringTokenizer;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
@@ -20,315 +18,315 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
import org.eclipse.jdt.core.dom.ArrayType;
-import org.eclipse.jdt.core.dom.Assignment;
import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.BooleanLiteral;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FieldAccess;
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.ImportDeclaration;
import org.eclipse.jdt.core.dom.Initializer;
+import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
import org.eclipse.jdt.core.dom.NumberLiteral;
import org.eclipse.jdt.core.dom.PackageDeclaration;
import org.eclipse.jdt.core.dom.ParameterizedType;
import org.eclipse.jdt.core.dom.PrimitiveType;
import org.eclipse.jdt.core.dom.QualifiedName;
-import org.eclipse.jdt.core.dom.QualifiedType;
import org.eclipse.jdt.core.dom.ReturnStatement;
-import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.SimpleType;
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jdt.core.dom.TypeLiteral;
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jdt.core.dom.WildcardType;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.text.edits.MalformedTreeException;
import org.eclipse.text.edits.TextEdit;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.creation.core.utils.JBossStatusUtils;
import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
public class ImplementationClassCreationCommand extends
AbstractDataModelOperation {
- protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
- protected static final String TAB = "\t"; //$NON-NLS-1$
- protected static final String SPACE = " "; //$NON-NLS-1$
- protected static final String DOT = "."; //$NON-NLS-1$
- protected static final String COMMA = ","; //$NON-NLS-1$
- protected static final String SEMICOLON = ";"; //$NON-NLS-1$
- protected static final String POUND = "#"; //$NON-NLS-1$
- protected static final String OPEN_PAR = "("; //$NON-NLS-1$
- protected static final String CLOSE_PAR = ")"; //$NON-NLS-1$
- protected static final String OPEN_BRA = "{"; //$NON-NLS-1$
- protected static final String CLOSE_BRA = "}"; //$NON-NLS-1$
- protected static final String lineSeparator =
System.getProperty("line.separator"); //$NON-NLS-1$
+ private static final String RESOURCE_FOLDER = "src";
- protected static final String JAVA_LANG_OBJECT = "java.lang.Object";
//$NON-NLS-1$
- protected static final String PACKAGE = "package "; //$NON-NLS-1$
- protected static final String CLASS = "class "; //$NON-NLS-1$
- protected static final String IMPORT = "import "; //$NON-NLS-1$
- protected static final String EXTENDS = "extends "; //$NON-NLS-1$
- protected static final String IMPLEMENTS = "implements "; //$NON-NLS-1$
- protected static final String THROWS = "throws "; //$NON-NLS-1$
- protected static final String SUPER = "super"; //$NON-NLS-1$
- protected static final String PUBLIC = "public "; //$NON-NLS-1$
- protected static final String PROTECTED = "protected "; //$NON-NLS-1$
- protected static final String PRIVATE = "private "; //$NON-NLS-1$
- protected static final String STATIC = "static "; //$NON-NLS-1$
- protected static final String ABSTRACT = "abstract "; //$NON-NLS-1$
- protected static final String FINAL = "final "; //$NON-NLS-1$
- protected static final String VOID = "void"; //$NON-NLS-1$
- protected static final String INT = "int"; //$NON-NLS-1$
- protected static final String BOOLEAN = "boolean"; //$NON-NLS-1$
- protected static final String MAIN_METHOD = "\tpublic static void main(String[]
args) {"; //$NON-NLS-1$
- protected static final String TODO_COMMENT = "\t\t// TODO Auto-generated method
stub"; //$NON-NLS-1$
- protected static final String RETURN_NULL = "\t\treturn null;"; //$NON-NLS-1$
- protected static final String RETURN_0 = "\t\treturn 0;"; //$NON-NLS-1$
- protected static final String RETURN_FALSE = "\t\treturn false;";
//$NON-NLS-1$
- protected static final String RESOURCE_FOLDER = "src";
-
- protected static final String PREFIX_JAXWS_ANNOTATION_CLASS = "javax.jws";
- protected static final String CLASS_LOGGER = "Logger";
- protected static final String SUFFIX_PACKAGENAME_IMPL = "impl";
- protected static final String DEFAULT_CU_SUFFIX = ".java";
-
+ private static final String PREFIX_JAXWS_ANNOTATION_CLASS = "javax.jws";
+ private static final String CLASS_LOGGER = "Logger";
+ private static final String SUFFIX_PACKAGENAME_IMPL = "impl";
+ private static final String DEFAULT_CU_SUFFIX = ".java";
+
+ private static final String ANNOTATION_TYPE_NAME_WEBSERVICE = "WebService";;
+ private static final String ANNOTATION_PROPERTY_NAME = "name";
+ private static final String ANNOTATION_PROPERTY_SERVICE_NAME = "serviceName";
+ private static final String ANNOTATION_PROPERTY_ENDPOINT_INTERFACE =
"endpointInterface";
+
private ServiceModel model;
- private List<String> importStatements;
private IWorkspaceRoot fWorkspaceRoot;
- private IJavaProject javaProject;
-
- public ImplementationClassCreationCommand(ServiceModel model){
+
+ public ImplementationClassCreationCommand(ServiceModel model) {
this.model = model;
- fWorkspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
-
+ fWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+
}
-
-
-
+
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
-
-
-
- IFile inFile = getServiceInterfaceFile(model.getPortTypes().get(0));
-
+ IStatus status = Status.OK_STATUS;
try {
- //IFile implJavaFile = createEmptyImplJavaFile("Test");
- //so far, it only generate implementation for first port type, neet to generate impl
class for all
- //port type interfaces
- generateImplClass(model.getPortTypes().get(0));
+ /*
+ * so far, it only generate implementation for first port type, need
+ * to generate impl class for all port type interfaces
+ */
+ List<String> portTypes = model.getPortTypes();
+ for (String portTypeName : portTypes) {
+ generateImplClass(portTypeName);
+ String implClsName = getImplPackageName() + "." +
getImplClassName(portTypeName);
+ model.addServiceClasses(implClsName);
+ }
+
} catch (CoreException e) {
- e.printStackTrace();
+ status = JBossStatusUtils
+ .errorStatus(
+ JBossWSCreationCoreMessages.ERROR_MESSAGE_INVALID_BINDING_FILE,
+ e);
} catch (MalformedTreeException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ status = JBossStatusUtils
+ .errorStatus(
+ JBossWSCreationCoreMessages.ERROR_MESSAGE_INVALID_BINDING_FILE,
+ e);
} catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ status = JBossStatusUtils
+ .errorStatus(
+ JBossWSCreationCoreMessages.ERROR_MESSAGE_INVALID_BINDING_FILE,
+ e);
}
- return Status.OK_STATUS;
+ return status;
}
-
- private String getImplPackageName(){
- return model.getCustomPackage() + ".impl";
- }
-
- private IPackageFragmentRoot getPackageFragmentRoot(){
- String str = model.getWebProjectName() + File.separator + RESOURCE_FOLDER;
- IPath path= new Path(str);
- IResource res= fWorkspaceRoot.findMember(path);
- IProject prj = res.getProject();
- IJavaProject javaPrj = JavaCore.create(prj);
- return javaPrj.getPackageFragmentRoot(res);
-
- }
-
- private String getCompilationUnitName(String portTypeName){
- return getImplClassName(portTypeName) + DEFAULT_CU_SUFFIX;
- }
-
+ protected void generateImplClass(String portTypeName/* , IFile implJavaFile */)
+ throws CoreException, MalformedTreeException, BadLocationException {
- private String getImplClassName(String portTypeName){
- String firstLetter = portTypeName.substring(0,1);
- String implClsName = firstLetter.toUpperCase() + portTypeName.substring(1);
- implClsName = implClsName + "Impl";
- return implClsName;
- }
-
- /*private CompilationUnit createASTForImplementation(String portTypeName) throws
JavaModelException {
- IPackageFragmentRoot root= getPackageFragmentRoot();
- IPackageFragment pack= root.getPackageFragment(getImplPackageName()); //$NON-NLS-1$
-
- if (!pack.exists()) {
- String packName= pack.getElementName();
- pack= root.createPackageFragment(packName, true, null);
- }
-
- String cuName= getCompilationUnitName(portTypeName);
- ICompilationUnit parentCU= pack.createCompilationUnit(cuName, "", false,
null); //$NON-NLS-1$
- // create a working copy with a new owner
-
- boolean needsSave= true;
- parentCU.becomeWorkingCopy(null); // cu is now a (primary) working copy
-
-
- ASTParser parser= ASTParser.newParser(AST.JLS3);
- parser.setSource(parentCU);
- parser.setResolveBindings(false);
- parser.setFocalPosition(0);
- return (CompilationUnit) parser.createAST(null);
- }*/
+ CompilationUnit portTypeCU = getCompilationUnitForInterface(portTypeName);
+ Object obj = portTypeCU.imports();
+ List<ImportDeclaration> imports = getImportsWithoutJaxwsAnnotation(portTypeCU);
-/* private IFile createEmptyImplJavaFile(String portTypeName) throws CoreException{
-
-
- IFile inFile = getServiceInterfaceFile(portTypeName);
- if(inFile != null && inFile.exists()){
- IFolder implFolder = inFile.getParent().getFolder(new Path("impl"));
- if(!implFolder.exists()){
- implFolder.create(true, true, null);
- }
- IFile implJava = implFolder.getFile(model.getServiceNames().get(0) +
".java");
- return implJava;
- }
- return null;
- }*/
-
- protected void generateImplClass(String portTypeName/*, IFile implJavaFile*/) throws
CoreException, MalformedTreeException, BadLocationException{
+ IPackageFragment pack = getImplPakcage();
- CompilationUnit cu = getCompilationUnitForInterface(portTypeName);
- Object obj = cu.imports();
- List<ImportDeclaration> imports = getImportsWithoutJaxwsAnnotation(cu);
-
- IPackageFragmentRoot root= getPackageFragmentRoot();
- IPackageFragment pack= root.getPackageFragment(getImplPackageName()); //$NON-NLS-1$
-
- if (!pack.exists()) {
- String packName= pack.getElementName();
- pack= root.createPackageFragment(packName, true, null);
- }
-
- String cuName= getCompilationUnitName(portTypeName);
- ICompilationUnit parentCU= pack.createCompilationUnit(cuName, "", true,
null); //$NON-NLS-1$
+ String cuName = getJavaFileName(portTypeName);
+ ICompilationUnit icu = pack.createCompilationUnit(cuName,
+ "", true, null); //$NON-NLS-1$
// create a working copy with a new owner
-
- parentCU.becomeWorkingCopy(null); // cu is now a (primary) working copy
-
-
- ASTParser parser= ASTParser.newParser(AST.JLS3);
- parser.setSource(parentCU);
+
+ icu.becomeWorkingCopy(null);
+
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setSource(icu);
parser.setResolveBindings(false);
parser.setFocalPosition(0);
-
+
CompilationUnit implCu = (CompilationUnit) parser.createAST(null);
AST ast = implCu.getAST();
- //creation of a Document and ASTRewrite
- String source = parentCU.getBuffer().getContents();
+ // creation of a Document and ASTRewrite
+ String source = icu.getBuffer().getContents();
Document document = new Document(source);
-
- ASTRewrite rewrite = ASTRewrite.create(implCu.getAST());
+
implCu.recordModifications();
-
- //start to add content implementation class
-
-
- //add package declaration for impl class:
+
+ // start to add content into implementation class
+
+ // add package declaration for impl class:
PackageDeclaration implPackage = ast.newPackageDeclaration();
implPackage.setName(ast.newName(pack.getElementName()));
implCu.setPackage(implPackage);
-
- //add imports for implementation class
- for(ImportDeclaration id: imports){
- ImportDeclaration newId = ast.newImportDeclaration();
- newId.setName(ast.newName(id.getName().getFullyQualifiedName()));
- implCu.imports().add(newId);
- }
-
- //import port type interface and jboss Logger
- ImportDeclaration id = ast.newImportDeclaration();
- QualifiedName portTypeImport = ast.newQualifiedName(ast.newName(cu
- .getPackage().getName().getFullyQualifiedName()), ast
- .newSimpleName(portTypeName));
- id.setName(portTypeImport);
- implCu.imports().add(id);
- id = ast.newImportDeclaration();
- id.setName(ast.newName("org.jboss.logging.Logger"));
- implCu.imports().add(id);
-
- //add class declaration
+
+ // add imports for implementation class
+ addImportsToImplementationClass(implCu, portTypeCU, portTypeName);
+
+ // add class declaration
TypeDeclaration type = ast.newTypeDeclaration();
type.setInterface(false);
- type.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
+ // add WebService annotation
+ String endpoint = getPortTypeInterfaceFullName(portTypeName);
+ NormalAnnotation ann = createAnnotation(ast,
+ getImplClassName(portTypeName), portTypeName, endpoint);
+ type.modifiers().add(ann);
+ type.modifiers().add(
+ ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
type.setName(ast.newSimpleName(getImplClassName(portTypeName)));
- type.superInterfaceTypes().add(ast.newSimpleType(ast.newName(portTypeName)));
-
- //add Logger variable declaration
- //createLoggerField(ast, type);
-
-
- //add method implementation
- TypeDeclaration inTD = (TypeDeclaration)cu.types().get(0);
- //firstly, get all methods that declared in Interface class and then add corresponding
methods to
+ type.superInterfaceTypes().add(
+ ast.newSimpleType(ast.newName(portTypeName)));
+
+ // add Logger variable declaration
+ // createLoggerField(ast, type);
+
+ // add method implementation
+ TypeDeclaration inTD = (TypeDeclaration) portTypeCU.types().get(0);
+ // firstly, get all methods that declared in Interface class and then
+ // add corresponding methods to
// the impl class
MethodDeclaration[] methods = inTD.getMethods();
- for(int i = 0; i < methods.length; i++){
- MethodDeclaration newMethod = createMethodForImplClass(ast, methods[i]);
+ for (int i = 0; i < methods.length; i++) {
+ MethodDeclaration newMethod = createMethodForImplClass(ast,
+ methods[i]);
type.bodyDeclarations().add(newMethod);
}
-
-
+
implCu.types().add(type);
-
-
- //try to save the modification
- TextEdit edits = implCu.rewrite(document, parentCU.getJavaProject().getOptions(true));
+
+ // try to save the Java file
+ TextEdit edits = implCu.rewrite(document, icu.getJavaProject()
+ .getOptions(true));
edits.apply(document);
String newSource = document.get();
- parentCU.getBuffer().setContents(newSource);
- parentCU.reconcile(ICompilationUnit.NO_AST, false, null, null);
- parentCU.commitWorkingCopy(true, null);
- parentCU.discardWorkingCopy();
-
-
-/* String content = implCu.toString();
-
- if(implJavaFile.exists()){
- implJavaFile.delete(true, null);
+ icu.getBuffer().setContents(newSource);
+ icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
+
+ icu.commitWorkingCopy(true, null);
+ icu.discardWorkingCopy();
+
+ }
+
+ private String getImplPackageName() {
+ return model.getCustomPackage() /* + ".impl" */;
+ }
+
+ private IPackageFragmentRoot getPackageFragmentRoot() {
+ String str = model.getWebProjectName() + File.separator
+ + RESOURCE_FOLDER;
+ IPath path = new Path(str);
+ IResource res = fWorkspaceRoot.findMember(path);
+ IProject prj = res.getProject();
+ IJavaProject javaPrj = JavaCore.create(prj);
+ return javaPrj.getPackageFragmentRoot(res);
+
+ }
+
+ private String getJavaFileName(String portTypeName) {
+
+ return getImplClassName(portTypeName) + DEFAULT_CU_SUFFIX;
+ }
+
+ private String getImplClassName(String portTypeName) {
+ String firstLetter = portTypeName.substring(0, 1);
+ String implClsName = firstLetter.toUpperCase()
+ + portTypeName.substring(1);
+ implClsName = implClsName + "Impl";
+ return implClsName;
+ }
+
+ private IPackageFragment getImplPakcage() throws JavaModelException {
+ IPackageFragmentRoot root = getPackageFragmentRoot();
+ String implPackageName = getImplPackageName();
+ IPackageFragment pack = root.getPackageFragment(implPackageName);
+
+ if (!pack.exists()) {
+ String packName = pack.getElementName();
+ pack = root.createPackageFragment(packName, true, null);
}
-
- implJavaFile.create(new StringBufferInputStream(content), true, null);*/
-
+
+ return pack;
}
-
- protected FieldDeclaration createLoggerField(AST ast, TypeDeclaration type){
- //for now, have no idea how to generate a field like:
+
+ private String getPortTypeInterfaceFullName(String portTypeName) {
+ return model.getCustomPackage() + "." + portTypeName;
+ }
+
+ private void addImportsToImplementationClass(CompilationUnit implCU,
+ CompilationUnit portTypeCU, String portTypeName) {
+ List<ImportDeclaration> imports = getImportsWithoutJaxwsAnnotation(portTypeCU);
+ AST implAST = implCU.getAST();
+
+ // add imports for implementation class
+ for (ImportDeclaration id : imports) {
+ ImportDeclaration newId = implAST.newImportDeclaration();
+ newId
+ .setName(implAST.newName(id.getName()
+ .getFullyQualifiedName()));
+ implCU.imports().add(newId);
+ }
+
+ // import port type interface and jboss Logger
+ ImportDeclaration importDec = implAST.newImportDeclaration();
+ QualifiedName portTypeImport = implAST.newQualifiedName(implAST
+ .newName(portTypeCU.getPackage().getName()
+ .getFullyQualifiedName()), implAST
+ .newSimpleName(portTypeName));
+ importDec.setName(portTypeImport);
+ implCU.imports().add(importDec);
+ importDec = implAST.newImportDeclaration();
+ importDec.setName(implAST.newName("org.jboss.logging.Logger"));
+ implCU.imports().add(importDec);
+
+ // import jaxws WebService
+ importDec = implAST.newImportDeclaration();
+ // hardcode here?
+ importDec.setName(implAST.newName("javax.jws.WebService"));
+ implCU.imports().add(importDec);
+ }
+
+ /*
+ * create web service annotation
+ */
+ protected NormalAnnotation createAnnotation(AST ast, String name,
+ String serviceName, String endpoint) {
+ NormalAnnotation ann = ast.newNormalAnnotation();
+ ann.setTypeName(ast.newSimpleName(ANNOTATION_TYPE_NAME_WEBSERVICE));
+
+ MemberValuePair member = createMemberValuePair(ast,
+ ANNOTATION_PROPERTY_NAME, name);
+ ann.values().add(member);
+ member = createMemberValuePair(ast, ANNOTATION_PROPERTY_SERVICE_NAME,
+ serviceName);
+ ann.values().add(member);
+ member = createMemberValuePair(ast,
+ ANNOTATION_PROPERTY_ENDPOINT_INTERFACE, endpoint);
+ ann.values().add(member);
+ return ann;
+ }
+
+ private MemberValuePair createMemberValuePair(AST ast, String propertyName,
+ String Value) {
+ MemberValuePair member = ast.newMemberValuePair();
+ member.setName(ast.newSimpleName(propertyName));
+ StringLiteral value = ast.newStringLiteral();
+ value.setLiteralValue(Value);
+ member.setValue(value);
+
+ return member;
+ }
+
+ protected FieldDeclaration createLoggerField(AST ast, TypeDeclaration type) {
+ // for now, have no idea how to generate a field like:
// private static Logger log = Logger.getLooger(TestEdnpointImpl.class);
- //TODO
-
+ // TODO
+ // ast.newWildcardType().setBound(type.);
VariableDeclarationFragment vdf = ast.newVariableDeclarationFragment();
vdf.setName(ast.newSimpleName("log"));
Initializer clsAccesss = ast.newInitializer();
@@ -343,164 +341,158 @@
mi.setName(ast.newSimpleName("getLogger"));
mi.arguments().add(fa);
vdf.setInitializer(mi);
-
+
type.bodyDeclarations().add(vdf);
-
- /*SingleVariableDeclaration svd = ast.newSingleVariableDeclaration();
- svd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD));
- svd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
- svd.setType(ast.newSimpleType(ast.newSimpleName(CLASS_LOGGER)));
- svd.setName(ast.newSimpleName("log"));
- Initializer initializer = ast.newInitializer();
- Block initBlock = ast.newBlock();
-
- MethodInvocation mi = ast.newMethodInvocation();
- mi.setExpression(ast.newName("Logger"));
- mi.setName(ast.newSimpleName("getLogger"));
-
-
- MethodInvocation invokCls = ast.newMethodInvocation();
- invokCls.setExpression((ast.newSimpleName("TestImpl"));
- invokCls.setName(ast.newSimpleName("class"));
- mi.arguments().add(invokCls.getExpression();
- svd.setInitializer(ast.newExpressionStatement(mi).getExpression());*/
+
+ /*
+ * SingleVariableDeclaration svd = ast.newSingleVariableDeclaration();
+ * svd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD));
+ * svd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
+ * svd.setType(ast.newSimpleType(ast.newSimpleName(CLASS_LOGGER)));
+ * svd.setName(ast.newSimpleName("log")); Initializer initializer =
+ * ast.newInitializer(); Block initBlock = ast.newBlock();
+ *
+ * MethodInvocation mi = ast.newMethodInvocation();
+ * mi.setExpression(ast.newName("Logger"));
+ * mi.setName(ast.newSimpleName("getLogger"));
+ *
+ *
+ * MethodInvocation invokCls = ast.newMethodInvocation();
+ * invokCls.setExpression((ast.newSimpleName("TestImpl"));
+ * invokCls.setName(ast.newSimpleName("class"));
+ * mi.arguments().add(invokCls.getExpression();
+ * svd.setInitializer(ast.newExpressionStatement(mi).getExpression());
+ */
return null;
}
-
- protected MethodDeclaration createMethodForImplClass(AST ast, MethodDeclaration
inMethod){
-
+
+ protected MethodDeclaration createMethodForImplClass(AST ast,
+ MethodDeclaration inMethod) {
+
MethodDeclaration md = ast.newMethodDeclaration();
md.setConstructor(false);
List modifiers = md.modifiers();
modifiers.add(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
- md.setName(ast.newSimpleName(inMethod.getName().getFullyQualifiedName()));
-
- SimpleType sType = (SimpleType)inMethod.getReturnType2();
- Name sTypeName = sType.getName();
- md.setReturnType2(ast.newSimpleType(ast.newName(sTypeName.getFullyQualifiedName())));
-
- List parameters = inMethod.parameters();;
- for(Object obj: parameters){
- SingleVariableDeclaration implSvd = ast.newSingleVariableDeclaration();
- SingleVariableDeclaration svd = (SingleVariableDeclaration)obj;
- implSvd.setName(ast.newSimpleName(svd.getName().getFullyQualifiedName()));
+ md.setName(ast
+ .newSimpleName(inMethod.getName().getFullyQualifiedName()));
+
+ SimpleType sType = (SimpleType) inMethod.getReturnType2();
+ Name sTypeName = sType.getName();
+ md.setReturnType2(ast.newSimpleType(ast.newName(sTypeName
+ .getFullyQualifiedName())));
+
+ List parameters = inMethod.parameters();
+ ;
+ for (Object obj : parameters) {
+ SingleVariableDeclaration implSvd = ast
+ .newSingleVariableDeclaration();
+ SingleVariableDeclaration svd = (SingleVariableDeclaration) obj;
+ implSvd.setName(ast.newSimpleName(svd.getName()
+ .getFullyQualifiedName()));
implSvd.setType(copyTypeFromOtherASTNode(ast, svd.getType()));
md.parameters().add(implSvd);
}
-
- //create method body
+
+ // create method body
Block block = ast.newBlock();
Type returnType = inMethod.getReturnType2();
ReturnStatement rs = ast.newReturnStatement();
- String typeName = ((SimpleType)returnType).getName().getFullyQualifiedName();
- if(returnType.isPrimitiveType() && returnType.isSimpleType()){
+ String typeName = ((SimpleType) returnType).getName()
+ .getFullyQualifiedName();
+ if (returnType.isPrimitiveType() && returnType.isSimpleType()) {
+ if (((PrimitiveType) returnType).getPrimitiveTypeCode().equals(
+ PrimitiveType.BOOLEAN)) {
+ BooleanLiteral bl = ast.newBooleanLiteral(false);
+ rs.setExpression(bl);
+ } else {
NumberLiteral nl = ast.newNumberLiteral();
nl.setToken("0");
rs.setExpression(nl);
-
- }else if("String".equals(typeName)){
+ }
+
+ } else if ("String".equals(typeName)) {
StringLiteral sl = ast.newStringLiteral();
sl.setLiteralValue("");
rs.setExpression(sl);
-
- }else{
+
+ } else {
rs.setExpression(ast.newNullLiteral());
}
block.statements().add(rs);
md.setBody(block);
-
+
return md;
}
-
- protected Name copyQualifiedName(AST ast, QualifiedName qname){
- String fullQName = qname.getFullyQualifiedName();
- StringTokenizer st = new StringTokenizer(fullQName,".");
- Name copy = null;
- SimpleName sn = ast.newSimpleName(st.nextToken());
- while(st.hasMoreTokens()){
- SimpleName snNext = ast.newSimpleName(st.nextToken());
- if(copy == null){
- copy = ast.newQualifiedName(sn, snNext);
- }else{
- //copy = ast.newn)
- }
- }
-
- return null;
- }
-
- private Type copyTypeFromOtherASTNode(AST ast, Type type){
- if(type instanceof PrimitiveType){
- return ast.newPrimitiveType(((PrimitiveType)type).getPrimitiveTypeCode());
- }
- else if(type instanceof SimpleType){
- SimpleType simpleType = (SimpleType)type;
-
- return ast.newSimpleType(ast.newName(simpleType.getName().getFullyQualifiedName()));
- }
- else if(type instanceof ArrayType){
- ArrayType atype = (ArrayType)type;
- return ast.newArrayType(copyTypeFromOtherASTNode(ast, atype.getComponentType()));
- }
- else if(type instanceof ParameterizedType){
- ParameterizedType ptype = (ParameterizedType)type;
- ast.newParameterizedType(copyTypeFromOtherASTNode(ast, ptype.getType()));
- }
- else if(type instanceof WildcardType){
- WildcardType sourcetype = (WildcardType)type;
+
+
+ private Type copyTypeFromOtherASTNode(AST ast, Type type) {
+ if (type instanceof PrimitiveType) {
+ return ast.newPrimitiveType(((PrimitiveType) type)
+ .getPrimitiveTypeCode());
+ } else if (type instanceof SimpleType) {
+ SimpleType simpleType = (SimpleType) type;
+
+ return ast.newSimpleType(ast.newName(simpleType.getName()
+ .getFullyQualifiedName()));
+ } else if (type instanceof ArrayType) {
+ ArrayType atype = (ArrayType) type;
+ return ast.newArrayType(copyTypeFromOtherASTNode(ast, atype
+ .getComponentType()));
+ } else if (type instanceof ParameterizedType) {
+ ParameterizedType ptype = (ParameterizedType) type;
+ ast.newParameterizedType(copyTypeFromOtherASTNode(ast, ptype
+ .getType()));
+ } else if (type instanceof WildcardType) {
+ WildcardType sourcetype = (WildcardType) type;
WildcardType wtype = ast.newWildcardType();
wtype.setBound(sourcetype.getBound());
return wtype;
}
-
+
return null;
}
- protected List<ImportDeclaration> getImportsWithoutJaxwsAnnotation(CompilationUnit
cu){
+
+ protected List<ImportDeclaration> getImportsWithoutJaxwsAnnotation(
+ CompilationUnit cu) {
List<ImportDeclaration> importList = new ArrayList<ImportDeclaration>();
List imports = cu.imports();
- for(Object obj: imports){
- ImportDeclaration id = (ImportDeclaration)obj;
+ for (Object obj : imports) {
+ ImportDeclaration id = (ImportDeclaration) obj;
String imClsName = id.getName().getFullyQualifiedName();
- if(!imClsName.startsWith(PREFIX_JAXWS_ANNOTATION_CLASS)){
+ if (!imClsName.startsWith(PREFIX_JAXWS_ANNOTATION_CLASS)) {
importList.add(id);
}
}
-
+
return importList;
}
-
- private CompilationUnit getCompilationUnitForInterface(String portTypeName){
+
+ private CompilationUnit getCompilationUnitForInterface(String portTypeName) {
IFile inFile = getServiceInterfaceFile(portTypeName);
- IJavaElement inSrc = JavaCore.create(inFile);
ICompilationUnit icu = JBossWSCreationUtils.getJavaUnitFromFile(inFile);
ASTParser astp = ASTParser.newParser(AST.JLS3);
astp.setSource(icu);
- CompilationUnit cu = (CompilationUnit)astp.createAST(null);
-
+ CompilationUnit cu = (CompilationUnit) astp.createAST(null);
+
return cu;
}
-
- private IFile getServiceInterfaceFile(String portTypeName){
- String packageName = model.getCustomPackage();
- IProject project = JBossWSCreationUtils.getProjectByName(model.getWebProjectName());
+
+ private IFile getServiceInterfaceFile(String portTypeName) {
IFolder pkgFolder = getPackageFolder();
- IFile inFile = pkgFolder.getFile(portTypeName + ".java");
+ IFile inFile = pkgFolder.getFile(portTypeName + DEFAULT_CU_SUFFIX);
return inFile;
}
-
-
- private IFolder getPackageFolder(){
- IProject project = JBossWSCreationUtils.getProjectByName(model.getWebProjectName());
+
+ private IFolder getPackageFolder() {
+ IProject project = JBossWSCreationUtils.getProjectByName(model
+ .getWebProjectName());
IFolder srcFolder = project.getFolder(RESOURCE_FOLDER);
- String pkgFolderName = model.getCustomPackage().replace(".",
File.separator);
+ String pkgFolderName = model.getCustomPackage().replace(".",
+ File.separator);
return srcFolder.getFolder(pkgFolderName);
-
+
}
-
-
-
-
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/InitialCommand.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -51,7 +51,7 @@
return StatusUtils.errorStatus(e.getLocalizedMessage(), e);
}
} else {
- model.setServiceClass(ws.getWebServiceInfo().getImplURL());
+ model.addServiceClasses(ws.getWebServiceInfo().getImplURL());
}
return Status.OK_STATUS;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -50,7 +50,13 @@
throws ExecutionException {
IEnvironment environment = getEnvironment();
IStatus status = null;
- status = mergeWebXML(getAxisServletDescriptor());
+ ServletDescriptor[] servletDescriptors = new
ServletDescriptor[model.getServiceClasses().size()];
+ List<String> serviceClasses = model.getServiceClasses();
+ for(int i = 0; i < serviceClasses.size(); i++){
+ servletDescriptors[i] = getAxisServletDescriptor(serviceClasses.get(i));
+ }
+
+ status = mergeWebXML(servletDescriptors);
if (status.getSeverity() == Status.ERROR) {
environment.getStatusHandler().reportError(status);
return status;
@@ -58,7 +64,7 @@
return Status.OK_STATUS;
}
- private IStatus mergeWebXML(final ServletDescriptor servletDescriptor) {
+ private IStatus mergeWebXML(final ServletDescriptor[] servletDescriptors) {
IStatus status = Status.OK_STATUS;
final IModelProvider provider = ModelProviderManager
.getModelProvider(JBossWSCreationUtils.getProjectByName(model
@@ -68,8 +74,10 @@
Object object = provider.getModelObject();
if (object instanceof org.eclipse.jst.javaee.web.WebApp) {
WebApp webApp = (WebApp) object;
+ for(int i = 0; i < servletDescriptors.length; i++){
addServlet(JBossWSCreationUtils.getProjectByName(model
- .getWebProjectName()), servletDescriptor, webApp);
+ .getWebProjectName()), servletDescriptors[i], webApp);
+ }
}
}
@@ -77,13 +85,12 @@
return status;
}
- private ServletDescriptor getAxisServletDescriptor() {
+ private ServletDescriptor getAxisServletDescriptor(String clsName) {
ServletDescriptor sd = new ServletDescriptor();
- sd._name = JBossWSCreationUtils.classNameFromQualifiedName(model
- .getServiceClass());
+ sd._name = JBossWSCreationUtils.classNameFromQualifiedName(clsName);
sd._displayName = sd._name;
- sd._className = model.getServiceClass();
+ sd._className = clsName;
sd._mappings = JBossWSCreationCoreMessages.SEPARATOR_JAVA + sd._name;
return sd;
}
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImpl.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -40,7 +40,7 @@
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- String implClass = model.getServiceClass();
+ String implClass = model.getServiceClasses().get(0);
String project = model.getWebProjectName();
ICompilationUnit unit = null;
try {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSProviderInvokeCommand.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -112,7 +112,7 @@
commandLine += " -c " + projectRoot + Path.SEPARATOR
+ "build/classes/ ";
- commandLine += model.getServiceClass();
+ commandLine += model.getServiceClasses().get(0);
return commandLine;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -10,23 +10,29 @@
private boolean serverStatus;
private String wsdlURI;
private List<String> portTypes;
- private List<String> serviceName;
+ private List<String> serviceNames;
private String customPackage;
- private List<String> bindingFileLocation;
+ private List<String> bindingFiles;
private String catalog;
- private String serviceClass;
+ private List<String> serviceClasses;
private boolean isGenWSDL;
private String target;
-
- public String getServiceClass() {
- return serviceClass;
- }
- public void setServiceClass(String serviceClass) {
- this.serviceClass = serviceClass;
+ public List<String> getServiceClasses(){
+ if(serviceClasses == null){
+ serviceClasses = new ArrayList<String>();
+ }
+ return this.serviceClasses;
}
+ public void addServiceClasses(String serviceCls){
+ this.serviceClasses = getServiceClasses();
+ if(!serviceClasses.contains(serviceCls)){
+ serviceClasses.add(serviceCls);
+ }
+ }
+
public String getCustomPackage() {
return customPackage;
}
@@ -41,20 +47,29 @@
return portTypes;
}
public void addPortTypes(String portType) {
- this.getPortTypes().add(portType);
+ this.portTypes = getPortTypes();
+ if(!this.portTypes.contains(portType)){
+ this.portTypes.add(portType);
+ }
}
public void setPortTypeList(List<String> portTypeList) {
this.portTypes = portTypeList;
}
public List<String> getServiceNames() {
- return serviceName;
+ if(serviceNames == null){
+ serviceNames = new ArrayList<String>();
+ }
+ return serviceNames;
}
public void addServiceName(String serviceName) {
- this.getServiceNames().add(serviceName);
+ this.serviceNames = getServiceClasses();
+ if(!serviceName.contains(serviceName)){
+ this.serviceNames.add(serviceName);
+ }
}
public void setServiceList(List<String> serviceList) {
- this.serviceName = serviceList;
+ this.serviceNames = serviceList;
}
public String getWsdlURI() {
@@ -79,13 +94,16 @@
}
public List<String> getBindingFiles(){
- if(bindingFileLocation == null){
- bindingFileLocation = new ArrayList<String>();
+ if(bindingFiles == null){
+ bindingFiles = new ArrayList<String>();
}
- return this.bindingFileLocation;
+ return this.bindingFiles;
}
public void addBindingFile(String bindingFileLocation){
- this.bindingFileLocation.add(bindingFileLocation);
+ this.bindingFiles = this.getBindingFiles();
+ if(!this.bindingFiles.contains(bindingFileLocation)){
+ this.bindingFiles.add(bindingFileLocation);
+ }
}
public boolean isGenWSDL() {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-05-22
11:22:53 UTC (rev 8288)
@@ -10,7 +10,9 @@
ERROR_MESSAGE_INVALID_BINDING_FILE={0} is not a valid JAX-WS or JAXB binding file
ERROR_READ_BINDING_FILE=Exception occurred while reading binding file
SEPARATOR_JAVA=/
-ERROR_NO_ANNOTATION=This class has not required Annotation!
+
+ERROR_IMPLEMENTATION_CODE_GENERATION=Exception occurred while generating implementation
class
+ERROR_NO_ANNOTATION=This class has no required Annotation!
WEBSERVICE_ANNOTATION=@WebService
ERROR_NO_CLASS= The class '{0}' cannot be loaded via project {1}.Check that the
project contains the class, or that the class is loadable according to the Java Build Path
of the project.
-ERROR_WS_LOCATION=The JBoss WS Runtime Location is NULL. Please set the location on JBoss
WS preferences page.
\ No newline at end of file
+ERROR_WS_LOCATION=The JBoss WS Runtime Location is NULL. Please set the location on JBoss
WS preferences page.
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -18,6 +18,7 @@
public static String ERROR_READ_BINDING_FILE;
public static String SEPARATOR_JAVA;
+ public static String ERROR_IMPLEMENTATION_CODE_GENERATION;
public static String ERROR_NO_ANNOTATION;
public static String WEBSERVICE_ANNOTATION;
public static String ERROR_NO_CLASS;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-05-22
02:01:46 UTC (rev 8287)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/wsrt/JBossWebService.java 2008-05-22
11:22:53 UTC (rev 8288)
@@ -52,7 +52,7 @@
commands.add(new BindingFilesValidationCommand(model));
commands.add(new WSDL2JavaCommand(model));
commands.add(new ImplementationClassCreationCommand(model));
- //commands.add(new
JbossWSRuntimeCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project)));
+ commands.add(new MergeWebXMLCommand(model));
}
else if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP){
commands.add(new InitialCommand(model, this, WebServiceScenario.BOTTOMUP));