Package org.opensaml.liberty.paos

Examples of org.opensaml.liberty.paos.Response


    }

    /** {@inheritDoc} */
    @Override
    public void testSingleElementMarshall() {
        Response response = getResponseWithRequiredAttributes();
       
        assertEquals(expectedDOM, response);
    }
View Full Code Here


    }
   
    /** {@inheritDoc} */
    @Override
    public void testSingleElementOptionalAttributesMarshall() {
        Response response = getResponseWithRequiredAttributes();
       
        response.setRefToMessageID(expectedRefToMessageID);
       
        assertEquals(expectedOptionalAttributesDOM, response);       
    }
View Full Code Here

       
        assertEquals(expectedOptionalAttributesDOM, response);       
    }
   
    private Response getResponseWithRequiredAttributes() {
        Response response = (Response) buildXMLObject(Response.DEFAULT_ELEMENT_NAME);
       
        response.setSOAP11Actor(expectedSOAP11Actor);
        response.setSOAP11MustUnderstand(expectedSOAP11MustUnderstand);
        return response;
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    @Override
    public void testSingleElementUnmarshall() {
        Response response = (Response) unmarshallElement(singleElementFile);
       
        testResponseRequiredElements(response);
    }
View Full Code Here

    }
   
    /** {@inheritDoc} */
    @Override
    public void testSingleElementOptionalAttributesUnmarshall() {
        Response response = (Response) unmarshallElement(singleElementOptionalAttributesFile);
       
        testResponseRequiredElements(response);
       
        assertEquals("refToMessageID had unexpected value", expectedRefToMessageID,
                response.getRefToMessageID());
    }
View Full Code Here

public class ResponseUnmarshaller extends AbstractSAMLObjectUnmarshaller {
   
    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute)
            throws UnmarshallingException {
        Response response = (Response) samlObject;
       
        QName attrName = XMLHelper.getNodeQName(attribute);
        if (Response.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) {
            response.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue()));
        } else if (Response.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) {
            response.setSOAP11Actor(attribute.getValue());
        } else if (Response.REF_TO_MESSAGE_ID_ATTRIB_NAME.equals(attribute.getLocalName())) {
            response.setRefToMessageID(attribute.getValue());
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

public class ResponseMarshaller extends AbstractSAMLObjectMarshaller {
   
    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement)
            throws MarshallingException {
        Response response = (Response) xmlObject;
       
        if (response.getRefToMessageID() != null) {
            domElement.setAttributeNS(null, Response.REF_TO_MESSAGE_ID_ATTRIB_NAME,
                    response.getRefToMessageID());
        }
        if (response.isSOAP11MustUnderstandXSBoolean() != null) {
            XMLHelper.marshallAttribute(Response.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
                    response.isSOAP11MustUnderstandXSBoolean().toString(), domElement, false);
        }
        if (response.getSOAP11Actor() != null) {
            XMLHelper.marshallAttribute(Response.SOAP11_ACTOR_ATTR_NAME,
                    response.getSOAP11Actor(), domElement, false);
        }
       
    }
View Full Code Here

TOP

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

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.