当前位置: 首页>>代码示例>>Java>>正文


Java StatusCode.setValue方法代码示例

本文整理汇总了Java中org.opensaml.saml1.core.StatusCode.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java StatusCode.setValue方法的具体用法?Java StatusCode.setValue怎么用?Java StatusCode.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opensaml.saml1.core.StatusCode的用法示例。


在下文中一共展示了StatusCode.setValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newStatus

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
protected final Status newStatus(final QName codeValue, final String statusMessage) {
    final Status status = newSamlObject(Status.class);
    final StatusCode code = newSamlObject(StatusCode.class);
    code.setValue(codeValue);
    status.setStatusCode(code);
    if (statusMessage != null) {
        final StatusMessage message = newSamlObject(StatusMessage.class);
        message.setMessage(statusMessage);
        status.setStatusMessage(message);
    }
    return status;
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:13,代码来源:AbstractSaml10ResponseView.java

示例2: processAttribute

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {

    StatusCode statusCode = (StatusCode) samlObject;

    if (attribute.getName().equals(StatusCode.VALUE_ATTRIB_NAME)) {
        statusCode.setValue(XMLHelper.getAttributeValueAsQName(attribute));
    } else {
        super.processAttribute(samlObject, attribute);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:StatusCodeUnmarshaller.java

示例3: populateRequiredData

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
    super.populateRequiredData();

    StatusCode statusCode = (StatusCode) target;
    statusCode.setValue(StatusCode.SUCCESS);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:8,代码来源:StatusCodeSchemaTest.java

示例4: testSingleElementMarshall

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */

    public void testSingleElementMarshall() {
        Status status = (Status) buildXMLObject(qname);

        StatusCode statusCode = (StatusCode) buildXMLObject(StatusCode.DEFAULT_ELEMENT_NAME);
        statusCode.setValue(StatusCode.SUCCESS);
        status.setStatusCode(statusCode);

        assertEquals(expectedDOM, status);
    }
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:12,代码来源:StatusTest.java

示例5: testChildElementsMarshall

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */

    public void testChildElementsMarshall() {
        Status status = (Status) buildXMLObject(qname);

        StatusCode statusCode = (StatusCode) buildXMLObject(StatusCode.DEFAULT_ELEMENT_NAME);
        statusCode.setValue(StatusCode.SUCCESS);
        status.setStatusCode(statusCode);

        StatusMessage statusMessage = (StatusMessage) buildXMLObject(StatusMessage.DEFAULT_ELEMENT_NAME);
        status.setStatusMessage(statusMessage);

        assertEquals(expectedChildElementsDOM, status);
    }
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:15,代码来源:StatusTest.java

示例6: testMissingValue

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
public void testMissingValue(){
    StatusCode statusCode = (StatusCode) target;
    statusCode.setValue(null);
    assertValidationFail("No Value attribute, should raise a Validation Exception");        
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:6,代码来源:StatusCodeSchemaTest.java

示例7: testBadQName1

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
public void testBadQName1(){
    StatusCode statusCode = (StatusCode) target;
    QName qname = new QName(SAMLConstants.SAML1_NS, "Success", SAMLConstants.SAML1_PREFIX);
    statusCode.setValue(qname);
    assertValidationFail("Value in SAML1 assertion namespace, should raise a Validation Exception");        
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:StatusCodeSchemaTest.java

示例8: testBadQName2

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
public void testBadQName2(){
    StatusCode statusCode = (StatusCode) target;
    QName qname = new QName(SAMLConstants.SAML10P_NS, "ssSuccess", SAMLConstants.SAML1P_PREFIX);
    statusCode.setValue(qname);
    assertValidationFail("unrecognized LocalName in SAML1 protocol namespace, should raise a Validation Exception");        
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:7,代码来源:StatusCodeSchemaTest.java

示例9: testSingleElementMarshall

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */

    public void testSingleElementMarshall() {
        StatusCode code = (StatusCode) buildXMLObject(qname);

        code.setValue(StatusCode.SUCCESS);

        assertEquals(expectedDOM, code);
    }
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:10,代码来源:StatusCodeTest.java

示例10: testChildElementsMarshall

import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */

    public void testChildElementsMarshall() {

        StatusCode code = (StatusCode) buildXMLObject(qname);

        code.setValue(StatusCode.REQUESTER);

        code.setStatusCode((StatusCode) buildXMLObject(qname));

        code.getStatusCode().setValue(StatusCode.VERSION_MISMATCH);

        assertEquals(expectedChildElementsDOM, code);
    }
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:15,代码来源:StatusCodeTest.java


注:本文中的org.opensaml.saml1.core.StatusCode.setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。