I have a simple ant script to build my classes from a sdl. Unfortunately wsimport fails immediately. I suspect it has something to do with classpaths.
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath>
<pathelement location="${jaxws.lib.dir}/jaxws-tools.jar" />
</classpath>
</taskdef>
<wsimport
wsdl="${project.wsdl.dir}\some.wsdl"
destdir="${jaxws.output.dir}"
keep="false"
extension="true"
verbose="true"
wsdlLocation="http://localhost/wsdl"
target="2.1">
<depends file="${project.wsdl.dir}"/>
<produces dir="${jaxws.output.dir}"/>
</wsimport>
The this is the output it produces:
[wsimport] 15 Mar 2013 12:23:25 PM com.sun.xml.bind.v2.util.XmlFactory createDocumentBuilderFactory [wsimport] SEVERE: null [wsimport] java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V [wsimport] at com.sun.xml.bind.v2.util.XmlFactory.createDocumentBuilderFactory(XmlFactory.java:176) [wsimport] at com.sun.tools.xjc.reader.internalizer.DOMForest.(DOMForest.java:162) [wsimport] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.resetSchema(SchemaCompilerImpl.java:215) [wsimport] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.(SchemaCompilerImpl.java:114) [wsimport] at com.sun.tools.xjc.api.XJC.createSchemaCompiler(XJC.java:72) [wsimport] at com.sun.tools.ws.wscompile.WsimportOptions.(WsimportOptions.java:152) [wsimport] at com.sun.tools.ws.wscompile.WsimportTool.(WsimportTool.java:89) [wsimport] at com.sun.tools.ws.wscompile.WsimportTool.(WsimportTool.java:92) [wsimport] at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:848) [wsimport] at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:103) [wsimport] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) [wsimport] at org.apache.tools.ant.Task.perform(Task.java:364) [wsimport] at org.apache.tools.ant.Target.execute(Target.java:301) [wsimport] at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:135) [wsimport] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.parseBuildFile(InternalAntRunner.java:192) [wsimport] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:401) [wsimport] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
If I run the commandline create by the verbose logging, on wsimport, from the jax-ws bin directory everything works perfectly
[wsimport] command line: wsimport -d C:\Development\Source\ccs\jaxws-output -extension -verbose -target 2.1 C:\Development\Source\ccs\wsdl\some.wsdl -wsdllocation http://localhost/wsdl
I tried looking for a solution, but right now I am out of ideas