基于Web Service数据源的数据窗口如何修改WSDL
我做了一个基于Web Service数据源的数据窗口,在向导中指定了WSDL File Name。
http://10.67.121.2:8278/tfdspub/services/Tfdspub?wsdl,可以正常取到数据。
可是到了现场以后,需要从不同的机器上取数据,
例如:http://10.67.121.2、http://10.67.121.3、http://10.67.121.4
请问能否动态的修改数据窗口中的WSDL的值?如何修改?
注:这几台机器中的Web Service的内容是一样的。
[解决办法]
我试了一下这样写代码是可以的。
并且,如果出错,在wserror 事件里可以获取错误信息:
dw_1.reset()
messagebox('', 'begin')
int ii_return
wsconnection ws_1
ws_1 = create wsconnection
ws_1.username = "johndoe"
ws_1.password = "mypassword"
ws_1.endpoint = "http://192.168.1.99/aeupms_ws/n_aeupms_ws.asmx?WSDL"
ws_1.authenticationmode = "basic"
ws_1.usewindowsintegratedauthentication = true
ii_return = dw_1.setwsobject (ws_1)
dw_1.retrieve()