private void CaptureTransportRelatedRequirements()
{
TransportProtocol transport = Common.GetConfigurationPropertyValue<TransportProtocol>("TransportType", this.Site);
switch (transport)
{
case TransportProtocol.HTTP:
// As response successfully returned, the transport related requirements can be directly captured.
Site.CaptureRequirement(
1,
@"[In Transport] Protocol servers MUST support SOAP over HTTP.");
break;
case TransportProtocol.HTTPS:
if (Common.IsRequirementEnabled(121, this.Site))
{
// Having received the response successfully have proved the HTTPS
// transport is supported. If the HTTPS transport is not supported, the
// response can't be received successfully.
Site.CaptureRequirement(
121,
@"[In Appendix B: Product Behavior] Implementation does additionally support SOAP over HTTPS to help secure communication with protocol clients.(The Windows SharePoint Services 3.0 and above products follow this behavior.)");
}
break;
default:
Site.Debug.Fail("Unknown transport type " + transport);
break;
}
SoapVersion soapVersion = Common.GetConfigurationPropertyValue<SoapVersion>("SoapVersion", this.Site);
switch (soapVersion)
{
case SoapVersion.SOAP11:
// As response successfully returned, the SOAP1.1 related requirements can be directly captured.
Site.CaptureRequirement(
122,
@"[In Transport] Protocol messages MUST be formatted as specified in [SOAP1.1] section 4 [or [SOAP1.2/1] section 5].");
break;
case SoapVersion.SOAP12:
// As response successfully returned, the SOAP1.2 related requirements can be directly captured.
Site.CaptureRequirement(
123,
@"[In Transport] Protocol messages MUST be formatted as specified in [SOAP1.2/1] section 5.");
break;
default:
Site.Debug.Fail("Unknown soap version" + soapVersion);
break;
}
}