JBossWS SVN: r14387 - in stack/native/trunk/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-12 12:12:15 -0400 (Thu, 12 May 2011)
New Revision: 14387
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/ReceiveUsernameOperation.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java
Log:
[JBWS-3256] Fixing testcase to properly use Principal api and fixing SPIProvider resolution in ReceiveUsernameOperation
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/ReceiveUsernameOperation.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/ReceiveUsernameOperation.java 2011-05-12 14:42:58 UTC (rev 14386)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/ReceiveUsernameOperation.java 2011-05-12 16:12:15 UTC (rev 14387)
@@ -37,6 +37,7 @@
import org.jboss.ws.extensions.security.nonce.NonceStore;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.xb.binding.SimpleTypeBindings;
@@ -57,8 +58,9 @@
this.store = store;
this.nonceStore = nonceStore;
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
+ ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class, cl);
}
public void process(Document message, Token token) throws WSSecurityException
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java 2011-05-12 14:42:58 UTC (rev 14386)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java 2011-05-12 16:12:15 UTC (rev 14387)
@@ -56,6 +56,6 @@
{
Principal principal = wsCtx.getUserPrincipal();
log.info("getUsernameToken: " + principal);
- return principal.toString();
+ return principal.getName();
}
}
13 years, 3 months
JBossWS SVN: r14386 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-12 10:42:58 -0400 (Thu, 12 May 2011)
New Revision: 14386
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3219] Updating jira description
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-05-12 14:42:41 UTC (rev 14385)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-05-12 14:42:58 UTC (rev 14386)
@@ -828,7 +828,7 @@
<exclude>org/jboss/test/ws/jaxws/samples/webserviceref/**/*EJB3TestCase*</exclude>
<exclude>org/jboss/test/ws/management/recording/**</exclude>
- <!-- # [JBWS-3219] unexpected element 'security-domain' encountered -->
+ <!-- # [JBWS-3219] unexpected element 'port-qname' encountered -->
<exclude>org/jboss/test/ws/jaxws/jbws2307/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2527/**</exclude>
13 years, 3 months
JBossWS SVN: r14385 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-12 10:42:41 -0400 (Thu, 12 May 2011)
New Revision: 14385
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3219] Updating jira description
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-12 14:37:06 UTC (rev 14384)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-12 14:42:41 UTC (rev 14385)
@@ -988,7 +988,7 @@
<exclude>org/jboss/test/ws/projectGenerator/**</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase*</exclude>
- <!-- # [JBWS-3219] unexpected element 'security-domain' encountered -->
+ <!-- # [JBWS-3219] unexpected element 'port-qname' encountered -->
<exclude>org/jboss/test/ws/jaxws/jbws2307/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2527/**</exclude>
13 years, 3 months
JBossWS SVN: r14384 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-12 10:37:06 -0400 (Thu, 12 May 2011)
New Revision: 14384
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
Enabling passing test
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-05-12 14:36:39 UTC (rev 14383)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-05-12 14:37:06 UTC (rev 14384)
@@ -831,7 +831,6 @@
<!-- # [JBWS-3219] unexpected element 'security-domain' encountered -->
<exclude>org/jboss/test/ws/jaxws/jbws2307/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2527/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1702/**</exclude>
<!-- # [JBWS-3232] javax.naming.NameNotFoundException: Name 'service' not found in context 'env' -->
<exclude>org/jboss/test/ws/jaxws/jbws3140/**</exclude>
13 years, 3 months
JBossWS SVN: r14383 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-12 10:36:39 -0400 (Thu, 12 May 2011)
New Revision: 14383
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Enable jbws1702 testcase
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-12 14:35:15 UTC (rev 14382)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-12 14:36:39 UTC (rev 14383)
@@ -991,7 +991,6 @@
<!-- # [JBWS-3219] unexpected element 'security-domain' encountered -->
<exclude>org/jboss/test/ws/jaxws/jbws2307/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2527/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1702/**</exclude>
<!-- # [JBWS-3205] JDKLogManager not used -->
<exclude>org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase*</exclude>
13 years, 3 months
JBossWS SVN: r14382 - shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1702/WEB-INF.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-12 10:35:15 -0400 (Thu, 12 May 2011)
New Revision: 14382
Modified:
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1702/WEB-INF/jboss-web.xml
Log:
Removing useless reference to security-domain in jbws1702 testcase
Modified: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1702/WEB-INF/jboss-web.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1702/WEB-INF/jboss-web.xml 2011-05-11 22:19:39 UTC (rev 14381)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1702/WEB-INF/jboss-web.xml 2011-05-12 14:35:15 UTC (rev 14382)
@@ -3,6 +3,5 @@
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
<jboss-web>
- <security-domain flushOnSessionInvalidation="false"/>
<context-root>/jbws1702</context-root>
</jboss-web>
13 years, 3 months
JBossWS SVN: r14381 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-11 18:19:39 -0400 (Wed, 11 May 2011)
New Revision: 14381
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
Log:
[JBWS-3264] Removing useless log4j hack
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java 2011-05-11 22:06:52 UTC (rev 14380)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java 2011-05-11 22:19:39 UTC (rev 14381)
@@ -21,7 +21,6 @@
*/
package org.jboss.wsf.stack.cxf.tools;
-import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.PrintStream;
import java.net.URL;
@@ -29,12 +28,9 @@
import java.util.ArrayList;
import java.util.List;
-import javax.xml.parsers.DocumentBuilderFactory;
-
import org.apache.cxf.tools.java2ws.JavaToWS;
import org.jboss.ws.api.tools.WSContractProvider;
import org.jboss.ws.common.utils.NullPrintStream;
-import org.w3c.dom.Element;
/**
* A WSContractProvider for the CXF stack
@@ -101,7 +97,6 @@
{
try
{
- initLog4j();
provide(loader.loadClass(endpointClass));
}
catch (ClassNotFoundException e)
@@ -235,32 +230,4 @@
return cp;
}
-
- /**
- * cxf java2ws tool requires log4j configuration;this method will configure log4j when running in command line and avoid the log4j not configure error.
- */
- private void initLog4j() {
- //TODO: look at if it is possible to set jboss LoggerRepository
- String xmlConfig = "<log4j:configuration xmlns:log4j=\"http://jakarta.apache.org/log4j/\" debug=\"false\">"
- + "<appender name=\"CONSOLE\" class=\"org.apache.log4j.ConsoleAppender\">"
- + "<param name=\"Threshold\" value=\"WARN\"/>"
- + "<param name=\"Target\" value=\"System.out\"/>"
- + "<layout class=\"org.apache.log4j.PatternLayout\">"
- + " <param name=\"ConversionPattern\" value=\"%d %-5p [%c] (%t) %m%n\"/>"
- + "</layout>"
- + "</appender>"
- + "<root>"
- + "<appender-ref ref=\"CONSOLE\"/>"
- + "</root>"
- + "</log4j:configuration>";
- try
- {
- Element element = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(xmlConfig.getBytes("UTF-8"))).getDocumentElement();
- org.apache.log4j.xml.DOMConfigurator.configure(element);
- }
- catch (Exception e)
- {
- //ignore
- }
- }
}
13 years, 3 months
JBossWS SVN: r14380 - common/trunk/src/main/java/org/jboss/ws/common/management.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-11 18:06:52 -0400 (Wed, 11 May 2011)
New Revision: 14380
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3199] AbstractServerConfig.toIPv6URLFormat throws java.net.UnknownHostException
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-05-11 19:53:20 UTC (rev 14379)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-05-11 22:06:52 UTC (rev 14380)
@@ -102,9 +102,18 @@
this.webServiceHost = toIPv6URLFormat("127.0.0.1".equals(host) ? "localhost" : host); // TCK workaround
}
- private String toIPv6URLFormat(final String host) throws UnknownHostException
+ private String toIPv6URLFormat(final String host)
{
- final boolean isIPv6Address = !UNDEFINED_HOSTNAME.equals(host) && InetAddress.getByName(host) instanceof Inet6Address;
+ boolean isIPv6Address = false;
+ try
+ {
+ isIPv6Address = !UNDEFINED_HOSTNAME.equals(host) && InetAddress.getByName(host) instanceof Inet6Address;
+ }
+ catch (UnknownHostException e)
+ {
+ log.warn("Could not get address for host: " + host, e);
+ //ignore, leave isIPv6Address to false
+ }
final boolean isIPv6Formatted = isIPv6Address && host.startsWith("[");
return isIPv6Address && !isIPv6Formatted ? "[" + host + "]" : host;
13 years, 3 months
JBossWS SVN: r14379 - stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-11 15:53:20 -0400 (Wed, 11 May 2011)
New Revision: 14379
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
Log:
Properly reset ClassLoader extension in client test bus; see CXF-3497
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java 2011-05-11 16:58:40 UTC (rev 14378)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java 2011-05-11 19:53:20 UTC (rev 14379)
@@ -51,10 +51,33 @@
protected void setUp() throws Exception {
defaultBus = BusFactory.getDefaultBus(false);
super.setUp();
+ Bus threadBus = BusFactory.getThreadDefaultBus(false);
+ if (threadBus != null)
+ {
+ ClassLoader busLoader = threadBus.getExtension(ClassLoader.class);
+ ClassLoader origLoader = this.getOriginalClassLoader();
+ //overwrite the ClassLoader extension with the new TCCL, to allow CXF seeing the client side archives
+ if (busLoader != null && busLoader == origLoader)
+ {
+ threadBus.setExtension(Thread.currentThread().getContextClassLoader(), ClassLoader.class);
+ }
+ }
}
@Override
protected void tearDown() throws Exception {
+ Bus threadBus = BusFactory.getThreadDefaultBus(false);
+ if (threadBus != null)
+ {
+ ClassLoader busLoader = threadBus.getExtension(ClassLoader.class);
+ ClassLoader origLoader = this.getOriginalClassLoader();
+ //restore the ClassLoader extension to the orig loader
+ if (busLoader != null && busLoader == Thread.currentThread().getContextClassLoader())
+ {
+ threadBus.setExtension(origLoader, ClassLoader.class);
+ }
+ }
+
try
{
Bus afterTestsDefaultBus = BusFactory.getDefaultBus(false);
13 years, 3 months
JBossWS SVN: r14378 - container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-11 12:58:40 -0400 (Wed, 11 May 2011)
New Revision: 14378
Modified:
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
Log:
[JBWS-3279] Unifying CXFServletExt
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2011-05-11 16:52:29 UTC (rev 14377)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2011-05-11 16:58:40 UTC (rev 14378)
@@ -33,7 +33,6 @@
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.ServletClassProvider;
/**
* The modifier of jboss web meta data.
@@ -121,28 +120,10 @@
*/
private String getTransportClassName(final Deployment dep)
{
- String transportClassName = null;
- String transportClassProviderName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS_PROVIDER);
- if (transportClassProviderName != null)
- {
- try
- {
- ServletClassProvider scp = (ServletClassProvider)(Class.forName(transportClassProviderName).newInstance());
- transportClassName = scp.getServletClassName();
- }
- catch (Exception e)
- {
- log.warn("Cannot get transport class name from " + WSConstants.STACK_TRANSPORT_CLASS_PROVIDER, e);
- }
- }
+ String transportClassName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
if (transportClassName == null)
{
- transportClassName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
- }
-
- if (transportClassName == null)
- {
throw new IllegalStateException("Cannot obtain deployment property : " + WSConstants.STACK_TRANSPORT_CLASS);
}
13 years, 3 months