You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by gi...@apache.org on 2011/10/11 20:03:15 UTC
svn commit: r1181995 [12/26] - in /webservices/wss4j/branches/swssf: ./
cxf-integration/ cxf-integration/src/main/java/org/swssf/cxfIntegration/
cxf-integration/src/main/java/org/swssf/cxfIntegration/interceptor/
cxf-integration/src/main/java/org/swssf...
Copied: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/SignedInfoType.java (from r1179730, webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java)
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/SignedInfoType.java?p2=webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/SignedInfoType.java&p1=webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java&r1=1179730&r2=1181995&rev=1181995&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/SignedInfoType.java Tue Oct 11 18:03:00 2011
@@ -16,215 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.w3._2000._09.xmldsig_;
+package org.w3._2000._09.xmldsig_.wss;
-import org.swssf.ext.Constants;
-import org.swssf.ext.ParseException;
-import org.swssf.ext.Parseable;
-import org.swssf.ext.Utils;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-
-/**
- * <p>Java class for SignedInfoType complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
- * <pre>
- * <complexType name="SignedInfoType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
- * <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
- * <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
- * </sequence>
- * <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SignedInfoType", propOrder = {
- "canonicalizationMethod",
- "signatureMethod",
- "reference"
-})
-public class SignedInfoType implements Parseable {
- @XmlElement(name = "CanonicalizationMethod", required = true)
- protected CanonicalizationMethodType canonicalizationMethod;
- @XmlElement(name = "SignatureMethod", required = true)
- protected SignatureMethodType signatureMethod;
- @XmlElement(name = "Reference", required = true)
- protected List<ReferenceType> reference;
- @XmlAttribute(name = "Id")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- @XmlID
- @XmlSchemaType(name = "ID")
- protected String id;
-
- private Parseable currentParseable;
+public class SignedInfoType extends org.w3._2000._09.xmldsig_.SignedInfoType {
public SignedInfoType(StartElement startElement) {
- @SuppressWarnings("unchecked")
- Iterator<Attribute> attributeIterator = startElement.getAttributes();
- while (attributeIterator.hasNext()) {
- Attribute attribute = attributeIterator.next();
- if (attribute.getName().equals(Constants.ATT_NULL_Id)) {
- CollapsedStringAdapter collapsedStringAdapter = new CollapsedStringAdapter();
- this.id = collapsedStringAdapter.unmarshal(attribute.getValue());
- }
- }
- }
-
- public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
- if (currentParseable != null) {
- boolean finished = currentParseable.parseXMLEvent(xmlEvent);
- if (finished) {
- currentParseable.validate();
- currentParseable = null;
- }
- return false;
- }
-
- switch (xmlEvent.getEventType()) {
- case XMLStreamConstants.START_ELEMENT:
- StartElement startElement = xmlEvent.asStartElement();
-
- if (startElement.getName().equals(Constants.TAG_dsig_CanonicalizationMethod)) {
- currentParseable = this.canonicalizationMethod = new CanonicalizationMethodType(startElement);
- } else if (startElement.getName().equals(Constants.TAG_dsig_SignatureMethod)) {
- currentParseable = this.signatureMethod = new SignatureMethodType(startElement);
- } else if (startElement.getName().equals(Constants.TAG_dsig_Reference)) {
- ReferenceType referenceType = new ReferenceType(startElement);
- currentParseable = referenceType;
- getReference().add(referenceType);
- } else {
- throw new ParseException("Unsupported Element: " + startElement.getName());
- }
-
- break;
- case XMLStreamConstants.END_ELEMENT:
- currentParseable = null;
- EndElement endElement = xmlEvent.asEndElement();
- if (endElement.getName().equals(Constants.TAG_dsig_SignedInfo)) {
- return true;
- }
- break;
- //possible ignorable withespace and comments
- case XMLStreamConstants.CHARACTERS:
- case XMLStreamConstants.COMMENT:
- break;
- default:
- throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
- }
- return false;
- }
-
- public void validate() throws ParseException {
- if (canonicalizationMethod == null || signatureMethod == null || getReference().size() == 0) {
- throw new ParseException("Element \"CanonicalizationMethod\"|\"SignatureMethod\"|\"Reference\" is missing");
- }
- }
-
- /**
- * Gets the value of the canonicalizationMethod property.
- *
- * @return possible object is
- * {@link CanonicalizationMethodType }
- */
- public CanonicalizationMethodType getCanonicalizationMethod() {
- return canonicalizationMethod;
+ super(startElement);
}
-
- /**
- * Sets the value of the canonicalizationMethod property.
- *
- * @param value allowed object is
- * {@link CanonicalizationMethodType }
- */
- public void setCanonicalizationMethod(CanonicalizationMethodType value) {
- this.canonicalizationMethod = value;
- }
-
- /**
- * Gets the value of the signatureMethod property.
- *
- * @return possible object is
- * {@link SignatureMethodType }
- */
- public SignatureMethodType getSignatureMethod() {
- return signatureMethod;
- }
-
- /**
- * Sets the value of the signatureMethod property.
- *
- * @param value allowed object is
- * {@link SignatureMethodType }
- */
- public void setSignatureMethod(SignatureMethodType value) {
- this.signatureMethod = value;
- }
-
- /**
- * Gets the value of the reference property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the reference property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
- * <pre>
- * getReference().add(newItem);
- * </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link ReferenceType }
- */
- public List<ReferenceType> getReference() {
- if (reference == null) {
- reference = new ArrayList<ReferenceType>();
- }
- return this.reference;
- }
-
- /**
- * Gets the value of the id property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getId() {
- return id;
- }
-
- /**
- * Sets the value of the id property.
- *
- * @param value allowed object is
- * {@link String }
- */
- public void setId(String value) {
- this.id = value;
- }
-
}
Copied: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformType.java (from r1179730, webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java)
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformType.java?p2=webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformType.java&p1=webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java&r1=1179730&r2=1181995&rev=1181995&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformType.java Tue Oct 11 18:03:00 2011
@@ -16,25 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.w3._2000._09.xmldsig_;
+package org.w3._2000._09.xmldsig_.wss;
import org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.TransformationParametersType;
-import org.swssf.ext.Constants;
-import org.swssf.ext.ParseException;
-import org.swssf.ext.Parseable;
-import org.swssf.ext.Utils;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.*;
+import org.swssf.wss.ext.WSSConstants;
+import org.swssf.xmlsec.ext.ParseException;
+import org.swssf.xmlsec.ext.Parseable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
/**
@@ -60,29 +55,14 @@ import java.util.List;
@XmlType(name = "TransformType", propOrder = {
"content"
})
-public class TransformType implements Parseable {
+public class TransformType extends org.w3._2000._09.xmldsig_.TransformType {
- @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class)
- @XmlMixed
- @XmlAnyElement(lax = true)
- protected List<Object> content;
- @XmlAttribute(name = "Algorithm", required = true)
- @XmlSchemaType(name = "anyURI")
- protected String algorithm;
- protected String inclusiveNamespaces;
protected TransformationParametersType transformationParametersType;
private Parseable currentParseable;
public TransformType(StartElement startElement) {
- @SuppressWarnings("unchecked")
- Iterator<Attribute> attributeIterator = startElement.getAttributes();
- while (attributeIterator.hasNext()) {
- Attribute attribute = attributeIterator.next();
- if (attribute.getName().equals(Constants.ATT_NULL_Algorithm)) {
- this.algorithm = attribute.getValue();
- }
- }
+ super(startElement);
}
public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
@@ -98,113 +78,24 @@ public class TransformType implements Pa
switch (xmlEvent.getEventType()) {
case XMLStreamConstants.START_ELEMENT:
StartElement startElement = xmlEvent.asStartElement();
- if (startElement.getName().equals(Constants.TAG_c14nExcl_InclusiveNamespaces)) {
- Attribute attribute = startElement.getAttributeByName(Constants.ATT_NULL_PrefixList);
- if (attribute != null) {
- inclusiveNamespaces = attribute.getValue();
- }
- currentParseable = new Parseable() {
- public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
- switch (xmlEvent.getEventType()) {
- case XMLStreamConstants.START_ELEMENT:
- StartElement startElement = xmlEvent.asStartElement();
- throw new ParseException("Unsupported Element: " + startElement.getName());
- case XMLStreamConstants.END_ELEMENT:
- return true;
- case XMLStreamConstants.CHARACTERS:
- break;
- }
- return false;
- }
-
- public void validate() throws ParseException {
- }
- };
- } else if (startElement.getName().equals(Constants.TAG_wsse_TransformationParameters)) {
+ if (startElement.getName().equals(WSSConstants.TAG_wsse_TransformationParameters)) {
currentParseable = transformationParametersType = new TransformationParametersType(startElement);
- } else {
- throw new ParseException("Unsupported Element: " + startElement.getName());
+ return false;
}
break;
case XMLStreamConstants.END_ELEMENT:
currentParseable = null;
EndElement endElement = xmlEvent.asEndElement();
- if (endElement.getName().equals(Constants.TAG_dsig_Transform)) {
+ if (endElement.getName().equals(WSSConstants.TAG_wsse_TransformationParameters)) {
return true;
}
break;
- //possible ignorable withespace and comments
- case XMLStreamConstants.CHARACTERS:
- case XMLStreamConstants.COMMENT:
- break;
- default:
- throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
}
- return false;
+ return super.parseXMLEvent(xmlEvent);
}
public void validate() throws ParseException {
- if (algorithm == null) {
- throw new ParseException("Attribute \"Algorithm\" is missing");
- }
- }
-
- /**
- * Gets the value of the content property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the content property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
- * <pre>
- * getContent().add(newItem);
- * </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- * {@link String }
- * {@link JAXBElement }{@code <}{@link String }{@code >}
- */
- public List<Object> getContent() {
- if (content == null) {
- content = new ArrayList<Object>();
- }
- return this.content;
- }
-
- /**
- * Gets the value of the algorithm property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getAlgorithm() {
- return algorithm;
- }
-
- /**
- * Sets the value of the algorithm property.
- *
- * @param value allowed object is
- * {@link String }
- */
- public void setAlgorithm(String value) {
- this.algorithm = value;
- }
-
- public String getInclusiveNamespaces() {
- return inclusiveNamespaces;
- }
-
- public void setInclusiveNamespaces(String inclusiveNamespaces) {
- this.inclusiveNamespaces = inclusiveNamespaces;
+ super.validate();
}
public TransformationParametersType getTransformationParametersType() {
Copied: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformsType.java (from r1179730, webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java)
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformsType.java?p2=webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformsType.java&p1=webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java&r1=1179730&r2=1181995&rev=1181995&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/wss/TransformsType.java Tue Oct 11 18:03:00 2011
@@ -16,127 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.w3._2000._09.xmldsig_;
+package org.w3._2000._09.xmldsig_.wss;
-import org.swssf.ext.Constants;
-import org.swssf.ext.ParseException;
-import org.swssf.ext.Parseable;
-import org.swssf.ext.Utils;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * <p>Java class for TransformsType complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
- * <pre>
- * <complexType name="TransformsType">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "TransformsType", propOrder = {
- "transform"
-})
-public class TransformsType implements Parseable {
- @XmlElement(name = "Transform", required = true)
- protected List<TransformType> transform;
-
- private Parseable currentParseable;
+public class TransformsType extends org.w3._2000._09.xmldsig_.TransformsType {
public TransformsType(StartElement startElement) {
+ super(startElement);
}
-
- public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
- if (currentParseable != null) {
- boolean finished = currentParseable.parseXMLEvent(xmlEvent);
- if (finished) {
- currentParseable.validate();
- currentParseable = null;
- }
- return false;
- }
-
- switch (xmlEvent.getEventType()) {
- case XMLStreamConstants.START_ELEMENT:
- StartElement startElement = xmlEvent.asStartElement();
-
- if (startElement.getName().equals(Constants.TAG_dsig_Transform)) {
- TransformType transformType = new TransformType(startElement);
- currentParseable = transformType;
- getTransform().add(transformType);
- } else {
- throw new ParseException("Unsupported Element: " + startElement.getName());
- }
-
- break;
- case XMLStreamConstants.END_ELEMENT:
- currentParseable = null;
- EndElement endElement = xmlEvent.asEndElement();
- if (endElement.getName().equals(Constants.TAG_dsig_Transforms)) {
- return true;
- }
- break;
- //possible ignorable withespace and comments
- case XMLStreamConstants.CHARACTERS:
- case XMLStreamConstants.COMMENT:
- break;
- default:
- throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
- }
- return false;
- }
-
- public void validate() throws ParseException {
- if (transform.size() == 0) {
- throw new ParseException("Element \"Transform\" is missing");
- }
- }
-
- /**
- * Gets the value of the transform property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the transform property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
- * <pre>
- * getTransform().add(newItem);
- * </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link TransformType }
- */
- public List<TransformType> getTransform() {
- if (transform == null) {
- transform = new ArrayList<TransformType>();
- }
- return this.transform;
- }
-
}
Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/resources/wss/wss-config.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/resources/wss/wss-config.xml?rev=1181995&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/resources/wss/wss-config.xml (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/resources/wss/wss-config.xml Tue Oct 11 18:03:00 2011
@@ -0,0 +1,400 @@
+<?xml version="1.0"?>
+<!-- This configuration file is used for configuration of the org.swssf -->
+<Configuration target="org.apache.xml.security" xmlns="http://www.xmlsecurity.org/NS/configuration">
+ <Properties>
+ <Property NAME="securityTokenFactory" VAL="org.swssf.wss.impl.securityToken.SecurityTokenFactoryImpl"/>
+ <Property NAME="CACertKeyStorePassword" VAL="changeit"/>
+ <!--<Property NAME="CertProvider" VAL="BC"/>-->
+ <!--<Property NAME="DefaultX509Alias" VAL="sigEnc"/>-->
+ </Properties>
+ <!-- todo XInclude from security-config ?! -->
+ <SecurityHeaderHandlers>
+ <Handler NAME="BinarySecurityToken"
+ URI="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+ JAVACLASS="org.swssf.wss.impl.processor.input.BinarySecurityTokenInputHandler"/>
+ <Handler NAME="EncryptedKey"
+ URI="http://www.w3.org/2001/04/xmlenc#"
+ JAVACLASS="org.swssf.wss.impl.processor.input.EncryptedKeyInputHandler"/>
+ <Handler NAME="ReferenceList"
+ URI="http://www.w3.org/2001/04/xmlenc#"
+ JAVACLASS="org.swssf.wss.impl.processor.input.ReferenceListInputHandler"/>
+ <Handler NAME="Signature"
+ URI="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SignatureInputHandler"/>
+ <Handler NAME="Timestamp"
+ URI="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ JAVACLASS="org.swssf.wss.impl.processor.input.TimestampInputHandler"/>
+ <Handler NAME="UsernameToken"
+ URI="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+ JAVACLASS="org.swssf.wss.impl.processor.input.UsernameTokenInputHandler"/>
+ <Handler NAME="SignatureConfirmation"
+ URI="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SignatureConfirmationInputHandler"/>
+ <Handler NAME="SecurityTokenReference"
+ URI="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SecurityTokenReferenceInputHandler"/>
+ <Handler NAME="Assertion"
+ URI="urn:oasis:names:tc:SAML:1.0:assertion"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SAMLTokenInputHandler"/>
+ <Handler NAME="Assertion"
+ URI="urn:oasis:names:tc:SAML:2.0:assertion"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SAMLTokenInputHandler"/>
+ <Handler NAME="SecurityContextToken"
+ URI="http://schemas.xmlsoap.org/ws/2005/02/sc"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SecurityContextTokenInputHandler"/>
+ <Handler NAME="SecurityContextToken"
+ URI="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
+ JAVACLASS="org.swssf.wss.impl.processor.input.SecurityContextTokenInputHandler"/>
+ <Handler NAME="DerivedKeyToken"
+ URI="http://schemas.xmlsoap.org/ws/2005/02/sc"
+ JAVACLASS="org.swssf.wss.impl.processor.input.DerivedKeyTokenInputHandler"/>
+ <Handler NAME="DerivedKeyToken"
+ URI="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
+ JAVACLASS="org.swssf.wss.impl.processor.input.DerivedKeyTokenInputHandler"/>
+ </SecurityHeaderHandlers>
+ <TransformAlgorithms>
+ <!-- c14n omitting comments -->
+ <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+ JAVACLASS="org.swssf.xmlsec.impl.transformer.canonicalizer.Canonicalizer20010315_OmitCommentsTransformer" />
+ <!-- c14n with comments -->
+ <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+ JAVACLASS="org.swssf.xmlsec.impl.transformer.canonicalizer.Canonicalizer20010315_WithCommentsTransformer" />
+ <!-- c14n 1.1 omitting comments -->
+ <TransformAlgorithm URI="http://www.w3.org/2006/12/xml-c14n11"
+ JAVACLASS="org.swssf.xmlsec.impl.transformer.canonicalizer.Canonicalizer11_OmitCommentsTransformer" />
+ <!-- c14n 1.1 with comments -->
+ <TransformAlgorithm URI="http://www.w3.org/2006/12/xml-c14n11#WithComments"
+ JAVACLASS="org.swssf.xmlsec.impl.transformer.canonicalizer.Canonicalizer11_WithCommentsTransformer" />
+ <!-- exclusive c14n omitting comments -->
+ <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+ JAVACLASS="org.swssf.xmlsec.impl.transformer.canonicalizer.Canonicalizer20010315_ExclOmitCommentsTransformer" />
+ <!-- exclusive c14n with comments -->
+ <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+ JAVACLASS="org.swssf.xmlsec.impl.transformer.canonicalizer.Canonicalizer20010315_ExclWithCommentsTransformer" />
+
+ <!-- STR-Transformer -->
+ <TransformAlgorithm URI="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#STR-Transform"
+ JAVACLASS="org.swssf.wss.impl.transformer.STRTransformer" />
+
+ <!-- Base64 -->
+ <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformBase64Decode" />
+
+ <!-- XPath transform -->
+ <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXPath" />
+ <!-- enveloped signature -->
+ <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformEnvelopedSignature" />
+ <!-- XSLT -->
+ <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXSLT" />
+ <!-- XPath version 2 -->
+ <TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXPath2Filter" />
+ <!-- XPath version 2b -->
+ <TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXPath2Filter" />
+ </TransformAlgorithms>
+ <JCEAlgorithmMappings>
+ <Algorithms>
+ <!-- MessageDigest Algorithms -->
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
+ Description="MD5 message digest from RFC 1321"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="NOT RECOMMENDED"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="128"
+ JCEProvider="BC"
+ JCEName="MD5"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
+ Description="RIPEMD-160 message digest"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="OPTIONAL"
+ KeyLength="160"
+ JCEProvider="BC"
+ JCEName="RIPEMD160"/>
+
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
+ Description="SHA-1 message digest"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="REQUIRED"
+ KeyLength="160"
+ JCEProvider="BC"
+ JCEName="SHA-1"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
+ Description="SHA-1 message digest with 256 bit"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="RECOMMENDED"
+ KeyLength="256"
+ JCEProvider="BC"
+ JCEName="SHA-256"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
+ Description="SHA message digest with 384 bit"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="384"
+ JCEProvider="BC"
+ JCEName="SHA-384"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
+ Description="SHA-1 message digest with 512 bit"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="OPTIONAL"
+ KeyLength="512"
+ JCEProvider="BC"
+ JCEName="SHA-512"/>
+
+ <!-- Signature Algorithms -->
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+ Description="Digital Signature Algorithm with SHA-1 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="REQUIRED"
+ KeyLength="160"
+ RequiredKey="SHA1withDSA"
+ JCEProvider="BC"
+ JCEName="SHA1withDSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+ Description="RSA Signature with MD5 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="NOT RECOMMENDED"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="128"
+ RequiredKey="MD5withRSA"
+ JCEProvider="BC"
+ JCEName="MD5withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+ Description="RSA Signature with RIPEMD-160 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="160"
+ RequiredKey="RIPEMD160withRSA"
+ JCEProvider="BC"
+ JCEName="RIPEMD160withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+ Description="RSA Signature with SHA-1 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="RECOMMENDED"
+ KeyLength="160"
+ RequiredKey="SHA1withRSA"
+ JCEProvider="BC"
+ JCEName="SHA1withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+ Description="RSA Signature with SHA-256 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="256"
+ RequiredKey="SHA256withRSA"
+ JCEProvider="BC"
+ JCEName="SHA256withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+ Description="RSA Signature with SHA-384 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="384"
+ RequiredKey="SHA384withRSA"
+ JCEProvider="BC"
+ JCEName="SHA384withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+ Description="RSA Signature with SHA-512 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="512"
+ RequiredKey="SHA512withRSA"
+ JCEProvider="BC"
+ JCEName="SHA512withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
+ Description="ECDSA Signature with SHA-1 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="160"
+ RequiredKey="ECDSAwithSHA1"
+ JCEProvider="BC"
+ JCEName="ECDSAwithSHA1"/>
+
+ <!-- MAC Algorithms -->
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+ Description="Message Authentication code using MD5"
+ AlgorithmClass="Mac"
+ RequirementLevel="NOT RECOMMENDED"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="128"
+ RequiredKey="HmacMD5"
+ JCEProvider="BC"
+ JCEName="HmacMD5"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+ Description="Message Authentication code using RIPEMD-160"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="160"
+ RequiredKey="HMACRIPEMD160"
+ JCEProvider="BC"
+ JCEName="HMACRIPEMD160"/>
+
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+ Description="Message Authentication code using SHA1"
+ AlgorithmClass="Mac"
+ RequirementLevel="REQUIRED"
+ KeyLength="160"
+ RequiredKey="HmacSHA1"
+ JCEProvider="BC"
+ JCEName="HmacSHA1"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+ Description="Message Authentication code using SHA-256"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="256"
+ RequiredKey="HmacSHA256"
+ JCEProvider="BC"
+ JCEName="HmacSHA256"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+ Description="Message Authentication code using SHA-384"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="384"
+ RequiredKey="HmacSHA384"
+ JCEProvider="BC"
+ JCEName="HmacSHA384"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+ Description="Message Authentication code using SHA-512"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ KeyLength="512"
+ RequiredKey="HmacSHA512"
+ JCEProvider="BC"
+ JCEName="HmacSHA512"/>
+
+ <!-- Block encryption Algorithms -->
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
+ Description="Block encryption using Triple-DES"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="REQUIRED"
+ KeyLength="192"
+ RequiredKey="DESede"
+ JCEProvider="BC"
+ JCEName="DESede/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
+ Description="Block encryption using AES with a key length of 128 bit"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="REQUIRED"
+ KeyLength="128"
+ RequiredKey="AES"
+ JCEProvider="BC"
+ JCEName="AES/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
+ Description="Block encryption using AES with a key length of 192 bit"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="OPTIONAL"
+ KeyLength="192"
+ RequiredKey="AES"
+ JCEProvider="BC"
+ JCEName="AES/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
+ Description="Block encryption using AES with a key length of 256 bit"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="REQUIRED"
+ KeyLength="256"
+ RequiredKey="AES"
+ JCEProvider="BC"
+ JCEName="AES/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
+ Description="Key Transport RSA-v1.5"
+ AlgorithmClass="KeyTransport"
+ RequirementLevel="REQUIRED"
+ RequiredKey="RSA"
+ JCEProvider="BC"
+ JCEName="RSA/ECB/PKCS1Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
+ Description="Key Transport RSA-OAEP"
+ AlgorithmClass="KeyTransport"
+ RequirementLevel="REQUIRED"
+ RequiredKey="RSA"
+ JCEProvider="BC"
+ JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
+ Description="Key Agreement Diffie-Hellman"
+ AlgorithmClass="KeyAgreement"
+ RequirementLevel="OPTIONAL"
+ RequiredKey="DH"
+ JCEProvider="BC"
+ JCEName="DH"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
+ Description="Symmetric Key Wrap using Triple DES"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="REQUIRED"
+ KeyLength="192"
+ RequiredKey="DESede"
+ JCEProvider="BC"
+ JCEName="DESedeWrap"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
+ Description="Symmetric Key Wrap using AES with a key length of 128 bit"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="REQUIRED"
+ KeyLength="128"
+ RequiredKey="AES"
+ JCEProvider="BC"
+ JCEName="AESWrap"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
+ Description="Symmetric Key Wrap using AES with a key length of 192 bit"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="OPTIONAL"
+ KeyLength="192"
+ RequiredKey="AES"
+ JCEProvider="BC"
+ JCEName="AESWrap"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
+ Description="Symmetric Key Wrap using AES with a key length of 256 bit"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="REQUIRED"
+ KeyLength="256"
+ RequiredKey="AES"
+ JCEProvider="BC"
+ JCEName="AESWrap"/>
+
+ </Algorithms>
+ </JCEAlgorithmMappings>
+ <ResourceResolvers>
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP"
+ DESCRIPTION="A simple resolver for requests to HTTP space" />
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverLocalFilesystem"
+ DESCRIPTION="A simple resolver for requests to the local file system" />
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverFragment"
+ DESCRIPTION="A simple resolver for requests of same-document URIs" />
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverXPointer"
+ DESCRIPTION="A simple resolver for requests of XPointer fragents" />
+ </ResourceResolvers>
+</Configuration>
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/AbstractTestBase.java?rev=1181995&r1=1179730&r2=1181995&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/AbstractTestBase.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/AbstractTestBase.java Tue Oct 11 18:03:00 2011
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.swssf.test;
+package org.swssf.wss.test;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -31,12 +31,12 @@ import org.apache.ws.security.handler.WS
import org.apache.ws.security.message.WSSecSignature;
import org.apache.ws.security.util.WSSecurityUtil;
import org.apache.xml.security.utils.XMLUtils;
-import org.swssf.WSSec;
-import org.swssf.ext.*;
-import org.swssf.securityEvent.SecurityEvent;
-import org.swssf.securityEvent.SecurityEventListener;
-import org.swssf.test.utils.StAX2DOM;
-import org.swssf.test.utils.XmlReaderToWriter;
+import org.swssf.wss.WSSec;
+import org.swssf.wss.ext.*;
+import org.swssf.wss.securityEvent.SecurityEvent;
+import org.swssf.wss.securityEvent.SecurityEventListener;
+import org.swssf.xmlsec.test.utils.StAX2DOM;
+import org.swssf.xmlsec.test.utils.XmlReaderToWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -103,25 +103,25 @@ public abstract class AbstractTestBase {
//xmlInputFactory.setProperty(WstxInputProperties.P_MIN_TEXT_SEGMENT, new Integer(5 * 8192));
}
- public Document doInboundSecurity(SecurityProperties securityProperties, InputStream inputStream) throws WSSecurityException, WSSConfigurationException, XMLStreamException, ParserConfigurationException {
+ public Document doInboundSecurity(WSSSecurityProperties securityProperties, InputStream inputStream) throws WSSecurityException, WSSConfigurationException, XMLStreamException, ParserConfigurationException {
return doInboundSecurity(securityProperties, xmlInputFactory.createXMLStreamReader(inputStream), null);
}
- public Document doInboundSecurity(SecurityProperties securityProperties, InputStream inputStream, SecurityEventListener securityEventListener) throws WSSecurityException, WSSConfigurationException, XMLStreamException, ParserConfigurationException {
+ public Document doInboundSecurity(WSSSecurityProperties securityProperties, InputStream inputStream, SecurityEventListener securityEventListener) throws WSSecurityException, WSSConfigurationException, XMLStreamException, ParserConfigurationException {
return doInboundSecurity(securityProperties, xmlInputFactory.createXMLStreamReader(inputStream), securityEventListener);
}
- public Document doInboundSecurity(SecurityProperties securityProperties, XMLStreamReader xmlStreamReader) throws WSSecurityException, WSSConfigurationException, XMLStreamException, ParserConfigurationException {
+ public Document doInboundSecurity(WSSSecurityProperties securityProperties, XMLStreamReader xmlStreamReader) throws WSSecurityException, WSSConfigurationException, XMLStreamException, ParserConfigurationException {
return doInboundSecurity(securityProperties, xmlStreamReader, null);
}
- public Document doInboundSecurity(SecurityProperties securityProperties, XMLStreamReader xmlStreamReader, SecurityEventListener securityEventListener) throws WSSecurityException, XMLStreamException, ParserConfigurationException {
+ public Document doInboundSecurity(WSSSecurityProperties securityProperties, XMLStreamReader xmlStreamReader, SecurityEventListener securityEventListener) throws WSSecurityException, XMLStreamException, ParserConfigurationException {
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
XMLStreamReader outXmlStreamReader = wsSecIn.processInMessage(xmlStreamReader, new ArrayList<SecurityEvent>(), securityEventListener);
return StAX2DOM.readDoc(documentBuilderFactory.newDocumentBuilder(), outXmlStreamReader);
}
- protected ByteArrayOutputStream doOutboundSecurity(SecurityProperties securityProperties, InputStream sourceDocument) throws Exception {
+ protected ByteArrayOutputStream doOutboundSecurity(WSSSecurityProperties securityProperties, InputStream sourceDocument) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
@@ -359,32 +359,32 @@ public abstract class AbstractTestBase {
xPath.setNamespaceContext(
new NamespaceContext() {
public String getNamespaceURI(String prefix) {
- if (org.swssf.ext.Constants.PREFIX_DSIG.equals(prefix)) {
- return org.swssf.ext.Constants.NS_DSIG;
- } else if (org.swssf.ext.Constants.PREFIX_SOAPENV.equals(prefix)) {
- return org.swssf.ext.Constants.NS_SOAP11;
- } else if (org.swssf.ext.Constants.PREFIX_WSSE.equals(prefix)) {
- return org.swssf.ext.Constants.NS_WSSE10;
- } else if (org.swssf.ext.Constants.PREFIX_WSU.equals(prefix)) {
- return org.swssf.ext.Constants.NS_WSU10;
- } else if (org.swssf.ext.Constants.PREFIX_XENC.equals(prefix)) {
- return org.swssf.ext.Constants.NS_XMLENC;
+ if (WSSConstants.PREFIX_DSIG.equals(prefix)) {
+ return WSSConstants.NS_DSIG;
+ } else if (WSSConstants.PREFIX_SOAPENV.equals(prefix)) {
+ return WSSConstants.NS_SOAP11;
+ } else if (WSSConstants.PREFIX_WSSE.equals(prefix)) {
+ return WSSConstants.NS_WSSE10;
+ } else if (WSSConstants.PREFIX_WSU.equals(prefix)) {
+ return WSSConstants.NS_WSU10;
+ } else if (WSSConstants.PREFIX_XENC.equals(prefix)) {
+ return WSSConstants.NS_XMLENC;
} else {
return null;
}
}
public String getPrefix(String namespaceURI) {
- if (org.swssf.ext.Constants.NS_DSIG.equals(namespaceURI)) {
- return org.swssf.ext.Constants.PREFIX_DSIG;
- } else if (org.swssf.ext.Constants.NS_SOAP11.equals(namespaceURI)) {
- return org.swssf.ext.Constants.PREFIX_SOAPENV;
- } else if (org.swssf.ext.Constants.NS_WSSE10.equals(namespaceURI)) {
- return org.swssf.ext.Constants.PREFIX_WSSE;
- } else if (org.swssf.ext.Constants.NS_WSU10.equals(namespaceURI)) {
- return org.swssf.ext.Constants.PREFIX_WSU;
- } else if (org.swssf.ext.Constants.NS_XMLENC.equals(namespaceURI)) {
- return org.swssf.ext.Constants.PREFIX_XENC;
+ if (WSSConstants.NS_DSIG.equals(namespaceURI)) {
+ return WSSConstants.PREFIX_DSIG;
+ } else if (WSSConstants.NS_SOAP11.equals(namespaceURI)) {
+ return WSSConstants.PREFIX_SOAPENV;
+ } else if (WSSConstants.NS_WSSE10.equals(namespaceURI)) {
+ return WSSConstants.PREFIX_WSSE;
+ } else if (WSSConstants.NS_WSU10.equals(namespaceURI)) {
+ return WSSConstants.PREFIX_WSU;
+ } else if (WSSConstants.NS_XMLENC.equals(namespaceURI)) {
+ return WSSConstants.PREFIX_XENC;
} else {
return null;
}
Modified: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/CallbackHandlerImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/CallbackHandlerImpl.java?rev=1181995&r1=1179730&r2=1181995&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/CallbackHandlerImpl.java (original)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/java/org/swssf/wss/test/CallbackHandlerImpl.java Tue Oct 11 18:03:00 2011
@@ -16,18 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.swssf.test;
+package org.swssf.wss.test;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.message.WSSecEncryptedKey;
import org.apache.ws.security.saml.ext.builder.SAML2Constants;
import org.opensaml.common.SAMLVersion;
-import org.swssf.crypto.CryptoBase;
-import org.swssf.crypto.Merlin;
-import org.swssf.ext.WSPasswordCallback;
-import org.swssf.impl.saml.SAMLCallback;
-import org.swssf.impl.saml.bean.*;
-import org.swssf.impl.saml.builder.SAML1Constants;
+import org.swssf.wss.ext.WSPasswordCallback;
+import org.swssf.wss.impl.saml.SAMLCallback;
+import org.swssf.wss.impl.saml.bean.*;
+import org.swssf.wss.impl.saml.builder.SAML1Constants;
+import org.swssf.xmlsec.crypto.CryptoBase;
+import org.swssf.xmlsec.crypto.Merlin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;