JBossWS SVN: r15551 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-31 11:45:16 -0500 (Tue, 31 Jan 2012)
New Revision: 15551
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3422] Reviewing excludes and enabling passing tests
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-01-31 16:37:14 UTC (rev 15550)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-01-31 16:45:16 UTC …
[View More](rev 15551)
@@ -1245,7 +1245,7 @@
<testExcludes>
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
<!-- EJB3 client API dependencies -->
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
</testExcludes>
</configuration>
<goals>
@@ -1279,9 +1279,6 @@
<!--# [CXF-2006] RespectBinding feature and not understood required extensibility elements-->
<exclude>org/jboss/test/ws/jaxws/jbws2449/**</exclude>
- <!--# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored-->
- <exclude>org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*</exclude>
-
<!--# [JBWS-2561] XOP request not properly inlined-->
<exclude>org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.*</exclude>
@@ -1301,8 +1298,8 @@
<!-- AS7 integration exclusions -->
<!-- ////////////////////////// -->
- <!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/**</exclude>
+ <!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher // also see compile exclude above -->
+ <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
@@ -1316,7 +1313,6 @@
<!-- # TODO: remote JNDI support (non EJB objects) -->
<exclude>org/jboss/test/ws/jaxrpc/samples/secureejb/**</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase*</exclude>
</excludes>
</configuration>
[View Less]
13 years
JBossWS SVN: r15550 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-31 11:37:14 -0500 (Tue, 31 Jan 2012)
New Revision: 15550
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java
Log:
[JBWS-3422] Fixing lookup
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
--- shared-…
[View More]testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java 2012-01-31 16:32:46 UTC (rev 15549)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java 2012-01-31 16:37:14 UTC (rev 15550)
@@ -66,7 +66,7 @@
try
{
InitialContext iniCtx = getInitialContext();
- EJB3Remote ejb3Remote = (EJB3Remote)iniCtx.lookup("/EJB3Client/remote");
+ EJB3Remote ejb3Remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-samples-webserviceref-ejb3-client//EJB3Client!" + EJB3Remote.class.getName());
String helloWorld = "Hello World!";
Object retObj = ejb3Remote.echo(helloWorld);
[View Less]
13 years
JBossWS SVN: r15549 - shared-testsuite/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-31 11:32:46 -0500 (Tue, 31 Jan 2012)
New Revision: 15549
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
Log:
[JBWS-3422] Deploy any *-client.jar archive that also contains serviceref in the name
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/…
[View More]wsf/test/JBossWSTestSetup.java 2012-01-31 10:46:37 UTC (rev 15548)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2012-01-31 16:32:46 UTC (rev 15549)
@@ -165,7 +165,7 @@
{
URL archiveURL = getArchiveURL(archive);
clientJars.add(archiveURL);
- if (archive.contains("jaxrpc") || archive.endsWith("serviceref-client.jar"))
+ if (archive.contains("jaxrpc") || archive.contains("serviceref"))
{
performDeploy(archive);
}
[View Less]
13 years
JBossWS SVN: r15548 - shared-testsuite/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-01-31 05:46:37 -0500 (Tue, 31 Jan 2012)
New Revision: 15548
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
enable old good feature :)
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2012-01-31 10:17:15 UTC (rev 15547)
+++ shared-…
[View More]testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2012-01-31 10:46:37 UTC (rev 15548)
@@ -59,6 +59,7 @@
private static final String SYSPROP_JBOSS_BIND_ADDRESS = "jboss.bind.address";
private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+ private static final boolean DEPLOY_PROCESS_ENABLED = !Boolean.getBoolean("disable.test.archive.deployment");
private static Deployer DEPLOYER;
private static MBeanServerConnection server;
@@ -82,18 +83,24 @@
/** Deploy the given archive
*/
- public static void deploy(String archive) throws Exception
+ public static void deploy(final String archive) throws Exception
{
- URL archiveURL = getArchiveFile(archive).toURI().toURL();
- getDeployer().deploy(archiveURL);
+ if (DEPLOY_PROCESS_ENABLED)
+ {
+ URL archiveURL = getArchiveFile(archive).toURI().toURL();
+ getDeployer().deploy(archiveURL);
+ }
}
/** Undeploy the given archive
*/
- public static void undeploy(String archive) throws Exception
+ public static void undeploy(final String archive) throws Exception
{
- URL archiveURL = getArchiveFile(archive).toURI().toURL();
- getDeployer().undeploy(archiveURL);
+ if (DEPLOY_PROCESS_ENABLED)
+ {
+ URL archiveURL = getArchiveFile(archive).toURI().toURL();
+ getDeployer().undeploy(archiveURL);
+ }
}
public static boolean isTargetJBoss6()
[View Less]
13 years
JBossWS SVN: r15547 - common/trunk/src/main/java/org/jboss/ws/common/deployment.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-31 05:17:15 -0500 (Tue, 31 Jan 2012)
New Revision: 15547
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java
Log:
[JBWS-3421] Do not cache EndpointRegistry instance
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/…
[View More]deployment/EndpointRegistryDeploymentAspect.java 2012-01-31 03:25:22 UTC (rev 15546)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java 2012-01-31 10:17:15 UTC (rev 15547)
@@ -36,13 +36,15 @@
*/
public class EndpointRegistryDeploymentAspect extends AbstractDeploymentAspect
{
- private EndpointRegistry registry;
+ private EndpointRegistryFactory factory;
public void start(Deployment dep)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- if (registry == null)
- registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
+ if (factory == null) {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ factory = spiProvider.getSPI(EndpointRegistryFactory.class);
+ }
+ EndpointRegistry registry = factory.getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
registry.register(ep);
@@ -51,9 +53,11 @@
public void stop(Deployment dep)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- if (registry == null)
- registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
+ if (factory == null) {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ factory = spiProvider.getSPI(EndpointRegistryFactory.class);
+ }
+ EndpointRegistry registry = factory.getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
registry.unregister(ep);
[View Less]
13 years
JBossWS SVN: r15546 - in stack/native/trunk/modules/core/src/main/resources: schema and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-01-30 22:25:22 -0500 (Mon, 30 Jan 2012)
New Revision: 15546
Added:
stack/native/trunk/modules/core/src/main/resources/schema/javaee_web_services_metadata_handler_2_0.xsd
Modified:
stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties
Log:
[JBWS-3162]:Add javaee_web_services_metadata_handler_2_0.xsd to jbossws-entities.properties
Modified: stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties
===…
[View More]================================================================
--- stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties 2012-01-31 03:08:03 UTC (rev 15545)
+++ stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties 2012-01-31 03:25:22 UTC (rev 15546)
@@ -19,3 +19,4 @@
http\://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd=schema/oasis-200401-wss-wssecurity-secext-1.0.xsd
http\://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd=schema/oasis-200401-wss-wssecurity-utility-1.0.xsd
http\://www.w3.org/2000/09/xmldsig#=schema/xmldsig-core-schema.xsd
+http\://java.sun.com/xml/ns/javaee/javaee_web_services_metadata_handler_2_0.xsd=schema/javaee_web_services_metadata_handler_2_0.xsd
Added: stack/native/trunk/modules/core/src/main/resources/schema/javaee_web_services_metadata_handler_2_0.xsd
===================================================================
--- stack/native/trunk/modules/core/src/main/resources/schema/javaee_web_services_metadata_handler_2_0.xsd (rev 0)
+++ stack/native/trunk/modules/core/src/main/resources/schema/javaee_web_services_metadata_handler_2_0.xsd 2012-01-31 03:25:22 UTC (rev 15546)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+ <xsd:annotation>
+ <xsd:documentation>
+ javaee_web_services_metadata_handler.xsd v2.0.1 11/09/2007
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2004-2007 BEA Systems, Inc.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <xsd:element name="handler-chains"
+ type="javaee:service-ref_handler-chainsType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The handler-chains element is the root element for defining
+ handlerchains.
+
+ The Web Services Metadata for the Java Platform (JSR-181), Version 2.0
+ specification defines the @javax.jws.HandlerChain annotation
+ that refers to an XML descriptor conforming to this schema.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+</xsd:schema>
[View Less]
13 years
JBossWS SVN: r15545 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-01-30 22:08:03 -0500 (Mon, 30 Jan 2012)
New Revision: 15545
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/CXFInstanceProviderDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties
Log:
[JBWS-3395]:Avoid CXFInstanceProvider thowing NPE when the endpoint ServiceBean is not available
Modified: stack/cxf/trunk/modules/server/src/main/java/org/…
[View More]jboss/wsf/stack/cxf/deployment/aspect/CXFInstanceProviderDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/CXFInstanceProviderDeploymentAspect.java 2012-01-30 17:47:15 UTC (rev 15544)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/CXFInstanceProviderDeploymentAspect.java 2012-01-31 03:08:03 UTC (rev 15545)
@@ -22,12 +22,17 @@
package org.jboss.wsf.stack.cxf.deployment.aspect;
+import java.util.ResourceBundle;
+
import org.apache.cxf.frontend.ServerFactoryBean;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.stack.cxf.CXFInstanceProvider;
+import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
+
/**
* Instance provider DA.
*
@@ -35,14 +40,19 @@
*/
public final class CXFInstanceProviderDeploymentAspect extends AbstractDeploymentAspect
{
-
+ private static final ResourceBundle bundle = BundleUtils.getBundle(CXFInstanceProviderDeploymentAspect.class);
@Override
public void start(final Deployment dep)
{
for (final Endpoint ep : dep.getService().getEndpoints())
{
final ServerFactoryBean factory = ep.getAttachment(ServerFactoryBean.class);
- ep.setInstanceProvider(new CXFInstanceProvider(factory));
+ //TODO: remove this after JBWS-3396 resolved
+ if (factory == null && SpringUtils.isSpringAvailable())
+ {
+ throw new IllegalStateException(BundleUtils.getMessage(bundle, "SPRING_ENDPOINT_NOT_DEFINED", ep.getTargetBeanName()));
+ }
+ ep.setInstanceProvider(new CXFInstanceProvider(factory));
}
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties 2012-01-30 17:47:15 UTC (rev 15544)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties 2012-01-31 03:08:03 UTC (rev 15545)
@@ -1 +1,2 @@
UNSUPPORTED_DEPLOYMENT_TYPE=Unsupported deployment type: {0}
+SPRING_ENDPOINT_NOT_DEFINED=Endpoint {0} is not defined in jbossws-cxf.xml
\ No newline at end of file
[View Less]
13 years
JBossWS SVN: r15544 - stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-30 12:47:15 -0500 (Mon, 30 Jan 2012)
New Revision: 15544
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
Log:
[JBPAPP-7271] Fixing testcase
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
===================================================================
--…
[View More]- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2012-01-30 16:41:54 UTC (rev 15543)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2012-01-30 17:47:15 UTC (rev 15544)
@@ -56,10 +56,10 @@
{
checkThreadBus(bus);
}
- checkDefaultBus(initialDefaultBus);
+ checkDefaultBus(initialDefaultBus != null ? initialDefaultBus : bus); //on JBossWS 3.x series integration, the default bus is set if null
BusFactory.setThreadDefaultBus(initialThreadBus);
checkThreadBus(initialThreadBus);
- checkDefaultBus(initialDefaultBus);
+ checkDefaultBus(initialDefaultBus != null ? initialDefaultBus : bus);
}
public static void testSOAPConnection(String host) throws BusTestException, Exception
[View Less]
13 years
JBossWS SVN: r15543 - in legacy/branches/jbossws-1.2.1.GA_CP: jbossws-core/src/resources/schema and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-30 11:41:54 -0500 (Mon, 30 Jan 2012)
New Revision: 15543
Added:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/SecurityActions.java
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/ws-addr.xsd
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/wsdl20.xsd
…
[View More] legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws153/WEB-INF/web.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-addr.xsd
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd
Log:
[JBPAPP-7127] Caching default document builder factory to improve performances
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2012-01-30 16:23:50 UTC (rev 15542)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2012-01-30 16:41:54 UTC (rev 15543)
@@ -67,7 +67,32 @@
public final class DOMUtils
{
private static Logger log = Logger.getLogger(DOMUtils.class);
+
+ private static final String ENABLE_DOCTYPE_DECL = "org.jboss.ws.enable_doctype_decl";
+ private static final String DISALLOW_DOCTYPE_DECL_FEATURE = "http://apache.org/xml/features/disallow-doctype-decl";
+
+ private static DocumentBuilderFactory documentBuilderFactory;
+
+ private static final boolean enableDoctypeDeclaration = Boolean.getBoolean(ENABLE_DOCTYPE_DECL);
+
+ static
+ {
+ //load default document builder factory using the DOMUtils' defining classloader
+ final ClassLoader classLoader = SecurityActions.getContextClassLoader();
+ SecurityActions.setContextClassLoader(DOMUtils.class.getClassLoader());
+ try
+ {
+ final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ initializeFactory(factory);
+ documentBuilderFactory = factory;
+ }
+ finally
+ {
+ SecurityActions.setContextClassLoader(classLoader);
+ }
+ }
+
// All elements created by the same thread are created by the same builder and belong to the same doc
private static ThreadLocal documentThreadLocal = new ThreadLocal();
private static ThreadLocal builderThreadLocal = new ThreadLocal() {
@@ -75,9 +100,21 @@
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- factory.setNamespaceAware(true);
- DocumentBuilder builder = factory.newDocumentBuilder();
+
+ //check if the factory we'd get for this thread is equivalent to the default one;
+ //in that case re-use the default one and skip the initialization, which is time-consuming
+ final DocumentBuilderFactory threadFactory ;
+ if (factory.getClass().getClassLoader() == documentBuilderFactory.getClass().getClassLoader())
+ {
+ threadFactory = documentBuilderFactory ;
+ }
+ else
+ {
+ threadFactory = factory ;
+ initializeFactory(threadFactory) ;
+ }
+
+ DocumentBuilder builder = threadFactory.newDocumentBuilder();
builder.setEntityResolver(new JBossWSEntityResolver());
return builder;
}
@@ -93,6 +130,24 @@
{
}
+ private static void initializeFactory(final DocumentBuilderFactory factory)
+ {
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+
+ try
+ {
+ if (!enableDoctypeDeclaration)
+ {
+ factory.setFeature(DISALLOW_DOCTYPE_DECL_FEATURE, true);
+ }
+ }
+ catch (ParserConfigurationException pce)
+ {
+ log.error(pce);
+ }
+ }
+
public static void clearThreadLocals()
{
documentThreadLocal.remove();
Added: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/SecurityActions.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/SecurityActions.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/utils/SecurityActions.java 2012-01-30 16:41:54 UTC (rev 15543)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * Security actions for this package
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 19-Jun-2009
+ *
+ */
+class SecurityActions
+{
+ /**
+ * Get context classloader.
+ *
+ * @return the current context classloader
+ */
+ static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ /**
+ * Set context classloader.
+ *
+ * @param classLoader the context classloader
+ */
+ static void setContextClassLoader(final ClassLoader classLoader)
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Load a class using the provided classloader
+ *
+ * @param name
+ * @return
+ * @throws PrivilegedActionException
+ */
+ static Class<?> loadClass(final ClassLoader cl, final String name) throws PrivilegedActionException, ClassNotFoundException
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return cl.loadClass(name);
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
+ public Class<?> run() throws PrivilegedActionException
+ {
+ try
+ {
+ return cl.loadClass(name);
+ }
+ catch (Exception e)
+ {
+ throw new PrivilegedActionException(e);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Return the current value of the specified system property
+ *
+ * @param name
+ * @param defaultValue
+ * @return
+ */
+ static String getSystemProperty(final String name, final String defaultValue)
+ {
+ PrivilegedAction<String> action = new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(name, defaultValue);
+ }
+ };
+ return AccessController.doPrivileged(action);
+ }
+}
\ No newline at end of file
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/ws-addr.xsd
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/ws-addr.xsd 2012-01-30 16:23:50 UTC (rev 15542)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/ws-addr.xsd 2012-01-30 16:41:54 UTC (rev 15543)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"-->
<!--
W3C XML Schema defined in the Web Services Addressing 1.0 specification
http://www.w3.org/TR/ws-addr-core
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/wsdl20.xsd
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/wsdl20.xsd 2012-01-30 16:23:50 UTC (rev 15542)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/resources/schema/wsdl20.xsd 2012-01-30 16:41:54 UTC (rev 15543)
@@ -15,7 +15,7 @@
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-->
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://www.w3.org/2003/11/wsdl" targetNamespace="http://www.w3.org/2003/11/wsdl" elementFormDefault="qualified" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws153/WEB-INF/web.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws153/WEB-INF/web.xml 2012-01-30 16:23:50 UTC (rev 15542)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws153/WEB-INF/web.xml 2012-01-30 16:41:54 UTC (rev 15543)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"-->
<web-app id="WebApp_ID">
<display-name>include-test</display-name>
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-addr.xsd
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-addr.xsd 2012-01-30 16:23:50 UTC (rev 15542)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-addr.xsd 2012-01-30 16:41:54 UTC (rev 15543)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"-->
<!--
W3C XML Schema defined in the Web Services Addressing 1.0 specification
http://www.w3.org/TR/ws-addr-core
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd 2012-01-30 16:23:50 UTC (rev 15542)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd 2012-01-30 16:41:54 UTC (rev 15543)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"-->
<!--
W3C XML Schema defined in the Web Services Addressing 1.0 specification
http://www.w3.org/TR/ws-addr-core
[View Less]
13 years
JBossWS SVN: r15542 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-01-30 11:23:50 -0500 (Mon, 30 Jan 2012)
New Revision: 15542
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java
Log:
[JBWS-3386] UsernameToken password is not mandatory
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java
===================================================================
--- stack/native/trunk/…
[View More]modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java 2012-01-30 16:08:08 UTC (rev 15541)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java 2012-01-30 16:23:50 UTC (rev 15542)
@@ -27,6 +27,7 @@
import javax.xml.namespace.QName;
import org.apache.xml.security.utils.XMLUtils;
+import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.extensions.security.Constants;
@@ -82,8 +83,10 @@
this.username = XMLUtils.getFullTextChildrenFromElement(child);
child = Util.getNextSiblingElement(child);
- if (child == null || ! Constants.WSSE_NS.equals(child.getNamespaceURI()) || ! "Password".equals(child.getLocalName()))
- throw new WSSecurityException(BundleUtils.getMessage(bundle, "PASSWORD_CHILD_EXPECTED"));
+ if (child == null || ! Constants.WSSE_NS.equals(child.getNamespaceURI()) || ! "Password".equals(child.getLocalName())) {
+ Logger.getLogger(this.getClass()).debug(BundleUtils.getMessage(bundle, "PASSWORD_CHILD_EXPECTED"));
+ return;
+ }
this.password = XMLUtils.getFullTextChildrenFromElement(child);
String passwordType = child.getAttribute("Type");
[View Less]
13 years