Author: rsearls
Date: 2014-10-15 16:46:05 -0400 (Wed, 15 Oct 2014)
New Revision: 18986
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java
Log:
[JBWS-3792] added patch code from jira
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java 2014-10-15
08:03:43 UTC (rev 18985)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java 2014-10-15
20:46:05 UTC (rev 18986)
@@ -210,10 +210,13 @@
}
else if (match(reader, WSDL_NS, IMPORT)) {
final String location = reader.getAttributeValue(null, LOCATION);
- final String url = wsdlUrl.toString();
- final String newUrl = url.substring(0, url.lastIndexOf("/") +
(location.startsWith("/") ? 0 : 1)) + location;
- if (!metadata.getImports().containsKey(newUrl)) {
- metadata.getImports().put(newUrl, false);
+ try {
+ final String newUrl = new URL(wsdlUrl, location).toExternalForm();
+ if (!metadata.getImports().containsKey(newUrl)) {
+ metadata.getImports().put(newUrl, false);
+ }
+ } catch (MalformedURLException e) {
+ throw MESSAGES.failedToRead(wsdlUrl.toExternalForm(),
e.getMessage(), e);
}
}
continue;