【发布时间】:2017-12-10 01:23:26
【问题描述】:
我有一组代码,它们适用于两种不同的产品,但部分代码对每种产品的行为不同
URL wsdlURL = IntegrationLandscapeService.class.getClassLoader().getResource("IntegrationLandscapeService.wsdl");
对于一个设置,它给出绝对路径,而对于另一个设置,它给出相对路径,这会导致问题,我的要求是获得问题的绝对路径。
代码流程:
调用是从主类文件中进行的,并且从那里的 CommonCode in common code 它正在寻找位于 LandScapeService.jar 中的 WSDL
更新:
下一行代码是
IntegrationLandscapeService landscapeService = new IntegrationLandscapeService(wsdlURL);
但我收到以下错误
failed [Failed to access the WSDL at: jar:file:/
tracker.jar!/lib/t24-IF_IntegrationLandscapeService-IntegrationLandscapeService-jwc.jar!/IntegrationLandscapeService.wsdl
.It failed with:
\tracker.jar (The system cannot find the file specified).]
罐子截图
【问题讨论】:
-
你为什么在乎?导致什么问题?只要您在每种情况下都获得一个有效的 URL,是什么问题?
-
@EJP。我已经更新了这个问题。请看一下。