/** {@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);
    }
  }
Example #2
0
  /** {@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);
    }
  }