Método CreateResource
Adiciona um novo recurso a uma biblioteca do SharePoint.
Namespace: ReportService2006
Assembly: ReportService2006 (em ReportService2006.dll)
Sintaxe
'Declaração
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/CreateResource", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Function CreateResource ( _
Resource As String, _
Parent As String, _
Overwrite As Boolean, _
Contents As Byte(), _
MimeType As String, _
Properties As Property() _
) As CatalogItem
'Uso
Dim instance As ReportingService2006
Dim Resource As String
Dim Parent As String
Dim Overwrite As Boolean
Dim Contents As Byte()
Dim MimeType As String
Dim Properties As Property()
Dim returnValue As CatalogItem
returnValue = instance.CreateResource(Resource, _
Parent, Overwrite, Contents, MimeType, _
Properties)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/CreateResource", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public CatalogItem CreateResource(
string Resource,
string Parent,
bool Overwrite,
byte[] Contents,
string MimeType,
Property[] Properties
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/CreateResource", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
CatalogItem^ CreateResource(
String^ Resource,
String^ Parent,
bool Overwrite,
array<unsigned char>^ Contents,
String^ MimeType,
array<Property^>^ Properties
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/CreateResource", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member CreateResource :
Resource:string *
Parent:string *
Overwrite:bool *
Contents:byte[] *
MimeType:string *
Properties:Property[] -> CatalogItem
public function CreateResource(
Resource : String,
Parent : String,
Overwrite : boolean,
Contents : byte[],
MimeType : String,
Properties : Property[]
) : CatalogItem
Parâmetros
- Resource
Tipo: System. . :: . .String
O nome do novo recurso.
- Parent
Tipo: System. . :: . .String
A URL totalmente qualificada da pasta pai que conterá o recurso.
- Overwrite
Tipo: System. . :: . .Boolean
Uma expressão Booliana que especifica se um recurso existente com o mesmo nome e caminho deve ser substituído. O valor padrão é false.
- Contents
Tipo: array<System. . :: . .Byte> [] () [] []
O conteúdo do arquivo de recurso.
- MimeType
Tipo: System. . :: . .String
O tipo MIME do recurso. O tamanho máximo é 260 caracteres.
- Properties
Tipo: array<ReportService2006. . :: . .Property> [] () [] []
Uma matriz de objetos Property que define os nomes e os valores de propriedades a serem definidos para o recurso.
Valor de retorno
Tipo: ReportService2006. . :: . .CatalogItem
Um objeto CatalogItem do recurso recém-criado.
Comentários
The table below shows header and permissions information on this operation.
SOAP Headers |
(Out) ServerInfoHeaderValue |
Required Permissions |
Creating a new resource: AddListItems()()()() on Parent Updating an existing resource: EditListItems()()()() on Resource |
The length of the Parent parameter cannot exceed 260 characters; otherwise, a SOAP exception is thrown with the error code rsItemLengthExceeded.
The Parent parameter cannot be null or empty or contain the following reserved characters: : ? ; @ & = + $ , \ * > < | . ". You can use the forward slash character (/) to separate items in the full path name of the folder, but you cannot use it at the end of the folder name.
If errors occur, the resource is not created.
Adding a resource to a SharePoint library modifies the ModifiedBy and ModifiedDate properties of the parent folder.