ProfileService.GetProfileDefXML Method (PIA)

Use this method to retrieve the XML definition of the named profile schema type.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Profiles
…
Public Function GetProfileDefXML(bstrProfileName As StringbNamesOnlyAs Boolean,
) As String

[C#]

using Microsoft.CommerceServer.Interop.Profiles;
…
public string GetProfileDefXML(stringbstrProfileName,
  boolbNamesOnly);

Parameters

[Visual Basic .NET]

  • bstrProfileName
    A String that contains the name of the profile schema type.
  • bNamesOnly
    A Boolean that determines whether the method returns the profile schema name or the profile schema definition. A value of False indicates to return the profile definition. A value of True indicates to return only the name of the profile schema.

[C#]

  • bstrProfileName
    A string that contains the name of the profile schema type.
  • bNamesOnly
    A bool that determines whether the method returns the profile schema name or the profile schema definition. A value of false indicates to return the profile definition. A value of true indicates to return only the name of the profile schema.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns a String that contains the XML description.

[C#] This method returns a string containing the XML description.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

The Errors property stores the collection of errors encountered in the last Profiles resource operation if an exception is thrown. For more information, see ProfileService.Errors.

Remarks

If the bstrProfileName parameter is empty and the bNamesOnly parameter is false, the XML descriptions of all the schema types in the catalog are returned.

If the bstrProfileName parameter is empty and the bNamesOnly parameter is true, the names of all the schema types in the catalog are returned.

Call the Initialize method before you use this ProfileService method.

[Visual Basic .NET]

Example

' sXML is a String
' oProfileService is a Commerce ProfileService object

sXML = oProfileService.GetProfileDefXML("UserObject", False)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Profiles

Platforms: Windows 2000, Windows Server 2003

Assembly: mscsupslib (in mscsupslib.dll)

See Also

ProfileService Class

Profile XML Structures

Copyright © 2005 Microsoft Corporation.
All rights reserved.