在应用程序被连接至网络时使用同步 Web 服务请求。使用此方法,通过调用服务绑定类中的方法来发出 Web 服务请求,且仅当已接收到来自服务器的 Web 服务响应时才返回结果。
下面的示例发出请求以获得美元对加元的汇率:
//C# double r = service.ConversionRate( Currency.USD, Currency.CAD ); // Java double r = service.conversionRate( NET.webserviceX.Currency.USD, NET.webserviceX.Currency.CAD ); |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |