Package org.opensaml.ws.wssecurity

Examples of org.opensaml.ws.wssecurity.EncryptedHeader


*/
public class EncryptedHeaderMarshaller extends AbstractWSSecurityObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        EncryptedHeader eh = (EncryptedHeader) xmlObject;
       
        if (eh.getWSUId() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.WSU_ID_ATTR_NAME,
                    eh.getWSUId(), domElement, true);
        }
        if (eh.isSOAP11MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
                    eh.isSOAP11MustUnderstandXSBoolean().toString(), domElement, false);
        }
        if (eh.getSOAP11Actor() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP11_ACTOR_ATTR_NAME,
                    eh.getSOAP11Actor(), domElement, false);
        }
        if (eh.isSOAP12MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP12_MUST_UNDERSTAND_ATTR_NAME,
                    eh.isSOAP12MustUnderstandXSBoolean().toString(), domElement, false);
        }
        if (eh.getSOAP12Role() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP12_ROLE_ATTR_NAME,
                    eh.getSOAP12Role(), domElement, false);
        }
        if (eh.isSOAP12RelayXSBoolean() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP12_RELAY_ATTR_NAME,
                    eh.isSOAP12RelayXSBoolean().toString(), domElement, false);
        }
       
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here


*/
public class EncryptedHeaderUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        EncryptedHeader eh = (EncryptedHeader) xmlObject;
        QName attrName = XMLHelper.getNodeQName(attribute);
        if (EncryptedHeader.WSU_ID_ATTR_NAME.equals(attrName)) {
            eh.setWSUId(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else if (EncryptedHeader.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
            eh.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
        } else if (EncryptedHeader.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
            eh.setSOAP11Actor(attribute.getValue());
        } else if (EncryptedHeader.SOAP12_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
            eh.setSOAP12MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
        } else if (EncryptedHeader.SOAP12_ROLE_ATTR_NAME.equals(attrName)) {
            eh.setSOAP12Role(attribute.getValue());
        } else if (EncryptedHeader.SOAP12_RELAY_ATTR_NAME.equals(attrName)) {
            eh.setSOAP12Relay(XSBooleanValue.valueOf(attribute.getValue()));
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        EncryptedHeader eh = (EncryptedHeader) parentXMLObject;
        if (childXMLObject instanceof EncryptedData) {
            eh.setEncryptedData((EncryptedData) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

*/
public class EncryptedHeaderUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        EncryptedHeader eh = (EncryptedHeader) xmlObject;
        QName attrName = XMLHelper.getNodeQName(attribute);
        if (EncryptedHeader.WSU_ID_ATTR_NAME.equals(attrName)) {
            eh.setWSUId(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else if (EncryptedHeader.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
            eh.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
        } else if (EncryptedHeader.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
            eh.setSOAP11Actor(attribute.getValue());
        } else if (EncryptedHeader.SOAP12_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
            eh.setSOAP12MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
        } else if (EncryptedHeader.SOAP12_ROLE_ATTR_NAME.equals(attrName)) {
            eh.setSOAP12Role(attribute.getValue());
        } else if (EncryptedHeader.SOAP12_RELAY_ATTR_NAME.equals(attrName)) {
            eh.setSOAP12Relay(XSBooleanValue.valueOf(attribute.getValue()));
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        EncryptedHeader eh = (EncryptedHeader) parentXMLObject;
        if (childXMLObject instanceof EncryptedData) {
            eh.setEncryptedData((EncryptedData) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

*/
public class EncryptedHeaderMarshaller extends AbstractWSSecurityObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        EncryptedHeader eh = (EncryptedHeader) xmlObject;
       
        if (eh.getWSUId() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.WSU_ID_ATTR_NAME,
                    eh.getWSUId(), domElement, true);
        }
        if (eh.isSOAP11MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
                    eh.isSOAP11MustUnderstandXSBoolean().toString(), domElement, false);
        }
        if (eh.getSOAP11Actor() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP11_ACTOR_ATTR_NAME,
                    eh.getSOAP11Actor(), domElement, false);
        }
        if (eh.isSOAP12MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP12_MUST_UNDERSTAND_ATTR_NAME,
                    eh.isSOAP12MustUnderstandXSBoolean().toString(), domElement, false);
        }
        if (eh.getSOAP12Role() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP12_ROLE_ATTR_NAME,
                    eh.getSOAP12Role(), domElement, false);
        }
        if (eh.isSOAP12RelayXSBoolean() != null) {
            XMLHelper.marshallAttribute(EncryptedHeader.SOAP12_RELAY_ATTR_NAME,
                    eh.isSOAP12RelayXSBoolean().toString(), domElement, false);
        }
       
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

TOP

Related Classes of org.opensaml.ws.wssecurity.EncryptedHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.