WSDL位置的文件我用提供的WSDL位置路径文件中的wsimport任务的gradle产生了初步的MyService:/ d:/someLocationWherePlacedMyWSDl.interface.v2.wsdl如何更改内部供水
public class MyService
extends Service
{
private final static URL MyService_WSDL_LOCATION;
private final static Logger logger = Logger.getLogger(com.google.services.MyService.class.getName());
static {
URL url = null;
try {
URL baseUrl;
baseUrl = com.google.services.MyService.class.getResource(".");
url = new URL(baseUrl, "file:/D:/someLocationWherePlacedMyWSDl.interface.v2.wsdl");
} catch (MalformedURLException e) {
logger.warning("Failed to create URL for the wsdl Location: 'file:/D:/someLocationWherePlacedMyWSDl.interface.v2.wsdl', retrying as a local file");
logger.warning(e.getMessage());
}
MyService_WSDL_LOCATION = url;
}
}
我怎样才能更改?它发生是因为该文件是在一个环境中生成的,然后该工件(战争)被移动到另一个服务器。
有什么想法?
是的,我明白了。本地一切都完美。但是这个文件位于war文件内部,当Jenkins试图获得这个文件/var/distributives/myservice/tomcat-base/wsdl/someLocationWherePlacedMyWSDl.interface.v2.wsdl时,我得到异常(没有这样的文件或目录)。它看起来像无法看到战争文件内的文件。任何想法如何处理?