Author: maeste
Date: 2007-05-14 17:44:06 -0400 (Mon, 14 May 2007)
New Revision: 3092
Added:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/Policy.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/PolicyAttachment.java
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/HelloJavaBean.java
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/SimpleEncryptTestCase.java
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/META-INF/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/META-INF/jboss-wsse-client.xml
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/WEB-INF/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/META-INF/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/META-INF/jboss-wsse-client.xml
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/WEB-INF/
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/wsse.keystore
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/wsse.truststore
Removed:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/Policy.java
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleSignTestCase.java
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/simple-sign/
Modified:
branches/JBWS-856/integration-jboss42/build.xml
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/WSSecurityAssertionDeployer.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/util/PrimitiveAssertionWriter.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml
branches/JBWS-856/jbossws-tests/build.xml
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl
Log:
Annotated policy implementation
Modified: branches/JBWS-856/integration-jboss42/build.xml
===================================================================
--- branches/JBWS-856/integration-jboss42/build.xml 2007-05-14 14:34:24 UTC (rev 3091)
+++ branches/JBWS-856/integration-jboss42/build.xml 2007-05-14 21:44:06 UTC (rev 3092)
@@ -138,6 +138,7 @@
<include name="stax-api.jar"/>
<include name="wsdl4j.jar"/>
<include name="xmlsec.jar"/>
+ <include name="wstx.jar"/>
</fileset>
<fileset dir="${jboss42.resources.dir}">
<include name="jbossws.beans/META-INF/jboss-beans.xml"/>
Deleted: branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/Policy.java
===================================================================
--- branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/Policy.java 2007-05-14
14:34:24 UTC (rev 3091)
+++ branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/Policy.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -1,47 +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.ws.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Defines a policy attachment.
- *
- * @author Alessio Soldano, <alessio.soldano(a)javalinux.it>
- * @since 25-Apr-2007
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.TYPE, ElementType.METHOD})
-public @interface Policy {
-
- /**
- * The location of a pre-defined policy expression.
- * The policyLocation is a URL (relative or absolute) that refers to a file
containing
- * WSLD fragment in which one or more policy expression(s) are provided and attached.
- *
- */
- String wsdlFragmentLocation();
-
-}
Copied:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
(from rev 3038,
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/Policy.java)
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
(rev 0)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,47 @@
+/*
+* 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.ws.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Defines a policy attachment.
+ *
+ * @author Alessio Soldano, <alessio.soldano(a)javalinux.it>
+ * @since 25-Apr-2007
+ */
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.TYPE, ElementType.METHOD})
+public @interface PolicyWsdlFragment {
+
+ /**
+ * The location of a pre-defined policy expression.
+ * The policyLocation is a URL (relative or absolute) that refers to a file
containing
+ * WSLD fragment in which one or more policy expression(s) are provided and attached.
+ *
+ */
+ String wsdlFragmentLocation();
+
+}
Added:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/Policy.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/Policy.java
(rev 0)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/Policy.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +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.
+ */
+package org.jboss.ws.extensions.policy.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+import org.jboss.ws.extensions.policy.PolicyScopeLevel;
+
+/**
+ * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
+ *
+ * since 11/05/2007
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface Policy {
+
+ public String policyFileLocation();
+
+ public PolicyScopeLevel scope();
+}
Added:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/PolicyAttachment.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/PolicyAttachment.java
(rev 0)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/annotation/PolicyAttachment.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,38 @@
+/*
+ * 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.ws.extensions.policy.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
+ *
+ * since 11/05/2007
+ */
+(a)Target(ElementType.TYPE)
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface PolicyAttachment {
+ Policy[] value();
+}
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -89,12 +89,6 @@
public Policy deployServerside(Policy policy, ExtensibleMetaData extMetaData) throws
UnsupportedPolicy
{
-// ByteArrayOutputStream stream = new ByteArrayOutputStream();
-// PolicyWriter writer =
-// PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
-//
-// writer.writePolicy(policy, stream );
-// log.debug(stream.toString());
List<Assertion> returnedPolicyTerms = new LinkedList<Assertion>();
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/WSSecurityAssertionDeployer.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/WSSecurityAssertionDeployer.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/WSSecurityAssertionDeployer.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -1,5 +1,6 @@
package org.jboss.ws.extensions.policy.deployer;
+import java.io.ByteArrayOutputStream;
import java.io.StringReader;
import java.io.StringWriter;
@@ -7,6 +8,7 @@
import javax.xml.stream.XMLStreamWriter;
import org.apache.ws.policy.PrimitiveAssertion;
+import org.jboss.logging.Logger;
import org.jboss.ws.extensions.policy.PolicyAssertion;
import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertion;
import org.jboss.ws.extensions.policy.deployer.util.PrimitiveAssertionWriter;
@@ -19,10 +21,11 @@
public class WSSecurityAssertionDeployer implements AssertionDeployer
{
-
+ private final static Logger log = Logger.getLogger(PolicyDeployer.class);
+
public void deploy(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData)
throws UnsupportedAssertion
{
- StringWriter writer = new StringWriter();
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
if (extMetaData instanceof EndpointMetaData)
{
EndpointMetaData ep = (EndpointMetaData) extMetaData;
@@ -31,10 +34,9 @@
try
{
//GET XML of security assertion
- PrimitiveAssertionWriter.newInstance().writePrimitiveAssertion(assertion,
writer);
+ PrimitiveAssertionWriter.newInstance().writePrimitiveAssertion(assertion,
stream);
+ StringReader reader = new StringReader(stream.toString());
- StringReader reader = new StringReader(writer.toString());
-
//Set security configuration
securityConfiguration = WSSecurityOMFactory.newInstance().parse(reader);
WSSecurityConfigFactory.newInstance().initKeystorePath(ep.getRootFile(),
securityConfiguration);
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/util/PrimitiveAssertionWriter.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/util/PrimitiveAssertionWriter.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/deployer/util/PrimitiveAssertionWriter.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -1,5 +1,6 @@
package org.jboss.ws.extensions.policy.deployer.util;
+import java.io.ByteArrayOutputStream;
import java.io.StringWriter;
import java.util.Hashtable;
import java.util.Iterator;
@@ -27,17 +28,15 @@
return new PrimitiveAssertionWriter();
}
- public void writePrimitiveAssertion(PrimitiveAssertion assertion, StringWriter
stringWriter) throws XMLStreamException
+ public void writePrimitiveAssertion(PrimitiveAssertion assertion,
ByteArrayOutputStream stream) throws XMLStreamException
{
- XMLStreamWriter writer =
XMLOutputFactory.newInstance().createXMLStreamWriter(stringWriter);
+ XMLStreamWriter writer =
XMLOutputFactory.newInstance().createXMLStreamWriter(stream);
writePrimitiveAssertion(assertion, writer);
}
public void writePrimitiveAssertion(PrimitiveAssertion assertion, XMLStreamWriter
writer) throws XMLStreamException
{
-
-
QName qname = assertion.getName();
String writerPrefix = writer.getPrefix(qname.getNamespaceURI());
@@ -68,6 +67,7 @@
writeTerms(terms, writer);
writer.writeEndElement();
+ writer.flush();
}
private void writeTerms(List terms, XMLStreamWriter writer) throws XMLStreamException
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -23,7 +23,9 @@
// $Id$
+import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -63,6 +65,7 @@
import org.jboss.ws.extensions.eventing.deployment.EventingEndpoint;
import org.jboss.ws.extensions.eventing.metadata.EventingEpMetaExt;
import org.jboss.ws.extensions.policy.PolicyScopeLevel;
+import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
import org.jboss.ws.extensions.policy.deployer.PolicyDeployer;
import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy;
import org.jboss.ws.extensions.policy.metadata.PolicyMetaExtension;
@@ -469,6 +472,37 @@
}
}
+ protected void processPolicyAnnotation(EndpointMetaData epMetaData, Class<?>
sepClass, UnifiedDeploymentInfo udi)
+ {
+ for (org.jboss.ws.extensions.policy.annotation.Policy policy :
sepClass.getAnnotation(PolicyAttachment.class).value())
+ {
+ Policy normPolicy;
+ InputStream is = null;
+ try
+ {
+ DOMPolicyReader reader = (DOMPolicyReader)
PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
+ is = udi.getMetaDataFileURL(policy.policyFileLocation()).openStream();
+ Policy unnormalizedPolicy = reader.readPolicy(is);
+ normPolicy = (Policy)unnormalizedPolicy.normalize();
+ log.info("++++++++++++++ Deploying Annotated
Policy="+policy.policyFileLocation());
+ deployPolicy(normPolicy, policy.scope(), epMetaData);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ } finally
+ {
+ try
+ {
+ is.close();
+ } catch (Exception e) {}
+ }
+
+ }
+
+
+ }
+
protected void processPolicyMetaDataExtension(EndpointMetaData epMetaData,
WSDLDefinitions wsdlDefinitions)
{
//Collect all policies defined in our wsdl definitions
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -34,9 +34,10 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.annotation.Policy;
+import org.jboss.ws.annotation.PolicyWsdlFragment;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
import org.jboss.ws.metadata.builder.MetaDataBuilder;
import org.jboss.ws.metadata.umdm.*;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -107,9 +108,6 @@
sepMetaData.setServiceEndpointImplName(sepClass.getName());
sepMetaData.setServiceEndpointInterfaceName(seiClass.getName());
- //maeste
- //TODO: use this 4 lines in asserion deployer
- // Assign the WS-Security configuration,
WSSecurityConfigFactory wsseConfFactory =
WSSecurityConfigFactory.newInstance();
WSSecurityConfiguration securityConfiguration =
wsseConfFactory.createConfiguration(
wsMetaData.getRootFile(), WSSecurityOMFactory.SERVER_RESOURCE_NAME
@@ -162,6 +160,11 @@
else if (seiClass.isAnnotationPresent(HandlerChain.class))
processHandlerChain(sepMetaData, seiClass);
+// Process an optional @PolicyAttachment annotation
+ if (sepClass.isAnnotationPresent(PolicyAttachment.class))
+ processPolicyAnnotation(sepMetaData, sepClass, udi);
+
+
// process webservices.xml contributions
processWSDDContribution(sepMetaData);
@@ -334,7 +337,7 @@
wsMetaData.addService(result.serviceMetaData);
//Check for policy attachment file
- Policy anPolicy = sepClass.getAnnotation(Policy.class);
+ PolicyWsdlFragment anPolicy = sepClass.getAnnotation(PolicyWsdlFragment.class);
if (anPolicy!=null)
{
String policyLocation = anPolicy.wsdlFragmentLocation();
Modified: branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml
===================================================================
--- branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-05-14 14:34:24
UTC (rev 3091)
+++ branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-05-14 21:44:06
UTC (rev 3092)
@@ -470,6 +470,19 @@
<include name="PolicyAttachmentFragment.wsdl"/>
</webinf>
</war>
+ <!-- jaxws-samples-wssecurityAnnotatedpolicy-encrypt -->
+ <war
warfile="${tests.output.dir}/libs/jaxws-samples-wssecurityAnnotatedpolicy-encrypt.war"
webxml="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/Hello.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/HelloJavaBean.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/UserType.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy">
+ <include name="wsse.keystore"/>
+ <include name="wsse.truststore"/>
+ <include name="Policy.xml"/>
+ </webinf>
+ </war>
<!-- jaxws-samples-xop-doclit -->
<war jarfile="${tests.output.dir}/libs/jaxws-samples-xop-doclit.war"
webxml="${tests.output.dir}/resources/jaxws/samples/xop/doclit/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: branches/JBWS-856/jbossws-tests/build.xml
===================================================================
--- branches/JBWS-856/jbossws-tests/build.xml 2007-05-14 14:34:24 UTC (rev 3091)
+++ branches/JBWS-856/jbossws-tests/build.xml 2007-05-14 21:44:06 UTC (rev 3092)
@@ -262,6 +262,8 @@
<wsconsume
wsdl="${tests.resources.dir}/jaxws/holder/META-INF/wsdl/HolderService.wsdl"
package="org.jboss.test.ws.jaxws.holder"
sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume
wsdl="${tests.resources.dir}/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl"
package="org.jboss.test.ws.jaxws.samples.wssecurity"
sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
<wsconsume
wsdl="${tests.resources.dir}/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl"
package="org.jboss.test.ws.jaxws.samples.wssecuritypolicy"
sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
+ <wsconsume
wsdl="${tests.resources.dir}/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl"
package="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy"
sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
+
</target>
<!--
@@ -354,7 +356,9 @@
</taskdef>
<wsprovide
resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity"
genwsdl="true"
sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean"/>
- <wsprovide
resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecuritypolicy"
genwsdl="true"
sei="org.jboss.test.ws.jaxws.samples.wssecuritypolicy.HelloJavaBean"/>
+ <wsprovide
resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecuritypolicy"
genwsdl="true"
sei="org.jboss.test.ws.jaxws.samples.wssecuritypolicy.HelloJavaBean"/>
+ <wsprovide
resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurityAnnotatedpolicy"
genwsdl="true"
sei="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy.HelloJavaBean"/>
+
</target>
<target name="generate-resources"
depends="servicegen,wstools,wsprovide">
Added:
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/HelloJavaBean.java
===================================================================
---
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/HelloJavaBean.java
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/HelloJavaBean.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,49 @@
+/*
+ * 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.samples.wssecurityAnnotatedpolicy;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.ws.extensions.policy.PolicyScopeLevel;
+import org.jboss.ws.extensions.policy.annotation.Policy;
+import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
+
+
+@WebService(name = "Hello", targetNamespace =
"http://org.jboss.ws/samples/wssecurityAnnotatedpolicy")
+@PolicyAttachment({@Policy( policyFileLocation="WEB-INF/Policy.xml", scope =
PolicyScopeLevel.WSDL_PORT ) })
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class HelloJavaBean
+{
+ private Logger log = Logger.getLogger(HelloJavaBean.class);
+
+ @WebMethod
+ public UserType echoUserType(@WebParam(name = "user") UserType in0)
+ {
+ log.info(in0);
+ return in0;
+ }
+}
Added:
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/SimpleEncryptTestCase.java
===================================================================
---
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/SimpleEncryptTestCase.java
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/SimpleEncryptTestCase.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,86 @@
+/*
+ * 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.samples.wssecurityAnnotatedpolicy;
+
+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.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.jaxws.client.ServiceExt;
+
+/**
+ * Test WS-Security with RPC/Literal
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision: 2385 $
+ */
+public class SimpleEncryptTestCase extends JBossWSTest
+{
+ /** Construct the test case with a given name
+ */
+
+ /** Deploy the test */
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(SimpleEncryptTestCase.class,
"jaxws-samples-wssecurityAnnotatedpolicy-encrypt.war");
+ }
+
+ /**
+ * Test JSE endpoint
+ */
+ public void testEndpoint() throws Exception
+ {
+ Hello hello = getPort();
+
+ UserType in0 = new UserType();
+ in0.setMsg("Kermit");
+ UserType retObj = hello.echoUserType(in0);
+ assertEquals("Kermit", retObj.getMsg());
+ }
+
+ private Hello getPort() throws Exception
+ {
+ URL wsdlURL = new
File("wsprovide/resources/jaxws/samples/wssecurityAnnotatedpolicy/HelloService.wsdl").toURL();
+ URL securityURL = new
File("resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/META-INF/jboss-wsse-client.xml").toURL();
+ QName serviceName = new
QName("http://org.jboss.ws/samples/wssecurityAnnotatedpolicy",
"HelloService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ ((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
+
+ Hello port = (Hello)service.getPort(Hello.class);
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+
+ Map<String, Object> reqContext =
((BindingProvider)port).getRequestContext();
+ reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxws-samples-wssecurityAnnotatedpolicy-encrypt");
+
+ return port;
+ }
+}
\ No newline at end of file
Modified:
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java
===================================================================
---
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -28,10 +28,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.annotation.Policy;
+import org.jboss.ws.annotation.PolicyWsdlFragment;
@WebService(name = "Hello", targetNamespace =
"http://org.jboss.ws/samples/wssecuritypolicy")
-@Policy(wsdlFragmentLocation="WEB-INF/PolicyAttachmentFragment.wsdl")
+@PolicyWsdlFragment(wsdlFragmentLocation="WEB-INF/PolicyAttachmentFragment.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class HelloJavaBean
{
Deleted:
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleSignTestCase.java
===================================================================
---
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleSignTestCase.java 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleSignTestCase.java 2007-05-14
21:44:06 UTC (rev 3092)
@@ -1,82 +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.samples.wssecuritypolicy;
-
-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.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.client.ServiceExt;
-
-/**
- * Test WS-Security with RPC/Literal
- *
- * @author Thomas.Diesler(a)jboss.com
- */
-public class SimpleSignTestCase extends JBossWSTest
-{
- /** Deploy the test */
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(SimpleSignTestCase.class,
"jaxws-samples-wssecurity-sign.war");
- }
-
- /**
- * Test JSE endpoint
- */
- public void testEndpoint() throws Exception
- {
- Hello hello = getPort();
-
- UserType in0 = new UserType();
- in0.setMsg("Kermit");
- UserType retObj = hello.echoUserType(in0);
- assertEquals("Kermit", retObj.getMsg());
- }
-
- private Hello getPort() throws Exception
- {
- URL wsdlURL = new
File("wsprovide/resources/jaxws/samples/wssecurity/HelloService.wsdl").toURL();
- URL securityURL = new
File("resources/jaxws/samples/wssecurity/simple-sign/META-INF/jboss-wsse-client.xml").toURL();
- QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity",
"HelloService");
-
- Service service = Service.create(wsdlURL, serviceName);
- ((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
-
- Hello port = (Hello)service.getPort(Hello.class);
- ((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");
-
- return port;
- }
-}
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='HelloService'
targetNamespace='http://org.jboss.ws/samples/wssecurity'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.ws/samples/wssecurity'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema targetNamespace='http://org.jboss.ws/samples/wssecurity'
version='1.0'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:complexType name='UserType'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='msg'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='Hello_echoUserType'>
+ <part name='user' type='tns:UserType'/>
+ </message>
+ <message name='Hello_echoUserTypeResponse'>
+ <part name='return' type='tns:UserType'/>
+ </message>
+ <portType name='Hello'>
+ <operation name='echoUserType' parameterOrder='user'>
+ <input message='tns:Hello_echoUserType'/>
+ <output message='tns:Hello_echoUserTypeResponse'/>
+ </operation>
+ </portType>
+ <binding name='HelloBinding' type='tns:Hello'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoUserType'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/wssecurity'
use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/wssecurity'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='HelloService'>
+ <port binding='tns:HelloBinding' name='HelloPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsp:Policy wsu:Id="X509EndpointPolicy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:jboss-ws-security
xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_...
+ <sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>
+ <sp:key-store-password>jbossws</sp:key-store-password>
+
<sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-file>
+ <sp:trust-store-password>jbossws</sp:trust-store-password>
+ <sp:config>
+ <sp:encrypt type="x509v3" alias="wsse"/>
+ <sp:requires>
+ <sp:encryption/>
+ </sp:requires>
+ </sp:config>
+ </sp:jboss-ws-security>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml 2007-05-14
21:44:06 UTC (rev 3092)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>HelloService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy.HelloJavaBean</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/META-INF/jboss-wsse-client.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/META-INF/jboss-wsse-client.xml
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-encrypt/META-INF/jboss-wsse-client.xml 2007-05-14
21:44:06 UTC (rev 3092)
@@ -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>
+ <encrypt type="x509v3" alias="wsse"/>
+ <requires>
+ <encryption/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/META-INF/jboss-wsse-client.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/META-INF/jboss-wsse-client.xml
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/simple-sign/META-INF/jboss-wsse-client.xml 2007-05-14
21:44:06 UTC (rev 3092)
@@ -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/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/wsse.keystore
===================================================================
(Binary files differ)
Property changes on:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/wsse.keystore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/wsse.truststore
===================================================================
(Binary files differ)
Property changes on:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/wsse.truststore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl 2007-05-14
14:34:24 UTC (rev 3091)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl 2007-05-14
21:44:06 UTC (rev 3092)
@@ -12,7 +12,7 @@
<wsp:Policy wsu:Id="X509EndpointPolicy">
<wsp:ExactlyOne>
<wsp:All>
- <sp:jboss-ws-security xmlns:sp="mynamespace">
+ <sp:jboss-ws-security
xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_...
<sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>
<sp:key-store-password>jbossws</sp:key-store-password>
<sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-file>