LoginResponse=class; {" http://server.cdt.com "}
The login=class; {" http://server.cdt.com "}
The login=class (TRemotable)
Private
FstrDeviceId: WideString;
FstrDeviceKey: WideString;
Published
The property strDeviceId: WideString read FstrDeviceId write FstrDeviceId;
The property strDeviceKey: WideString read FstrDeviceKey write FstrDeviceKey;
end;
HTSAPServer=interface (IInvokable)
Function the login (const parameters: login) : loginResponse. Stdcall;
Initialization
InvRegistry. RegisterInterface (TypeInfo (HTSAPServer), 'http://server.cdt.com', 'utf-8');
InvRegistry. RegisterInvokeOptions (TypeInfo (HTSAPServer), ioDocument);//jia
InvRegistry. RegisterDefaultSOAPAction (TypeInfo (HTSAPServer), ");
RemClassRegistry. RegisterXSClass (login, 'http://server.cdt.com', 'login');
///call the login function below error, who helped write down how to call?
Procedure TForm1. Btn1Click (Sender: TObject);
Var
LginRse: loginResponse;
Login1: login;
The begin
Login1:=login. Create;
LginRse:=loginResponse. Create;
Login1. StrDeviceId:='123456';
Login1. StrDeviceKey:='1234567890';
Try
LginRse:=(htpr1 as HTSAPServer). The login (login1);
Mmo1. Text:=lginRse. Return;
The finally
Login1. Free;
LginRse. Free;
end;
end;
CodePudding user response:
An error found http://schemas.xmlsoap.org/wsdl/:definitionsCodePudding user response:
Expected error http://schemas.xmlsoap.org/soap/envelope/:Envelope