prepareForAssignment(m_Signature,sig);
*m_pos_Signature=m_Signature=sig;
// Sync content reference back up.
- if (m_Signature)
+ if (m_Signature && (!m_AssertionID || *m_AssertionID!=chDigit_0))
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
if (!m_AssertionID)
const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
- MARSHALL_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
+ domElement->setAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, m_AssertionID);\r
+ if (*m_MinorVersion!=chDigit_0)\r
+ domElement->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);\r
MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
if (!m_IssueInstant) {
const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
+ void unmarshallAttributes(const DOMElement* domElement) {
+ // Standard processing, but then we check IDness.
+ AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
+ if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0))
+ const_cast<DOMElement*>(domElement)->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
+ }
+
void processAttribute(const DOMAttr* attribute) {
static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
throw UnmarshallingException("Assertion has invalid major version.");
}
PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
- PROC_ID_ATTRIB(AssertionID,ASSERTIONID,NULL);
+ PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,NULL);
PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
}
prepareForAssignment(m_Signature,sig);
*m_pos_Signature=m_Signature=sig;
// Sync content reference back up.
- if (m_Signature)
+ if (m_Signature && (!m_RequestID || *m_RequestID!=chDigit_0))
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
if (!m_RequestID)
const_cast<RequestAbstractTypeImpl*>(this)->m_RequestID=SAMLConfig::getConfig().generateIdentifier();
- MARSHALL_ID_ATTRIB(RequestID,REQUESTID,NULL);
+ domElement->setAttributeNS(NULL, REQUESTID_ATTRIB_NAME, m_RequestID);\r
+ if (*m_MinorVersion!=chDigit_0)\r
+ domElement->setIdAttributeNS(NULL, REQUESTID_ATTRIB_NAME);\r
if (!m_IssueInstant) {
const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(NULL);
const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
+ void unmarshallAttributes(const DOMElement* domElement) {
+ // Standard processing, but then we check IDness.
+ AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
+ if (m_RequestID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0))
+ const_cast<DOMElement*>(domElement)->setIdAttributeNS(NULL, REQUESTID_ATTRIB_NAME);
+ }
+
void processAttribute(const DOMAttr* attribute) {
static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
throw UnmarshallingException("Request has invalid major version.");
}
PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
- PROC_ID_ATTRIB(RequestID,REQUESTID,NULL);
+ PROC_STRING_ATTRIB(RequestID,REQUESTID,NULL);
PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
}
};
prepareForAssignment(m_Signature,sig);
*m_pos_Signature=m_Signature=sig;
// Sync content reference back up.
- if (m_Signature)
+ if (m_Signature && (!m_ResponseID || *m_ResponseID!=chDigit_0))
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
if (!m_ResponseID)
const_cast<ResponseAbstractTypeImpl*>(this)->m_ResponseID=SAMLConfig::getConfig().generateIdentifier();
- MARSHALL_ID_ATTRIB(ResponseID,RESPONSEID,NULL);
+ domElement->setAttributeNS(NULL, RESPONSEID_ATTRIB_NAME, m_ResponseID);\r
+ if (*m_MinorVersion!=chDigit_0)\r
+ domElement->setIdAttributeNS(NULL, RESPONSEID_ATTRIB_NAME);\r
MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
if (!m_IssueInstant) {
const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(NULL);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
+ void unmarshallAttributes(const DOMElement* domElement) {
+ // Standard processing, but then we check IDness.
+ AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
+ if (m_ResponseID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0))
+ const_cast<DOMElement*>(domElement)->setIdAttributeNS(NULL, RESPONSEID_ATTRIB_NAME);
+ }
+
void processAttribute(const DOMAttr* attribute) {
static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
throw UnmarshallingException("Response has invalid major version.");
}
PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
- PROC_ID_ATTRIB(ResponseID,RESPONSEID,NULL);
+ PROC_STRING_ATTRIB(ResponseID,RESPONSEID,NULL);
PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);