Commit c7d67332 authored by Philippe Merle's avatar Philippe Merle

Updated the FraSCAti WSDL compiler plugin to remake it compatible with EasyBPEL.

parent 24e19d82
......@@ -131,27 +131,26 @@
</dependency>
<!-- JAXB2 xjc plugin for generating toString() methods in XML to Java mapping classes. -->
<!-- TODO move back to 0.6.0 when EasyBPEL 1.4 will use this JAXB2 Basics Runtime. -->
<!--
<version>0.6.0</version>
-->
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>${jaxb2.version}</version>
</dependency>
<!-- TODO move back to 0.6.0 when EasyBPEL 1.4 will use this JAXB2 Basics Runtime. -->
<artifactId>jaxb2-basics</artifactId>
<!-- TODO move back to 0.6.0 when EasyBPEL 1.4 will use this JAXB2 Basics Runtime. -->
<version>0.5.0</version>
<!--
<artifactId>jaxb2-basics-runtime</artifactId>
<version>0.6.0</version>
<version>${jaxb2.version}</version>
-->
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<!-- TODO move back to 0.6.0 when EasyBPEL 1.4 will use this JAXB2 Basics Runtime. -->
<!--
<artifactId>jaxb2-basics-runtime</artifactId>
<version>0.6.0</version>
<version>${jaxb2.version}</version>
<!-- <artifactId>runtime</artifactId> -->
<!-- <version>0.4.1.5</version> -->
-->
<artifactId>runtime</artifactId>
<version>0.4.1.5</version>
</dependency>
</dependencies>
......
......@@ -155,8 +155,15 @@ public class WsdlCompilerCXF
// Require to study the Apache CXF WSDL2Java class to find a more appropriate entry point.
String outputDirectory = this.membraneGeneration.getOutputDirectory() + '/' + targetDirectory;
URL bindingFileURL= Thread.currentThread().getContextClassLoader().getResource(bindingFileName);
String[] params = new String[]{this.wsdl2javaOptions , "-b" , bindingFileURL.toExternalForm() , "-d", outputDirectory , wsdlUri };
URL bindingFileURL = Thread.currentThread().getContextClassLoader().getResource(bindingFileName);
// Create WSDL compiler parameters, including -b option if the JAXB binding file is present in the classpath.
String[] params = null;
if(bindingFileURL != null) {
params = new String[]{this.wsdl2javaOptions, "-b" , bindingFileURL.toExternalForm(), "-d", outputDirectory , wsdlUri };
} else {
params = new String[]{this.wsdl2javaOptions, "-d", outputDirectory , wsdlUri };
}
log.info("Compiling WSDL '" + wsdlUri + "' into '" + outputDirectory + "'...");
......
<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings jaxb:version="2.0" jaxb:extensionBindingPrefixes="xjc"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jaxb:globalBindings>
<xjc:simple/>
<jaxb:javaType name="java.util.Date" xmlType="xs:dateTime"
parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
<jaxb:javaType name="java.util.Date" xmlType="xs:date"
parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
<jaxb:javaType name="java.util.Date" xmlType="xs:time"
parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
<jaxb:serializable/>
</jaxb:globalBindings>
</jaxb:bindings>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment