Author: darran.lofthouse(a)jboss.com
Date: 2010-02-26 07:36:15 -0500 (Fri, 26 Feb 2010)
New Revision: 11691
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java
Log:
[JBWS-2943] Inconsistent / Incomplete handling of CONFIDENTIAL transport-guarantee defined
in jboss.xml compared to @WebContext annotation.
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2010-02-26
12:18:02 UTC (rev 11690)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2010-02-26
12:36:15 UTC (rev 11691)
@@ -25,6 +25,7 @@
import java.util.Map;
import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.annotation.WebContext;
@@ -36,6 +37,9 @@
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
/**
* A deployer that assigns the endpoint address.
@@ -119,7 +123,7 @@
}
}
}
- else
+ else if (DeploymentType.JAXWS_EJB3 == dep.getType())
{
//TODO Unify annotation scans
Class implClass = ep.getTargetBeanClass();
@@ -128,6 +132,18 @@
{
transportGuarantee = anWebContext.transportGuarantee();
}
+ if (anWebContext == null || transportGuarantee == null ||
transportGuarantee.length() == 0)
+ {
+ String ejbName = ep.getShortName();
+ EJBArchiveMetaData ejbArchiveMD =
dep.getAttachment(EJBArchiveMetaData.class);
+ EJBMetaData ejbMD = ejbArchiveMD != null ?
ejbArchiveMD.getBeanByEjbName(ejbName) : null;
+ EJBSecurityMetaData ejbSecurityMD = ejbMD != null ?
ejbMD.getSecurityMetaData() : null;
+
+ if (ejbSecurityMD != null)
+ {
+ transportGuarantee = ejbSecurityMD.getTransportGuarantee();
+ }
+ }
}
return "CONFIDENTIAL".equals(transportGuarantee);
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java 2010-02-26
12:18:02 UTC (rev 11690)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java 2010-02-26
12:36:15 UTC (rev 11691)
@@ -34,7 +34,6 @@
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlMimeType;
import javax.xml.ws.BindingType;
-import javax.xml.ws.spi.Provider;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
@@ -68,7 +67,7 @@
{
Object content = dh.getContent();
- // Metro returns an ByteArrayInputStream
+ // Metro returns a ByteArrayInputStream
if (content instanceof InputStream)
{
try
Show replies by date