SOAPAction: String;
The SOAPAction property determines the SOAPAction header that is sent with request.
The method that will be called by web service on request execution is specified in the SOAPAction header. The header is specified if it is required by the implementation of corresponding web service. By default, the empty string is sent, the executed method is determined by the sent request.
The additional headers can be added to the Headers collection.
Executing the example requires the deployed web service. The service implementations requires explicit sending of executed method in the SOAPAction header.
Add a link to the Net system assembly.
Sub UserProc;
Var
Service: INetHttpService;
Cmd: INetCommand;
HttpCmd: INetHttpCommand;
Request, Response: Variant;
Begin
Service := New NetHttpService.Create;
Service.Url := "http://www.sample.com/InfoServer/Info.asmx";
Cmd := Service.Connect;
HttpCmd.Command := NetHttpCommandType.Post;
HttpCmd.OuterBody := True;
HttpCmd.Headers.Add("Host: www.sample.com");
HttpCmd.SOAPAction := "http://www.sample.com/InfoServer/GetData";
Request := "...Request sending to the server...";
Cmd.Start(Request);
Response := Cmd.Result;
//...
// Further work with obtained response
//...
End Sub UserProc;
The specified example in general shows how parameters for executing examples requiring the SOAPAction header definition are set.
See also: