LobSystem Class

NOTE: This API is now obsolete.

Represents a source of business data, business logic, or both. SAP R/3 IDES, Siebel 7.5, and AdventureWorks SQL Server 2000 sample database are examples of LobSystem objects.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Server.ApplicationRegistry.MetadataModel.MetadataObject
    Microsoft.Office.Server.ApplicationRegistry.MetadataModel.LobSystem

Namespace:  Microsoft.Office.Server.ApplicationRegistry.MetadataModel
Assembly:  Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Syntax

'Declaration
<ObsoleteAttribute("O12 Application Registry API is deprecated. Please use BusinessData.",  _
    False)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class LobSystem _
    Inherits MetadataObject
'Usage
Dim instance As LobSystem
[ObsoleteAttribute("O12 Application Registry API is deprecated. Please use BusinessData.", 
    false)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class LobSystem : MetadataObject

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

This example shows how to browse the metadata repository and get an LobSystem object and an Entity object.

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.

  • Make sure the LobSystem object and entity names referenced in the example exist in the Business Data Catalog. Use valid names.

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 System.Data;
using Microsoft.Office.Server.ApplicationRegistry.MetadataModel;
using Microsoft.Office.Server.ApplicationRegistry.Runtime;
using Microsoft.Office.Server.ApplicationRegistry.SystemSpecific;
using Microsoft.Office.Server.ApplicationRegistry.Infrastructure;
using WSSAdmin = Microsoft.SharePoint.Administration;
using OSSAdmin = Microsoft.Office.Server.Administration;

namespace Microsoft.SDK.SharePointServer.Samples
{
    class GetSystemAndEntity
    {
        const string yourSSPName = "EnterYourSSPNameHere";

        static void Main(string[] args)
        {
            SetupBDC();
            DisplayLOBSystemsinBDC();
            GetLOBSystem();
            GetEntity();
            Console.WriteLine("Press any key to exit...");
            Console.Read();
        }
        static void SetupBDC()
        {
            SqlSessionProvider.Instance().SetSharedResourceProviderToUse(yourSSPName);
        }
        static void DisplayLOBSystemsinBDC()
        {
            NamedLobSystemInstanceDictionary sysInstances = ApplicationRegistry.GetLobSystemInstances();
            Console.WriteLine("Listing system instances...");
            foreach (String name in sysInstances.Keys)
            {
                Console.WriteLine(name);
            }
        }
        static void GetLOBSystem()
        {
            NamedLobSystemInstanceDictionary sysInstances = ApplicationRegistry.GetLobSystemInstances();
            LobSystemInstance AdvWorksIns = sysInstances["AdventureWorksSampleInstance"];
            Console.WriteLine("Getting a system instance and displaying its ID...");
            LobSystem AdvWorksSys = AdvWorksIns.GetLobSystem();
            Console.WriteLine(AdvWorksSys.Name.ToString());
            Console.WriteLine("ID: "+AdvWorksSys.Id.ToString());
        }

        static void GetEntity()
        {
            NamedLobSystemInstanceDictionary sysInstances = ApplicationRegistry.GetLobSystemInstances();
            LobSystemInstance AdvWorksIns = sysInstances["AdventureWorksSampleInstance"];
            Console.WriteLine("Getting an entity object and displaying its ID...");
            Entity prodEntity = AdvWorksIns.GetEntities()["Product"];
            Console.WriteLine(prodEntity.Name.ToString());
            Console.WriteLine("ID: "+prodEntity.Id.ToString());
        }

    }
}

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

LobSystem Members

Microsoft.Office.Server.ApplicationRegistry.MetadataModel Namespace