INetCommand.Start

Syntax

Start(Var Value: Variant);

Parameters

Value. Data or request sent to network resource for processing.

Description

The Start method initializes sending of the request to network resource.

Comments

On executing POST requests in the Value parameter the SOAP request is specified that will be processed by server.

On executing GET requests in the Value parameter the empty string can be sent and execution parameters are specified in network resource URL string.

On finishing request execution, the result will be available in the Result property.

Example

Executing the example requires the deployed Foresight Analytics Platform BI server.

Add a link to the Net system assembly.

Sub UserProc;
Var
    Service: INetHttpService;
    Cmd: INetCommand;
    HttpCmd: INetHttpCommand;
    Request: Variant;
    Response, Id: string;
Begin
    Service := 
New NetHttpService.Create;
    Service.Url := 
"http://localhost:9090/axis2/services/PP.SOM.Som";
    Cmd := Service.Connect;
    HttpCmd := Cmd 
As INetHttpCommand;
    HttpCmd.Command := NetHttpCommandType.Post;
    HttpCmd.AcceptLanguage := 
"ru";
    Request := 
"<OpenMetabase>" +
        
"<tDef><id>griva_p5</id></tDef>" +
        
"<tCreds><user><id>sa</id></user><pass>Qwerty1</pass></tCreds>" +
        
"</OpenMetabase>" ;
    Cmd.Start(Request);
    Response := Cmd.Result 
As String;
    Id := Response.SubString(Response.IndexOf(
"<id>") + 4, Response.IndexOf("</id>") - Response.IndexOf("<id>") - 4);
    Debug.WriteLine(Id);
    Request := 
"<CloseMetabase><tMb><id>" + id + "</id></tMb></CloseMetabase>";
    Cmd.Start(Request);
End Sub UserProc;

On executing the example, BI server connection is established. Request to open connection with repository will be sent to BI server, the obtained connection moniker will be displayed to the development environment console. After that the request to open repository connection is sent.

See also:

INetCommand