Author: mmusaji
Date: 2012-11-08 06:07:50 -0500 (Thu, 08 Nov 2012)
New Revision: 16961
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBPAPP-10373] replaced schema filename with actual path for schema to allow multiple
schemas with the same name to be found
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2012-11-08
10:08:23 UTC (rev 16960)
+++
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2012-11-08
11:07:50 UTC (rev 16961)
@@ -168,20 +168,21 @@
String locationURI = wsdlImport.getLocationURI();
Definition subdef = wsdlImport.getDefinition();
+ URL targetURL = new URL(baseURI.substring(0,
baseURI.lastIndexOf("/") + 1) + locationURI);
+
// its an external import, don't publish locally
if (locationURI.startsWith("http://") == false)
{
// infinity loops prevention
- if (published.contains(locationURI))
+ if (published.contains(targetURL.getPath()))
{
continue;
}
else
{
- published.add(locationURI);
+ published.add(targetURL.getPath());
}
- URL targetURL = new URL(baseURI.substring(0,
baseURI.lastIndexOf("/") + 1) + locationURI);
File targetFile = new File(targetURL.getPath());
targetFile.getParentFile().mkdirs();
@@ -221,17 +222,18 @@
{
if (schemaLocation.startsWith("http://") == false)
{
+ URL xsdURL = new URL(baseURI.substring(0,
baseURI.lastIndexOf("/") + 1) + schemaLocation);
+
// infinity loops prevention
- if (published.contains(schemaLocation))
+ if (published.contains(xsdURL.getPath()))
{
continue;
}
else
{
- published.add(schemaLocation);
+ published.add(xsdURL.getPath());
}
- URL xsdURL = new URL(baseURI.substring(0,
baseURI.lastIndexOf("/") + 1) + schemaLocation);
File targetFile = new File(xsdURL.getPath());
targetFile.getParentFile().mkdirs();
Show replies by date