我使用C# 填寫了提供的 用戶名密碼和域 能請求成功
string userName = "123";
string paw = "123";
WST ws = new WST();
ws.Credentials = new NetworkCredential(userName, paw, "aaa");
string resp =ws.WSTEST("321");
使用delphi 呼叫時 只有設定用戶名密碼的地方
function GetWST_Port(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): WST_Port;
const
defWSDL = '';
defURL = '';
defSvc = 'WST';
defPrt = 'WST_Port';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as WST_Port);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
RIO.HTTPWebNode.UserName := '123';
RIO.HTTPWebNode.Password := '123';
end
else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
還有一個域的 引數怎么設定啊?
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/265733.html
標籤:網絡通信/分布式開發
下一篇:設備鎖定,跪求求大佬幫忙。