Author: alessio.soldano(a)jboss.com
Date: 2012-02-27 05:23:46 -0500 (Mon, 27 Feb 2012)
New Revision: 15751
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/DefaultAlgorithmSuiteLoader.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/GCMAlgorithmSuite.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.jks
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService_schema1.xsd
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
Log:
[JBWS-3439] Adding GCM tests to verify WSS4J 1.6.5 / Santuario 1.5 upgrade
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2012-02-27
09:37:06 UTC (rev 15750)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2012-02-27
10:23:46 UTC (rev 15751)
@@ -28,7 +28,9 @@
import org.apache.cxf.bus.CXFBusFactory;
import org.apache.cxf.bus.extension.ExtensionManagerBus;
import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.ws.security.policy.custom.AlgorithmSuiteLoader;
import org.jboss.wsf.stack.cxf.client.ProviderImpl;
+import org.jboss.wsf.stack.cxf.extensions.security.DefaultAlgorithmSuiteLoader;
/**
*
@@ -49,6 +51,9 @@
{
extensions.put(Configurer.class, new JBossWSNonSpringConfigurer(new
BeanCustomizer()));
}
+ if (!extensions.containsKey(AlgorithmSuiteLoader.class)) {
+ extensions.put(AlgorithmSuiteLoader.class, new DefaultAlgorithmSuiteLoader());
+ }
//Explicitly ask for the ProviderImpl.class.getClassLoader() to be used for
getting
//cxf bus extensions (as that classloader is the jaxws-client module one which
'sees' all
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java 2012-02-27
09:37:06 UTC (rev 15750)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java 2012-02-27
10:23:46 UTC (rev 15751)
@@ -32,6 +32,8 @@
import org.apache.cxf.buslifecycle.BusLifeCycleManager;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.ws.security.policy.custom.AlgorithmSuiteLoader;
+import org.jboss.wsf.stack.cxf.extensions.security.DefaultAlgorithmSuiteLoader;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.Resource;
@@ -109,6 +111,10 @@
bus.setExtension(bac, BusApplicationContext.class);
setConfigurer(bus);
+
+ if (bus.getExtension(AlgorithmSuiteLoader.class) == null) {
+ bus.setExtension(new DefaultAlgorithmSuiteLoader(),
AlgorithmSuiteLoader.class);
+ }
possiblySetDefaultBus(bus);
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/DefaultAlgorithmSuiteLoader.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/DefaultAlgorithmSuiteLoader.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/DefaultAlgorithmSuiteLoader.java 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.stack.cxf.extensions.security;
+
+import org.w3c.dom.Element;
+
+import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.ws.security.policy.SPConstants;
+import org.apache.cxf.ws.security.policy.custom.AlgorithmSuiteLoader;
+import org.apache.cxf.ws.security.policy.model.AlgorithmSuite;
+
+/**
+ * This class retrieves the default AlgorithmSuites.
+ */
+public class DefaultAlgorithmSuiteLoader implements AlgorithmSuiteLoader {
+
+ private static final String CXF_CUSTOM_POLICY_NS =
+ "http://cxf.apache.org/custom/security-policy";
+
+ public AlgorithmSuite getAlgorithmSuite(Element policyElement, SPConstants consts) {
+ if (policyElement != null) {
+ Element algorithm = DOMUtils.getFirstElement(policyElement);
+ if (algorithm != null) {
+ AlgorithmSuite algorithmSuite = null;
+ if (CXF_CUSTOM_POLICY_NS.equals(algorithm.getNamespaceURI())) {
+ algorithmSuite = new GCMAlgorithmSuite(consts);
+ } else {
+ algorithmSuite = new AlgorithmSuite(consts);
+ }
+ algorithmSuite.setAlgorithmSuite(algorithm.getLocalName());
+ return algorithmSuite;
+ }
+ }
+ return null;
+ }
+
+}
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/GCMAlgorithmSuite.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/GCMAlgorithmSuite.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/security/GCMAlgorithmSuite.java 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.stack.cxf.extensions.security;
+
+import org.apache.cxf.ws.security.policy.SP12Constants;
+import org.apache.cxf.ws.security.policy.SPConstants;
+import org.apache.cxf.ws.security.policy.WSSPolicyException;
+import org.apache.cxf.ws.security.policy.model.AlgorithmSuite;
+
+/**
+ * This AlgorithmSuite supports GCM security policies.
+ */
+public class GCMAlgorithmSuite extends AlgorithmSuite {
+
+ public GCMAlgorithmSuite(SPConstants version) {
+ super(version);
+ }
+
+ public GCMAlgorithmSuite() {
+ super(SP12Constants.INSTANCE);
+ }
+
+ /**
+ * Set the algorithm suite
+ *
+ * @param algoSuite
+ * @throws WSSPolicyException
+ */
+ @Override
+ public void setAlgorithmSuite(String algoSuite) throws WSSPolicyException {
+ this.algoSuiteString = algoSuite;
+
+ if ("Basic128GCM".equals(algoSuite)) {
+ this.digest = SPConstants.SHA1;
+ this.encryption = "http://www.w3.org/2009/xmlenc11#aes128-gcm";
+ this.symmetricKeyWrap = SPConstants.KW_AES128;
+ this.asymmetricKeyWrap = SPConstants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = SPConstants.P_SHA1_L128;
+ this.signatureKeyDerivation = SPConstants.P_SHA1_L128;
+ this.encryptionDerivedKeyLength = 128;
+ this.signatureDerivedKeyLength = 128;
+ this.minimumSymmetricKeyLength = 128;
+ } else if ("Basic192GCM".equals(algoSuite)) {
+ this.digest = SPConstants.SHA1;
+ this.encryption = "http://www.w3.org/2009/xmlenc11#aes192-gcm";
+ this.symmetricKeyWrap = SPConstants.KW_AES192;
+ this.asymmetricKeyWrap = SPConstants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = SPConstants.P_SHA1_L192;
+ this.signatureKeyDerivation = SPConstants.P_SHA1_L192;
+ this.encryptionDerivedKeyLength = 192;
+ this.signatureDerivedKeyLength = 192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if ("Basic256GCM".equals(algoSuite)) {
+ this.digest = SPConstants.SHA1;
+ this.encryption = "http://www.w3.org/2009/xmlenc11#aes256-gcm";
+ this.symmetricKeyWrap = SPConstants.KW_AES256;
+ this.asymmetricKeyWrap = SPConstants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = SPConstants.P_SHA1_L256;
+ this.signatureKeyDerivation = SPConstants.P_SHA1_L192;
+ this.encryptionDerivedKeyLength = 256;
+ this.signatureDerivedKeyLength = 192;
+ this.minimumSymmetricKeyLength = 256;
+ this.encryptionDerivedKeyLength = 256;
+ }
+ }
+}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-02-27
09:37:06 UTC (rev 15750)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-02-27
10:23:46 UTC (rev 15751)
@@ -128,6 +128,28 @@
</manifest>
</war>
+ <!-- jaxws-samples-wsse-policy-sign-encrypt-gcm -->
+ <war
+
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-sign-encrypt-gcm.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/Service*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF">
+ <include name="jaxws-endpoint-config.xml"/>
+ <include name="wsdl/*"/>
+ </webinf>
+ <zipfileset
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF"
prefix="WEB-INF/classes">
+ <include name="bob.jks" />
+ <include name="bob.properties" />
+ </zipfileset>
+ <manifest>
+ <attribute name="Dependencies"
value="org.apache.ws.security"/>
+ </manifest>
+ </war>
+
<!-- jaxws-samples-wsse-policy-sign-encrypt-mc -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-sign-encrypt-mc.war"
needxmlfile='false'>
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.jks
===================================================================
(Binary files differ)
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.jks
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.properties
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.properties
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.properties 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.keystore.alias=bob
+org.apache.ws.security.crypto.merlin.file=bob.jks
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0
schema/jbossws-jaxws-config_4_0.xsd">
+
+ <endpoint-config>
+ <config-name>Custom WS-Security Endpoint</config-name>
+ <property>
+ <property-name>ws-security.signature.properties</property-name>
+ <property-value>bob.properties</property-value>
+ </property>
+ <property>
+ <property-name>ws-security.encryption.properties</property-name>
+ <property-value>bob.properties</property-value>
+ </property>
+ <property>
+ <property-name>ws-security.signature.username</property-name>
+ <property-value>bob</property-value>
+ </property>
+ <property>
+ <property-name>ws-security.encryption.username</property-name>
+ <property-value>alice</property-value>
+ </property>
+ <property>
+ <property-name>ws-security.callback-handler</property-name>
+
<property-value>org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback</property-value>
+ </property>
+ </endpoint-config>
+
+</jaxws-config>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/web.xml 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
+ version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypoli...
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:wsp="http://www.w3.org/ns/ws-policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:wsaws="http://www.w3.org/2005/08/addressing"
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypoli...
schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityServiceEncryptThenSignPolicy"/>
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wssePolicy-sign-encrypt"/>
+ </port>
+ </service>
+
+ <wsp:Policy wsu:Id="SecurityServiceEncryptThenSignPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token
+
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/...
+ <wsp:Policy>
+ <sp:WssX509V1Token11/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token
+
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/...
+ <wsp:Policy>
+ <sp:WssX509V1Token11/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp-cxf:Basic192GCM
xmlns:sp-cxf="http://cxf.apache.org/custom/security-policy"/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:SignedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"...
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"...
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:Wss10
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"...
+ <wsp:Policy>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</definitions>
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService_schema1.xsd
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService_schema1.xsd 2012-02-27
10:23:46 UTC (rev 15751)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypoli...
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+