Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sending SMS through Java in Database

User_SepFeb 28 2013 — edited Feb 28 2013
Hi,


I got a set of java codes for sending sms from the below blog,

Object SMS - send and receive SMS
from GSM card SIM with JAVA
Communication API
By FRANCK ANDRIANO on Sunday 27 January 2008, 14:01 -
serial comm - Permalink

I can succesfully send the sms through java.

Now i need to call the java program in 10g Databse.

I used the syntax, @'E:\Gsm.java'; to call my code from my local machine to the database.

The next step I did is, (Created a function, by calling the Java Class followed by the executing method)

CREATE OR REPLACE FUNCTION SEND$GSM (
"P_NM" IN VARCHAR2,
"P_SCNM" IN VARCHAR2,
"P_MSG" IN VARCHAR2
)
RETURN VARCHAR2
IS
LANGUAGE JAVA
NAME 'Gsm.param(java.lang.String,
java.lang.String,
java.lang.String) return java.lang.String';

Now am trying to pass the parameters, in sql as shown below,


SET SERVEROUTPUT ON;
declare
TEMP varchar2(20);
begin
SEND$GSM('91XXXXXXXXXX', '91XXXXXXXXXX', 'TestMessage');
DBMS_OUTPUT.PUT_LINE(TEMP);
end;

Now am getting the output as "Success", but I never received any sms.

Any ideas?

-regards
raka
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2013
Added on Feb 28 2013
1 comment
210 views