if (requestType != null) {
Element requestTypeElement = doc.createElementNS(TrustConstants.WST_NS, TrustConstants.WST_PREFIX + TrustConstants.REQUEST_TYPE);
setTextContent(requestTypeElement, requestType.toString());
wstElement.appendChild(requestTypeElement);
} else {
throw new NoRequestType("RequestType is a required element that cannot be null.");
}
if (base != null) {
wstElement.appendChild(createTokenOrReferenceElement(TrustConstants.WST_PREFIX + TrustConstants.BASE, base));
}