我有一個在Delphi 2009上編寫的程序。它使用基於SSL的SOAP over HTTP。因此,觸發HTTP請求的SOAP請求由Microsoft Internet Explorer通過DLL處理。然後MSIE將彈出一個要求登錄的彈出窗口。Delphi XE + SOAP + SSL
但現在我需要在Delphi XE中編譯它,並且我遇到了問題。程序不想在SSL中登錄。根本沒有彈出。所以,似乎觸發器不想工作。
出現在此代碼的第二行中的錯誤:
mantis:=GetMantisConnectPortType(false, mantisurl);
mi := mantis.mc_issue_get(username,password,MantisIssue);
該錯誤是
Project IssueReporter.exe raised exception class ESOAPHTTPException with message 'Authorization Required (401) - 'https://***/mantis/api/soap/mantisconnect.php''.
清單的連接過程是
function GetMantisConnectPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): MantisConnectPortType;
const
defWSDL = 'https://***/mantis/api/soap/mantisconnect.php?wsdl';
defURL = 'https://***/mantis/api/soap/mantisconnect.php';
defSvc = 'MantisConnect';
defPrt = 'MantisConnectPort';
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 MantisConnectPortType);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
mc_issue_get是的一部分
MantisConnectPortType = interface(IInvokable)
一個具有聲明:
function mc_issue_get(const username: string; const password: string; const issue_id: Int64): IssueData; stdcall;
在瀏覽器和舊的exe在2009年編制的工作正常。請幫助解決這個問題。 塔拉斯,基輔
檢查您的證書是他們應該在哪裏...並向我們展示客戶拿到證書的代碼。 – Sam 2011-05-18 05:58:05