Monday, October 11, 2010

My Finger Is Swollen From My Pedicure

Workshop: PL / SQL Web Service Create, set Data Source to the Weblogic Server

order for the web service can be created, should have first made a few steps on the database be. Below you will find a script that performs the following steps complete. To set the Oracle Environments oraenv the Oracle script can be used as follows, the default orcl can be accepted. . oraenv

First, the EMPLOYEES table in the database schema HR HOLIDAYS one column is expanded, which results from the content unfairly divided by 100.
alter table EMPLOYEES add (holidays NUMBER);

update employees set holidays = round (salary/100); commit;



CREATE OR REPLACE PACKAGE AS HR_INFO
(

EMPID IN NUMBER, FIRST NAME OUT VARCHAR2,


LAST NAME OUT VARCHAR2


);
( 
  FIRSTNAME OUT VARCHAR2, 

  LASTNAME OUT VARCHAR2,    HOLIDAYS OUT NUMBER 


); 
/ 

CREATE OR REPLACE PACKAGE BODY HR_INFO AS 
( 

  EMPID IN NUMBER,    FIRSTNAME OUT VARCHAR2, 


  LASTNAME OUT VARCHAR2 
BEGIN 
  select first_name, last_name    into firstname, lastname 

  from employees 

  where employee_id = empid;  END GETHRINFO; 



PROCEDURE GETHRINFO2  ( 
  EMPID IN NUMBER, 

  FIRSTNAME OUT VARCHAR2, 
  HOLIDAYS OUT NUMBER 
BEGIN 


  select first_name, last_name, holidays
from employees where employee_id =
GETHRINFO2 END;

END HR_INFO;

/ These steps are fully implemented by the script
HR_INFO.sql
(~ oracle / workshop). Run it with

sqlplus hr / hr @ HR_INFO.sql can create PL / SQL Web service, Web services generate

0 comments:

Post a Comment