Invoking a Web service  Example 2

Chapter 5: Using Adaptive Server Enterprise Web Services

Example 1

This example invokes an RPC/encoded Web method to display stock information.

Use the add option of sp_webservices to map Web methods to proxy tables:

1>sp_webservices "add" ,
"http://webservices.try.sybase.com/web/services/StockQuotes?wsdl" , ws
2>go

Two Web methods are mapped to proxy tables. One of these Web methods is named getQuote.

Invoke the Web method by selecting from the proxy table:

1> SELECT * 
FROM getQuote 
WHERE _symbol = 'SY'
2> go

getQuoteReturn     _symbol
--------------     -------
22.480000          SY
(1 row affected)




Copyright © 2004. Sybase Inc. All rights reserved. Example 2

View this book as PDF