metro-jax-ws icon indicating copy to clipboard operation
metro-jax-ws copied to clipboard

wsimport issue with symlink and file URI

Open Tomas-Kraus opened this issue 2 years ago • 1 comments

wsimport fails if the binding file is behind a symlinked and the path is provided as URI to wsimport. The URI is used because of the wsimport ant task which detects the link and then uses URI.

ls -ld /test-dir
lrwxr-xr-x  1 root  wheel  22 Mar 19 16:38 /test-dir -> /Users/romano/test-dir

export S1AS_HOME=/Users/romano/workspaces/glassfish/main/appserver/distributions/glassfish/target/stage/glassfish4
$S1AS_HOME/glassfish/bin/wsimport -d test -Xendorsed -keep -b file:/test-dir/custom-server.xml /test-dir/AddNumbers.wsdl

parsing WSDL...

[ERROR]     "file:/test-dir/AddNumbers.wsdl" is not a part of this compilation. Is this a mistake for "file:/test-dir/custom-server.xml"?
  line 49 of file:/test-dir/custom-server.xml

    Failed to parse the WSDL.

Environment

macos

Affected Versions

[2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8]

Source: https://github.com/javaee/metro-jax-ws/issues/1147 Author: glassfishrobot

Tomas-Kraus avatar Jun 02 '22 17:06 Tomas-Kraus

This is still an issue even in the latest 4.0.0 version. /home/bld is a symlink to /app1/home/bld.

20:51:29 [INFO] --- jaxws-maven-plugin:4.0.0:wsimport (SubmissionService) @ services-client --- 20:51:29 [INFO] Processing: file:/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/target/wsdl/META-INF/wsdl/SubmissionService.wsdl 20:51:29 [INFO] jaxws:wsimport args: [-keep, -s, '/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/target/generated-sources/wsimport', -d, '/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/target/classes', -verbose, -encoding, ISO-8859-1, -Xnocompile, -p, com.txdot..service.agency.ws.crashsubmission.client, -target, 3.0, -b, '/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/src/main/resources/jaxws/SubmissionServiceDataBinding.xml', "file:/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/target/wsdl/META-INF/wsdl/SubmissionService.wsdl"] 20:51:29 parsing WSDL... 20:51:29 [ERROR] "file:/app1/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/target/wsdl/META-INF/wsdl/SubmissionService_schema1.xsd" is not a part of this compilation. Is this a mistake for "file:/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/target/wsdl/META-INF/wsdl/SubmissionService_schema1.xsd"? 20:51:29 line 4 of file:/app1/home/bld/devtools/jenkins/workspace/trunk-nightly/services/services-client/src/main/resources/jaxws/SubmissionServiceDataBinding.xml 20:51:29 20:51:29 Exception in thread "main" java.lang.reflect.InvocationTargetException 20:51:29 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:51:29 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) 20:51:29 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 20:51:29 at java.base/java.lang.reflect.Method.invoke(Method.java:568) 20:51:29 at org.jvnet.jax_ws_commons.jaxws.Invoker.main(Invoker.java:74) 20:51:29 Caused by: com.sun.tools.ws.wscompile.AbortException 20:51:29 at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:114) 20:51:29 at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2265) 20:51:29 at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:164) 20:51:29 at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:111) 20:51:29 at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:413) 20:51:29 at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:180) 20:51:29 at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:158) 20:51:29 ... 5 more

tech-consortium avatar Aug 03 '22 02:08 tech-consortium