BusinessDataCatalogSharedServiceClient.ImportPackage Method
Imports the specified BDC model or BDC model resources to the Metadata Store.
Namespace: [BdcAdminService Web service]
Service reference: http://Site/_vti_bin/BdcAdminService.svc
Syntax
'Declaration
Public Function ImportPackage ( _
<OutAttribute> ByRef errors As String(), _
xml As String, _
packageContents As PackageContents, _
adminStruct As AdministrationMetadataCatalogStruct, _
settingId As String, _
callerCultureLcid As Integer, _
updateModel As Boolean _
) As ModelStruct
'Usage
Dim instance As BusinessDataCatalogSharedServiceClient
Dim errors As String()
Dim xml As String
Dim packageContents As PackageContents
Dim adminStruct As AdministrationMetadataCatalogStruct
Dim settingId As String
Dim callerCultureLcid As Integer
Dim updateModel As Boolean
Dim returnValue As ModelStruct
returnValue = instance.ImportPackage(errors, _
xml, packageContents, adminStruct, _
settingId, callerCultureLcid, updateModel)
public ModelStruct ImportPackage(
out string[] errors,
string xml,
PackageContents packageContents,
AdministrationMetadataCatalogStruct adminStruct,
string settingId,
int callerCultureLcid,
bool updateModel
)
Parameters
errors
Type: []A list of noncritical errors that occurred when merging data or reading the XML.
xml
Type: System.StringThe XML representation of the BDC model.
packageContents
Type: Microsoft.SharePoint.BusinessData.Parser.PackageContentsOptions that specify what to import.
adminStruct
Type: Microsoft.SharePoint.BusinessData.SharedService.AdministrationMetadataCatalogStructThe metadata catalog that contains the model that is contained by the metadata model.
settingId
Type: System.StringThe identifier of a partition in the Metadata Store to create properties, localized names, and access control entries in.
callerCultureLcid
Type: System.Int32The LCID of to the locale in which the error messages are to be returned.
updateModel
Type: System.Booleantrue to update the model if it already exists in the Metadata Store; otherwise, false . This parameter is ignored if packageContents does not have the PackageContents.Model value specified.
Return Value
Type: Microsoft.SharePoint.BusinessData.SharedService.ModelStruct
The created model.
Exceptions
Exception | Condition |
---|---|
AccessDeniedExceptionState | A fault exception with AccessDeniedExceptionState as its state is thrown if the security principal is not authorized to perform this operation. |
PackageFormatExceptionState | A fault exception with PackageFormatExceptionState as its state is thrown if the specified metadata model XML format is invalid or an error occurred while importing the BDC model. |
Remarks
The adminStruct parameter required by this method can be obtained by creating a new instance of the AdministrationMetadataCatalogStruct class.
See Also
Reference
BusinessDataCatalogSharedServiceClient Class