Rediger

Del via


How to Extend the Schema Generator Wizard

How to extend the existing Schema Generator Wizard and how to create a new wizard for schema generation.

Extend the existing schema wizard

  1. Implement the ISchemaGenerator interface to create a new schema generator module that you can integrate into the existing Schema Generator Wizard.

    public interface ISchemaGenerator  
    {  
    //Method to extract a schema from a document.  
    void GenerateSchema(string inputDocument,string outputDocumentPath);  
    
    //Method to extract the errors.  
    [return : MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT )]object [] Errors();  
    
    //Method to extract the warnings.  
    [return : MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT )]object [] Warnings();  
    
    //Method to extract the referenced schemas.  
    [return : MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT )]object [] ReferencedSchemas();  
    }  
    
  2. Drop the resulting assembly in the following Microsoft BizTalk Server installation folder:

    \Program Files (x86)\Microsoft BizTalk Server <VERSION>\Developer Tools\Schema Editor Extensions

    The next time you run the Schema Generator Wizard, it will automatically pick up your new schema generator module.

    Use the following procedure to create a new schema wizard.

    Location in SDK

    \Program Files (x86)\Microsoft BizTalk Server <VERSION>\SDK\Utilities\Schema Generator

Create a new schema wizard

  1. Run InstallDTD.vbs to install Microsoft.BizTalk.DTDToXSDGenerator.dll to \Program Files (x86)\Microsoft BizTalk Server <VERSION>\Developer Tools\Schema Editor Extensions. DTDToXSDGenerator.dll exposes classes you can use to convert DTD files to XSD.

  2. Run InstallWFX.vbs to install Microsoft.BizTalk.WFXToXSDGenerator.dll to \Program Files (x86)\Microsoft BizTalk Server <VERSION>\Developer Tools\Schema Editor Extensions. WFXToXSDGenerator.dll exposes classes you can use to convert WFX files to XSD.

See Also

Utilities in the SDK