private void VerifyExportWorkflowTemplate(string exportWorkflowTemplateResult)
{
Site.Log.Add(LogEntryKind.Comment, "Verify common requirements in ExportWorkflowTemplate operation.");
this.VerifyCommonReqs();
// When code can run to this line, it indicates the soap out message for this operation is received, else the operation will throw exception above.
// So this operation's description is consistent with server.
Site.CaptureRequirement(
96,
@"[In ExportWorkflowTemplate] [The ExportWorkflowTemplate operation is defined as:] <wsdl:operation name=""ExportWorkflowTemplate"">
<wsdl:input message=""tns:ExportWorkflowTemplateSoapIn"" />
<wsdl:output message=""tns:ExportWorkflowTemplateSoapOut"" />
</wsdl:operation>");
bool isSchemaRight = SchemaValidation.XmlValidationErrors.Count == 0 && SchemaValidation.XmlValidationWarnings.Count == 0;
// When the variable isSchemaRight is true, it exposes that the message's format described in the Open Specification is consistent with server. So we can verify R98,R104,R117.
Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R98");
// Verify MS-SITESS requirement: MS-SITESS_R98
Site.CaptureRequirementIfIsTrue(
isSchemaRight,
98,
@"[In ExportWorkflowTemplate] [The client sends an ExportWorkflowTemplateSoapIn request message] and the server responds with an ExportWorkflowTemplateSoapOut response message.");
// When the variable isSchemaRight is true, it exposes that the message's format described in the Open Specification is consistent with server. So we can verify R104.
Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R104");
// Verify MS-SITESS requirement: MS-SITESS_R104
Site.CaptureRequirementIfIsTrue(
isSchemaRight,
104,
@"[In ExportWorkflowTemplateSoapOut] The SOAP body contains an ExportWorkflowTemplateResponse element.");
// When the variable isSchemaRight is true, it exposes that the message's format described in the Open Specification is consistent with server. So we can verify R117.
Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R117");
// Verify MS-SITESS requirement: MS-SITESS_R117
Site.CaptureRequirementIfIsTrue(
isSchemaRight,
117,
@"[In ExportWorkflowTemplateResponse] [The ExportWorkflowTemplateResponse element is defined as:] <s:element name=""ExportWorkflowTemplateResponse"">
<s:complexType>
<s:sequence>
<s:element name=""ExportWorkflowTemplateResult"" minOccurs=""1"" maxOccurs=""1"" type=""s:string"" />
</s:sequence>
</s:complexType>
</s:element>");
// If ExportWorkflowTemplate operation succeeds, we can verify whether ExportWorkflowTemplateResult is a site-collection relative URL.
Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R450, the ExportWorkflowTemplateResult is {0}", exportWorkflowTemplateResult);
bool isVerifyR450 = Uri.IsWellFormedUriString(exportWorkflowTemplateResult, UriKind.Relative) && exportWorkflowTemplateResult.Substring(0, 1) != "/";
// Verify MS-SITESS requirement: MS-SITESS_R450
Site.CaptureRequirementIfIsTrue(
isVerifyR450,
450,
@"[In ExportWorkflowTemplateResponse] ExportWorkflowTemplateResult: It MUST be the site-relative URL of the created solution file..");
}