Author: alessio.soldano(a)jboss.com
Date: 2011-06-14 09:48:15 -0400 (Tue, 14 Jun 2011)
New Revision: 14547
Modified:
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
Log:
[JBWS-3312] Avoid using deprecated endpoint methods
Modified:
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2011-06-14
13:30:34 UTC (rev 14546)
+++
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2011-06-14
13:48:15 UTC (rev 14547)
@@ -37,6 +37,7 @@
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.HttpEndpoint;
/**
* Creator of web app meta data for EJB endpoints.
@@ -188,11 +189,14 @@
for (final Endpoint ep : dep.getService().getEndpoints())
{
- final String endpointName = ep.getShortName();
- final List<String> urlPatterns =
WebMetaDataHelper.getUrlPatterns(ep.getURLPattern());
+ if (ep instanceof HttpEndpoint)
+ {
+ final String endpointName = ep.getShortName();
+ final List<String> urlPatterns =
WebMetaDataHelper.getUrlPatterns(((HttpEndpoint)ep).getURLPattern());
- this.log.debug("Servlet name: " + endpointName + ", URL patterns:
" + urlPatterns);
- WebMetaDataHelper.newServletMapping(endpointName, urlPatterns,
servletMappings);
+ this.log.debug("Servlet name: " + endpointName + ", URL
patterns: " + urlPatterns);
+ WebMetaDataHelper.newServletMapping(endpointName, urlPatterns,
servletMappings);
+ }
}
}
@@ -232,7 +236,7 @@
final String authMethod = ejbMDAccessor.getAuthMethod(ejbEndpoint);
final boolean hasAuthMethod = authMethod != null;
- if (hasAuthMethod || hasTransportGuarantee)
+ if (ejbEndpoint instanceof HttpEndpoint && (hasAuthMethod ||
hasTransportGuarantee))
{
final List<SecurityConstraintMetaData> securityConstraints =
WebMetaDataHelper
.getSecurityConstraints(jbossWebMD);
@@ -245,7 +249,7 @@
final WebResourceCollectionsMetaData webResourceCollections =
WebMetaDataHelper
.getWebResourceCollections(securityConstraint);
final String endpointName = ejbEndpoint.getShortName();
- final String urlPattern = ejbEndpoint.getURLPattern();
+ final String urlPattern = ((HttpEndpoint)ejbEndpoint).getURLPattern();
this.log.debug("Creating web resource collection for endpoint: " +
endpointName + ", URL pattern: "
+ urlPattern);
WebMetaDataHelper.newWebResourceCollection(endpointName, urlPattern,
secureWsdlAccess,