Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

CHAPTER 15 XML DB Web Services > Publishing PL/SQL Functions/Procedures

Publishing PL/SQL Functions/Procedures

Let’s learn how to publish PL/SQL functions and procedures as Web Services using the Oracle XML DB Web Services.

Creating PL/SQl Packages and Functions

First, we create a PL/SQL package with the check_transactions() function that checks the transaction data (create_trading_pkg.sql):

CREATE OR REPLACE PACKAGE trading_pkg AS

     FUNCTION check_transactions(p_uname IN VARCHAR2,p_pwd IN VARCHAR2) RETURN XMLType;

END trading_pkg;

/

CREATE OR REPLACE PACKAGE body trading_pkg AS

     FUNCTION check_transactions(p_uname IN VARCHAR2,p_pwd IN VARCHAR2) RETURN XMLType

     AS

          v_out xmltype :=xmltype(‘<null/>’);

          v_md5key raw(16);

     BEGIN

          SELECT c.client_pwd INTO v_md5key FROM client_tbl c WHERE c.username = p_uname;


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint