Hi there,
I have a ant wsgen task defined to create artifacts for an JAX-WS deployment.
The following code was working fine with JDK1.8 and fails with JDK11, Please suggest:
build.gradle
configurations {
jaxws
}
dependencies {
project.dependencies.jaxws 'com.sun.xml.ws:jaxws-tools:2.2.10'
}
ant.taskdef(name: 'wsgen', classname: 'com.sun.tools.ws.ant.WsGen', classpath: project.configurations.jaxws.asPath)
webServices.each { service ->
ant.wsgen(
keep: true,
destdir: <dest dir with .class files>,
sourcedestdir: <src dir with .java files>,
resourcedestdir: wsdlDir,
genwsdl: 'true',
classpath: <dest dir with .class files>,
protocol: 'Xsoap1.2',
extension: 'true',
inlineSchemas: 'true',
sei: 'com.org.jaxws.sampleService1,
verbose: 'true'
)
}
Now my sampleService1.java file:
import javax.jws.WebMethod;
import javax.security.auth.Subject;
import javax.jws.WebService;
@WebService(portName = "TestPort")
public class sampleService1 {
@WebMethod
public String sayHello(String str) {
final StringBuilder output = new StringBuilder();
output.append("hello");
return output.toString();
}
}
When i run the above code, i get wsgen failed error.
Please suggest.