ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gi...@apache.org
Subject svn commit: r1172285 [11/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/oasis_open/docs/ws_sx/ws_secureconversation/_200512/DerivedKeyTokenType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/DerivedKeyTokenType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/DerivedKeyTokenType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/DerivedKeyTokenType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,439 @@
+/**
+ * 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.oasis_open.docs.ws_sx.ws_secureconversation._200512;
+
+import org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.SecurityTokenReferenceType;
+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.math.BigInteger;
+import java.util.Iterator;
+
+
+/**
+ * <p>Java class for DerivedKeyTokenType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="DerivedKeyTokenType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}SecurityTokenReference" minOccurs="0"/>
+ *         &lt;element name="Properties" type="{http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512}PropertiesType" minOccurs="0"/>
+ *         &lt;sequence minOccurs="0">
+ *           &lt;choice>
+ *             &lt;element name="Generation" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *             &lt;element name="Offset" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *           &lt;/choice>
+ *           &lt;element name="Length" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
+ *         &lt;/sequence>
+ *         &lt;element ref="{http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512}Label" minOccurs="0"/>
+ *         &lt;element ref="{http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512}Nonce" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id"/>
+ *       &lt;attribute name="Algorithm" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DerivedKeyTokenType", propOrder = {
+        "securityTokenReference",
+        "properties",
+        "generation",
+        "offset",
+        "length",
+        "label",
+        "nonce"
+})
+public class DerivedKeyTokenType implements Parseable {
+
+    @XmlElement(name = "SecurityTokenReference", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
+    protected SecurityTokenReferenceType securityTokenReference;
+    @XmlElement(name = "Properties")
+    protected PropertiesType properties;
+    @XmlElement(name = "Generation")
+    @XmlSchemaType(name = "unsignedLong")
+    protected BigInteger generation;
+    @XmlElement(name = "Offset")
+    @XmlSchemaType(name = "unsignedLong")
+    protected int offset;
+    @XmlElement(name = "Length")
+    @XmlSchemaType(name = "unsignedLong")
+    protected int length;
+    @XmlElement(name = "Label")
+    protected String label;
+    @XmlElement(name = "Nonce")
+    protected byte[] nonce;
+    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAttribute(name = "Algorithm")
+    @XmlSchemaType(name = "anyURI")
+    protected String algorithm;
+
+    private Parseable currentParseable;
+    private StartElement startElement;
+
+    public DerivedKeyTokenType(StartElement startElement) {
+        this.startElement = startElement;
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_wsu_Id)) {
+                this.id = attribute.getValue();
+            } else 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_wsse_SecurityTokenReference)) {
+                    currentParseable = securityTokenReference = new SecurityTokenReferenceType(startElement);
+                } else if (startElement.getName().getLocalPart().equals(Constants.TAG_wsc0502_Properties.getLocalPart())) {
+                    currentParseable = properties = new PropertiesType(startElement);
+                } else if (startElement.getName().getLocalPart().equals(Constants.TAG_wsc0502_Generation.getLocalPart())) {
+                    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:
+                                    generation = new BigInteger(xmlEvent.asCharacters().getData());
+                                    break;
+                            }
+                            return false;
+                        }
+
+                        public void validate() throws ParseException {
+                        }
+                    };
+                } else if (startElement.getName().getLocalPart().equals(Constants.TAG_wsc0502_Offset.getLocalPart())) {
+                    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:
+                                    offset = Integer.parseInt(xmlEvent.asCharacters().getData());
+                                    break;
+                            }
+                            return false;
+                        }
+
+                        public void validate() throws ParseException {
+                        }
+                    };
+                } else if (startElement.getName().getLocalPart().equals(Constants.TAG_wsc0502_Length.getLocalPart())) {
+                    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:
+                                    length = Integer.parseInt(xmlEvent.asCharacters().getData());
+                                    break;
+                            }
+                            return false;
+                        }
+
+                        public void validate() throws ParseException {
+                        }
+                    };
+                } else if (startElement.getName().getLocalPart().equals(Constants.TAG_wsc0502_Label.getLocalPart())) {
+                    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:
+                                    label = xmlEvent.asCharacters().getData();
+                                    break;
+                            }
+                            return false;
+                        }
+
+                        public void validate() throws ParseException {
+                        }
+                    };
+                } else if (startElement.getName().getLocalPart().equals(Constants.TAG_wsc0502_Nonce.getLocalPart())) {
+                    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:
+                                    nonce = 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().getLocalPart().equals(Constants.TAG_wsc0502_DerivedKeyToken.getLocalPart())) {
+                    return true;
+                }
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+    }
+
+    /**
+     * Gets the value of the securityTokenReference property.
+     *
+     * @return possible object is
+     *         {@link SecurityTokenReferenceType }
+     */
+    public SecurityTokenReferenceType getSecurityTokenReference() {
+        return securityTokenReference;
+    }
+
+    /**
+     * Sets the value of the securityTokenReference property.
+     *
+     * @param value allowed object is
+     *              {@link SecurityTokenReferenceType }
+     */
+    public void setSecurityTokenReference(SecurityTokenReferenceType value) {
+        this.securityTokenReference = value;
+    }
+
+    /**
+     * Gets the value of the properties property.
+     *
+     * @return possible object is
+     *         {@link PropertiesType }
+     */
+    public PropertiesType getProperties() {
+        return properties;
+    }
+
+    /**
+     * Sets the value of the properties property.
+     *
+     * @param value allowed object is
+     *              {@link PropertiesType }
+     */
+    public void setProperties(PropertiesType value) {
+        this.properties = value;
+    }
+
+    /**
+     * Gets the value of the generation property.
+     *
+     * @return possible object is
+     *         {@link BigInteger }
+     */
+    public BigInteger getGeneration() {
+        return generation;
+    }
+
+    /**
+     * Sets the value of the generation property.
+     *
+     * @param value allowed object is
+     *              {@link BigInteger }
+     */
+    public void setGeneration(BigInteger value) {
+        this.generation = value;
+    }
+
+    /**
+     * Gets the value of the offset property.
+     *
+     * @return possible object is
+     *         {@link BigInteger }
+     */
+    public int getOffset() {
+        return offset;
+    }
+
+    /**
+     * Sets the value of the offset property.
+     *
+     * @param value allowed object is
+     *              {@link BigInteger }
+     */
+    public void setOffset(int value) {
+        this.offset = value;
+    }
+
+    /**
+     * Gets the value of the length property.
+     *
+     * @return possible object is
+     *         {@link BigInteger }
+     */
+    public int getLength() {
+        return length;
+    }
+
+    /**
+     * Sets the value of the length property.
+     *
+     * @param value allowed object is
+     *              {@link BigInteger }
+     */
+    public void setLength(int value) {
+        this.length = value;
+    }
+
+    /**
+     * Gets the value of the label property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Sets the value of the label property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setLabel(String value) {
+        this.label = value;
+    }
+
+    /**
+     * Gets the value of the nonce property.
+     *
+     * @return possible object is
+     *         byte[]
+     */
+    public byte[] getNonce() {
+        return nonce;
+    }
+
+    /**
+     * Sets the value of the nonce property.
+     *
+     * @param value allowed object is
+     *              byte[]
+     */
+    public void setNonce(byte[] value) {
+        this.nonce = 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 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/oasis_open/docs/ws_sx/ws_secureconversation/_200512/DerivedKeyTokenType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/PropertiesType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/PropertiesType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/PropertiesType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/PropertiesType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,104 @@
+/**
+ * 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.oasis_open.docs.ws_sx.ws_secureconversation._200512;
+
+import org.swssf.ext.ParseException;
+import org.swssf.ext.Parseable;
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.stream.events.StartElement;
+import javax.xml.stream.events.XMLEvent;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <p>Java class for PropertiesType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="PropertiesType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "PropertiesType", propOrder = {
+        "any"
+})
+public class PropertiesType implements Parseable {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+
+    private StartElement startElement;
+
+    public PropertiesType(StartElement startElement) {
+        this.startElement = startElement;
+    }
+
+    public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
+        return false;
+    }
+
+    public void validate() throws ParseException {
+    }
+
+    /**
+     * Gets the value of the any 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 any property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link Element }
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/PropertiesType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/SecurityContextTokenType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/SecurityContextTokenType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/SecurityContextTokenType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/SecurityContextTokenType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,225 @@
+/**
+ * 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.oasis_open.docs.ws_sx.ws_secureconversation._200512;
+
+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.annotation.*;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.namespace.QName;
+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.*;
+
+
+/**
+ * Actual content model is non-deterministic, hence wildcard. The following shows intended content model:
+ * <xs:element ref='wsc:Identifier' minOccurs='1' />
+ * <xs:element ref='wsc:Instance' minOccurs='0' />
+ * <xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
+ * <p/>
+ * <p/>
+ * <p>Java class for SecurityContextTokenType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SecurityContextTokenType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id"/>
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SecurityContextTokenType", propOrder = {
+        "any"
+})
+public class SecurityContextTokenType implements Parseable {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    private Parseable currentParseable;
+    private StartElement startElement;
+
+    private String identifier;
+
+    public SecurityContextTokenType(StartElement startElement) {
+        super();
+        this.startElement = startElement;
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_wsu_Id)) {
+                this.id = 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().getLocalPart().equals(Constants.TAG_wsc0502_Identifier.getLocalPart())) {
+                    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:
+                                    identifier = xmlEvent.asCharacters().getData();
+                                    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().getLocalPart().equals(Constants.TAG_wsc0502_SecurityContextToken.getLocalPart())) {
+                    return true;
+                }
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+    }
+
+    /**
+     * Gets the value of the any 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 any property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link Element }
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * 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 a map that contains attributes that aren't bound to any typed property on this class.
+     * <p/>
+     * <p/>
+     * the map is keyed by the name of the attribute and
+     * the value is the string value of the attribute.
+     * <p/>
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     *
+     * @return always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    public void setIdentifier(String identifier) {
+        this.identifier = identifier;
+    }
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/ws_sx/ws_secureconversation/_200512/SecurityContextTokenType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/AttributedString.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/AttributedString.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/AttributedString.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/AttributedString.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,176 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+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.namespace.QName;
+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.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * This type represents an element with arbitrary attributes.
+ * <p/>
+ * <p>Java class for AttributedString complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="AttributedString">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id"/>
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AttributedString", propOrder = {
+        "value"
+})
+@XmlSeeAlso({
+        PasswordString.class,
+        EncodedString.class
+})
+public class AttributedString implements Parseable {
+
+    @XmlValue
+    protected StringBuffer value = new StringBuffer();
+    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    private QName startElementName;
+
+    public AttributedString() {
+        super();
+    }
+
+    public AttributedString(StartElement startElement) {
+        this.startElementName = startElement.getName();
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_wsu_Id)) {
+                CollapsedStringAdapter collapsedStringAdapter = new CollapsedStringAdapter();
+                this.id = collapsedStringAdapter.unmarshal(attribute.getValue());
+            }
+        }
+    }
+
+    public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
+
+        switch (xmlEvent.getEventType()) {
+            case XMLStreamConstants.START_ELEMENT:
+                break;
+            case XMLStreamConstants.END_ELEMENT:
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(startElementName)) {
+                    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 {
+    }
+
+    /**
+     * Gets the value of the value property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getValue() {
+        return value.toString();
+    }
+
+    /**
+     * Sets the value of the value property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setValue(String value) {
+        this.value.append(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 a map that contains attributes that aren't bound to any typed property on this class.
+     * <p/>
+     * <p/>
+     * the map is keyed by the name of the attribute and
+     * the value is the string value of the attribute.
+     * <p/>
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     *
+     * @return always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/AttributedString.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/BinarySecurityTokenType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/BinarySecurityTokenType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/BinarySecurityTokenType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/BinarySecurityTokenType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,126 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+import org.swssf.ext.Constants;
+import org.swssf.ext.ParseException;
+import org.swssf.ext.Utils;
+
+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.Iterator;
+
+
+/**
+ * A security token that is encoded in binary
+ * <p/>
+ * <p>Java class for BinarySecurityTokenType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="BinarySecurityTokenType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>EncodedString">
+ *       &lt;attribute name="ValueType" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "BinarySecurityTokenType")
+public class BinarySecurityTokenType
+        extends EncodedString {
+
+    @XmlAttribute(name = "ValueType")
+    @XmlSchemaType(name = "anyURI")
+    protected String valueType;
+
+    private boolean isChildFinished = false;
+
+    public BinarySecurityTokenType() {
+        super();
+    }
+
+    public BinarySecurityTokenType(StartElement startElement) {
+        super(startElement);
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_NULL_ValueType)) {
+                this.valueType = attribute.getValue();
+            }
+        }
+    }
+
+    public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
+
+        if (!isChildFinished) {
+            isChildFinished = super.parseXMLEvent(xmlEvent);
+        }
+
+        switch (xmlEvent.getEventType()) {
+            case XMLStreamConstants.START_ELEMENT:
+                StartElement startElement = xmlEvent.asStartElement();
+                throw new ParseException("Unexpected Element: " + startElement.getName());
+            case XMLStreamConstants.END_ELEMENT:
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(Constants.TAG_wsse_BinarySecurityToken)) {
+                    return true;
+                }
+                break;
+            case XMLStreamConstants.CHARACTERS:
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+    }
+
+    /**
+     * Gets the value of the valueType property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getValueType() {
+        return valueType;
+    }
+
+    /**
+     * Sets the value of the valueType property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setValueType(String value) {
+        this.valueType = value;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/BinarySecurityTokenType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EmbeddedType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EmbeddedType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EmbeddedType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EmbeddedType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,130 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * This type represents a reference to an embedded security token.
+ * <p/>
+ * <p>Java class for EmbeddedType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="EmbeddedType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *         &lt;any processContents='lax'/>
+ *       &lt;/choice>
+ *       &lt;attribute name="ValueType" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EmbeddedType", propOrder = {
+        "any"
+})
+public class EmbeddedType {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAttribute(name = "ValueType")
+    @XmlSchemaType(name = "anyURI")
+    protected String valueType;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    /**
+     * Gets the value of the any 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 any property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * {@link Object }
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets the value of the valueType property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getValueType() {
+        return valueType;
+    }
+
+    /**
+     * Sets the value of the valueType property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setValueType(String value) {
+        this.valueType = value;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * <p/>
+     * <p/>
+     * the map is keyed by the name of the attribute and
+     * the value is the string value of the attribute.
+     * <p/>
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     *
+     * @return always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EmbeddedType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EncodedString.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EncodedString.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EncodedString.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EncodedString.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,131 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+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.namespace.QName;
+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;
+
+
+/**
+ * This type is used for elements containing stringified binary data.
+ * <p/>
+ * <p>Java class for EncodedString complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="EncodedString">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>AttributedString">
+ *       &lt;attribute name="EncodingType" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EncodedString")
+@XmlSeeAlso({
+        BinarySecurityTokenType.class,
+        KeyIdentifierType.class
+})
+public class EncodedString
+        extends AttributedString implements Parseable {
+
+    @XmlAttribute(name = "EncodingType")
+    @XmlSchemaType(name = "anyURI")
+    protected String encodingType;
+
+    private QName startElementName;
+
+    public EncodedString() {
+        super();
+    }
+
+    public EncodedString(StartElement startElement) {
+        super(startElement);
+        this.startElementName = startElement.getName();
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_NULL_EncodingType)) {
+                this.encodingType = attribute.getValue();
+            }
+        }
+    }
+
+    public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
+
+        super.parseXMLEvent(xmlEvent);
+
+        switch (xmlEvent.getEventType()) {
+            case XMLStreamConstants.START_ELEMENT:
+                break;
+            case XMLStreamConstants.END_ELEMENT:
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(startElementName)) {
+                    return true;
+                }
+                break;
+            case XMLStreamConstants.CHARACTERS:
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+        super.validate();
+    }
+
+    /**
+     * Gets the value of the encodingType property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getEncodingType() {
+        return encodingType;
+    }
+
+    /**
+     * Sets the value of the encodingType property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setEncodingType(String value) {
+        this.encodingType = value;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/EncodedString.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/KeyIdentifierType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/KeyIdentifierType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/KeyIdentifierType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/KeyIdentifierType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,119 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+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.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;
+
+
+/**
+ * A security token key identifier
+ * <p/>
+ * <p>Java class for KeyIdentifierType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="KeyIdentifierType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>EncodedString">
+ *       &lt;attribute name="ValueType" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "KeyIdentifierType")
+public class KeyIdentifierType
+        extends EncodedString implements Parseable {
+
+    @XmlAttribute(name = "ValueType")
+    @XmlSchemaType(name = "anyURI")
+    protected String valueType;
+
+    public KeyIdentifierType(StartElement startElement) {
+        super(startElement);
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_NULL_ValueType)) {
+                this.valueType = attribute.getValue();
+            }
+        }
+    }
+
+    public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
+
+        super.parseXMLEvent(xmlEvent);
+
+        switch (xmlEvent.getEventType()) {
+            case XMLStreamConstants.START_ELEMENT:
+                break;
+            case XMLStreamConstants.END_ELEMENT:
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(Constants.TAG_wsse_KeyIdentifier)) {
+                    return true;
+                }
+                break;
+            case XMLStreamConstants.CHARACTERS:
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+        super.validate();
+    }
+
+    /**
+     * Gets the value of the valueType property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getValueType() {
+        return valueType;
+    }
+
+    /**
+     * Sets the value of the valueType property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setValueType(String value) {
+        this.valueType = value;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/KeyIdentifierType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/PasswordString.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/PasswordString.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/PasswordString.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/PasswordString.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,77 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.stream.events.StartElement;
+
+
+/**
+ * This type is used for password elements per Section 4.1.
+ * <p/>
+ * <p>Java class for PasswordString complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="PasswordString">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>AttributedString">
+ *       &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "PasswordString")
+public class PasswordString
+        extends AttributedString {
+
+    @XmlAttribute(name = "Type")
+    @XmlSchemaType(name = "anyURI")
+    protected String type;
+
+
+    public PasswordString(StartElement startElement) {
+        super(startElement);
+    }
+
+    /**
+     * 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/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/PasswordString.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/ReferenceType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/ReferenceType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/ReferenceType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/ReferenceType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,190 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+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.namespace.QName;
+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.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * This type represents a reference to an external security token.
+ * <p/>
+ * <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;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;attribute name="ValueType" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ReferenceType")
+public class ReferenceType implements Parseable {
+
+    private Parseable currentParseable;
+
+    @XmlElement(name = "BinarySecurityToken")
+    protected BinarySecurityTokenType binarySecurityTokenType;
+    @XmlAttribute(name = "URI")
+    @XmlSchemaType(name = "anyURI")
+    protected String uri;
+    @XmlAttribute(name = "ValueType")
+    @XmlSchemaType(name = "anyURI")
+    protected String valueType;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    public ReferenceType() {
+    }
+
+    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_URI)) {
+                this.uri = Utils.dropReferenceMarker(attribute.getValue());
+            } else if (attribute.getName().equals(Constants.ATT_NULL_ValueType)) {
+                this.valueType = attribute.getValue();
+            }
+        }
+    }
+
+    public boolean parseXMLEvent(XMLEvent xmlEvent) throws ParseException {
+        if (currentParseable != null) {
+            boolean finished = currentParseable.parseXMLEvent(xmlEvent);
+            if (finished) {
+                currentParseable = null;
+            }
+            return false;
+        }
+
+        switch (xmlEvent.getEventType()) {
+            case XMLStreamConstants.START_ELEMENT:
+                StartElement startElement = xmlEvent.asStartElement();
+                if (startElement.getName().equals(Constants.TAG_wsse_BinarySecurityToken)) {
+                    currentParseable = this.binarySecurityTokenType = new BinarySecurityTokenType(startElement);
+                } else {
+                    throw new ParseException("Unexpected Element: " + startElement.getName());
+                }
+                break;
+            case XMLStreamConstants.END_ELEMENT:
+                currentParseable = null;
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(Constants.TAG_wsse_Reference)) {
+                    return true;
+                }
+                break;
+            default:
+                throw new ParseException("Unexpected event received " + Utils.getXMLEventAsString(xmlEvent));
+        }
+        return false;
+    }
+
+    public void validate() throws ParseException {
+        if (uri == null) {
+            throw new ParseException("Attribute \"URI\" is missing");
+        }
+    }
+
+    /**
+     * 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 valueType property.
+     *
+     * @return possible object is
+     *         {@link String }
+     */
+    public String getValueType() {
+        return valueType;
+    }
+
+    /**
+     * Sets the value of the valueType property.
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setValueType(String value) {
+        this.valueType = value;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * <p/>
+     * <p/>
+     * the map is keyed by the name of the attribute and
+     * the value is the string value of the attribute.
+     * <p/>
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     *
+     * @return always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+    public BinarySecurityTokenType getBinarySecurityTokenType() {
+        return binarySecurityTokenType;
+    }
+
+    public void setBinarySecurityTokenType(BinarySecurityTokenType binarySecurityTokenType) {
+        this.binarySecurityTokenType = binarySecurityTokenType;
+    }
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/ReferenceType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityHeaderType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityHeaderType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityHeaderType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityHeaderType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,106 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.
+ * <p/>
+ * <p>Java class for SecurityHeaderType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SecurityHeaderType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SecurityHeaderType", propOrder = {
+        "any"
+})
+public class SecurityHeaderType {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    /**
+     * Gets the value of the any 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 any property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * {@link Object }
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * <p/>
+     * <p/>
+     * the map is keyed by the name of the attribute and
+     * the value is the string value of the attribute.
+     * <p/>
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     *
+     * @return always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityHeaderType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityTokenReferenceType.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityTokenReferenceType.java?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityTokenReferenceType.java (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityTokenReferenceType.java Sun Sep 18 13:51:23 2011
@@ -0,0 +1,267 @@
+/**
+ * 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.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0;
+
+import org.swssf.ext.Constants;
+import org.swssf.ext.ParseException;
+import org.swssf.ext.Parseable;
+import org.swssf.ext.Utils;
+import org.w3._2000._09.xmldsig_.X509DataType;
+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 javax.xml.namespace.QName;
+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.*;
+
+
+/**
+ * This type is used reference a security token.
+ * <p/>
+ * <p>Java class for SecurityTokenReferenceType complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * &lt;complexType name="SecurityTokenReferenceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *         &lt;any processContents='lax'/>
+ *       &lt;/choice>
+ *       &lt;attribute ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id"/>
+ *       &lt;attribute ref="{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Usage"/>
+ *       &lt;anyAttribute processContents='lax' namespace='##other'/>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SecurityTokenReferenceType", propOrder = {
+        "any"
+})
+public class SecurityTokenReferenceType implements Parseable {
+
+    private Parseable currentParseable;
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlElement(name = "Reference")
+    protected ReferenceType referenceType;
+    @XmlElement(name = "KeyIdentifier")
+    protected KeyIdentifierType keyIdentifierType;
+    @XmlElement(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#")
+    protected X509DataType x509DataType;
+    @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlID
+    @XmlSchemaType(name = "ID")
+    protected String id;
+    @XmlAttribute(name = "Usage", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
+    protected List<String> usage;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    public SecurityTokenReferenceType() {
+    }
+
+    public SecurityTokenReferenceType(StartElement startElement) {
+        @SuppressWarnings("unchecked")
+        Iterator<Attribute> attributeIterator = startElement.getAttributes();
+        while (attributeIterator.hasNext()) {
+            Attribute attribute = attributeIterator.next();
+            if (attribute.getName().equals(Constants.ATT_wsu_Id)) {
+                CollapsedStringAdapter collapsedStringAdapter = new CollapsedStringAdapter();
+                this.id = collapsedStringAdapter.unmarshal(attribute.getValue());
+            } else if (attribute.getName().equals(Constants.ATT_wsse_Usage)) {
+                this.getUsage().add(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_wsse_Reference)) {
+                    currentParseable = this.referenceType = new ReferenceType(startElement);
+                } else if (startElement.getName().equals(Constants.TAG_wsse_KeyIdentifier)) {
+                    currentParseable = this.keyIdentifierType = new KeyIdentifierType(startElement);
+                } else if (startElement.getName().equals(Constants.TAG_dsig_X509Data)) {
+                    currentParseable = this.x509DataType = new X509DataType(startElement);
+                } else {
+                    throw new ParseException("Unexpected Element: " + startElement.getName());
+                }
+
+                break;
+            case XMLStreamConstants.END_ELEMENT:
+                currentParseable = null;
+                EndElement endElement = xmlEvent.asEndElement();
+                if (endElement.getName().equals(Constants.TAG_wsse_SecurityTokenReference)) {
+                    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 (referenceType == null && keyIdentifierType == null && x509DataType == null) {
+            throw new ParseException("Element \"Reference\"|\"KeyIdentifier\"|\"x509DataType\" is missing");
+        }
+    }
+
+    /**
+     * Gets the value of the any 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 any property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * {@link Object }
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * 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 usage 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 usage property.
+     * <p/>
+     * <p/>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getUsage().add(newItem);
+     * </pre>
+     * <p/>
+     * <p/>
+     * <p/>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     */
+    public List<String> getUsage() {
+        if (usage == null) {
+            usage = new ArrayList<String>();
+        }
+        return this.usage;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * <p/>
+     * <p/>
+     * the map is keyed by the name of the attribute and
+     * the value is the string value of the attribute.
+     * <p/>
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     *
+     * @return always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+    public ReferenceType getReferenceType() {
+        return referenceType;
+    }
+
+    public void setReferenceType(ReferenceType referenceType) {
+        this.referenceType = referenceType;
+    }
+
+    public KeyIdentifierType getKeyIdentifierType() {
+        return keyIdentifierType;
+    }
+
+    public void setKeyIdentifierType(KeyIdentifierType keyIdentifierType) {
+        this.keyIdentifierType = keyIdentifierType;
+    }
+
+    public X509DataType getX509DataType() {
+        return x509DataType;
+    }
+
+    public void setX509DataType(X509DataType x509DataType) {
+        this.x509DataType = x509DataType;
+    }
+}

Propchange: webservices/wss4j/branches/swssf/streaming-ws-security/src/main/java/org/oasis_open/docs/wss/_2004/_01/oasis_200401_wss_wssecurity_secext_1_0/SecurityTokenReferenceType.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message