ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gi...@apache.org
Subject svn commit: r1172285 [27/48] - in /webservices/wss4j/branches/swssf: ./ cxf-integration/ cxf-integration/src/ cxf-integration/src/main/ cxf-integration/src/main/java/ cxf-integration/src/main/java/org/ cxf-integration/src/main/java/org/swssf/ cxf-integ...
Date Sun, 18 Sep 2011 13:51:36 GMT
Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,297 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+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.Iterator;
+
+
+/**
+ * <p>Java class for ReferenceType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="ReferenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *       &lt;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ReferenceType", propOrder = {
+        "transforms",
+        "digestMethod",
+        "digestValue"
+})
+public class ReferenceType implements Parseable {
+
+    @XmlElement(name = "Transforms")
+    protected TransformsType transforms;
+    @XmlElement(name = "DigestMethod", required = true)
+    protected DigestMethodType digestMethod;
+    @XmlElement(name = "DigestValue", required = true)
+    protected byte[] digestValue;
+    @XmlAttribute(name = "Id")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAttribute(name = "URI")
+    @XmlSchemaType(name = "anyURI")
+    protected String uri;
+    @XmlAttribute(name = "Type")
+    @XmlSchemaType(name = "anyURI")
+    protected String type;
+
+    private boolean processed = false;
+
+    private Parseable currentParseable;
+
+    public ReferenceType(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());
+            } else if (attribute.getName().equals(Constants.ATT_NULL_URI)) {
+                this.uri = Utils.dropReferenceMarker(attribute.getValue());
+            } else if (attribute.getName().equals(Constants.ATT_NULL_Type)) {
+                this.type = 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_Transforms)) {
+                    currentParseable = this.transforms = new TransformsType(startElement);
+                } else if (startElement.getName().equals(Constants.TAG_dsig_DigestMethod)) {
+                    currentParseable = this.digestMethod = new DigestMethodType(startElement);
+                } else if (startElement.getName().equals(Constants.TAG_dsig_DigestValue)) {
+                    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:
+                                    digestValue = xmlEvent.asCharacters().getData().getBytes();
+                                    break;
+                            }
+                            return false;
+                        }
+
+                        public void validate() throws ParseException {
+                        }
+                    };
+                } 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_Reference)) {
+                    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 (digestMethod == null || digestValue == null || uri == null) {
+            throw new ParseException("Element \"DigestMethod\"|\"DigestValue\" or Attribute \"uri\" is missing");
+        }
+    }
+
+    /**
+     * Gets the value of the transforms property.
+     *
+     * @return possible object is
+     *         {@link TransformsType }
+     */
+    public TransformsType getTransforms() {
+        return transforms;
+    }
+
+    /**
+     * Sets the value of the transforms property.
+     *
+     * @param value allowed object is
+     *              {@link TransformsType }
+     */
+    public void setTransforms(TransformsType value) {
+        this.transforms = value;
+    }
+
+    /**
+     * Gets the value of the digestMethod property.
+     *
+     * @return possible object is
+     *         {@link DigestMethodType }
+     */
+    public DigestMethodType getDigestMethod() {
+        return digestMethod;
+    }
+
+    /**
+     * Sets the value of the digestMethod property.
+     *
+     * @param value allowed object is
+     *              {@link DigestMethodType }
+     */
+    public void setDigestMethod(DigestMethodType value) {
+        this.digestMethod = value;
+    }
+
+    /**
+     * Gets the value of the digestValue property.
+     *
+     * @return possible object is
+     *         byte[]
+     */
+    public byte[] getDigestValue() {
+        return digestValue;
+    }
+
+    /**
+     * Sets the value of the digestValue property.
+     *
+     * @param value allowed object is
+     *              byte[]
+     */
+    public void setDigestValue(byte[] value) {
+        this.digestValue = value;
+    }
+
+    /**
+     * 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;
+    }
+
+    /**
+     * Gets the value of the uri property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getURI() {
+        return uri;
+    }
+
+    /**
+     * Sets the value of the uri property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setURI(String value) {
+        this.uri = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    public boolean isProcessed() {
+        return processed;
+    }
+
+    public void setProcessed(boolean processed) {
+        this.processed = processed;
+    }
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/ReferenceType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,118 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+import javax.xml.bind.annotation.*;
+
+
+/**
+ * <p>Java class for RetrievalMethodType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="RetrievalMethodType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RetrievalMethodType", propOrder = {
+        "transforms"
+})
+public class RetrievalMethodType {
+
+    @XmlElement(name = "Transforms")
+    protected TransformsType transforms;
+    @XmlAttribute(name = "URI")
+    @XmlSchemaType(name = "anyURI")
+    protected String uri;
+    @XmlAttribute(name = "Type")
+    @XmlSchemaType(name = "anyURI")
+    protected String type;
+
+    /**
+     * Gets the value of the transforms property.
+     *
+     * @return possible object is
+     *         {@link TransformsType }
+     */
+    public TransformsType getTransforms() {
+        return transforms;
+    }
+
+    /**
+     * Sets the value of the transforms property.
+     *
+     * @param value allowed object is
+     *              {@link TransformsType }
+     */
+    public void setTransforms(TransformsType value) {
+        this.transforms = value;
+    }
+
+    /**
+     * Gets the value of the uri property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getURI() {
+        return uri;
+    }
+
+    /**
+     * Sets the value of the uri property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setURI(String value) {
+        this.uri = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/RetrievalMethodType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,86 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <p>Java class for SPKIDataType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SPKIDataType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence maxOccurs="unbounded">
+ *         &lt;element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *         &lt;any processContents='lax' namespace='##other' minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SPKIDataType", propOrder = {
+        "spkiSexpAndAny"
+})
+public class SPKIDataType {
+
+    @XmlElementRef(name = "SPKISexp", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class)
+    @XmlAnyElement(lax = true)
+    protected List<Object> spkiSexpAndAny;
+
+    /**
+     * Gets the value of the spkiSexpAndAny 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 spkiSexpAndAny property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSPKISexpAndAny().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * {@link Object }
+     * {@link JAXBElement }{@code <}{@link byte[]}{@code >}
+     */
+    public List<Object> getSPKISexpAndAny() {
+        if (spkiSexpAndAny == null) {
+            spkiSexpAndAny = new ArrayList<Object>();
+        }
+        return this.spkiSexpAndAny;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SPKIDataType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,167 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+import org.swssf.ext.Constants;
+import org.swssf.ext.ParseException;
+import org.swssf.ext.Parseable;
+import org.swssf.ext.Utils;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.*;
+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.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+
+/**
+ * <p>Java class for SignatureMethodType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SignatureMethodType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/>
+ *         &lt;any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignatureMethodType", propOrder = {
+        "content"
+})
+public class SignatureMethodType implements Parseable {
+
+    @XmlElementRef(name = "HMACOutputLength", 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;
+
+    private Parseable currentParseable;
+
+    public SignatureMethodType(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();
+            }
+        }
+    }
+
+    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();
+                throw new ParseException("Unsupported Element: " + startElement.getName());
+            case XMLStreamConstants.END_ELEMENT:
+                currentParseable = null;
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(Constants.TAG_dsig_SignatureMethod)) {
+                    return true;
+                }
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    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 JAXBElement }{@code <}{@link BigInteger }{@code >}
+     * {@link String }
+     * {@link Object }
+     */
+    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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureMethodType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,107 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <p>Java class for SignaturePropertiesType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SignaturePropertiesType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignaturePropertiesType", propOrder = {
+        "signatureProperty"
+})
+public class SignaturePropertiesType {
+
+    @XmlElement(name = "SignatureProperty", required = true)
+    protected List<SignaturePropertyType> signatureProperty;
+    @XmlAttribute(name = "Id")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+
+    /**
+     * Gets the value of the signatureProperty 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 signatureProperty property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getSignatureProperty().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SignaturePropertyType }
+     */
+    public List<SignaturePropertyType> getSignatureProperty() {
+        if (signatureProperty == null) {
+            signatureProperty = new ArrayList<SignaturePropertyType>();
+        }
+        return this.signatureProperty;
+    }
+
+    /**
+     * 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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertiesType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,136 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <p>Java class for SignaturePropertyType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SignaturePropertyType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded">
+ *         &lt;any processContents='lax' namespace='##other'/>
+ *       &lt;/choice>
+ *       &lt;attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignaturePropertyType", propOrder = {
+        "content"
+})
+public class SignaturePropertyType {
+
+    @XmlMixed
+    @XmlAnyElement(lax = true)
+    protected List<Object> content;
+    @XmlAttribute(name = "Target", required = true)
+    @XmlSchemaType(name = "anyURI")
+    protected String target;
+    @XmlAttribute(name = "Id")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+
+    /**
+     * 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 String }
+     * {@link Object }
+     */
+    public List<Object> getContent() {
+        if (content == null) {
+            content = new ArrayList<Object>();
+        }
+        return this.content;
+    }
+
+    /**
+     * Gets the value of the target property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getTarget() {
+        return target;
+    }
+
+    /**
+     * Sets the value of the target property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setTarget(String value) {
+        this.target = value;
+    }
+
+    /**
+     * 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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignaturePropertyType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,252 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+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 SignatureType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SignatureType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignatureType", propOrder = {
+        "signedInfo",
+        "signatureValue",
+        "keyInfo",
+        "object"
+})
+public class SignatureType implements Parseable {
+
+    @XmlElement(name = "SignedInfo", required = true)
+    protected SignedInfoType signedInfo;
+    @XmlElement(name = "SignatureValue", required = true)
+    protected SignatureValueType signatureValue;
+    @XmlElement(name = "KeyInfo")
+    protected KeyInfoType keyInfo;
+    @XmlElement(name = "Object")
+    protected List<ObjectType> object;
+    @XmlAttribute(name = "Id")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+
+    private Parseable currentParseable;
+
+    public SignatureType(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_SignedInfo)) {
+                    currentParseable = this.signedInfo = new SignedInfoType(startElement);
+                } else if (startElement.getName().equals(Constants.TAG_dsig_SignatureValue)) {
+                    currentParseable = this.signatureValue = new SignatureValueType(startElement);
+                } else if (startElement.getName().equals(Constants.TAG_dsig_KeyInfo)) {
+                    currentParseable = this.keyInfo = new KeyInfoType(startElement);
+                } 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_Signature)) {
+                    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 (signedInfo == null || signatureValue == null) {
+            throw new ParseException("Element \"SignedInfo\"|\"SignatureValue\" is missing");
+        }
+    }
+
+    /**
+     * Gets the value of the signedInfo property.
+     *
+     * @return possible object is
+     *         {@link SignedInfoType }
+     */
+    public SignedInfoType getSignedInfo() {
+        return signedInfo;
+    }
+
+    /**
+     * Sets the value of the signedInfo property.
+     *
+     * @param value allowed object is
+     *              {@link SignedInfoType }
+     */
+    public void setSignedInfo(SignedInfoType value) {
+        this.signedInfo = value;
+    }
+
+    /**
+     * Gets the value of the signatureValue property.
+     *
+     * @return possible object is
+     *         {@link SignatureValueType }
+     */
+    public SignatureValueType getSignatureValue() {
+        return signatureValue;
+    }
+
+    /**
+     * Sets the value of the signatureValue property.
+     *
+     * @param value allowed object is
+     *              {@link SignatureValueType }
+     */
+    public void setSignatureValue(SignatureValueType value) {
+        this.signatureValue = value;
+    }
+
+    /**
+     * Gets the value of the keyInfo property.
+     *
+     * @return possible object is
+     *         {@link KeyInfoType }
+     */
+    public KeyInfoType getKeyInfo() {
+        return keyInfo;
+    }
+
+    /**
+     * Sets the value of the keyInfo property.
+     *
+     * @param value allowed object is
+     *              {@link KeyInfoType }
+     */
+    public void setKeyInfo(KeyInfoType value) {
+        this.keyInfo = value;
+    }
+
+    /**
+     * Gets the value of the object 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 object property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getObject().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ObjectType }
+     */
+    public List<ObjectType> getObject() {
+        if (object == null) {
+            object = new ArrayList<ObjectType>();
+        }
+        return this.object;
+    }
+
+    /**
+     * 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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,162 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+import org.apache.commons.codec.binary.Base64;
+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.Arrays;
+import java.util.Iterator;
+
+
+/**
+ * <p>Java class for SignatureValueType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SignatureValueType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>base64Binary">
+ *       &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SignatureValueType", propOrder = {
+        "value"
+})
+public class SignatureValueType implements Parseable {
+
+    @XmlValue
+    protected StringBuffer value = new StringBuffer();
+    @XmlAttribute(name = "Id")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+
+    private Parseable currentParseable;
+
+    public SignatureValueType(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();
+                throw new ParseException("Unsupported Element: " + startElement.getName());
+            case XMLStreamConstants.END_ELEMENT:
+                currentParseable = null;
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(Constants.TAG_dsig_SignatureValue)) {
+                    return true;
+                }
+                break;
+            case XMLStreamConstants.CHARACTERS:
+                this.value.append(xmlEvent.asCharacters().getData());
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+        if (value == null) {
+            throw new ParseException("Content is missing");
+        }
+    }
+
+    /**
+     * Gets the value of the value property.
+     *
+     * @return possible object is
+     *         byte[]
+     */
+    public byte[] getValue() {
+        return Base64.decodeBase64(this.value.toString());
+    }
+
+    public String getRawValue() {
+        return this.value.toString();
+    }
+
+    /**
+     * Sets the value of the value property.
+     *
+     * @param value allowed object is
+     *              byte[]
+     */
+    public void setValue(byte[] value) {
+        this.value.append(Arrays.toString(value));
+    }
+
+    /**
+     * 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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignatureValueType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 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_/SignedInfoType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,230 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+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>
+ * &lt;complexType name="SignedInfoType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/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 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;
+    }
+
+    /**
+     * 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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/SignedInfoType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 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_/TransformType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,213 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+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 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 TransformType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="TransformType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *         &lt;any processContents='lax' namespace='##other'/>
+ *         &lt;element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/choice>
+ *       &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TransformType", propOrder = {
+        "content"
+})
+public class TransformType implements Parseable {
+
+    @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();
+            }
+        }
+    }
+
+    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_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)) {
+                    currentParseable = transformationParametersType = new TransformationParametersType(startElement);
+                } 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_Transform)) {
+                    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 (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;
+    }
+
+    public TransformationParametersType getTransformationParametersType() {
+        return transformationParametersType;
+    }
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 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_/TransformsType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,142 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+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>
+ * &lt;complexType name="TransformsType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/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 TransformsType(StartElement 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;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/TransformsType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,168 @@
+/**
+ * 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.
+ */
+package org.w3._2000._09.xmldsig_;
+
+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 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 X509DataType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="X509DataType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence maxOccurs="unbounded">
+ *         &lt;choice>
+ *           &lt;element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/>
+ *           &lt;element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           &lt;element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           &lt;element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           &lt;element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *           &lt;any processContents='lax' namespace='##other'/>
+ *         &lt;/choice>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "X509DataType", propOrder = {
+        "x509IssuerSerialOrX509SKIOrX509SubjectName"
+})
+public class X509DataType implements Parseable {
+
+    private Parseable currentParseable;
+
+    @XmlElementRefs({
+            @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class),
+            @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class),
+            @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class),
+            @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class),
+            @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class)
+    })
+    @XmlAnyElement(lax = true)
+    protected List<Object> x509IssuerSerialOrX509SKIOrX509SubjectName;
+    @XmlElement(name = "X509IssuerSerial")
+    protected X509IssuerSerialType x509IssuerSerialType;
+
+    public X509DataType(StartElement 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_X509IssuerSerial)) {
+                    currentParseable = this.x509IssuerSerialType = new X509IssuerSerialType(startElement);
+                } 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_X509Data)) {
+                    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 (x509IssuerSerialType == null) {
+            throw new ParseException("Element \"X509IssuerSerialType\" is missing");
+        }
+    }
+
+    /**
+     * Gets the value of the x509IssuerSerialOrX509SKIOrX509SubjectName 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 x509IssuerSerialOrX509SKIOrX509SubjectName property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getX509IssuerSerialOrX509SKIOrX509SubjectName().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * {@link Object }
+     * {@link JAXBElement }{@code <}{@link byte[]}{@code >}
+     * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >}
+     * {@link JAXBElement }{@code <}{@link String }{@code >}
+     * {@link JAXBElement }{@code <}{@link byte[]}{@code >}
+     * {@link JAXBElement }{@code <}{@link byte[]}{@code >}
+     */
+    public List<Object> getX509IssuerSerialOrX509SKIOrX509SubjectName() {
+        if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) {
+            x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList<Object>();
+        }
+        return this.x509IssuerSerialOrX509SKIOrX509SubjectName;
+    }
+
+    public X509IssuerSerialType getX509IssuerSerialType() {
+        return x509IssuerSerialType;
+    }
+
+    public void setX509IssuerSerialType(X509IssuerSerialType x509IssuerSerialType) {
+        this.x509IssuerSerialType = x509IssuerSerialType;
+    }
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/w3/_2000/_09/xmldsig_/X509DataType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message