I'm looking the solutions that can do integration between the PHP and Delphi Soap Server. I want to send a file into Delphi SOAP Server via PHP Soap Client. The Delphi server code will be invoked using the TSoapAttachment and the sample code is below :-
Ttextminesvc = class(TInvokableClass, Itextminesvc)
public
.....
protected
function UploadFile(afilename: string; afile: TSoapAttachment): Boolean;
stdcall;
.......
function Ttextminesvc.UploadFile(afilename: string; afile: TSoapAttachment): Boolean;
var ffilename: string;
const pathdir = 'C:\tmp';
begin
result := false;
ffilename := pathdir + afilename;
try
if not directoryexists(pathdir) then
ForceDirectories(pathdir);
except
raise Exception.Create('Unable to create repository directory on the server.');
end;
try
if not fileexists(ffilename) then
begin
afile.SaveToFile(ffilename);
result := true;
end;
except
result := false;
end;
end;
Thanks