Package org.opensaml.liberty.paos

Examples of org.opensaml.liberty.paos.Request


    }

    /** {@inheritDoc} */
    @Override
    public void testSingleElementMarshall() {
        Request request = getRequestWithRequiredAttributes();
       
        assertEquals(expectedDOM, request);
    }
View Full Code Here


    }
   
    /** {@inheritDoc} */
    @Override
    public void testSingleElementOptionalAttributesMarshall() {
        Request request = getRequestWithRequiredAttributes();
       
        request.setMessageID(expectedMessageID);
       
        assertEquals(expectedOptionalAttributesDOM, request);       
    }
View Full Code Here

       
        assertEquals(expectedOptionalAttributesDOM, request);       
    }
   
    private Request getRequestWithRequiredAttributes() {
        Request request = (Request) buildXMLObject(Request.DEFAULT_ELEMENT_NAME);
       
        request.setResponseConsumerURL(expectedResponseConsumerURL);
        request.setService(expectedService);
        request.setSOAP11Actor(expectedSOAP11Actor);
        request.setSOAP11MustUnderstand(expectedSOAP11MustUnderstand);
        return request;
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    @Override
    public void testSingleElementUnmarshall() {
        Request request = (Request) unmarshallElement(singleElementFile);
       
        testRequestRequiredElements(request);
    }
View Full Code Here

    }
   
    /** {@inheritDoc} */
    @Override
    public void testSingleElementOptionalAttributesUnmarshall() {
        Request request = (Request) unmarshallElement(singleElementOptionalAttributesFile);
       
        testRequestRequiredElements(request);
       
        assertEquals("messageID had unexpected value", expectedMessageID,
                request.getMessageID());
    }
View Full Code Here

public class RequestMarshaller extends AbstractSAMLObjectMarshaller {
   
    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement)
            throws MarshallingException {
        Request request = (Request) xmlObject;
       
        if (request.getResponseConsumerURL() != null) {
            domElement.setAttributeNS(null, Request.RESPONSE_CONSUMER_URL_ATTRIB_NAME,
                    request.getResponseConsumerURL());
        }
        if (request.getService() != null) {
            domElement.setAttributeNS(null, Request.SERVICE_ATTRIB_NAME, request.getService());
        }
        if (request.getMessageID() != null) {
            domElement.setAttributeNS(null, Request.MESSAGE_ID_ATTRIB_NAME,
                    request.getMessageID());
        }
        if (request.isSOAP11MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(Request.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
                    request.isSOAP11MustUnderstandXSBoolean().toString(), domElement, false);
        }
        if (request.getSOAP11Actor() != null) {
            XMLHelper.marshallAttribute(Request.SOAP11_ACTOR_ATTR_NAME,
                    request.getSOAP11Actor(), domElement, false);
        }
       
    }
View Full Code Here

public class RequestUnmarshaller extends AbstractSAMLObjectUnmarshaller {
   
    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute)
            throws UnmarshallingException {
        Request request = (Request) samlObject;
       
        QName attrName = XMLHelper.getNodeQName(attribute);
        if (Request.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
            request.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
        } else if (Request.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
            request.setSOAP11Actor(attribute.getValue());
        } else if (Request.RESPONSE_CONSUMER_URL_ATTRIB_NAME.equals(attribute.getLocalName())) {
            request.setResponseConsumerURL(attribute.getValue());
        } else if (Request.SERVICE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            request.setService(attribute.getValue());
        } else if (Request.MESSAGE_ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
            request.setMessageID(attribute.getValue());
        } else {
            super.processAttribute(samlObject, attribute);
        }
       
    }
View Full Code Here

TOP

Related Classes of org.opensaml.liberty.paos.Request

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.