Author: mageshbk(a)jboss.com
Date: 2009-01-06 04:37:55 -0500 (Tue, 06 Jan 2009)
New Revision: 8963
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBWS-2437] Fixed Regression
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-01-05
18:44:31 UTC (rev 8962)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-01-06
09:37:55 UTC (rev 8963)
@@ -27,8 +27,11 @@
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -90,7 +93,16 @@
File impResourceFile = new File(impResourcePath);
String wsdlPublishLoc =
epMetaData.getServiceMetaData().getWsdlPublishLocation();
- if
(impResourceFile.getCanonicalPath().indexOf(wsdlLocFile.getParentFile().getCanonicalPath())
>= 0
+ log.debug("Importing resource file: " +
impResourceFile.getCanonicalPath());
+
+ String wsdlLocFilePath = wsdlLocFile.getParentFile().getCanonicalPath();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ String wsdlDataLoc = serverConfig.getServerDataDir().getCanonicalPath() +
File.separatorChar + "wsdl";
+
+ //allow wsdl file's parent or server's data/wsdl or overriden wsdl
publish directories only
+ if (impResourceFile.getCanonicalPath().indexOf(wsdlLocFilePath) >= 0
+ || impResourceFile.getCanonicalPath().indexOf(wsdlDataLoc) >= 0
|| (wsdlPublishLoc != null
&& impResourceFile.getCanonicalPath().indexOf(new File(new
URL(wsdlPublishLoc).getPath()).getCanonicalPath()) >= 0))
{
Show replies by date