我有一个在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