Author: dennyxu
Date: 2008-06-19 04:12:32 -0400 (Thu, 19 Jun 2008)
New Revision: 8846
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java
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/MergeWebXMLCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.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.ui/META-INF/MANIFEST.MF
Log:
JBIDE-2370: set servlet name to the port typename in the wsdl file,
prompt error message dialog while generating code failure
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java 2008-06-19
08:05:07 UTC (rev 8845)
+++
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java 2008-06-19
08:12:32 UTC (rev 8846)
@@ -13,6 +13,7 @@
import java.util.Set;
import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
public class JBossWSFacetInstallDataModelProvider extends
@@ -54,5 +55,7 @@
return super.getDefaultProperty(propertyName);
}
-
+ public Object create() {
+ return DataModelFactory.createDataModel(this);
+ }
}
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-06-19
08:05:07 UTC (rev 8845)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/BindingFilesValidationCommand.java 2008-06-19
08:12:32 UTC (rev 8846)
@@ -57,6 +57,7 @@
/*
* just ensure that the file is a readable xml file to avoid breaking code generation
+ * so the xml file is not validated with xml schema
*/
private IStatus validateXMLFile(XMLReader reader, String filename){
try {
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-06-19
08:05:07 UTC (rev 8845)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-06-19
08:12:32 UTC (rev 8846)
@@ -349,7 +349,10 @@
PrimitiveType.BOOLEAN)) {
BooleanLiteral bl = ast.newBooleanLiteral(false);
rs.setExpression(bl);
- } else {
+ }else if(((PrimitiveType) returnType).getPrimitiveTypeCode().equals(
+ PrimitiveType.VOID)) {
+ // do nothing
+ }else {
NumberLiteral nl = ast.newNumberLiteral();
nl.setToken("0");
rs.setExpression(nl);
@@ -363,9 +366,7 @@
StringLiteral sl = ast.newStringLiteral();
sl.setLiteralValue("");
rs.setExpression(sl);
- } else if("void".equals(typeName)){
- // do nothing
- }else{
+ } else{
rs.setExpression(ast.newNullLiteral());
}
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-06-19
08:05:07 UTC (rev 8845)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/MergeWebXMLCommand.java 2008-06-19
08:12:32 UTC (rev 8846)
@@ -135,8 +135,12 @@
private ServletDescriptor getServletDescriptor(String clsName) {
+ String servletName = JBossWSCreationUtils.classNameFromQualifiedName(clsName);
+ if(servletName.endsWith("Impl") && servletName.length() > 4){
+ servletName = servletName.substring(0, servletName.length() - 4);
+ }
ServletDescriptor sd = new ServletDescriptor();
- sd._name = JBossWSCreationUtils.classNameFromQualifiedName(clsName);
+ sd._name = servletName;
sd._displayName = sd._name;
sd._className = clsName;
sd._mappings = JBossWSCreationCoreMessages.Separator_Java + sd._name;
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2008-06-19
08:05:07 UTC (rev 8845)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2008-06-19
08:12:32 UTC (rev 8846)
@@ -80,7 +80,17 @@
}
// log the result of the command execution
-
JBossWSCreationCore.getDefault().logInfo(convertInputStreamToString(proc.getInputStream()));
+ String resultOutput = convertInputStreamToString(proc.getInputStream());
+ if(resultOutput != null && resultOutput.indexOf("[ERROR]")
>= 0){
+ JBossWSCreationCore.getDefault().logError(resultOutput);
+ IStatus errorStatus = StatusUtils.errorStatus(resultOutput);
+ status = StatusUtils
+ .errorStatus(
+ JBossWSCreationCoreMessages.Error_Message_Failed_To_Generate_Code,
+ new CoreException(errorStatus));
+ }else{
+ JBossWSCreationCore.getDefault().logInfo(resultOutput);
+ }
} catch (IOException e) {
JBossWSCreationCore.getDefault().logError(e);
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-06-19
08:05:07 UTC (rev 8845)
+++
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2008-06-19
08:12:32 UTC (rev 8846)
@@ -12,7 +12,7 @@
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
-Error_Message_Failed_To_Generate_Code=Failed to Generate code, please read the log for
more details
+Error_Message_Failed_To_Generate_Code=Failed to Generate Web Service code, please check
the log for more details
Error_Message_Failed_to_Generate_Implementation=Failed to generate implementation class
Error_Message_Command_File_Not_Found=The command file: "{0}" does not exist,
please check the JBoss Web Service runtime setting to make sure the location of JBoss Web
Service runtime is valid.
Error_Message_Execute_Command=Exception occurred while execute JBossWS tool command
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2008-06-19
08:05:07 UTC (rev 8845)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2008-06-19
08:12:32 UTC (rev 8846)
@@ -26,3 +26,4 @@
org.eclipse.wst.common.project.facet.ui,
org.jboss.tools.ws.ui
Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.ws.creation.ui.wsrt
Show replies by date