JBossWS SVN: r13669 - hudson/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-02-04 05:20:02 -0500 (Fri, 04 Feb 2011)
New Revision: 13669
Modified:
hudson/trunk/pom.xml
Log:
use JBossWS parent
Modified: hudson/trunk/pom.xml
===================================================================
--- hudson/trunk/pom.xml 2011-02-04 10:04:33 UTC (rev 13668)
+++ hudson/trunk/pom.xml 2011-02-04 10:20:02 UTC (rev 13669)
@@ -22,6 +22,13 @@
<description>JBossWS Hudson Integration</description>
<version>4.0.0-SNAPSHOT</version>
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-parent</artifactId>
+ <version>1.0.10-SNAPSHOT</version>
+ </parent>
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/hudson/trunk</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/hudson/trunk</developerConnection>
13 years, 11 months
JBossWS SVN: r13668 - shared-testsuite/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-02-04 05:04:33 -0500 (Fri, 04 Feb 2011)
New Revision: 13668
Modified:
shared-testsuite/trunk/pom.xml
Log:
switch to new parent
Modified: shared-testsuite/trunk/pom.xml
===================================================================
--- shared-testsuite/trunk/pom.xml 2011-02-04 09:56:48 UTC (rev 13667)
+++ shared-testsuite/trunk/pom.xml 2011-02-04 10:04:33 UTC (rev 13668)
@@ -13,7 +13,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.0.9.GA</version>
+ <version>1.0.10-SNAPSHOT</version>
</parent>
<!-- Source Control Management -->
13 years, 11 months
JBossWS SVN: r13667 - in common/trunk: src/main/java/org/jboss/wsf/framework and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-02-04 04:56:48 -0500 (Fri, 04 Feb 2011)
New Revision: 13667
Added:
common/trunk/src/main/java/org/jboss/wsf/test/DeployerJBoss6.java
Removed:
common/trunk/src/main/java/org/jboss/wsf/test/TestDeployer.java
common/trunk/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
Modified:
common/trunk/pom.xml
common/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[JBWS-3207] introducing remote Deployer SPI interface - providing default implementation for AS6 + refactoring
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2011-02-04 09:53:42 UTC (rev 13666)
+++ common/trunk/pom.xml 2011-02-04 09:56:48 UTC (rev 13667)
@@ -15,7 +15,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.0.9.GA</version>
+ <version>1.0.10-SNAPSHOT</version>
</parent>
<!-- Source Control Management -->
Modified: common/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2011-02-04 09:53:42 UTC (rev 13666)
+++ common/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2011-02-04 09:56:48 UTC (rev 13667)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.framework;
+import org.jboss.wsf.spi.deployer.Deployer;
import org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory;
import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
@@ -42,6 +43,7 @@
import org.jboss.wsf.spi.management.JMSEndpointResolver;
import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
import org.jboss.wsf.spi.util.ServiceLoader;
+import org.jboss.wsf.test.DeployerJBoss6;
/**
* @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
@@ -62,7 +64,7 @@
{
returnType = loadService(spiType, DefaultDeploymentAspectManagerFactory.class);
}
- if (DeploymentModelFactory.class.equals(spiType))
+ else if (DeploymentModelFactory.class.equals(spiType))
{
returnType = loadService(spiType, DefaultDeploymentModelFactory.class);
}
@@ -90,6 +92,10 @@
{
returnType = loadService(spiType, DefaultEndpointRegistryFactory.class);
}
+ else if (Deployer.class.equals(spiType))
+ {
+ returnType = loadService(spiType, DeployerJBoss6.class);
+ }
else if (JMSEndpointResolver.class.equals(spiType))
{
returnType = loadService(spiType, DefaultJMSEndpointResolver.class);
Added: common/trunk/src/main/java/org/jboss/wsf/test/DeployerJBoss6.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/DeployerJBoss6.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/wsf/test/DeployerJBoss6.java 2011-02-04 09:56:48 UTC (rev 13667)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.wsf.test;
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+import org.jboss.wsf.spi.deployer.Deployer;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class DeployerJBoss6 implements Deployer
+{
+
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+
+ public DeployerJBoss6()
+ {
+ this.server = JBossWSTestHelper.getServer();
+ }
+
+ public void deploy(final URL url) throws Exception
+ {
+ invokeMainDeployer("deploy", url);
+ }
+
+ public void undeploy(final URL url) throws Exception
+ {
+ invokeMainDeployer("undeploy", url);
+ }
+
+ private void invokeMainDeployer(final String methodName, final URL url) throws Exception
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), methodName, new Object[]
+ {url}, new String[]
+ {"java.net.URL"});
+ }
+
+}
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2011-02-04 09:53:42 UTC (rev 13666)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2011-02-04 09:56:48 UTC (rev 13667)
@@ -40,6 +40,10 @@
import javax.xml.ws.soap.SOAPBinding;
import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployer.Deployer;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
/**
* A JBossWS test helper that deals with test deployment/undeployment, etc.
@@ -54,6 +58,7 @@
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("test.disable.deployment");
+ private static final Deployer DEPLOYER;
private static MBeanServerConnection server;
private static String integrationTarget;
@@ -62,6 +67,12 @@
private static String implVersion;
private static String testArchiveDir;
private static String testResourcesDir;
+
+ static
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DEPLOYER = spiProvider.getSPI(Deployer.class);
+ }
/** Deploy the given archive
*/
@@ -70,7 +81,7 @@
if ( DEPLOY_PROCESS_ENABLED )
{
URL archiveURL = getArchiveFile(archive).toURI().toURL();
- getDeployer().deploy(archiveURL);
+ DEPLOYER.deploy(archiveURL);
}
}
@@ -81,7 +92,7 @@
if ( DEPLOY_PROCESS_ENABLED )
{
URL archiveURL = getArchiveFile(archive).toURI().toURL();
- getDeployer().undeploy(archiveURL);
+ DEPLOYER.undeploy(archiveURL);
}
}
@@ -221,11 +232,6 @@
return server;
}
- private static TestDeployer getDeployer()
- {
- return new TestDeployerJBoss(getServer());
- }
-
public static String getIntegrationTarget()
{
if (integrationTarget == null)
Deleted: common/trunk/src/main/java/org/jboss/wsf/test/TestDeployer.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/TestDeployer.java 2011-02-04 09:53:42 UTC (rev 13666)
+++ common/trunk/src/main/java/org/jboss/wsf/test/TestDeployer.java 2011-02-04 09:56:48 UTC (rev 13667)
@@ -1,41 +0,0 @@
-/*
- * 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.wsf.test;
-
-import java.net.URL;
-
-/**
- * WS test deployer
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-May-2006
- */
-public interface TestDeployer
-{
- /** Deploy the given archive
- */
- void deploy(URL archive) throws Exception;
-
- /** Undeploy the given archive
- */
- void undeploy(URL archive) throws Exception;
-}
Deleted: common/trunk/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2011-02-04 09:53:42 UTC (rev 13666)
+++ common/trunk/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2011-02-04 09:56:48 UTC (rev 13667)
@@ -1,119 +0,0 @@
-/*
- * 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.wsf.test;
-
-import java.io.Serializable;
-import java.net.URL;
-import java.security.Principal;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-import org.jboss.wsf.spi.invocation.SecurityAdaptor;
-import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-
-/**
- * A JBossWS test helper that deals with test deployment/undeployment, etc.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Oct-2004
- */
-public class TestDeployerJBoss implements TestDeployer
-{
- private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
-
- private MBeanServerConnection server;
- private String username;
- private String password;
-
- public TestDeployerJBoss(MBeanServerConnection server)
- {
- this.server = server;
-
- username = System.getProperty("jmx.authentication.username");
- if ("${jmx.authentication.username}".equals(username))
- username = null;
-
- password = System.getProperty("jmx.authentication.password");
- if ("${jmx.authentication.password}".equals(password))
- password = null;
- }
-
- public void deploy(URL url) throws Exception
- {
- invokeMainDeployer("deploy", url);
- }
-
- public void undeploy(URL url) throws Exception
- {
- invokeMainDeployer("undeploy", url);
- }
-
- private void invokeMainDeployer(String methodName, URL url) throws Exception
- {
- Principal prevUsername = null;
- Object prevPassword = null;
-
- SecurityAdaptor securityAdaptor = null;
- if (username != null || password != null)
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
-
- prevUsername = securityAdaptor.getPrincipal();
- prevPassword = securityAdaptor.getCredential();
- securityAdaptor.setPrincipal(new SimplePrincipal(username));
- securityAdaptor.setCredential(password);
- }
-
- try
- {
- server.invoke(new ObjectName(MAIN_DEPLOYER), methodName, new Object[] { url }, new String[] { "java.net.URL" });
- }
- finally
- {
- if (username != null || password != null)
- {
- securityAdaptor.setPrincipal(prevUsername);
- securityAdaptor.setCredential(prevPassword);
- }
- }
- }
-
- @SuppressWarnings("serial")
- public static class SimplePrincipal implements Principal, Serializable
- {
- private String name;
-
- public SimplePrincipal(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
- }
-}
13 years, 11 months
JBossWS SVN: r13666 - in spi/trunk: src/main/java/org/jboss/wsf/spi and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-02-04 04:53:42 -0500 (Fri, 04 Feb 2011)
New Revision: 13666
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployer/
spi/trunk/src/main/java/org/jboss/wsf/spi/deployer/Deployer.java
Modified:
spi/trunk/pom.xml
Log:
[JBWS-3207] introducing remote Deployer SPI interface
Modified: spi/trunk/pom.xml
===================================================================
--- spi/trunk/pom.xml 2011-02-04 09:37:33 UTC (rev 13665)
+++ spi/trunk/pom.xml 2011-02-04 09:53:42 UTC (rev 13666)
@@ -13,7 +13,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.0.9.GA</version>
+ <version>1.0.10-SNAPSHOT</version>
</parent>
<!-- Source Control Management -->
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/deployer/Deployer.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployer/Deployer.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployer/Deployer.java 2011-02-04 09:53:42 UTC (rev 13666)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.wsf.spi.deployer;
+
+import java.net.URL;
+
+import org.jboss.wsf.spi.SPIView;
+
+/**
+ * Abstraction to provide AS agnostic remote deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public interface Deployer extends SPIView
+{
+ /**
+ * Deploys specified archive remotely.
+ * @param archive to deploy
+ * @throws Exception if some problem occurs
+ */
+ void deploy(URL archive) throws Exception;
+ /**
+ * Undeploys specified archive remotely.
+ * @param archive to undeploy
+ * @throws Exception if some problem occurs
+ */
+ void undeploy(URL archive) throws Exception;
+}
13 years, 11 months
JBossWS SVN: r13665 - in stack/cxf/trunk: modules/dist and 35 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-04 04:37:33 -0500 (Fri, 04 Feb 2011)
New Revision: 13665
Added:
stack/cxf/trunk/modules/resources/src/main/resources/modules/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/cxf/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/cxf/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/cxf/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/neethi/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/neethi/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/neethi/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/xmlschema/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/xmlschema/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/xmlschema/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/api/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/api/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/api/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-factories/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-factories/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-factories/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/spi/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/spi/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/spi/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf
Modified:
stack/cxf/trunk/build.xml
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml
stack/cxf/trunk/modules/dist/src/main/distro/build-setup.xml
stack/cxf/trunk/modules/dist/src/main/distro/build.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
Log:
[JBWS-3206] Initial support for deploy against JBoss AS7
Modified: stack/cxf/trunk/build.xml
===================================================================
--- stack/cxf/trunk/build.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/build.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -32,6 +32,7 @@
<property name="jbossws.default.deploy.conf" value="${stack.resources.dir}/resources/deploy.conf"/>
<property name="jbossws.default.server.deploy.conf" value="${stack.resources.dir}/resources/server-deploy.conf"/>
+ <property name="jbossws.default.modules.conf" value="${stack.resources.dir}/resources/modules-deploy.conf"/>
<property name="target.properties.file" value="${basedir}/target.properties"/>
<!-- ================================================================== -->
@@ -63,23 +64,30 @@
<condition property="jboss601.home" value="${profiles.profile.properties.jboss601.home}">
<isset property="profiles.profile.properties.jboss601.home"/>
</condition>
-
- <fail message="jboss home not set, use jboss601.home=value or jboss600.home=value to set">
- <condition>
- <and>
- <not>
- <isset property="jboss601.home"/>
- </not>
- <not>
- <isset property="jboss600.home"/>
- </not>
- </and>
+ <condition property="jboss700.home" value="${profiles.profile.properties.jboss700.home}">
+ <isset property="profiles.profile.properties.jboss700.home"/>
</condition>
- </fail>
+ <fail message="jboss home not set, use jboss601.home=value, jboss600.home=value or jboss700.home=value to set">
+ <condition>
+ <and>
+ <not>
+ <isset property="jboss601.home"/>
+ </not>
+ <not>
+ <isset property="jboss600.home"/>
+ </not>
+ <not>
+ <isset property="jboss700.home"/>
+ </not>
+ </and>
+ </condition>
+ </fail>
+
<echo/>
<echo message="jboss600.home=${jboss600.home}"/>
<echo message="jboss601.home=${jboss601.home}"/>
+ <echo message="jboss700.home=${jboss700.home}"/>
</target>
<target name="init" depends="mvn-settings,prepare,os-init">
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/modules/dist/pom.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -33,6 +33,12 @@
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-resources</artifactId>
+ <version>${project.version}</version>
+ <classifier>jboss700</classifier>
+ </dependency>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
Modified: stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -94,8 +94,57 @@
modifyjbossintegration="false"
removenativecore="false"/><!-- [JBWS-2505][JBWS-2895] -->
</target>
+
+ <!-- ================================================================== -->
+ <!-- Prepare Deployment Structure JBoss-7.0.0 -->
+ <!-- ================================================================== -->
+ <target name="deploy-structure-jboss700" depends="prepare-deploy">
+ <delete dir="${deploy.structure}"/>
+
+ <path id="jbossws-common.path">
+ <fileset dir="${deploy.artifacts.dir}">
+ <include name="**/jbossws-common.jar"/>
+ </fileset>
+ </path>
+ <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jbossws-common.path"/>
+
+ <antcall target="deploy-jbossws-cxf-modules" inheritall="false">
+ <param name="installserver" value="${deploy.structure}"/>
+ <param name="thirdpartydir" value="${deploy.artifacts.dir}"/>
+ </antcall>
+ </target>
+
<!-- ================================================================== -->
+ <!-- Deployment JBoss700 -->
+ <!-- ================================================================== -->
+
+ <target name="target-jboss700">
+ <property name="jbossws.integration.target" value="jboss700"/>
+ <echo message="jbossws.integration.target=${jbossws.integration.target}" file="${target.properties.file}"/>
+ </target>
+
+ <target name="deploy-jboss700" depends="undeploy-jboss700,deploy-structure-jboss700" description="Deploy jbossws to jboss700">
+ <fail message="Not available: ${jboss700.available.file}" unless="jboss700.available"/>
+ <copy todir="${jboss700.home}" overwrite="true" verbose="true">
+ <fileset dir="${deploy.structure}">
+ <exclude name="**/jboss/as/webservices/**/module.xml"/>
+ </fileset>
+ </copy>
+ <!-- Install org/jboss/as/webservices module.xml separately since it needs to reference libs already on the AS -->
+ <installModules targetDir="${jboss700.home}/modules">
+ <fileset dir="${deploy.structure}/modules">
+ <include name="**/jboss/as/webservices/**/module.xml"/>
+ </fileset>
+ </installModules>
+ </target>
+
+ <target name="undeploy-jboss700" depends="target-jboss700,init" description="Remove jbossws from jboss700">
+ <fail message="Not available: ${jboss700.available.file}" unless="jboss700.available"/>
+ <macro-undeploy-jbossws-modules targetdir="${jboss700.home}" defaultmodulesconf="${jbossws.default.modules.conf}"/>
+ </target>
+
+ <!-- ================================================================== -->
<!-- Spring -->
<!-- ================================================================== -->
<target name="check-spring">
Modified: stack/cxf/trunk/modules/dist/src/main/distro/build-setup.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/distro/build-setup.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/modules/dist/src/main/distro/build-setup.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -35,15 +35,19 @@
<property name="jboss601.server.deploy" value="${jboss601.server}/deploy"/>
<property name="jboss601.server.deployers" value="${jboss601.server}/deployers"/>
+ <property name="jboss700.modules" value="${jboss700.home}/modules"/>
+
<property name="jboss600.available.file" value="${jboss600.client}/jboss-client.jar"/>
<property name="jboss601.available.file" value="${jboss601.client}/jboss-client.jar"/>
+ <property name="jboss700.available.file" value="${jboss700.home}/jboss-modules.jar"/>
<available property="jboss600.available" file="${jboss600.available.file}"/>
<available property="jboss601.available" file="${jboss601.available.file}"/>
+ <available property="jboss700.available" file="${jboss700.available.file}"/>
<tstamp>
<format property="build.id" pattern="yyyyMMddHHmm"/>
</tstamp>
</target>
-</project>
\ No newline at end of file
+</project>
Modified: stack/cxf/trunk/modules/dist/src/main/distro/build.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/distro/build.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/modules/dist/src/main/distro/build.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -24,6 +24,7 @@
<property name="deploy.artifacts.dir" value="${basedir}/deploy"/>
<property name="jbossws.default.deploy.conf" value="${build.dir}/deploy.conf"/>
<property name="jbossws.default.server.deploy.conf" value="${build.dir}/server-deploy.conf"/>
+ <property name="jbossws.default.modules.conf" value="${build.dir}/modules-deploy.conf"/>
<property name="target.properties.file" value="${basedir}/target.properties"/>
<!-- Check if ant.properties is available -->
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -25,6 +25,15 @@
</includes>
</fileSet>
+ <!-- module.xml files -->
+ <fileSet>
+ <directory>../resources/src/main/resources/modules</directory>
+ <outputDirectory>deploy-artifacts/modules</outputDirectory>
+ <includes>
+ <include>**/module.xml</include>
+ </includes>
+ </fileSet>
+
<!-- management console and port component link servlet -->
<fileSet>
<directory>./management/target</directory>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/cxf/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/cxf/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/cxf/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.apache.cxf">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api" />
+ <module name="javax.annotation.api" />
+ <module name="javax.jws.api" />
+ <module name="javax.servlet.api" />
+ <module name="javax.xml.bind.api" services="import"/>
+ <module name="javax.xml.soap.api" />
+ <module name="javax.xml.stream.api" />
+ <module name="javax.xml.ws.api" />
+ <module name="org.apache.neethi" />
+ <module name="org.apache.ws.commons.xmlschema" />
+ <module name="wsdl4j.wsdl4j" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/neethi/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/neethi/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/neethi/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.apache.neethi">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api"/>
+ <module name="javax.xml.stream.api" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/xmlschema/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/xmlschema/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/apache/ws/commons/xmlschema/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.apache.ws.commons.xmlschema">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.as.webservices">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api"/>
+ <module name="javax.jws.api"/>
+ <module name="javax.xml.ws.api"/>
+ <module name="org.jboss.jandex"/>
+ <module name="org.jboss.metadata"/>
+ <module name="org.jboss.staxmapper"/>
+ <module name="org.jboss.as.domain"/>
+ <module name="org.jboss.as.managed-beans"/>
+ <module name="org.jboss.as.server"/>
+ <module name="org.jboss.as.web"/>
+ <module name="org.jboss.threads"/>
+ <module name="org.jboss.modules"/>
+ <module name="org.jboss.msc"/>
+ <module name="org.jboss.vfs"/>
+ <module name="org.jboss.logging"/>
+ <module name="org.jboss.common-core" />
+ <module name="org.jboss.ws.api" />
+ <module name="org.jboss.ws.common" />
+ <module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
+ <module name="org.jboss.ws.cxf.jbossws-cxf-client" services="import"/>
+ <module name="org.jboss.ws.cxf.jbossws-cxf-server" services="import"/>
+ <module name="org.jboss.ws.spi" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/api/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/api/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/api/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.api">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api"/>
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.common">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api"/>
+ <module name="javax.annotation.api"/>
+ <module name="javax.ejb.api"/>
+ <module name="javax.servlet.api"/>
+ <module name="javax.xml.ws.api"/>
+ <module name="org.jboss.ws.api"/>
+ <module name="org.jboss.ws.spi"/>
+ <module name="org.jboss.logging"/>
+ <module name="wsdl4j.wsdl4j" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.cxf.jbossws-cxf-client">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api" />
+ <module name="javax.xml.bind.api" />
+ <module name="org.jboss.ws.spi" />
+ <module name="org.jboss.ws.common" />
+ <module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
+ <module name="org.apache.cxf" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
+ <include path="META-INF/spring.*"/>
+ </imports>
+ </module>
+ <module name="org.apache.neethi" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-factories/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-factories/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-factories/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.cxf.jbossws-cxf-factories">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.cxf.jbossws-cxf-server">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api" />
+ <module name="javax.servlet.api" />
+ <module name="javax.jws.api" />
+ <module name="javax.xml.bind.api" />
+ <module name="javax.xml.stream.api" />
+ <module name="javax.xml.ws.api" />
+ <module name="org.jboss.ws.api" />
+ <module name="org.jboss.ws.spi" />
+ <module name="org.jboss.ws.common" />
+ <module name="org.jboss.ws.cxf.jbossws-cxf-client" />
+ <module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
+ <module name="org.apache.cxf" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
+ <include path="META-INF/spring.*"/>
+ </imports>
+ </module>
+ <module name="org.jboss.common-core" />
+ <module name="org.jboss.logging" />
+ <module name="wsdl4j.wsdl4j" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="org.jboss.ws.spi" />
+ <module name="org.jboss.ws.common" />
+ </dependencies>
+</module>
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/spi/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/spi/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/spi/main/module.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.spi">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api"/>
+ <module name="javax.xml.stream.api"/>
+ <module name="javax.xml.ws.api"/>
+ <module name="org.jboss.ws.api"/>
+ </dependencies>
+</module>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-02-04 09:33:55 UTC (rev 13664)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-02-04 09:37:33 UTC (rev 13665)
@@ -318,6 +318,85 @@
</target>
<!-- ================================================================== -->
+ <!-- Modules -->
+ <!-- ================================================================== -->
+
+ <macrodef name="macro-deploy-jbossws-modules">
+ <attribute name="thirdpartydir"/>
+ <attribute name="targetdir"/>
+ <sequential>
+ <!-- libraries -->
+ <copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-client/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-cxf-client.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-server/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-cxf-server.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-factories/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-cxf-factories.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-cxf-transports-httpserver.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/apache/cxf//main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/cxf-*.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/ws/api/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-api.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/ws/common/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-common.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/ws/spi/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-spi.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/apache/neethi/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/neethi.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/apache/ws/commons/xmlschema/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/XmlSchema.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetdir}/org/jboss/as/webservices/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jbossws-cxf-resources.jar"/>
+ </fileset>
+ </copy>
+ <!-- module.xml files -->
+ <installModules targetDir="@{targetdir}">
+ <fileset dir="@{thirdpartydir}/modules">
+ <include name="**/module.xml"/>
+ <exclude name="**/jboss/as/webservices/**/module.xml"/>
+ </fileset>
+ </installModules>
+ <copy toDir="@{targetdir}">
+ <fileset dir="@{thirdpartydir}/modules">
+ <include name="**/jboss/as/webservices/**/module.xml"/>
+ </fileset>
+ </copy>
+ </sequential>
+ </macrodef>
+
+ <!-- ================================================================== -->
<!-- Deploy JBossWS -->
<!-- ================================================================== -->
@@ -351,6 +430,11 @@
<macro-deploy-juddi-sar targetdir="${installserver}/deploy/juddi-service.sar" thirdpartydir="${thirdpartydir}"/>
</target>
+ <target name="deploy-jbossws-cxf-modules">
+ <fail message="installserver must be specified" unless="installserver"/>
+ <fail message="thirdpartydir must be specified" unless="thirdpartydir"/>
+ <macro-deploy-jbossws-modules targetdir="${installserver}/modules" thirdpartydir="${thirdpartydir}"/>
+ </target>
<!-- ================================================================== -->
<!-- Install Spring -->
@@ -378,6 +462,29 @@
<!-- Undeploy JBossWS -->
<!-- ================================================================== -->
+ <macrodef name="macro-undeploy-jbossws-modules">
+ <attribute name="defaultmodulesconf"/>
+ <attribute name="targetdir"/>
+
+ <sequential>
+ <loadfile property="jbossws.modules.conf" srcfile="@{targetdir}/modules/org/jboss/as/webservices/jbossws-modules.conf" failonerror="false"/>
+ <loadfile property="jbossws.modules.conf" srcfile="@{defaultmodulesconf}" failonerror="false"/>
+
+ <property name="jboss.modules" value="@{targetdir}/modules"/>
+
+ <delete includeemptydirs="true" verbose="true">
+ <fileset dir="${jboss.modules}">
+ <include name="**/org/jboss/as/webservices/main/jbossws-cxf-resources-*"/>
+ </fileset>
+ </delete>
+
+ <!-- delete content of last deployment -->
+ <delete verbose="true">
+ <fileset dir="${jboss.modules}" includes="${jbossws.modules.conf}"/>
+ </delete>
+ </sequential>
+ </macrodef>
+
<macrodef name="macro-undeploy-jbossws">
<attribute name="defaultconf"/>
<attribute name="defaultserverconf"/>
Added: stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf 2011-02-04 09:37:33 UTC (rev 13665)
@@ -0,0 +1 @@
+org/apache/cxf, org/apache/neethi, org/apache/ws/commons/xmlschema, org/jboss/ws
\ No newline at end of file
13 years, 11 months
JBossWS SVN: r13664 - common/trunk/src/main/java/org/jboss/ws/tools/ant.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-04 04:33:55 -0500 (Fri, 04 Feb 2011)
New Revision: 13664
Added:
common/trunk/src/main/java/org/jboss/ws/tools/ant/InstallModulesTask.java
Log:
[JBWS-3206] Adding Ant task for copying and modifying AS7 module.xml files
Added: common/trunk/src/main/java/org/jboss/ws/tools/ant/InstallModulesTask.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/tools/ant/InstallModulesTask.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/ws/tools/ant/InstallModulesTask.java 2011-02-04 09:33:55 UTC (rev 13664)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.tools.ant;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.FilenameFilter;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+
+/**
+ * An Ant task for installing AS7 module.xml files; reads the contents of the provided
+ * module.xml files, computes the module path from their full paths, updates the contents
+ * with the resource libs found at the corresponding module in the target dir location
+ * and finally write the destination module.xml files in the target module dir.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 03-Feb-2011
+ *
+ */
+public class InstallModulesTask extends Task
+{
+ private String targetDir; //the target directory where modules are installed
+ private FileSet fileset; //the fileset of module.xml files to be processed
+
+ @Override
+ public void execute() throws BuildException
+ {
+ try
+ {
+ DirectoryScanner dsc = fileset.getDirectoryScanner(getProject());
+ File baseDir = dsc.getBasedir();
+ String[] files = dsc.getIncludedFiles();
+ for (int i = 0; i < files.length; i++)
+ {
+ String currentFile = files[i];
+ File moduleXml = new File(baseDir, currentFile);
+ String modulePath = currentFile.substring(0, currentFile.lastIndexOf(File.separator));
+ File libDir = new File(targetDir, modulePath);
+ File destFile = new File(targetDir, currentFile);
+ System.out.println("Processing descriptor for module " + modulePath);
+ System.out.println("* Source module descriptor: " + moduleXml);
+ System.out.println("* Destination module descriptor: " + destFile);
+ String c = readFileContents(moduleXml);
+ if (libDir.exists())
+ {
+ String[] libs = libDir.list(new FilenameFilter()
+ {
+ @Override
+ public boolean accept(File dir, String name)
+ {
+ return name.endsWith(".jar") || name.endsWith(".ear") || name.endsWith(".sar")
+ || name.endsWith(".war");
+ }
+ });
+ BufferedWriter out = new BufferedWriter(new FileWriter(destFile));
+ out.write(updateContents(c, libs));
+ out.close();
+ }
+ else
+ {
+ libDir.mkdirs();
+ BufferedWriter out = new BufferedWriter(new FileWriter(destFile));
+ out.write(c);
+ out.close();
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new BuildException(e);
+ }
+ }
+
+ private static String readFileContents(File file) throws Exception
+ {
+ StringBuilder sb = new StringBuilder();
+ BufferedReader in = null;
+ try
+ {
+ in = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = in.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append("\n");
+ }
+ }
+ finally
+ {
+ if (in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+ }
+ }
+ return sb.toString();
+ }
+
+ private static String updateContents(String contents, String[] libs)
+ {
+ StringBuilder sb = new StringBuilder();
+ for (String f : libs) {
+ sb.append("<resource-root path=\"");
+ sb.append(f);
+ sb.append("\"/>\n ");
+ }
+ return contents.replaceFirst("<!-- Insert resources here -->", sb.toString());
+ }
+
+ public FileSet createFileset()
+ {
+ this.fileset = new FileSet();
+ return fileset;
+ }
+
+ public void setTargetDir(String targetDir)
+ {
+ this.targetDir = targetDir;
+ }
+}
13 years, 11 months
JBossWS SVN: r13663 - stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/utils.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-02-03 18:55:06 -0500 (Thu, 03 Feb 2011)
New Revision: 13663
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
Log:
[JBPAPP-5850] can't be build under OpenJDK - this fix was required for the MTOM + Security test case to pass
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2011-02-03 01:27:30 UTC (rev 13662)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2011-02-03 23:55:06 UTC (rev 13663)
@@ -1,39 +1,40 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * 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;
-// $Id$
-
import java.awt.image.BufferedImage;
-import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
import javax.mail.internet.ContentType;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.ParseException;
@@ -45,10 +46,6 @@
import org.jboss.wsf.common.IOUtils;
import org.jboss.wsf.common.JavaUtils;
-import com.sun.image.codec.jpeg.JPEGCodec;
-import com.sun.image.codec.jpeg.JPEGImageDecoder;
-import com.sun.image.codec.jpeg.JPEGImageEncoder;
-
/**
* Generic mime utility class.
*
@@ -223,15 +220,18 @@
{
public Object readFrom(InputStream in) {
Object converted = null;
+
try
{
- JPEGImageDecoder dec = JPEGCodec.createJPEGDecoder(in);
- BufferedImage bim = dec.decodeAsBufferedImage();
+ ImageReader decoder = ImageIO.getImageReadersByFormatName("JPEG").next();
+ ImageInputStream iis = ImageIO.createImageInputStream(in);
+ decoder.setInput(iis);
+ BufferedImage bim = decoder.read(0);
converted = bim;
}
catch (Exception e)
{
- // ignore
+ e.printStackTrace();
}
return converted;
@@ -240,10 +240,12 @@
public void writeTo(Object obj, OutputStream out) {
if(obj instanceof BufferedImage)
{
- JPEGImageEncoder enc = JPEGCodec.createJPEGEncoder(out);
+ ImageWriter encoder = ImageIO.getImageWritersByFormatName("JPEG").next();
try
{
- enc.encode((BufferedImage)obj);
+ ImageOutputStream ios = ImageIO.createImageOutputStream(out);
+ encoder.setOutput(ios);
+ encoder.write((BufferedImage)obj);
}
catch (IOException e)
{
@@ -291,17 +293,12 @@
Object converted = null;
try
{
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- StringBuilder sb = new StringBuilder();
- String line = null;
-
- while ((line = br.readLine()) != null) {
- sb.append(line + "\n");
+ StringBuilder out = new StringBuilder();
+ byte[] b = new byte[4096];
+ for (int n; (n = in.read(b)) != -1;) {
+ out.append(new String(b, 0, n));
}
-
- br.close();
-
- converted = sb.toString();
+ converted = out.toString();
}
catch (IOException e)
{
@@ -401,4 +398,4 @@
}
-}
+}
\ No newline at end of file
13 years, 11 months
JBossWS SVN: r13662 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850: src/main/java/org/jboss/ws/core and 15 other directories.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-02-02 20:27:30 -0500 (Wed, 02 Feb 2011)
New Revision: 13662
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.keystore
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.truststore
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.keystore
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.truststore
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/NodeImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-client-config.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml
Log:
[JBPAPP-5850] - JBossWS: MTOM + WS-Security not working
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/ant-import-tests/build-jars-jaxws.xml 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/ant-import-tests/build-jars-jaxws.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -360,6 +360,32 @@
<include name="org/jboss/test/ws/jaxws/jbws1283/*.*"/>
</fileset>
</jar>
+
+ <!-- jaxws-jbws2014-->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws2014-sign.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2014/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2014/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2014/sign/META-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2014/">
+ <include name="wsse.*"/>
+ </metainf>
+ </jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws2014-encrypt.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2014/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2014/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2014/encrypt/META-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2014/">
+ <include name="wsse.*"/>
+ </metainf>
+ </jar>
<!-- jaxws-jbws1422 -->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws1422.jar">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/CommonClient.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/CommonClient.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -54,6 +54,7 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -295,6 +296,8 @@
boolean handlerPass = callRequestHandlerChain(portName, handlerType[0]);
handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[1]);
handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[2]);
+
+ XOPContext.visitAndRestoreXOPData();
// Handlers might have replaced the message
reqMessage = msgContext.getMessageAbstraction();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -547,12 +547,7 @@
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
- boolean status = (handlerChain != null ? handlerChain.handleRequest(msgContext, type) : true);
-
- if (type == HandlerType.ENDPOINT)
- XOPContext.visitAndRestoreXOPData();
-
- return status;
+ return (handlerChain != null ? handlerChain.handleRequest(msgContext, type) : true);
}
@Override
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -70,6 +70,7 @@
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
@@ -226,6 +227,8 @@
handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[1]);
handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[2]);
+ XOPContext.visitAndRestoreXOPData();
+
// Handlers might have replaced the message
reqMsg = (SOAPMessageImpl)msgContext.getSOAPMessage();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -28,13 +28,17 @@
import java.util.Set;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.server.ServerHandlerDelegate;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
@@ -100,7 +104,13 @@
log.debug("callResponseHandlerChain: " + type);
HandlerChainExecutor executor = getExecutor(type);
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
- return (executor != null ? executor.handleMessage(msgContext) : true);
+ boolean status = (executor != null ? executor.handleMessage(msgContext) : true);
+
+ MessageAbstraction msg = ((CommonMessageContext)msgContext).getMessageAbstraction();
+ if (msg instanceof SOAPMessage)
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
@@ -120,7 +130,13 @@
log.debug("callFaultHandlerChain: " + type);
HandlerChainExecutor executor = getExecutor(type);
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
- return (executor != null ? executor.handleFault(msgContext, ex) : true);
+ boolean status = (executor != null ? executor.handleFault(msgContext, ex) : true);
+
+ MessageAbstraction msg = ((CommonMessageContext)msgContext).getMessageAbstraction();
+ if (msg instanceof SOAPMessage)
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
private List<Handler> getHandlerChain(EndpointMetaData epMetaData, HandlerType type)
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/NodeImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/NodeImpl.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/NodeImpl.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -22,8 +22,10 @@
package org.jboss.ws.core.soap;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
@@ -66,6 +68,8 @@
protected org.w3c.dom.Node domNode;
// A list of soap children
private List<NodeImpl> soapChildren = new ArrayList<NodeImpl>();
+ // A hash with the user data
+ private Map<String, Object> userData;
/** Construct the Node for a given org.w3c.dom.Node
*
@@ -612,8 +616,11 @@
public Object getUserData(String key)
{
- // FIXME getUserData
- throw new NotImplementedException("getUserData");
+ if (userData != null)
+ {
+ return userData.get(key);
+ }
+ return null;
}
public boolean isDefaultNamespace(String namespaceURI)
@@ -662,8 +669,11 @@
public Object setUserData(String key, Object data, UserDataHandler handler)
{
- // FIXME setUserData
- throw new NotImplementedException("setUserData");
+ if (userData == null)
+ {
+ userData = new HashMap<String, Object>();
+ }
+ return userData.put(key, data);
}
// END org.w3c.dom.Node DOM Level 3 *****************************************************************************
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -33,6 +33,8 @@
import javax.xml.soap.SOAPFault;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.wsf.common.DOMUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -136,6 +138,8 @@
{
SOAPElement soapChild = createElement((Element)child);
soapElement.addChildElement(soapChild);
+ if (Constants.NAME_XOP_INCLUDE.equals(soapChild.getElementQName()))
+ XOPContext.inlineXOPData(soapChild);
}
else if (nodeType == Node.TEXT_NODE)
{
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -72,6 +72,8 @@
private static final Logger log = Logger.getLogger(XOPContext.class);
private static final String NS_XOP_JBOSSWS = "http://org.jboss.ws/xop";
+
+ private static final String NS_XOP_JBOSSWS_CONTENT_TYPE = NS_XOP_JBOSSWS + ":content-type";
/**
* Check if the current soap message flagged as a XOP package.
@@ -258,11 +260,11 @@
*/
public static void restoreXOPDataDOM(SOAPElement xopElement)
{
- String contentType = xopElement.getAttributeNS(NS_XOP_JBOSSWS, "content-type");
+ String contentType = (String)xopElement.getUserData(NS_XOP_JBOSSWS_CONTENT_TYPE);
if (contentType != null && contentType.length() > 0)
{
replaceBase64Representation(xopElement, contentType);
- xopElement.removeAttribute(new NameImpl(new QName(NS_XOP_JBOSSWS, "content-type")));
+ xopElement.setUserData(NS_XOP_JBOSSWS_CONTENT_TYPE, null, null);
}
else
{
@@ -345,7 +347,7 @@
String base64 = SimpleTypeBindings.marshalBase64(data);
parent.removeChild(xopIncludeElement);
parent.setValue(base64);
- parent.setAttributeNS(NS_XOP_JBOSSWS, "content-type", contentType);
+ parent.setUserData(NS_XOP_JBOSSWS_CONTENT_TYPE, contentType, null);
if (log.isDebugEnabled())
log.debug("Created base64 representation for content-type " + contentType);
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -131,7 +131,7 @@
processSOAPBinding(sepMetaData, seiClass);
// Process an optional @BindingType annotation
- processBindingType(sepMetaData, seiClass);
+ processBindingType(sepMetaData, sepClass);
// process config
processEndpointConfig(sepClass, linkName, sepMetaData);
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-client-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-client-config.xml 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-client-config.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -36,7 +36,7 @@
<config-name>Standard WSSecurity Client</config-name>
<post-handler-chains>
<javaee:handler-chain>
- <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
<javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml 2011-02-02 15:40:02 UTC (rev 13661)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -35,7 +35,7 @@
<config-name>Standard WSSecurity Endpoint</config-name>
<post-handler-chains>
<javaee:handler-chain>
- <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSSecurity Handler</javaee:handler-name>
<javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014 (from rev 13516, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java 2010-12-17 06:22:05 UTC (rev 13516)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.soap.SOAPBinding;
-
-import junit.framework.Test;
-
-import org.jboss.ws.core.StubExt;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test JBWS-2014 (WS-Security with MTOM) - signature + encryption
- *
- * @author alessio.soldano(a)jboss.com
- * @since 01-May-2008
- */
-public class EncryptTestCase extends JBossWSTest
-{
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(EncryptTestCase.class, "jaxws-jbws2014-encrypt.jar");
- }
-
- @SuppressWarnings("unchecked")
- public void testEndpoint() throws Exception
- {
- TestDto in0 = new TestDto();
- in0.setId("myId");
- String text = "This is the attachment for id: myId";
- in0.setContent(new DataHandler(text, "text/plain"));
- TestEndpoint port = getPort();
- TestDto retObj = port.echo(in0);
-
- Map<String, Object> ctx = ((BindingProvider)port).getResponseContext();
- Object resContentType = ((HashMap<String,Object>)ctx.get("javax.xml.ws.http.response.headers")).get("Content-Type");
-
- //Inline data when using encryption
- assertTrue(resContentType.toString().contains("text/xml"));
- assertTrue(!resContentType.toString().contains("multipart"));
-
-
- assertEquals("myId", retObj.getId());
- Object result = retObj.getContent().getContent();
- if (result instanceof InputStream)
- {
- InputStream in = (InputStream)result;
- StringBuilder out = new StringBuilder();
- byte[] b = new byte[4096];
- for (int n; (n = in.read(b)) != -1;) {
- out.append(new String(b, 0, n));
- }
- result = out.toString();
- }
- assertEquals(text, result);
- }
-
- private TestEndpoint getPort() throws Exception
- {
- System.setProperty("org.jboss.ws.wsse.keyStore", getResourceFile("jaxws/jbws2014/wsse.keystore").getPath());
- System.setProperty("org.jboss.ws.wsse.trustStore", getResourceFile("jaxws/jbws2014/wsse.truststore").getPath());
- System.setProperty("org.jboss.ws.wsse.keyStorePassword", "jbossws");
- System.setProperty("org.jboss.ws.wsse.trustStorePassword", "jbossws");
- System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
- System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
-
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2014?wsdl");
- URL securityURL = getResourceURL("jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml");
- QName serviceName = new QName("http://org.jboss.ws/jbws2014", "TestService");
-
- Service service = Service.create(wsdlURL, serviceName);
-
- TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
- ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
- ((StubExt)port).setConfigName("Standard WSSecurity Client");
-
- SOAPBinding binding = (SOAPBinding)((BindingProvider)port).getBinding();
- binding.setMTOMEnabled(true);
- return port;
- }
-
- /** Try to discover the URL for the test resource */
- public URL getResourceURL(String resource) throws MalformedURLException
- {
- return getResourceFile(resource).toURL();
- }
-
- /** Try to discover the File for the test resource */
- public File getResourceFile(String resource)
- {
- File file = new File(resource);
- return file;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java (from rev 13516, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/EncryptTestCase.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test JBWS-2014 (WS-Security with MTOM) - signature + encryption
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 01-May-2008
+ */
+public class EncryptTestCase extends JBossWSTest
+{
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(EncryptTestCase.class, "jaxws-jbws2014-encrypt.jar");
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testEndpoint() throws Exception
+ {
+ TestDto in0 = new TestDto();
+ in0.setId("myId");
+ String text = "This is the attachment for id: myId";
+ in0.setContent(new DataHandler(text, "text/plain"));
+ TestEndpoint port = getPort();
+ TestDto retObj = port.echo(in0);
+
+ Map<String, Object> ctx = ((BindingProvider)port).getResponseContext();
+ Object resContentType = ((HashMap<String,Object>)ctx.get("javax.xml.ws.http.response.headers")).get("Content-Type");
+
+ //Inline data when using encryption
+ assertTrue(resContentType.toString().contains("text/xml"));
+ assertTrue(!resContentType.toString().contains("multipart"));
+
+
+ assertEquals("myId", retObj.getId());
+ Object result = retObj.getContent().getContent();
+ if (result instanceof InputStream)
+ {
+ InputStream in = (InputStream)result;
+ StringBuilder out = new StringBuilder();
+ byte[] b = new byte[4096];
+ for (int n; (n = in.read(b)) != -1;) {
+ out.append(new String(b, 0, n));
+ }
+ result = out.toString();
+ }
+ assertEquals(text, result);
+ }
+
+ private TestEndpoint getPort() throws Exception
+ {
+ System.setProperty("org.jboss.ws.wsse.keyStore", getResourceFile("resources/jaxws/jbws2014/wsse.keystore").getPath());
+ System.setProperty("org.jboss.ws.wsse.trustStore", getResourceFile("resources/jaxws/jbws2014/wsse.truststore").getPath());
+ System.setProperty("org.jboss.ws.wsse.keyStorePassword", "jbossws");
+ System.setProperty("org.jboss.ws.wsse.trustStorePassword", "jbossws");
+ System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
+ System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
+
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2014?wsdl");
+ URL securityURL = getResourceURL("resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml");
+ QName serviceName = new QName("http://org.jboss.ws/jbws2014", "TestService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+
+ SOAPBinding binding = (SOAPBinding)((BindingProvider)port).getBinding();
+ binding.setMTOMEnabled(true);
+ return port;
+ }
+
+ /** Try to discover the URL for the test resource */
+ public URL getResourceURL(String resource) throws MalformedURLException
+ {
+ return getResourceFile(resource).toURL();
+ }
+
+ /** Try to discover the File for the test resource */
+ public File getResourceFile(String resource)
+ {
+ File file = new File(resource);
+ return file;
+ }
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java 2010-12-17 06:22:05 UTC (rev 13516)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
-
-import java.io.File;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.soap.SOAPBinding;
-
-import junit.framework.Test;
-
-import org.jboss.ws.core.StubExt;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test JBWS-2014 (WS-Security with MTOM) - signature
- *
- * @author alessio.soldano(a)jboss.com
- * @since 01-May-2008
- */
-public class SignTestCase extends JBossWSTest
-{
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(SignTestCase.class, "jaxws-jbws2014-sign.jar");
- }
-
- @SuppressWarnings("unchecked")
- public void testEndpoint() throws Exception
- {
- TestDto in0 = new TestDto();
- in0.setId("myId");
- String text = "This is the attachment for id: myId";
- //This also tests JBWS-2172
- in0.setContent(new DataHandler(text, "text/plain"));
- TestEndpoint port = getPort();
- TestDto retObj = port.echo(in0);
-
- Map<String, Object> ctx = ((BindingProvider)port).getResponseContext();
- Object resContentType = ((HashMap<String,Object>)ctx.get("javax.xml.ws.http.response.headers")).get("Content-Type");
- //Check attachment
- assertTrue(resContentType.toString().contains("multipart"));
-
- assertEquals("myId", retObj.getId());
- Object result = retObj.getContent().getContent();
- if (result instanceof InputStream)
- {
- InputStream in = (InputStream)result;
- StringBuilder out = new StringBuilder();
- byte[] b = new byte[4096];
- for (int n; (n = in.read(b)) != -1;) {
- out.append(new String(b, 0, n));
- }
- result = out.toString();
- }
- assertEquals(text, result);
- }
-
- private TestEndpoint getPort() throws Exception
- {
- System.setProperty("org.jboss.ws.wsse.keyStore", getResourceFile("jaxws/jbws2014/wsse.keystore").getPath());
- System.setProperty("org.jboss.ws.wsse.trustStore", getResourceFile("jaxws/jbws2014/wsse.truststore").getPath());
- System.setProperty("org.jboss.ws.wsse.keyStorePassword", "jbossws");
- System.setProperty("org.jboss.ws.wsse.trustStorePassword", "jbossws");
- System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
- System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
-
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2014?wsdl");
- URL securityURL = getResourceURL("jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml");
- QName serviceName = new QName("http://org.jboss.ws/jbws2014", "TestService");
-
- Service service = Service.create(wsdlURL, serviceName);
-
- TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
- ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
- ((StubExt)port).setConfigName("Standard WSSecurity Client");
-
- SOAPBinding binding = (SOAPBinding)((BindingProvider)port).getBinding();
- binding.setMTOMEnabled(true);
- return port;
- }
-
- /** Try to discover the URL for the test resource */
- public URL getResourceURL(String resource) throws MalformedURLException
- {
- return getResourceFile(resource).toURL();
- }
-
- /** Try to discover the File for the test resource */
- public File getResourceFile(String resource)
- {
- File file = new File(resource);
- return file;
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java (from rev 13516, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/SignTestCase.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test JBWS-2014 (WS-Security with MTOM) - signature
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 01-May-2008
+ */
+public class SignTestCase extends JBossWSTest
+{
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(SignTestCase.class, "jaxws-jbws2014-sign.jar");
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testEndpoint() throws Exception
+ {
+ TestDto in0 = new TestDto();
+ in0.setId("myId");
+ String text = "This is the attachment for id: myId";
+ //This also tests JBWS-2172
+ in0.setContent(new DataHandler(text, "text/plain"));
+ TestEndpoint port = getPort();
+ TestDto retObj = port.echo(in0);
+
+ Map<String, Object> ctx = ((BindingProvider)port).getResponseContext();
+ Object resContentType = ((HashMap<String,Object>)ctx.get("javax.xml.ws.http.response.headers")).get("Content-Type");
+ //Check attachment
+ assertTrue(resContentType.toString().contains("multipart"));
+
+ assertEquals("myId", retObj.getId());
+ Object result = retObj.getContent().getContent();
+ if (result instanceof InputStream)
+ {
+ InputStream in = (InputStream)result;
+ StringBuilder out = new StringBuilder();
+ byte[] b = new byte[4096];
+ for (int n; (n = in.read(b)) != -1;) {
+ out.append(new String(b, 0, n));
+ }
+ result = out.toString();
+ }
+ assertEquals(text, result);
+ }
+
+ private TestEndpoint getPort() throws Exception
+ {
+ System.setProperty("org.jboss.ws.wsse.keyStore", getResourceFile("resources/jaxws/jbws2014/wsse.keystore").getPath());
+ System.setProperty("org.jboss.ws.wsse.trustStore", getResourceFile("resources/jaxws/jbws2014/wsse.truststore").getPath());
+ System.setProperty("org.jboss.ws.wsse.keyStorePassword", "jbossws");
+ System.setProperty("org.jboss.ws.wsse.trustStorePassword", "jbossws");
+ System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
+ System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
+
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2014?wsdl");
+ URL securityURL = getResourceURL("resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml");
+ QName serviceName = new QName("http://org.jboss.ws/jbws2014", "TestService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+
+ SOAPBinding binding = (SOAPBinding)((BindingProvider)port).getBinding();
+ binding.setMTOMEnabled(true);
+ return port;
+ }
+
+ /** Try to discover the URL for the test resource */
+ public URL getResourceURL(String resource) throws MalformedURLException
+ {
+ return getResourceFile(resource).toURL();
+ }
+
+ /** Try to discover the File for the test resource */
+ public File getResourceFile(String resource)
+ {
+ File file = new File(resource);
+ return file;
+ }
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java 2010-12-17 06:22:05 UTC (rev 13516)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,28 +0,0 @@
-package org.jboss.test.ws.jaxws.jbws2014;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.annotation.XmlMimeType;
-
-public class TestDto
-{
- private DataHandler content;
- private String id;
-
- @XmlMimeType("text/plain")
- public DataHandler getContent()
- {
- return content;
- }
- public void setContent(DataHandler content)
- {
- this.content = content;
- }
- public String getId()
- {
- return id;
- }
- public void setId(String id)
- {
- this.id = id;
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java (from rev 13516, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestDto.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,28 @@
+package org.jboss.test.ws.jaxws.jbws2014;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlMimeType;
+
+public class TestDto
+{
+ private DataHandler content;
+ private String id;
+
+ @XmlMimeType("text/plain")
+ public DataHandler getContent()
+ {
+ return content;
+ }
+ public void setContent(DataHandler content)
+ {
+ this.content = content;
+ }
+ public String getId()
+ {
+ return id;
+ }
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java 2010-12-17 06:22:05 UTC (rev 13516)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
-
-//$Id: TestEndpoint.java 6872 2008-05-02 17:49:10Z alessio.soldano(a)jboss.com $
-
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-@WebService(targetNamespace = "http://org.jboss.ws/jbws2014")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
- use = SOAPBinding.Use.LITERAL)
-public interface TestEndpoint
-{
- public TestDto echo(TestDto dto);
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java (from rev 13516, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpoint.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
+
+//$Id: TestEndpoint.java 6872 2008-05-02 17:49:10Z alessio.soldano(a)jboss.com $
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jbws2014")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
+ use = SOAPBinding.Use.LITERAL)
+public interface TestEndpoint
+{
+ public TestDto echo(TestDto dto);
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java 2010-12-17 06:22:05 UTC (rev 13516)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
-
-//$Id: TestEndpointImpl.java 6872 2008-05-02 17:49:10Z alessio.soldano(a)jboss.com $
-
-import javax.ejb.Stateless;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.ws.BindingType;
-
-import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.wsf.spi.annotation.WebContext;
-
-/**
- * The MTOM endpoint
- *
- * @author alessio.soldano(a)jboss.org
- * @since 01-May-2008
- */
-@Stateless
-@WebService(endpointInterface = "org.jboss.test.ws.jaxws.jbws2014.TestEndpoint",
- name = "TestEndpoint",
- targetNamespace = "http://org.jboss.ws/jbws2014",
- serviceName = "TestService")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
-@WebContext(contextRoot="/jaxws-jbws2014", urlPattern="/*")
-@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
-@EndpointConfig(configName = "Standard WSSecurity Endpoint")
-public class TestEndpointImpl
-{
- public TestDto echo(TestDto dto)
- {
- return dto;
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java (from rev 13516, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/java/org/jboss/test/ws/jaxws/jbws2014/TestEndpointImpl.java 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2014;
+
+//$Id: TestEndpointImpl.java 6872 2008-05-02 17:49:10Z alessio.soldano(a)jboss.com $
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.BindingType;
+
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * The MTOM endpoint
+ *
+ * @author alessio.soldano(a)jboss.org
+ * @since 01-May-2008
+ */
+@Stateless
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.jbws2014.TestEndpoint",
+ name = "TestEndpoint",
+ targetNamespace = "http://org.jboss.ws/jbws2014",
+ serviceName = "TestService")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
+@WebContext(contextRoot="/jaxws-jbws2014", urlPattern="/*")
+@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
+@EndpointConfig(configName = "Standard WSSecurity Endpoint")
+public class TestEndpointImpl
+{
+ public TestDto echo(TestDto dto)
+ {
+ return dto;
+ }
+}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014 (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/encrypt)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/encrypt/META-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml 2010-12-17 06:37:50 UTC (rev 13517)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <config>
- <sign type="x509v3" alias="wsse"/>
- <encrypt type="x509v3" alias="wsse"/>
- <requires>
- <signature/>
- <encryption/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-client.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <config>
+ <sign type="x509v3" alias="wsse"/>
+ <encrypt type="x509v3" alias="wsse"/>
+ <requires>
+ <signature/>
+ <encryption/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml 2010-12-17 06:37:50 UTC (rev 13517)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <key-store-file>META-INF/wsse.keystore</key-store-file>
- <key-store-password>jbossws</key-store-password>
- <trust-store-file>META-INF/wsse.truststore</trust-store-file>
- <trust-store-password>jbossws</trust-store-password>
- <config>
- <sign type="x509v3" alias="wsse"/>
- <encrypt type="x509v3" alias="wsse"/>
- <requires>
- <signature/>
- <encryption/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/encrypt/META-INF/jboss-wsse-server.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <key-store-file>META-INF/wsse.keystore</key-store-file>
+ <key-store-password>jbossws</key-store-password>
+ <trust-store-file>META-INF/wsse.truststore</trust-store-file>
+ <trust-store-password>jbossws</trust-store-password>
+ <config>
+ <sign type="x509v3" alias="wsse"/>
+ <encrypt type="x509v3" alias="wsse"/>
+ <requires>
+ <signature/>
+ <encryption/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/sign)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/sign/META-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml 2010-12-17 06:37:50 UTC (rev 13517)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <config>
- <sign type="x509v3" alias="wsse" includeTimestamp="false"/>
- <requires>
- <signature/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-client.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <config>
+ <sign type="x509v3" alias="wsse" includeTimestamp="false"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml 2010-12-17 06:37:50 UTC (rev 13517)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <key-store-file>META-INF/wsse.keystore</key-store-file>
- <key-store-password>jbossws</key-store-password>
- <trust-store-file>META-INF/wsse.truststore</trust-store-file>
- <trust-store-password>jbossws</trust-store-password>
- <config>
- <sign type="x509v3" alias="wsse" includeTimestamp="false"/>
- <requires>
- <signature/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/sign/META-INF/jboss-wsse-server.xml 2011-02-03 01:27:30 UTC (rev 13662)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <key-store-file>META-INF/wsse.keystore</key-store-file>
+ <key-store-password>jbossws</key-store-password>
+ <trust-store-file>META-INF/wsse.truststore</trust-store-file>
+ <trust-store-password>jbossws</trust-store-password>
+ <config>
+ <sign type="x509v3" alias="wsse" includeTimestamp="false"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.keystore
===================================================================
(Binary files differ)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.keystore (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/wsse.keystore)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.truststore
===================================================================
(Binary files differ)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/src/test/resources/jaxws/jbws2014/wsse.truststore (from rev 13517, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2014/wsse.truststore)
===================================================================
(Binary files differ)
13 years, 11 months
JBossWS SVN: r13661 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-02-02 10:40:02 -0500 (Wed, 02 Feb 2011)
New Revision: 13661
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850/
Log:
[JBPAPP-5850] create isolated branch for one off patch
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP07_JBPAPP-5850 (from rev 13660, stack/native/tags/jbossws-native-2.0.1.SP2_CP07)
13 years, 11 months
JBossWS SVN: r13660 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/extensions/security and 14 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-01 11:21:31 -0500 (Tue, 01 Feb 2011)
New Revision: 13660
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignEncryptFaultTestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignFaultTestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml
Removed:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerInbound.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerOutbound.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerServer.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Config.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Encrypt.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireSignature.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Requires.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Sign.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl
Log:
[JBPAPP-4346] Add support for fault signing and encryption
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -51,6 +51,7 @@
* A SOAPFault object, which carries status and/or error information, is an example of a SOAPBodyElement object.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
*/
public class SOAPBodyImpl extends SOAPElementImpl implements SOAPBody
{
@@ -67,13 +68,30 @@
{
log.trace("addChildElement: " + child.getElementName());
- if ((child instanceof SOAPBodyElement) == false)
- child = convertToBodyElement(child);
+ if (!(child instanceof SOAPBodyElement))
+ {
+ child = isFault(child) ? convertToSOAPFault(child) : convertToBodyElement(child);
+ }
child = super.addChildElement(child);
return child;
}
+ private boolean isFault(Node node)
+ {
+ return "Fault".equals(node.getLocalName()) && getNamespaceURI().equals(node.getNamespaceURI());
+ }
+
+ private SOAPElement convertToSOAPFault(Node node)
+ {
+ if (!(node instanceof SOAPElementImpl))
+ throw new IllegalArgumentException("SOAPElementImpl expected");
+
+ SOAPElementImpl element = (SOAPElementImpl) node;
+ element.detachNode();
+ return new SOAPFaultImpl(element);
+ }
+
public SOAPBodyElement addBodyElement(Name name) throws SOAPException
{
log.trace("addBodyElement: " + name);
@@ -197,7 +215,7 @@
{
log.trace("appendChild: " + newChild.getNodeName());
if (needsConversionToBodyElement(newChild))
- newChild = convertToBodyElement(newChild);
+ newChild = isFault(newChild) ? convertToSOAPFault(newChild) : convertToBodyElement(newChild);
return super.appendChild(newChild);
}
@@ -206,7 +224,7 @@
{
log.trace("insertBefore: " + newChild.getNodeName());
if (needsConversionToBodyElement(newChild))
- newChild = convertToBodyElement(newChild);
+ newChild = isFault(newChild) ? convertToSOAPFault(newChild) : convertToBodyElement(newChild);
return super.insertBefore(newChild, refChild);
}
@@ -215,7 +233,7 @@
{
log.trace("replaceChild: " + newChild.getNodeName());
if (needsConversionToBodyElement(newChild))
- newChild = convertToBodyElement(newChild);
+ newChild = isFault(newChild) ? convertToSOAPFault(newChild) : convertToBodyElement(newChild);
return super.replaceChild(newChild, oldChild);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -40,10 +40,13 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.utils.SAAJUtils;
+import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
import org.jboss.xb.QNameBuilder;
import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
/**
* An element in the SOAPBody object that contains error and/or status information.
@@ -60,6 +63,7 @@
* goes only to the default actor, which is the final intended recipient.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com"/>Jason T. Greene</a>
*/
public class SOAPFaultImpl extends SOAPBodyElementDoc implements SOAPFault
{
@@ -101,6 +105,11 @@
{
super(new NameImpl("Fault", prefix, namespace));
}
+
+ public SOAPFaultImpl(SOAPElementImpl element)
+ {
+ super(element);
+ }
/** Gets the fault code for this SOAPFault object.
*/
@@ -717,15 +726,47 @@
return detail;
}
+ private Detail extractDetail(final QName detailQName)
+ {
+ SOAPElement obj = getChildElement(this, detailQName);
+ Detail detail = null;
+ if (obj instanceof Detail)
+ {
+ detail = (Detail)obj;
+ }
+ else if(obj instanceof SOAPElementImpl)
+ {
+ try
+ {
+ SOAPElementImpl soapEl = (SOAPElementImpl)obj;
+ SOAPFactoryImpl factory = new SOAPFactoryImpl();
+ detail = (Detail)addChildElement(factory.createDetail());
+
+ Iterator<Element> childIt = DOMUtils.getChildElements(soapEl);
+ while (childIt.hasNext())
+ {
+ Element domElement = childIt.next();
+ SOAPElement detailEntry = new DetailEntryImpl(factory.createElement(domElement, true));
+ detail.addChildElement(detailEntry);
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Unable to create fault detail: " + e.getMessage());
+ }
+ }
+ return detail;
+ }
+
private void findSoap11DetailElement()
{
- detail = (Detail)getChildElement(this, Constants.SOAP11_DETAIL);
+ this.detail = extractDetail(Constants.SOAP11_DETAIL);
log.trace("findSoap11DetailElement : " + detail);
}
private void findSoap12DetailElement()
{
- detail = (Detail)getChildElement(this, Constants.SOAP12_DETAIL);
+ detail = extractDetail(Constants.SOAP12_DETAIL);
log.trace("findSoap12DetailElement : " + detail);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -80,6 +80,7 @@
private MimeHeaders mimeHeaders = new MimeHeaders();
private List<AttachmentPart> attachments = new LinkedList<AttachmentPart>();
private CIDGenerator cidGenerator = new CIDGenerator();
+ private boolean faultMessage;
private boolean isXOPMessage;
private boolean isSWARefMessage;
private SOAPPartImpl soapPart;
@@ -140,6 +141,18 @@
{
return cidGenerator;
}
+
+ /**
+ * Marks this <code>SOAPMessage</code> as a fault. Otherwise, the message
+ * will be checked for a SOAPFault. The reason for this is to allow for
+ * faults to be encrypted, in which case there is no SOAPFault.
+ *
+ * @param faultMessage whether this message is a fault
+ */
+ public void setFaultMessage(boolean faultMessage)
+ {
+ this.faultMessage = faultMessage;
+ }
public boolean isXOPMessage()
{
@@ -441,6 +454,9 @@
public boolean isFaultMessage()
{
+ if (faultMessage)
+ return true;
+
SOAPFault soapFault = null;
try
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -84,13 +84,10 @@
QName secQName = new QName(Constants.WSSE_NS, "Security");
Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader, secQName) : null;
+ boolean fault = message.getSOAPBody().getFault() != null;
if (secHeaderElement == null)
{
- // This is ok, we always allow faults to be received because WS-Security does not encrypt faults
- if (message.getSOAPBody().getFault() != null)
- return;
-
- if (hasRequirements(config))
+ if (hasRequirements(config, fault))
throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));
}
@@ -98,7 +95,7 @@
{
if (secHeaderElement != null)
{
- decodeHeader(configuration, config, message, secHeaderElement);
+ decodeHeader(configuration, config, message, secHeaderElement, fault);
}
authorize(config);
@@ -115,7 +112,7 @@
}
- private void decodeHeader(WSSecurityConfiguration configuration, Config config, SOAPMessage message, Element secHeaderElement) throws WSSecurityException
+ private void decodeHeader(WSSecurityConfiguration configuration, Config config, SOAPMessage message, Element secHeaderElement, boolean fault) throws WSSecurityException
{
SecurityStore securityStore = new SecurityStore(configuration);
NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
@@ -134,7 +131,7 @@
if (log.isTraceEnabled())
log.trace("Decoded Message:\n" + DOMWriter.printNode(message.getSOAPPart(), true));
- List<RequireOperation> operations = buildRequireOperations(config);
+ List<RequireOperation> operations = buildRequireOperations(config, fault);
decoder.verify(operations);
if (log.isDebugEnabled())
@@ -161,8 +158,9 @@
Config config = getActualConfig(configuration, operationConfig);
log.debug("WS-Security config: " + config);
+ boolean fault = message.getSOAPBody().getFault() != null;
// Nothing to process
- if (config == null)
+ if (config == null || (fault && !config.includesFaults()))
return;
ArrayList<EncodingOperation> operations = new ArrayList<EncodingOperation>();
@@ -180,7 +178,7 @@
}
Sign sign = config.getSign();
- if (sign != null)
+ if (sign != null && (!fault || sign.isIncludeFaults()))
{
List<Target> targets = convertTargets(sign.getTargets());
if (sign.isIncludeTimestamp())
@@ -196,7 +194,7 @@
}
Encrypt encrypt = config.getEncrypt();
- if (encrypt != null)
+ if (encrypt != null && (!fault || encrypt.isIncludeFaults()))
{
List<Target> targets = convertTargets(encrypt.getTargets());
operations.add(new EncryptionOperation(targets, encrypt.getAlias(), encrypt.getAlgorithm(), encrypt.getWrap(), encrypt.getTokenRefType(), encrypt
@@ -268,7 +266,7 @@
return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
}
- private List<RequireOperation> buildRequireOperations(Config operationConfig)
+ private List<RequireOperation> buildRequireOperations(Config operationConfig, boolean fault)
{
if (operationConfig == null)
return null;
@@ -283,14 +281,14 @@
operations.add(new RequireTimestampOperation(requireTimestamp.getMaxAge()));
RequireSignature requireSignature = requires.getRequireSignature();
- if (requireSignature != null)
+ if (requireSignature != null && (!fault || requireSignature.isIncludeFaults()))
{
List<Target> targets = convertTargets(requireSignature.getTargets());
operations.add(new RequireSignatureOperation(targets));
}
RequireEncryption requireEncryption = requires.getRequireEncryption();
- if (requireEncryption != null)
+ if (requireEncryption != null && (!fault || requireEncryption.isIncludeFaults()))
{
List<Target> targets = convertTargets(requireEncryption.getTargets());
operations.add(new RequireEncryptionOperation(targets));
@@ -352,8 +350,10 @@
return operation.getConfig();
}
- private boolean hasRequirements(Config config)
+ private boolean hasRequirements(Config config, boolean fault)
{
- return config != null && config.getRequires() != null;
+ Requires requires = (config != null) ? config.getRequires() : null;
+ return requires != null && (!fault || requires.includesFaults());
+
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandler.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandler.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -27,6 +27,7 @@
import javax.xml.rpc.Stub;
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.soap.SOAPFaultException;
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
@@ -51,14 +52,22 @@
{
// provide logging
private static Logger log = Logger.getLogger(WSSecurityHandler.class);
+ protected static String FAULT_THROWN = "org.jboss.ws.wsse.faultThrown";
public QName[] getHeaders()
{
return new QName[] {Constants.WSSE_HEADER_QNAME};
}
+
+ protected boolean thrownByMe(MessageContext msgContext)
+ {
+ Boolean bool = (Boolean)msgContext.getProperty(FAULT_THROWN);
+ return bool != null && bool.booleanValue();
+ }
protected boolean handleInboundSecurity(MessageContext msgContext)
{
+ Exception exception = null;
try
{
WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
@@ -72,7 +81,17 @@
}
catch (SOAPException ex)
{
- log.error("Cannot handle inbound ws-security", ex);
+ exception = ex;
+ }
+
+ if (exception != null)
+ {
+ msgContext.setProperty(FAULT_THROWN, true);
+ if (exception instanceof SOAPFaultException)
+ throw (SOAPFaultException) exception;
+
+ // Unexpected exception, log it
+ log.error("Cannot handle inbound ws-security", exception);
return false;
}
return true;
@@ -80,6 +99,7 @@
protected boolean handleOutboundSecurity(MessageContext msgContext)
{
+ Exception exception = null;
try
{
WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
@@ -95,7 +115,17 @@
}
catch (SOAPException ex)
{
- log.error("Cannot handle outbound ws-security", ex);
+ exception = ex;
+ }
+
+ if (exception != null)
+ {
+ msgContext.setProperty(FAULT_THROWN, true);
+ if (exception instanceof SOAPFaultException)
+ throw (SOAPFaultException) exception;
+
+ // Unexpected exception, log it
+ log.error("Cannot handle outbound ws-security", exception);
return false;
}
return true;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerInbound.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerInbound.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerInbound.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -22,7 +22,9 @@
package org.jboss.ws.extensions.security.jaxrpc;
import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
/**
@@ -43,7 +45,19 @@
{
return handleOutboundSecurity(msgContext);
}
+
+ public boolean handleFault(MessageContext msgContext)
+ {
+ // Skip any WS-Security Faults
+ if (thrownByMe(msgContext))
+ return true;
+ // Mark the message as a fault, in case it ends up being encrypted
+ ((SOAPMessageImpl) ((SOAPMessageContext) msgContext).getMessage()).setFaultMessage(true);
+
+ return handleOutboundSecurity(msgContext);
+ }
+
protected String getConfigResourceName() {
return WSSecurityOMFactory.SERVER_RESOURCE_NAME;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerOutbound.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerOutbound.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxrpc/WSSecurityHandlerOutbound.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -42,7 +42,23 @@
{
return handleInboundSecurity(msgContext);
}
+
+ /* Their is a potential problem that can't be avoided using the JAX-RPC handler framework.
+ * If a request handler (outbound for the client) throws an exception, this will get called,
+ * but it will be incorrectly treated as an inbound message.
+ *
+ * This is intended to be called when the response message from the server (inbound)
+ * is a fault message.
+ */
+ public boolean handleFault(MessageContext msgContext)
+ {
+ if (thrownByMe(msgContext))
+ return true;
+ return handleInboundSecurity(msgContext);
+ }
+
+
protected String getConfigResourceName() {
return WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -30,6 +30,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
@@ -54,6 +55,7 @@
{
// provide logging
private static Logger log = Logger.getLogger(WSSecurityHandler.class);
+ protected static String FAULT_THROWN = "org.jboss.ws.wsse.faultThrown";
private static Set<QName> headers;
@@ -68,9 +70,16 @@
{
return headers;
}
+
+ protected boolean thrownByMe(MessageContext msgContext)
+ {
+ Boolean bool = (Boolean)msgContext.get(FAULT_THROWN);
+ return bool != null && bool.booleanValue();
+ }
protected boolean handleInboundSecurity(MessageContext msgContext)
{
+ Exception exception = null;
try
{
WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
@@ -83,7 +92,17 @@
}
catch (SOAPException ex)
{
- log.error("Cannot handle inbound ws-security", ex);
+ exception = ex;
+ }
+
+ if (exception != null)
+ {
+ msgContext.put(FAULT_THROWN, true);
+ if (exception instanceof SOAPFaultException)
+ throw (SOAPFaultException)exception;
+
+ // Unexpected exception, log it
+ log.error("Cannot handle inbound ws-security", exception);
return false;
}
return true;
@@ -91,6 +110,7 @@
protected boolean handleOutboundSecurity(MessageContext msgContext)
{
+ Exception exception = null;
try
{
WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
@@ -106,7 +126,17 @@
}
catch (SOAPException ex)
{
- log.error("Cannot handle outbound ws-security", ex);
+ exception = ex;
+ }
+
+ if (exception != null)
+ {
+ msgContext.put(FAULT_THROWN, true);
+ if (exception instanceof SOAPFaultException)
+ throw (SOAPFaultException) exception;
+
+ // Unexpected exception, log it
+ log.error("Cannot handle outbound ws-security", exception);
return false;
}
return true;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerClient.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerClient.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -42,7 +42,16 @@
{
return handleOutboundSecurity(msgContext);
}
+
+ @Override
+ public boolean handleFault(MessageContext msgContext)
+ {
+ if (thrownByMe(msgContext))
+ return true;
+ return handleInboundSecurity(msgContext);
+ }
+
protected String getConfigResourceName() {
return WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerServer.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerServer.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandlerServer.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -22,7 +22,9 @@
package org.jboss.ws.extensions.security.jaxws;
import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
/**
@@ -43,7 +45,20 @@
{
return handleOutboundSecurity(msgContext);
}
+
+ @Override
+ public boolean handleFault(MessageContext msgContext)
+ {
+ // Skip any WS-Security Faults
+ if (thrownByMe(msgContext))
+ return true;
+ // Mark the message as a fault, in case it ends up being encrypted
+ ((SOAPMessageImpl) ((SOAPMessageContext) msgContext).getMessage()).setFaultMessage(true);
+
+ return handleOutboundSecurity(msgContext);
+ }
+
protected String getConfigResourceName() {
return WSSecurityOMFactory.SERVER_RESOURCE_NAME;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Config.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -79,6 +79,11 @@
{
this.username = username;
}
+
+ public boolean includesFaults()
+ {
+ return (sign != null && sign.isIncludeFaults()) || (encrypt != null && encrypt.isIncludeFaults());
+ }
public Requires getRequires()
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Encrypt.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Encrypt.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Encrypt.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -36,11 +36,12 @@
private String type;
private String alias;
private String algorithm;
+ private boolean includeFaults;
private String keyWrapAlgorithm;
private String tokenRefType;
private String securityDomainAliasLabel;
- public Encrypt(String type, String alias, String algorithm, String wrap, String tokenRefType, String securityDomainAliasLabel)
+ public Encrypt(String type, String alias, String algorithm, String wrap, String tokenRefType, String securityDomainAliasLabel, boolean includeFaults)
{
this.type = type;
this.alias = alias;
@@ -48,6 +49,7 @@
this.keyWrapAlgorithm = wrap;
this.tokenRefType = tokenRefType;
this.securityDomainAliasLabel = securityDomainAliasLabel;
+ this.includeFaults = includeFaults;
}
public String getAlias()
@@ -109,4 +111,14 @@
{
this.securityDomainAliasLabel = securityDomainAliasLabel;
}
+
+ public boolean isIncludeFaults()
+ {
+ return includeFaults;
+ }
+
+ public void setIncludeFaults(boolean includeFaults)
+ {
+ this.includeFaults = includeFaults;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireEncryption.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -30,4 +30,21 @@
public class RequireEncryption extends Targetable
{
private static final long serialVersionUID = 3765798680988205647L;
+
+ private boolean includeFaults;
+
+ public RequireEncryption(boolean includeFaults)
+ {
+ this.includeFaults = includeFaults;
+ }
+
+ public boolean isIncludeFaults()
+ {
+ return includeFaults;
+ }
+
+ public void setIncludeFaults(boolean includeFaults)
+ {
+ this.includeFaults = includeFaults;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireSignature.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireSignature.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/RequireSignature.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -30,4 +30,21 @@
public class RequireSignature extends Targetable
{
private static final long serialVersionUID = -3854930944550152309L;
+
+ private boolean includeFaults;
+
+ public RequireSignature(boolean includeFaults)
+ {
+ this.includeFaults = includeFaults;
+ }
+
+ public boolean isIncludeFaults()
+ {
+ return includeFaults;
+ }
+
+ public void setIncludeFaults(boolean includeFaults)
+ {
+ this.includeFaults = includeFaults;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Requires.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Requires.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Requires.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -65,4 +65,10 @@
{
this.requireTimestamp = requireTimestamp;
}
+
+ public boolean includesFaults()
+ {
+ return (requireSignature != null && requireSignature.isIncludeFaults())
+ || (requireEncryption != null && requireEncryption.isIncludeFaults());
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Sign.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Sign.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Sign.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -33,17 +33,19 @@
private String type;
private String alias;
+ private boolean includeFaults;
private boolean includeTimestamp;
private String tokenRefType;
private String securityDomainAliasLabel;
- public Sign(String type, String alias, boolean includeTimestamp, String tokenRefType, String securityDomainAliasLabel)
+ public Sign(String type, String alias, boolean includeTimestamp, String tokenRefType, String securityDomainAliasLabel, boolean includeFaults)
{
this.type = type;
this.alias = alias;
this.includeTimestamp = includeTimestamp;
this.tokenRefType = tokenRefType;
this.securityDomainAliasLabel = securityDomainAliasLabel;
+ this.includeFaults = includeFaults;
}
public String getAlias()
@@ -95,4 +97,14 @@
{
this.securityDomainAliasLabel = securityDomainAliasLabel;
}
+
+ public boolean isIncludeFaults()
+ {
+ return includeFaults;
+ }
+
+ public void setIncludeFaults(boolean includeFaults)
+ {
+ this.includeFaults = includeFaults;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -50,7 +50,7 @@
public static final String CLIENT_RESOURCE_NAME = "jboss-wsse-client.xml";
- private static HashMap options = new HashMap(7);
+ private static HashMap<String, String> options = new HashMap<String, String>(7);
static
{
@@ -94,6 +94,7 @@
}
catch (JBossXBException e)
{
+ log.error("Could not parse " + configURL + ":", e);
IOException ioex = new IOException("Cannot parse: " + configURL);
Throwable cause = e.getCause();
if (cause != null)
@@ -281,19 +282,29 @@
log.trace("newChild: " + localName);
if ("sign".equals(localName))
{
- // By default, we alwyas include a timestamp
- Boolean include = new Boolean(true);
- String timestamp = attrs.getValue("", "includeTimestamp");
- if (timestamp != null)
- include = (Boolean)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, timestamp, null);
+ // By default, we always include a timestamp
+ boolean includeTimestamp = true;
+ String value = attrs.getValue("", "includeTimestamp");
+ if (value != null)
+ includeTimestamp = (Boolean) SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, value, null);
+
+ boolean includeFaults = false;
+ value = attrs.getValue("", "includeFaults");
+ if (value != null)
+ includeFaults = (Boolean) SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, value, null);
- return new Sign(attrs.getValue("", "type"), attrs.getValue("", "alias"), include.booleanValue(), attrs.getValue("", "tokenReference"), attrs.getValue("",
- "securityDomainAliasLabel"));
+ return new Sign(attrs.getValue("", "type"), attrs.getValue("", "alias"), includeTimestamp, attrs.getValue("", "tokenReference"), attrs.getValue("",
+ "securityDomainAliasLabel"), includeFaults);
}
else if ("encrypt".equals(localName))
{
+ boolean includeFaults = false;
+ String value = attrs.getValue("", "includeFaults");
+ if (value != null)
+ includeFaults = (Boolean) SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, value, null);
+
return new Encrypt(attrs.getValue("", "type"), attrs.getValue("", "alias"), attrs.getValue("", "algorithm"), attrs.getValue("", "keyWrapAlgorithm"), attrs
- .getValue("", "tokenReference"), attrs.getValue("", "securityDomainAliasLabel"));
+ .getValue("", "tokenReference"), attrs.getValue("", "securityDomainAliasLabel"), includeFaults);
}
else if ("timestamp".equals(localName))
{
@@ -474,11 +485,21 @@
log.trace("newChild: " + localName);
if ("signature".equals(localName))
{
- return new RequireSignature();
+ boolean includeFaults = false;
+ String value = attrs.getValue("", "includeFaults");
+ if (value != null)
+ includeFaults = (Boolean) SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, value, null);
+
+ return new RequireSignature(includeFaults);
}
else if ("encryption".equals(localName))
{
- return new RequireEncryption();
+ boolean includeFaults = false;
+ String value = attrs.getValue("", "includeFaults");
+ if (value != null)
+ includeFaults = (Boolean) SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, value, null);
+
+ return new RequireEncryption(includeFaults);
}
else if ("timestamp".equals(localName))
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/schema/jboss-ws-security_1_0.xsd 2011-02-01 16:21:31 UTC (rev 13660)
@@ -182,11 +182,13 @@
<xs:sequence>
<xs:element name="targets" type="targetsType" minOccurs="0"/>
</xs:sequence>
+ <xs:attribute name="includeFaults" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:complexType name="requireSignatureType">
<xs:sequence>
<xs:element name="targets" type="targetsType" minOccurs="0"/>
</xs:sequence>
+ <xs:attribute name="includeFaults" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:complexType name="requiresType">
<xs:all>
@@ -288,6 +290,7 @@
<xs:documentation>The label the ws-security engine needs for looking up (in the security domain) the alias that is to be used for encryption</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="includeFaults" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:complexType name="signType">
<xs:sequence>
@@ -312,6 +315,7 @@
<xs:documentation>The label the ws-security engine needs for looking up (in the security domain) the alias that is to be used for signing</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="includeFaults" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:simpleType name="tokenReferenceType">
<xs:restriction base="xs:string">
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -283,6 +283,8 @@
webxml="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException_Exception.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
</classes>
@@ -299,6 +301,8 @@
<war warfile="${tests.output.dir}/test-libs/jaxws-samples-wssecurity-sign.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException_Exception.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
</classes>
@@ -311,6 +315,44 @@
</webinf>
</war>
+ <!-- jaxws-samples-wssecurity-sign-fault -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-wssecurity-sign-fault.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException_Exception.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/ObjectFactory.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/sign-fault/WEB-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </webinf>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wssecurity">
+ <include name="wsse.keystore"/>
+ <include name="wsse.truststore"/>
+ </webinf>
+ </war>
+
+ <!-- jaxws-samples-wssecurity-sign-encrypt-fault -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-wssecurity-sign-encrypt-fault.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloException_Exception.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wssecurity/ObjectFactory.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </webinf>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wssecurity">
+ <include name="wsse.keystore"/>
+ <include name="wsse.truststore"/>
+ </webinf>
+ </war>
+
<!-- jaxws-samples-wssecurity-username -->
<war warfile="${tests.output.dir}/test-libs/jaxws-samples-wssecurity-username.war"
webxml="${tests.output.dir}/test-resources/jaxws/samples/wssecurity/simple-username/WEB-INF/web.xml">
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -42,4 +42,15 @@
log.info(in0);
return in0;
}
+
+ @WebMethod
+ public void triggerException(@WebParam(name = "String_1") String reason, @WebParam(name = "int_2") int code) throws HelloException_Exception
+ {
+ String message = "Error: " + reason + ":" + code;
+ HelloException he = new HelloException();
+ he.setMessage(message);
+ he.setCode(code);
+ he.setReason(reason);
+ throw new HelloException_Exception(message, he);
+ }
}
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignEncryptFaultTestCase.java (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignEncryptFaultTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignEncryptFaultTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignEncryptFaultTestCase.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -0,0 +1,98 @@
+/*
+ * 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.test.ws.jaxws.samples.wssecurity;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test WS-Security signature & encryption of faults
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class SignEncryptFaultTestCase extends JBossWSTest
+{
+ /** Deploy the test */
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(SignEncryptFaultTestCase.class, "jaxws-samples-wssecurity-sign-encrypt-fault.war");
+ }
+
+ /**
+ * Test JSE endpoint
+ */
+ public void testEndpoint() throws Exception
+ {
+ Hello hello = getPort();
+ performTest(hello, "Kermit");
+ }
+
+ private void performTest(Hello hello, String msg) throws Exception
+ {
+ UserType in0 = new UserType();
+ in0.setMsg(msg);
+ UserType retObj = hello.echoUserType(in0);
+ assertEquals(msg, retObj.getMsg());
+
+ HelloException_Exception exception = null;
+ try
+ {
+ hello.triggerException("Fake Reason", 124);
+ }
+ catch (HelloException_Exception ex)
+ {
+ exception = ex;
+ }
+ assertNotNull("No exception thrown", exception);
+ assertEquals(exception.getFaultInfo().getReason(), "Fake Reason");
+ assertEquals(exception.getFaultInfo().getCode(), 124);
+ }
+
+ private Hello getPort() throws Exception
+ {
+ URL wsdlURL = getResourceURL("wsprovide/jaxws/samples/wssecurity/HelloService.wsdl");
+ URL securityURL = getResourceURL("jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml");
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ Hello port = (Hello)service.getPort(Hello.class);
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+
+ Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();
+ reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxws-samples-wssecurity-sign-encrypt-fault");
+
+ return port;
+ }
+}
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignFaultTestCase.java (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignFaultTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignFaultTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SignFaultTestCase.java 2011-02-01 16:21:31 UTC (rev 13660)
@@ -0,0 +1,98 @@
+/*
+ * 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.test.ws.jaxws.samples.wssecurity;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test WS-Security signature of faults
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class SignFaultTestCase extends JBossWSTest
+{
+ /** Deploy the test */
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(SignFaultTestCase.class, "jaxws-samples-wssecurity-sign-fault.war");
+ }
+
+ /**
+ * Test JSE endpoint
+ */
+ public void testEndpoint() throws Exception
+ {
+ Hello hello = getPort();
+ performTest(hello, "Kermit");
+ }
+
+ private void performTest(Hello hello, String msg) throws Exception
+ {
+ UserType in0 = new UserType();
+ in0.setMsg(msg);
+ UserType retObj = hello.echoUserType(in0);
+ assertEquals(msg, retObj.getMsg());
+
+ HelloException_Exception exception = null;
+ try
+ {
+ hello.triggerException("Fake Reason", 124);
+ }
+ catch (HelloException_Exception ex)
+ {
+ exception = ex;
+ }
+ assertNotNull("No exception thrown", exception);
+ assertEquals(exception.getFaultInfo().getReason(), "Fake Reason");
+ assertEquals(exception.getFaultInfo().getCode(), 124);
+ }
+
+ private Hello getPort() throws Exception
+ {
+ URL wsdlURL = getResourceURL("wsprovide/jaxws/samples/wssecurity/HelloService.wsdl");
+ URL securityURL = getResourceURL("jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml");
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ Hello port = (Hello)service.getPort(Hello.class);
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+
+ Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();
+ reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxws-samples-wssecurity-sign-fault");
+
+ return port;
+ }
+}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl 2011-02-01 16:21:31 UTC (rev 13660)
@@ -7,6 +7,14 @@
<xs:element minOccurs='0' name='msg' type='xs:string'/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name='HelloException'>
+ <xs:sequence>
+ <xs:element name='message' nillable='true' type='xs:string'/>
+ <xs:element name='code' type='xs:int'/>
+ <xs:element name='reason' nillable='true' type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name='HelloException' type='tns:HelloException'/>
</xs:schema>
</types>
<message name='Hello_echoUserType'>
@@ -15,11 +23,24 @@
<message name='Hello_echoUserTypeResponse'>
<part name='return' type='tns:UserType'/>
</message>
+ <message name='Hello_triggerException'>
+ <part name='String_1' type='xsd:string'/>
+ <part name='int_2' type='xsd:int'/>
+ </message>
+ <message name='Hello_triggerExceptionResponse'/>
+ <message name='HelloException'>
+ <part element='tns:HelloException' name='HelloException'/>
+ </message>
<portType name='Hello'>
<operation name='echoUserType' parameterOrder='user'>
<input message='tns:Hello_echoUserType'/>
<output message='tns:Hello_echoUserTypeResponse'/>
</operation>
+ <operation name='triggerException' parameterOrder='String_1 int_2'>
+ <input message='tns:Hello_triggerException'/>
+ <output message='tns:Hello_triggerExceptionResponse'/>
+ <fault message='tns:HelloException' name='HelloException'/>
+ </operation>
</portType>
<binding name='HelloBinding' type='tns:Hello'>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
@@ -32,6 +53,18 @@
<soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
</output>
</operation>
+ <operation name='triggerException'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/wsse' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/wsse' use='literal'/>
+ </output>
+ <fault name='HelloException'>
+ <soap:fault name='HelloException' use='literal'/>
+ </fault>
+ </operation>
</binding>
<service name='HelloService'>
<port binding='tns:HelloBinding' name='HelloPort'>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault)
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF)
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -1,11 +0,0 @@
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <config>
- <sign type="x509v3" alias="wsse"/>
- <encrypt type="x509v3" alias="wsse"/>
- <requires>
- <signature includeFaults="true"/>
- <encryption includeFaults="true"/>
- </requires>
- </config>
-</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/META-INF/jboss-wsse-client.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -0,0 +1,11 @@
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <config>
+ <sign type="x509v3" alias="wsse"/>
+ <encrypt type="x509v3" alias="wsse"/>
+ <requires>
+ <signature includeFaults="true"/>
+ <encryption includeFaults="true"/>
+ </requires>
+ </config>
+</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF)
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <key-store-file>WEB-INF/wsse.keystore</key-store-file>
- <key-store-password>jbossws</key-store-password>
- <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
- <trust-store-password>jbossws</trust-store-password>
- <config>
- <sign type="x509v3" alias="wsse" includeFaults="true"/>
- <encrypt type="x509v3" alias="wsse" includeFaults="true"/>
- <requires>
- <signature/>
- <encryption/>
- </requires>
- </config>
-</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-encrypt-fault/WEB-INF/jboss-wsse-server.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <key-store-file>WEB-INF/wsse.keystore</key-store-file>
+ <key-store-password>jbossws</key-store-password>
+ <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
+ <trust-store-password>jbossws</trust-store-password>
+ <config>
+ <sign type="x509v3" alias="wsse" includeFaults="true"/>
+ <encrypt type="x509v3" alias="wsse" includeFaults="true"/>
+ <requires>
+ <signature/>
+ <encryption/>
+ </requires>
+ </config>
+</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault)
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF)
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <config>
- <sign type="x509v3" alias="wsse"/>
- <requires>
- <signature includeFaults="true"/>
- </requires>
- </config>
-</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/META-INF/jboss-wsse-client.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <config>
+ <sign type="x509v3" alias="wsse"/>
+ <requires>
+ <signature includeFaults="true"/>
+ </requires>
+ </config>
+</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF)
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml 2011-02-01 15:17:45 UTC (rev 13659)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <key-store-file>WEB-INF/wsse.keystore</key-store-file>
- <key-store-password>jbossws</key-store-password>
- <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
- <trust-store-password>jbossws</trust-store-password>
- <config>
- <sign type="x509v3" alias="wsse" includeFaults="true"/>
- <requires>
- <signature/>
- </requires>
- </config>
-</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml (from rev 13659, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wssecurity/sign-fault/WEB-INF/jboss-wsse-server.xml 2011-02-01 16:21:31 UTC (rev 13660)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <key-store-file>WEB-INF/wsse.keystore</key-store-file>
+ <key-store-password>jbossws</key-store-password>
+ <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
+ <trust-store-password>jbossws</trust-store-password>
+ <config>
+ <sign type="x509v3" alias="wsse" includeFaults="true"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+</jboss-ws-security>
13 years, 11 months