Author: ropalka
Date: 2011-12-16 05:24:57 -0500 (Fri, 16 Dec 2011)
New Revision: 15403
Modified:
common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
Log:
[JBWS-3401] if EJBs referencing WSDL are bundled in .war archives, always use
WEB-INF/wsdl
Modified: common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2011-12-16
10:21:17 UTC (rev 15402)
+++ common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2011-12-16
10:24:57 UTC (rev 15403)
@@ -51,6 +51,9 @@
private static final EndpointTypeFilter JAXRPC_JSE_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXRPC_JSE );
private static final EndpointTypeFilter JAXWS_EJB_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXWS_EJB3 );
private static final EndpointTypeFilter JAXWS_JSE_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXWS_JSE );
+ private static final String WAR_EXTENSION = ".war";
+ private static final String JAR_EXTENSION = ".jar";
+ private static final String EAR_EXTENSION = ".ear";
/**
* Forbidden constructor.
@@ -194,6 +197,39 @@
}
/**
+ * Returns true if archive name ends with '.jar' suffix.
+ *
+ * @param dep webservice deployment
+ * @return true if archive name ends with '.jar' suffix, false otherwise
+ */
+ public static boolean isJarArchive( final Deployment dep )
+ {
+ return dep.getSimpleName().endsWith(JAR_EXTENSION);
+ }
+
+ /**
+ * Returns true if archive name ends with '.war' suffix.
+ *
+ * @param dep webservice deployment
+ * @return true if archive name ends with '.war' suffix, false otherwise
+ */
+ public static boolean isWarArchive( final Deployment dep )
+ {
+ return dep.getSimpleName().endsWith(WAR_EXTENSION);
+ }
+
+ /**
+ * Returns true if archive name ends with '.ear' suffix.
+ *
+ * @param dep webservice deployment
+ * @return true if archive name ends with '.ear' suffix, false otherwise
+ */
+ public static boolean isEarArchive( final Deployment dep )
+ {
+ return dep.getSimpleName().endsWith(EAR_EXTENSION);
+ }
+
+ /**
* Returns true if endpoint represents JAXWS JSE endpoint.
*
* @param ep webservice endpoint
Modified:
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2011-12-16
10:21:17 UTC (rev 15402)
+++
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2011-12-16
10:24:57 UTC (rev 15403)
@@ -22,6 +22,7 @@
package org.jboss.ws.common.utils;
import static org.jboss.ws.common.integration.WSHelper.isJseDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isWarArchive;
import java.io.File;
import java.io.FileOutputStream;
@@ -84,7 +85,7 @@
serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
}
- if (isJseDeployment(dep))
+ if (isJseDeployment(dep) || isWarArchive(dep))
{
expLocation = "WEB-INF/wsdl/";
}
Show replies by date