怎样修改pb中web service代理对象的地址因为里面的web服务地址是在创建对像时就定义好了而且是protect类型,不能修改,怎么样才改?
------解决方案--------------------
SoapConnection conn // Define SoapConnection
syb_currencyexchangeport proxy_obj // Declare proxy
long rVal
real amount
//Define endpoint. You can omit it, if you want to use
//the default endpoint inside proxystring str_endpoint
str_endpoint = "http://services.xmethods.net:80/soap"
conn = create SoapConnection //Instantiated connection
conn.SetOptions("SoapLog=~"C:\mySoapLog.log~"")
// Set trace file to record soap interchange data,
// if string is "", disables the feature
rVal = Conn.CreateInstance(proxy_obj, &
"syb_currencyexchangeport", str_endpoint)
// Create proxy object
try
amount = proxy_obj.getrate("us","japan")
// Invoke service
messagebox("Current Exchange Rate", "One US Dollar"&
+ " is equal to " + string(amount) + " Japanese Yen")
catch ( SoapException e )
messagebox ("Error", "Cannot invoke Web service")
// error handling
end try
destroy conn