lizw 3 rokov pred
rodič
commit
a020dff121

+ 3 - 3
soap-gateway/src/main/java/com/galaxis/soap/wms/WMSServiceImpl.java

@@ -5,9 +5,10 @@ import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.core.io.ClassPathResource;
 import org.springframework.util.Assert;
-import org.springframework.util.ResourceUtils;
 
 import javax.jws.WebService;
 import javax.xml.namespace.QName;
@@ -67,9 +68,8 @@ public class WMSServiceImpl implements WMSService {
 
     @SneakyThrows
     public WMSServiceImpl() {
-        final String wsdl = FileUtils.readFileToString(ResourceUtils.getFile("classpath:WMSService.xml"), StandardCharsets.UTF_8);
+        final String wsdl = IOUtils.toString(new ClassPathResource("WMSService.xml").getInputStream(), StandardCharsets.UTF_8);
         final String usrHome = System.getProperty("user.home");
-
         for (Map.Entry<String, String> entry : WMS_MAPPING.entrySet()) {
             String bwkey = entry.getKey();
             String host = entry.getValue();