Skip to content

Commit

Permalink
Merge pull request #16 from mcgitty/wso2
Browse files Browse the repository at this point in the history
Use File to parse path, which honors / in Windows.
  • Loading branch information
rosensilva authored Oct 9, 2024
2 parents f6cb197 + fd1afb6 commit 3ef02da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.idea/
.classpath
.project
.settings/
/target/
7 changes: 4 additions & 3 deletions src/main/java/org/wso2/soaptorest/WSDLProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ void init(String path) throws SOAPToRESTException {
wsdlReader.setFeature(JAVAX_WSDL_VERBOSE_MODE, false);
wsdlReader.setFeature(JAVAX_WSDL_IMPORT_DOCUMENTS, false);
try {
String systemId = "";
if (path.lastIndexOf(File.separator) > 0) {
systemId = path.substring(0, path.lastIndexOf(File.separator));
File file = new File(path);
String systemId = file.getParent();
if (systemId == null) {
systemId = "";
}
wsdlDefinition = wsdlReader.readWSDL(systemId, WSDLProcessingUtil.getSecuredParsedDocumentFromPath(path, systemId));
initializeModels(wsdlDefinition, systemId);
Expand Down

0 comments on commit 3ef02da

Please sign in to comment.