本文整理汇总了Java中org.opensaml.xml.io.UnmarshallingException类的典型用法代码示例。如果您正苦于以下问题:Java UnmarshallingException类的具体用法?Java UnmarshallingException怎么用?Java UnmarshallingException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UnmarshallingException类属于org.opensaml.xml.io包,在下文中一共展示了UnmarshallingException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
LogoutRequest req = (LogoutRequest) parentSAMLObject;
if (childSAMLObject instanceof BaseID) {
req.setBaseID((BaseID) childSAMLObject);
} else if (childSAMLObject instanceof NameID) {
req.setNameID((NameID) childSAMLObject);
} else if (childSAMLObject instanceof EncryptedID) {
req.setEncryptedID((EncryptedID) childSAMLObject);
} else if (childSAMLObject instanceof SessionIndex) {
req.getSessionIndexes().add((SessionIndex) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例2: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
PolicyReference pr = (PolicyReference) xmlObject;
QName uriName = new QName(PolicyReference.URI_ATTRIB_NAME);
QName digestName = new QName(PolicyReference.DIGEST_ATTRIB_NAME);
QName digestAlgorithmName = new QName(PolicyReference.DIGEST_ALGORITHM_ATTRIB_NAME);
QName attribQName =
XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix());
if (uriName.equals(attribQName)) {
pr.setURI(attribute.getValue());
} else if (digestName.equals(attribQName)) {
pr.setDigest(attribute.getValue());
} else if (digestAlgorithmName.equals(attribQName)) {
pr.setDigestAlgorithm(attribute.getValue());
} else {
XMLHelper.unmarshallToAttributeMap(pr.getUnknownAttributes(), attribute);
}
}
示例3: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
Subject subject = (Subject) parentObject;
if (childObject instanceof BaseID) {
subject.setBaseID((BaseID) childObject);
} else if (childObject instanceof NameID) {
subject.setNameID((NameID) childObject);
} else if (childObject instanceof EncryptedID) {
subject.setEncryptedID((EncryptedID) childObject);
} else if (childObject instanceof SubjectConfirmation) {
subject.getSubjectConfirmations().add((SubjectConfirmation) childObject);
} else {
super.processChildElement(parentObject, childObject);
}
}
示例4: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
XACMLAuthzDecisionQueryType xacmlauthzdecisionquery = (XACMLAuthzDecisionQueryType) parentObject;
if (childObject instanceof RequestType) {
xacmlauthzdecisionquery.setRequest((RequestType) childObject);
} else if (childObject instanceof PolicyType) {
xacmlauthzdecisionquery.getPolicies().add((PolicyType) childObject);
} else if (childObject instanceof PolicySetType) {
xacmlauthzdecisionquery.getPolicySets().add((PolicySetType) childObject);
} else if (childObject instanceof ReferencedPoliciesType) {
xacmlauthzdecisionquery.setReferencedPolicies((ReferencedPoliciesType) childObject);
} else {
super.processChildElement(parentObject, childObject);
}
}
示例5: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
EncryptedType et = (EncryptedType) xmlObject;
if (attribute.getLocalName().equals(EncryptedType.ID_ATTRIB_NAME)) {
et.setID(attribute.getValue());
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
} else if (attribute.getLocalName().equals(EncryptedType.TYPE_ATTRIB_NAME)) {
et.setType(attribute.getValue());
} else if (attribute.getLocalName().equals(EncryptedType.MIMETYPE_ATTRIB_NAME)) {
et.setMimeType(attribute.getValue());
} else if (attribute.getLocalName().equals(EncryptedType.ENCODING_ATTRIB_NAME)) {
et.setEncoding(attribute.getValue());
} else {
super.processAttribute(xmlObject, attribute);
}
}
示例6: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@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);
}
}
示例7: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
AffiliationDescriptor descriptor = (AffiliationDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
descriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
descriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof AffiliateMember) {
descriptor.getMembers().add((AffiliateMember) childSAMLObject);
} else if (childSAMLObject instanceof KeyDescriptor) {
descriptor.getKeyDescriptors().add((KeyDescriptor) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例8: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
AuthnRequest req = (AuthnRequest) samlObject;
if (attribute.getLocalName().equals(AuthnRequest.FORCE_AUTHN_ATTRIB_NAME)) {
req.setForceAuthn(XSBooleanValue.valueOf(attribute.getValue()));
} else if (attribute.getLocalName().equals(AuthnRequest.IS_PASSIVE_ATTRIB_NAME)) {
req.setIsPassive(XSBooleanValue.valueOf(attribute.getValue()));
} else if (attribute.getLocalName().equals(AuthnRequest.PROTOCOL_BINDING_ATTRIB_NAME)) {
req.setProtocolBinding(attribute.getValue());
} else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_INDEX_ATTRIB_NAME)) {
req.setAssertionConsumerServiceIndex(Integer.valueOf(attribute.getValue()));
} else if (attribute.getLocalName().equals(AuthnRequest.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME)) {
req.setAssertionConsumerServiceURL(attribute.getValue());
} else if (attribute.getLocalName().equals(AuthnRequest.ATTRIBUTE_CONSUMING_SERVICE_INDEX_ATTRIB_NAME)) {
req.setAttributeConsumingServiceIndex(Integer.valueOf(attribute.getValue()));
} else if (attribute.getLocalName().equals(AuthnRequest.PROVIDER_NAME_ATTRIB_NAME)) {
req.setProviderName(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
示例9: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
RoleDescriptor roleDescriptor = (RoleDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
roleDescriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
roleDescriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof KeyDescriptor) {
roleDescriptor.getKeyDescriptors().add((KeyDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof Organization) {
roleDescriptor.setOrganization((Organization) childSAMLObject);
} else if (childSAMLObject instanceof ContactPerson) {
roleDescriptor.getContactPersons().add((ContactPerson) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例10: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
AttributeDesignatorType attributeDesignatorType = (AttributeDesignatorType) xmlObject;
if (attribute.getLocalName().equals(AttributeDesignatorType.ATTRIBUTE_ID_ATTRIB_NAME)){
attributeDesignatorType.setAttribtueId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
} else if (attribute.getLocalName().equals(AttributeDesignatorType.DATA_TYPE_ATTRIB_NAME)){
attributeDesignatorType.setDataType(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
} else if (attribute.getLocalName().equals(AttributeDesignatorType.ISSUER_ATTRIB_NAME)){
attributeDesignatorType.setIssuer(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
} else if (attribute.getLocalName().equals(AttributeDesignatorType.MUST_BE_PRESENT_ATTRIB_NAME)){
if (attribute.getValue().equals("True") || attribute.getValue().equals("true")) {
attributeDesignatorType.setMustBePresentXSBoolean(XSBooleanValue.valueOf("1"));
} else {
attributeDesignatorType.setMustBePresentXSBoolean(XSBooleanValue.valueOf("0"));
}
} else {
super.processAttribute(xmlObject, attribute);
}
}
示例11: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@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.IS_PASSIVE_NAME_ATTRIB_NAME.equals(attribute.getLocalName())) {
request.setPassive(XSBooleanValue.valueOf(attribute.getValue()));
} else if (Request.PROVIDER_NAME_ATTRIB_NAME.equals(attribute.getLocalName())) {
request.setProviderName(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
示例12: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
throws UnmarshallingException {
TargetType targetType = (TargetType) parentXMLObject;
if(childXMLObject.getElementQName().equals(ActionsType.DEFAULT_ELEMENT_NAME)){
targetType.setActions((ActionsType)childXMLObject);
} else if(childXMLObject.getElementQName().equals(EnvironmentsType.DEFAULT_ELEMENT_NAME)){
targetType.setEnvironments((EnvironmentsType)childXMLObject);
} else if(childXMLObject.getElementQName().equals(ResourcesType.DEFAULT_ELEMENT_NAME)){
targetType.setResources((ResourcesType)childXMLObject);
} else if(childXMLObject.getElementQName().equals(SubjectsType.DEFAULT_ELEMENT_NAME)){
targetType.setSubjects((SubjectsType)childXMLObject);
} else {
super.processChildElement(parentXMLObject, childXMLObject);
}
}
示例13: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
Organization org = (Organization) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
org.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof OrganizationName) {
org.getOrganizationNames().add((OrganizationName) childSAMLObject);
} else if (childSAMLObject instanceof OrganizationDisplayName) {
org.getDisplayNames().add((OrganizationDisplayName) childSAMLObject);
} else if (childSAMLObject instanceof OrganizationURL) {
org.getURLs().add((OrganizationURL) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例14: processChildElement
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
EntityDescriptor entityDescriptor = (EntityDescriptor) parentSAMLObject;
if (childSAMLObject instanceof Extensions) {
entityDescriptor.setExtensions((Extensions) childSAMLObject);
} else if (childSAMLObject instanceof Signature) {
entityDescriptor.setSignature((Signature) childSAMLObject);
} else if (childSAMLObject instanceof RoleDescriptor) {
entityDescriptor.getRoleDescriptors().add((RoleDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof AffiliationDescriptor) {
entityDescriptor.setAffiliationDescriptor((AffiliationDescriptor) childSAMLObject);
} else if (childSAMLObject instanceof Organization) {
entityDescriptor.setOrganization((Organization) childSAMLObject);
} else if (childSAMLObject instanceof ContactPerson) {
entityDescriptor.getContactPersons().add((ContactPerson) childSAMLObject);
} else if (childSAMLObject instanceof AdditionalMetadataLocation) {
entityDescriptor.getAdditionalMetadataLocations().add((AdditionalMetadataLocation) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例15: processAttribute
import org.opensaml.xml.io.UnmarshallingException; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
SubjectConfirmationData subjectCD = (SubjectConfirmationData) samlObject;
if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_BEFORE_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
subjectCD.setNotBefore(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(SubjectConfirmationData.NOT_ON_OR_AFTER_ATTRIB_NAME)
&& !DatatypeHelper.isEmpty(attribute.getValue())) {
subjectCD.setNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
} else if (attribute.getLocalName().equals(SubjectConfirmationData.RECIPIENT_ATTRIB_NAME)) {
subjectCD.setRecipient(attribute.getValue());
} else if (attribute.getLocalName().equals(SubjectConfirmationData.IN_RESPONSE_TO_ATTRIB_NAME)) {
subjectCD.setInResponseTo(attribute.getValue());
} else if (attribute.getLocalName().equals(SubjectConfirmationData.ADDRESS_ATTRIB_NAME)) {
subjectCD.setAddress(attribute.getValue());
} else {
QName attribQName = XMLHelper.getNodeQName(attribute);
if (attribute.isId()) {
subjectCD.getUnknownAttributes().registerID(attribQName);
}
subjectCD.getUnknownAttributes().put(attribQName, attribute.getValue());
}
}