Example 1  Example 3

Chapter 5: Using Adaptive Server Enterprise Web Services

Example 2

This example invokes a Web method to display stock information within an XML document.

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

1>sp_webservices "add" ,
"http://www.xignite.com/xquotes.asmx?WSDL" , ws
2>go

Fifteen Web methods are mapped to proxy tables. One of these Web methods is named GetQuotes.

Invoke the Web method by selecting the outxml column of the GetQuotes proxy table:

1> SELECT   outxml
FROM     GetQuotes 
WHERE    _inxml  ='<GetQuotes 
xmlns="http://www.xignite.com/services/">
<Symbol>SY</Symbol></GetQuotes>'
2> go

outxml                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           -------------------------------------- ...
<?xml version="1.0" encoding="UTF-8"  ?>
<GetQuotesResponse xmlns= ....>
...
</GetQuotesResponse> 
(1 row affected)




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

View this book as PDF