Biztalk (version 2006) provides similar layer-3 APIs for us to use. They are: AdvancedProgramming LanguageThe wmihe command line tool btstask.exe/btsdeploy.exe is used to call the assumerom method to read the process information.
Test Program
The developer tools directory in the BizTalk installation path contains a lot of DLL files. Today, I only tested it and only referenced Microsoft. biztalk. assumerom. DLL, which also comes with a Microsoft. biztalk. assumerom. XML instructions.
:
Technical documents:
CodeAs follows:
Using System;
Using System. Collections. Generic;
Using System. componentmodel;
Using System. Data;
Using System. drawing;
Using System. text;
Using System. Windows. forms;
Using System. configuration;
Using Microsoft. BizTalk. assumerom;
Namespace Testwinapp. Forms
{
Public Partial Class Formbtsorc: Form
{
Private Btscatalogexplorer bts_catalogexplorer = New Btscatalogexplorer ();
Public Formbtsorc ()
{
Initializecomponent ();
}
Private Void Formbtsorc_load ( Object Sender, eventargs E)
{
Txtbtssrvip. Text=Configurationmanager. connectionstrings ["Biztalkserver"]. Connectionstring;
}
Private Void Btngetorcs_click ( Object Sender, eventargs E)
{
Bts_catalogexplorer.connectionstring = Txtbtssrvip. Text. Trim ();
Datatable m_dtbtsorcs = New Datatable ();
Datacolumn m_dcapplicationname = New Datacolumn ( " Application " );
M_dcapplicationname.datatype = System. type. GetType ( " System. String " );
M_dtbtsorcs.columns.add (m_dcapplicationname );
Datacolumn m_dccount = New Datacolumn ( " Count " , System. type. GetType ( " System. int32 " ));
M_dtbtsorcs.columns.add (m_dccount );
Datacolumn m_dcorchname = New Datacolumn ( " Orchestration " , System. type. GetType ( " System. String " ));
M_dtbtsorcs.columns.add (m_dcorchname );
Datacolumn m_dcstates = New Datacolumn ( " States " , System. type. GetType ( " System. String " ));
M_dtbtsorcs.columns.add (m_dcstates );
Datacolumn m_dchostname = New Datacolumn ( " Hostname " , System. type. GetType ( " System. String " ));
M_dtbtsorcs.columns.add (m_dchostname );
// System. Collections. arraylist l_list = new system. Collections. arraylist ();
// Rochelle list.addrange (bts_catalogexplorer.applications );
Datarow l_row;
For ( Int I = 0 ; I < Bts_catalogexplorer.applications.count; I ++ )
{
Rochelle row = M_dtbtsorcs.newrow ();
Rochelle row [ 0 ] = Bts_catalogexplorer.applications [I]. Name;
Rochelle row [ 1 ] = Bts_catalogexplorer.applications [I]. orchestrations. count;
M_dtbtsorcs.rows.add (l_row );
For ( Int J = 0 ; J < Bts_catalogexplorer.applications [I]. orchestrations. Count; j ++ )
{
Rochelle row = M_dtbtsorcs.newrow ();
// Rochelle row [0] = bts_catalogexplorer.applications [I]. Name;
Rochelle row [ 1 ] = J + 1 ;
Rochelle row [ 2 ] = Bts_catalogexplorer.applications [I]. orchestrations [J]. fullname;
Rochelle row [ 3 ] = Bts_catalogexplorer.applications [I]. orchestrations [J]. Status. tostring ();
Rochelle row [ 4 ] = Bts_catalogexplorer.applications [I]. orchestrations [J]. Host;
M_dtbtsorcs.rows.add (l_row );
}
}
Datagridview_bts.datasource = M_dtbtsorcs;
}
}
}
Program running result:
Class used: btscatalogexplorer
Provides the implementation for the ibtscatalogexplorer interface. This is an important programming interface class. You can use connectionstring to read the process information on the configured server.
:
Application
Represents a logical grouping of BizTalk Server artifacts. This class cannot be inherited. stores the information (name, bottom process, etc.) of a single "application" and corresponding operations.
:
Btsorchestration
Provides the implementation for the ibtsorchestration interface. It stores the information of a single process (name, port, start or not) and corresponding operations.
:
Summary:
There are also many operations that can be implemented, such as creating a port, querying the pending process, starting the process, and stopping the process. BizTalk can provide some classes and methods for implementation, so you can study them later.
Although these programming interfaces provided by BizTalk are generally not used at all, they can be directly implemented using the built-in BizTalk management tool. however, when you cannot directly log on to the server, many of them are more practical.