Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » QAnywhere » 移动 Web 服务 » 发出 Web 服务请求

 

同步 Web 服务请求

在应用程序被连接至网络时使用同步 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 );