以下是WSDL产生的框架代码function GetCommonWebServicePortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): CommonWebServicePortType;
const
defWSDL = 'C:\Documents and Settings\Administrator\桌面\CommonWebService.xml';
defURL = 'http://localhost:8080/xxx/service/CommonWebService';
defSvc = 'CommonWebService';
defPrt = 'CommonWebServiceHttpPort';
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; RIO.HTTPWebNode.ConnectTimeout := 10000; //<<--该句是我加的 try
Result := (RIO as CommonWebServicePortType); 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;如上,当我使用RIO.HTTPWebNode.ConnectTimeout设置SOAP超时时,弹出错误“传递给系统调用的数据区域太小”,去GOOGLE也一无所获,只得求助CSDN高手了。
const
defWSDL = 'C:\Documents and Settings\Administrator\桌面\CommonWebService.xml';
defURL = 'http://localhost:8080/xxx/service/CommonWebService';
defSvc = 'CommonWebService';
defPrt = 'CommonWebServiceHttpPort';
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; RIO.HTTPWebNode.ConnectTimeout := 10000; //<<--该句是我加的 try
Result := (RIO as CommonWebServicePortType); 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;如上,当我使用RIO.HTTPWebNode.ConnectTimeout设置SOAP超时时,弹出错误“传递给系统调用的数据区域太小”,去GOOGLE也一无所获,只得求助CSDN高手了。
解决方案 »
- delphi 为什么TStrings 点后不显示属性什么的?
- delphi 生成新窗口的问题
- 请问DELPHI里有没有选择覆盖(override)父类方法的功能
- 怎么查看Dll库中的函数?
- 数据库路径错误
- 一个控件,在D6下编译,安装使用皆正确,在D5下编译,安装后,使用时出错:XXXFONT.Charset prOperty nOt exist!
- ExpressQuantum 系列门产品开发技术专区(大家有好的意见问题在这里提)
- 'printer is not currently printing ' 这个错误怎么回事,怎么解决??
- 请大家帮忙分析我这个程序为什么老是把电脑给搞掉线----求助!....
- 在qq用iplocate就可知道对方的ip地址, iplocate在哪儿可以下载,穷鬼问的问题
- 收藏一个 DBDateTimePicker
- 请问在delphi 7里如何隐藏PageControl控件的tabsheet标签?
我只想改变Webservice发送超时设置,没有使用参数传入,是函数内Create的,我试过,即使做参数传入,也无法改变超时设置。