C# Class Microsoft.Protocols.TestSuites.Common.SchemaValidation

A Class represent the XML schema validation function.
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
GenerateValidationResult ( ) : string

This method is used to generate xml validation result information by using the record errors and warnings.

GetSoapFaultDetailBody ( string soapBody ) : string

This method is used to get the soap fault detail.

ValidateXml ( ITestSite testSite, string xmlValue ) : ValidationResult

Validate a piece of Xml fragment.

ValidateXml ( string xmlValue ) : ValidationResult

Validate a piece of Xml fragment.

Private Methods

Method Description
DoValidation ( string xmlString ) : void

Validate special xml.

GetSchemaStringFromWsdlFile ( string schemaLoadPath ) : string[]

A method used to get the schema definitions from full WSDL file. It is designed to read schema definition from full WSDL file.

GetSoapStandardSchema ( ) : string[]

A method used to get the standard soap schema definitions from xsd file.

GetTargetNamespace ( string fullSchema ) : string

This method is used to get the target namespace from a schema string.

InitSchemaList ( ) : void

This method is used to initialize the schema definitions list which is used to set the schema validation settings.

InitValidateRecoder ( ) : void

Initialize the validate recorder.

ValidateSpecialXml ( string xmlString ) : void

Validate special xml.

ValidateXml ( ITestSite testSite, bool ignoreSoapFaultSchemaValidationForSoap12 ) : ValidationResult

Validate a piece of Xml fragment.

ValidationCallBack ( object sender, ValidationEventArgs args ) : void

This method is a callback function which is used to record the schema validation errors and warnings.

Method Details

GenerateValidationResult() public static method

This method is used to generate xml validation result information by using the record errors and warnings.
public static GenerateValidationResult ( ) : string
return string

GetSoapFaultDetailBody() public static method

This method is used to get the soap fault detail.
public static GetSoapFaultDetailBody ( string soapBody ) : string
soapBody string Xml fragment string.
return string

ValidateXml() public static method

Validate a piece of Xml fragment.
public static ValidateXml ( ITestSite testSite, string xmlValue ) : ValidationResult
testSite ITestSite Implements Microsoft.Protocols.TestTools.IAdapter.Site.
xmlValue string Xml fragment string.
return ValidationResult

ValidateXml() public static method

Validate a piece of Xml fragment.
public static ValidateXml ( string xmlValue ) : ValidationResult
xmlValue string Xml fragment string.
return ValidationResult