LobSystem Class
Represents a business application registered in the Business Data Catalog.
Inheritance Hierarchy
System.Object
Microsoft.Office.Server.ApplicationRegistry.Administration.MetadataObject
Microsoft.Office.Server.ApplicationRegistry.Administration.AccessControlledMetadataObject
Microsoft.Office.Server.ApplicationRegistry.Administration.IndividuallySecurableMetadataObject
Microsoft.Office.Server.ApplicationRegistry.Administration.LobSystem
Namespace: Microsoft.Office.Server.ApplicationRegistry.Administration
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Syntax
'Declaration
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class LobSystem _
Inherits IndividuallySecurableMetadataObject
'Usage
Dim instance As LobSystem
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class LobSystem : IndividuallySecurableMetadataObject
Remarks
The LobSystem object derives from the MetadataObject base class. Each LobSystem object has a unique name and is of a certain type: either Database or Web Service. The Business Data Catalog accesses systems of the same type by using the same provider. For example, AdventureWorks is a Microsoft SQL Server database, and the Business Data Catalog accesses it and all SQL Server databases through Microsoft ADO.NET. SAP R/3 IDES is an SAP R/3 system, and the Business Data Catalog accesses it through the Web Services proxy, as it does with the Siebel 7.5 system.
Client Impact
To use the Business Data features, such as Business Data Web Parts and Business Data columns in lists, you must define the metadata for the LobSystem object. The LobSystem object is the top-level container for metadata that describes a particular business application. In XML terms, it is the root node that contains all other metadata objects in an application definition.
After you define the metadata for a system and add the application definition to the Business Data Catalog, the entities are available to you in all the business data features. Entity Picker shows the entities in the system provided you have appropriate permissions and have defined the metadata appropriately.
Schema
Child |
Type |
Occurs |
Default |
Limits / Accepted Values |
Description |
Type |
Attribute( bdc:lobSystemType) |
0..1 |
Database WebService |
The type of system. |
|
Version |
Attribute (String) |
1..1 |
Same value space as System.Version: major.minor[.build[.revision]] |
The version of the application definition. The Business Data Catalog prevents you from overwriting a system with the same name and a lower version number. |
|
SystemUtility |
Attribute (String) |
0..1 |
Min. length: 1 Max. length: 255 |
Fully qualified name of a type that implements ISystemUtility. Allows extensible LobSystem types, which are not supported in Office SharePoint Server 2007. |
|
ConnectionManager |
Attribute (String) |
0..1 |
Min. length: 1 Max. length: 255 |
Fully qualified name of a type that implements IConnectionManager. Allows extensible LobSystem types, which are not supported in Office SharePoint Server 2007. |
|
EntityInstance |
Attribute (String) |
0..1 |
Min. length: 1 Max. length: 255 |
Fully qualified name of a type that implements IEntityInstance. Allows extensible LobSystem types, which are not supported in Office SharePoint Server 2007. |
|
LobSystemInstances |
Element |
0..1 |
Max. instances per system: 2 |
Container element for LobSystemInstance. |
|
Entities |
Element |
0..1 |
Max. entities per system: 200 |
Container element for Entity. |
|
Associations |
Element |
0..1 |
Max. associations per system: 1000 |
Container element for Association. |
Properties
Following are the properties that the LobSystem object accepts for both database and Web Service systems.
Property |
Type |
Required |
Default Value |
Limits/Accepted Values |
Comments |
---|---|---|---|---|---|
WildcardCharacter |
System.String |
No |
* (asterisk) |
Must not be a null reference (Nothing in Visual Basic) or the empty string. |
Provides a mechanism by which the Business Data Catalog object model can furnish a wildcard character agnostic interface. All users use '*' as a wildcard when writing applications, and the Business Data Catalog transforms that into a system-specific wildcard string. For example, the SQL Server wildcard string is "%" and so for all Database LobSystems, a metadata author would define this property with value '%'. |
WildcardCharacterEscapeFormat |
String |
No |
\{0} |
Must not be a null reference (Nothing in Visual Basic) or the empty string. |
To pass in a literal wildcard character as input to a backend, backend provide various ways of escaping. The Business Data Catalog uses the value in this property as a format string to define an escape format. |
Following are the properties that the LobSystem object accepts for Web Service systems in addition to the properties listed previously.
Property |
Type |
Required |
Default Value |
Limits/Accepted Values |
Comments |
---|---|---|---|---|---|
WsdlFetchUrl |
System.String |
Yes |
None |
URL to a Web service discovery document or WSDL file. |
|
WsdlFetchAuthenticationMode |
Syste Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.WebService.HttpAuthenticationMode |
No |
RevertToSelf |
PassThrough RevertToSelf Credentials WindowsCredentials |
Authentication mode used to fetch the Web services discovery document or WSDL file. |
WsdlFetchSsoProviderImplementation |
System.String |
Yes, if WsdlFetchAuthenticationMode is Credentials or WindowsCredentials |
The name of the SPS SSO provider. |
Fully qualified type name of the ISsoProvider implementation used to fetch the discovery document or WSDL file. |
|
WsdlFetchSsoApplicationId |
System.String |
Yes, if WsdlFetchAuthenticationMode is Credentials or WindowsCredentials |
None |
Fully qualified type name of the ISsoProvider implementation that stores credentials used to fetch the discovery document or WSDL file. |
|
WebServiceProxyNamespace |
System.String |
Yes |
None |
Namespace in which to generate web service proxy classes. |
|
WebServiceProxyProtocol |
System.String |
No |
Soap |
Soap Soap12 HttpPost HttpGet HttpSoap |
Protocol used by the Web service. The default, Soap, is SOAP 1.1. |
WebServiceProxyType |
System.String |
No |
None |
Must subclass HttpWebClientProtocol. |
Fully qualified type name of a type to use instead of the automatically generated Web service proxy. If this property is set, a Web service proxy is not generated. This can be particularly useful when proxy generation fails and it is simpler to manually compile the proxy and install it in the global assembly cache and reference it with this property. If the WebServiceProxyType property is not used, all non-primitive types referenced in TypeDescriptor objects should be referenced from the autogenerated proxy assembly. However, if the WebServiceProxyType is used, and points to a type in an assembly in the global assembly cache, TypeDescriptor types can be used from any assembly. |
WebProxyServerConfiguration |
System.String |
No |
None |
Proxy server URL. Requests to fetch WSDL are routed through this proxy server. |
Examples
The following code example shows you how to create an LobSystem and set connection parameters.
Prerequisites
Ensure a Shared Service Provider is already created.
Replace the constant value EnterYourSSPNameHere in the code with the name of your Shared Resource Provider.
Project References
Add the following Project References in your console application code project before running this sample:
Microsoft.SharePoint
Microsoft.SharePoint.Portal
Microsoft.Office.Server
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Server.ApplicationRegistry.Administration;
using Microsoft.Office.Server.ApplicationRegistry.Infrastructure;
using WSSAdmin = Microsoft.SharePoint.Administration;
using OSSAdmin = Microsoft.Office.Server.Administration;
namespace Microsoft.SDK.SharePointServer.Samples
{
class GetStartedAndCreateSystem
{
const string yourSSPName ="EnterYourSSPNameHere";
static void Main(string[] args)
{
SetupBDC();
CreateLobSystemAndInstance();
Console.WriteLine("Press any key to exit...");
Console.Read();
}
static void SetupBDC()
{
SqlSessionProvider.Instance().SetSharedResourceProviderToUse(yourSSPName);
}
static void CreateLobSystemAndInstance()
{
LobSystem system = ApplicationRegistry.Instance.LobSystems.Create("AdventureWorksSampleFromCode", true, "Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbSystemUtility", "Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbConnectionManager", "Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbEntityInstance");
LobSystemInstance sysInstance = system.LobSystemInstances.Create("AdventureWorksSampleFromCode", true);
sysInstance.Properties.Add("AuthenticationMode", (Int32)Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode.PassThrough);
sysInstance.Properties.Add("DatabaseAccessProvider", (Int32)Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider.SqlServer);
sysInstance.Properties.Add("RdbConnection Data Source", "YourAdvWorks2000ServerNameHere");
sysInstance.Properties.Add("RdbConnection Initial Catalog", "AdventureWorks2000");
sysInstance.Properties.Add("RdbConnection Integrated Security", "SSPI");
sysInstance.Properties.Add("RdbConnection Pooling", "false");
sysInstance.Properties.Add("WildCardCharacter", "%");
sysInstance.Update();
Console.WriteLine("Created a system instance successfully.");
}
}
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Office.Server.ApplicationRegistry.Administration Namespace