theone_jxm() 非常感谢您,提供的方法.经测试通过.可以随意在两个services之间切换. 感谢.Raptor(猛禽)兄 说的方法,我经测试.当改变URL时出现"interface not supported"的错误.不知是什么原因. 代码如下procedure TForm1.Button1Click(Sender: TObject); beginif radiobutton1.Checked then begin httprio1.URL:=edit2.Text; label1.Caption:=(httprio1 as isoaphello ).GetHello(1); end;if radiobutton2.Checked then begin httprio1.URL:=edit2.Text; label1.Caption:=inttostr((httprio1 as itest2).return_int(1,3)); end;end;
的确出现"interface not supported"的错误。Raptor(猛禽) 大哥不来看看么?
基本上你可以把这三个接口的WSDL都IMPORT进来,生成相应的接口单元,然后将HTTPRIO动态设置为不同的URL再用AS转为相应的接口就可以了
delphi的wsdl import向导为你生成的代理单元让你根本就不需要HTTPRIO控件了(其实代理函数自动生成HTTPRIO)
你说的动态是不是用一个HTTPRIO控件调用多个接口?这个完全没有必要
你们好我在客户端也是用wsdl import生成映射接口然后通过httprio调用接口函数.可在wsdl import生成的unit里的getisoaphello函数里有路径信息(http://10.13.0.33/web_application/soaptest.dll/wsdl/ISoapHello).
这个会影响我程序执行时改变HTTPRIO的URL吗?到底是改变HTTPRIO的URL呢还是改变WSDLLocation呢??
false,//用false,从而用delphi的所谓的URL调用soap,效率高
'http://' + serverIP + strend //这里是你的url,格式是youIP/soap/xxx,你可以随便改这个路径
).test(aa, bb, path);//你的接口函数
感谢.Raptor(猛禽)兄
说的方法,我经测试.当改变URL时出现"interface not supported"的错误.不知是什么原因.
代码如下procedure TForm1.Button1Click(Sender: TObject);
beginif radiobutton1.Checked then
begin
httprio1.URL:=edit2.Text;
label1.Caption:=(httprio1 as isoaphello ).GetHello(1);
end;if radiobutton2.Checked then
begin
httprio1.URL:=edit2.Text;
label1.Caption:=inttostr((httprio1 as itest2).return_int(1,3));
end;end;
不过还是要谢谢你们二位.
谢谢