I figured this out on my own. There turned out to be a different error. This is the way that worked for me.
ant
{
taskdef(name:'wsimport', classname:'com.sun.tools.ws.ant.WsImport', classpath:configurations.tools.asPath)
wsimport(
keep:true,
destdir: tempDestFile,
wsdl:"${common_WSDL_dir}/${current_wsdl_name}.wsdl",
xadditionalHeaders:true
){
binding(dir:file("${module_src_main_wsdl}"), includes:"jaxb-bindings.xml,jaxws-bindings.xml")
}
}
I was also using xjcargs in my wsimport (that I omitted from the original question) and the jars being referenced were named incorrectly. This is what the working task looks like.
wsimport(
keep:true,
destdir: tempDestFile,
wsdl:"${f.absolutePath}",
xadditionalHeaders:true
){
binding(dir:"${common_WSDL_dir}", includes:"common-jaxb-bindings.xml,common-jaxws-bindings.xml")
xjcarg(value:configurations.compile.asPath + "/schemas-common.jar")
xjcarg(value:configurations.compile.asPath + "/compile/schemas-hrxml3_1.jar")
}