@Test public void testRelativePaths() { String base1 = "base.wsdl"; String base2 = "wsdl/one/base.wsdl"; String base3 = "wsdl/one/two/base.wsdl"; String wsdl = "example.wsdl"; Assert.assertEquals("example.wsdl", reader.createRelativePath(base1, wsdl)); Assert.assertEquals("wsdl/one/example.wsdl", reader.createRelativePath(base2, wsdl)); Assert.assertEquals("wsdl/one/two/example.wsdl", reader.createRelativePath(base3, wsdl)); }
String createRelativePath(String baseURI, String path) { int lastPathIdx = baseURI.lastIndexOf('/'); if (lastPathIdx > 0) { return baseURI.substring(0, lastPathIdx + 1) + path; } else { return path; } }
WSDLReader { String createRelativePath(String baseURI, String path) { int lastPathIdx = baseURI.lastIndexOf('/'); if (lastPathIdx > 0) { return baseURI.substring(0, lastPathIdx + 1) + path; } else { return path; } } }
WSDLReader { String createRelativePath(String baseURI, String path) { int lastPathIdx = baseURI.lastIndexOf('/'); if (lastPathIdx > 0) { return baseURI.substring(0, lastPathIdx + 1) + path; } else { return path; } }  }
WSDLReader { String createRelativePath(String baseURI, String path) { int lastPathIdx = baseURI.lastIndexOf('/'); if (lastPathIdx > 0) { return baseURI.substring(0, lastPathIdx + 1) + path; } else { return path; } }  HashSet<ServiceOperation> readWSDL(final String wsdlURI, final String portName); Element readWSDL(final String wsdlURI); }
WSDLReader { String createRelativePath(String baseURI, String path) { int lastPathIdx = baseURI.lastIndexOf('/'); if (lastPathIdx > 0) { return baseURI.substring(0, lastPathIdx + 1) + path; } else { return path; } }  HashSet<ServiceOperation> readWSDL(final String wsdlURI, final String portName); Element readWSDL(final String wsdlURI);  }