Author: objectiser
Date: 2010-03-25 17:56:52 -0400 (Thu, 25 Mar 2010)
New Revision: 211
Modified:
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/generator/WSDLGenerator.java
Log:
Fix WSDL generation problem.
Modified:
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java
===================================================================
---
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java 2010-03-23
22:01:18 UTC (rev 210)
+++
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java 2010-03-25
21:56:52 UTC (rev 211)
@@ -121,7 +121,7 @@
try {
generateWSDL(conversationModel, mref, res);
} catch(Exception e) {
- logger.error("Failed to generate WSDL for '"+res+"'",
e);
+ org.jboss.savara.tools.wsdl.osgi.Activator.logError("Failed to generate WSDL
for '"+res+"'", e);
}
}
}
@@ -181,7 +181,8 @@
// Generate imports for specified message schema
for (Namespace ns : contract.getNamespaces()) {
- if (ns.getSchemaLocation() != null) {
+ if (ns.getSchemaLocation() != null &&
+ ns.getSchemaLocation().trim().length() > 0) {
IFile file=cdmResource.getParent().getFile(new Path(ns.getSchemaLocation()));
javax.wsdl.Import imp=defns.get(0).createImport();
@@ -201,8 +202,15 @@
new org.eclipse.core.runtime.NullProgressMonitor());
}
- artifactFile.setContents(file.getContents(), true, false,
+ try {
+ artifactFile.setContents(file.getContents(), true, false,
new org.eclipse.core.runtime.NullProgressMonitor());
+ } catch(Exception e) {
+ org.jboss.savara.tools.wsdl.osgi.Activator.logError(
+ "Failed to generate WSDL for choreography '"+
+ cdmResource+"' to file: "+artifactFile.getName(), e);
+ }
+
}
}
}
Modified:
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/generator/WSDLGenerator.java
===================================================================
---
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/generator/WSDLGenerator.java 2010-03-23
22:01:18 UTC (rev 210)
+++
tools/eclipse/trunk/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/generator/WSDLGenerator.java 2010-03-25
21:56:52 UTC (rev 211)
@@ -460,7 +460,7 @@
throw new UnsupportedOperationException("Currently only supports single type
reference");
}
- if (qname != null &&
+ if (defn != null && qname != null &&
(ret = defn.getMessage(qname)) == null) {
ret = defn.createMessage();
ret.setUndefined(false);
Show replies by date