合作伙伴写了一些处理逻辑在WebService中,wsdl地址为:https://114.255.245.64:8080/Crm/services/clienttrade?wsdl
我用delphi新建一个WebService的WSDL Import,生成一个文件后,调用报错,谁能帮忙:
调用:
procedure TForm1.btn2Click(Sender: TObject);
var
x: THTTPRIO; InterfaceVariable: clienttradePortType;
begin
X :=THTTPRio.Create(Application);
x.HTTPWebNode.UseUTF8InHeader:=true;
x.WSDLLocation:= 'https://114.255.245.64:8080/Crm/services/clienttrade?wsdl';
InterfaceVariable := X as clienttradePortType;
showmessage(InterfaceVariable.SayHello);
end;
报错信息有时是“证书作者不支持。。”、“Empty Document"
郁闷。另外,在WSDL Import导入的时候,点击Next有时会出现:
Unable to load WSDL File/Location: https://114.255.245.64:8080/Crm/services/clienttrade?wsdl. Error [灾难性故障].
我用delphi新建一个WebService的WSDL Import,生成一个文件后,调用报错,谁能帮忙:
调用:
procedure TForm1.btn2Click(Sender: TObject);
var
x: THTTPRIO; InterfaceVariable: clienttradePortType;
begin
X :=THTTPRio.Create(Application);
x.HTTPWebNode.UseUTF8InHeader:=true;
x.WSDLLocation:= 'https://114.255.245.64:8080/Crm/services/clienttrade?wsdl';
InterfaceVariable := X as clienttradePortType;
showmessage(InterfaceVariable.SayHello);
end;
报错信息有时是“证书作者不支持。。”、“Empty Document"
郁闷。另外,在WSDL Import导入的时候,点击Next有时会出现:
Unable to load WSDL File/Location: https://114.255.245.64:8080/Crm/services/clienttrade?wsdl. Error [灾难性故障].
解决方案 »
- 散分,祝华仔和所有D版的兄弟每天都有好心情,11:30结贴
- 如何在dbgrid中一次输入多条记录?
- 关于mediaplayer控件的问题
- (着急的n次方)怎么就没有人能够给我说明白呢!
- 为什么我的QR只显示一条记录啊
- 关于能进行“网络会议”软件有关问题的寻问(SOS)
- 用盗版软件做正版软件?
- 在用qrrichtext赋值打印的时候,后面总是要空行,如何去掉这些空行
- QUICKREPORT在以设为自定义纸张不能在WINDOWS98/ME中使用,只能在WINDOWS2000中用。怎么解决?
- 请教:MIDAS的概念是什么,起什么作用的呢?
- 很有意思的问题,怎么隐藏其它程序的进程~100分
- delphi如何遍历数据表?用delphi语句如何写
请参考,
就这么调用GetOrlServicePortType.GetPorts()
unit OrlWebService;interfaceuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;type
OrlServicePortType = interface(IInvokable)
['{76B1606E-9B05-4FE0-AD1E-55393C25E5BB}']
function GetPorts(const userName: WideString; const password: WideString): WideString; stdcall;
end;function GetOrlServicePortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): OrlServicePortType;implementationfunction GetOrlServicePortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): OrlServicePortType;
const
defWSDL = 'http://192.168.1.27:8080/axis2/services/OrlService?wsdl';
defURL = 'http://192.168.1.27:8080/axis2/services/OrlService';
defSvc = 'OrlService';
defPrt = 'OrlServicePortType';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
begin
RIO := THTTPRIO.Create(nil);
end
else
RIO := HTTPRIO;
try Result := (RIO as OrlServicePortType);
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;initialization
InvRegistry.RegisterInterface(TypeInfo(OrlServicePortType), 'http://service.nineOrl.com', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(OrlServicePortType), '');
InvRegistry.RegisterInvokeOptions(TypeInfo(OrlServicePortType), ioDocument);
end.