7 Replies Latest reply on Jul 11, 2013 12:38 PM by Billy~Verreynne

    how to write a procedure for sending fax


      how to write a procedure for sending fax for example in oracle apex

        • 1. Re: how to write a procedure for sending fax

          Please read the FAQ:


          Re: 2. How do I ask a question on the forums?


          You have not supplied enough information for people to be able to help you.

          • 2. Re: how to write a procedure for sending fax

            found thread for sending sms and email from oracle apex but is it possible to send fax through oracle apex, with oracle apex 4.1 and database 11g xe

            • 3. Re: how to write a procedure for sending fax
              Brian Bontrager

              In my experience, faxing is generally handled by additional software (such as RightFax)  or online services (efax.com).  You would write an interface to whichever fax software or service you use.  The solution is entirely dependent on your fax software/service.


              (Disclaimer: I have no relationship with either company mentioned; they are the first software and service that came to mind.  efax.com appears to have an email interface, so if you can send email you can send a fax - I imaging other online services provide this as well)

              • 4. Re: how to write a procedure for sending fax

                i have write this procedure  and pl/sql wrapper for java  procedure status valid but java code showing invalid can anybody help



                import net.interfax.outbound.SendCharFax;

                import net.interfax.outbound.SendCharFaxResponse;



                public class HelloWorldExample6 {



                    static String USERNAME = "neha";  //dummy

                    static String PASSWORD = "apex"; //dummy

                    static String FAX_NUMBER = "+12125554874 ";

                    static String TEXT_TO_FAX = "My text goes here";




                    public static void main(String[] anArgs) {

                        try {

                            net.interfax.outbound.InterFaxSoapStub theBinding = (net.interfax.outbound.InterFaxSoapStub)new net.interfax.outbound.InterFaxLocator().getInterFaxSoap();


                            System.out.println("Sending Fax using sendCharFax()");

                            SendCharFax theParams = new SendCharFax(USERNAME,





                            SendCharFaxResponse theResponse = theBinding.sendCharFax(theParams);


                            long theReturnCode = theResponse.getSendCharFaxResult();

                            System.out.println("sendCharFax() call returned with code: " + theReturnCode);

                        } catch (Exception e) {









                create or replace PROCEDURE HELLO_WORLD4

                AS LANGUAGE

                JAVA NAME  'HelloWorldExample6.main( java.lang.String[])';




                i have read we can wrap pl/sql around java for sending fax



                for java fax query used




                loaded Interfax.jar file also by loadjava Interfax.jar


                to see status in apex

                select * from all_objects where object_type like '%JAVA%';

                • 5. Re: how to write a procedure for sending fax

                  Your Java code uses classes that need to exist in Oracle. Does it? Can it step outside of the JVM sandbox to communicate with the fax device? Is this device connected to the Oracle server? Is the device driver interface to the fax device working?


                  Java. Write once. Debug everywhere.

                  • 6. Re: how to write a procedure for sending fax

                    Yes having query about same can this classes be loaded in oracle by any means?


                    normal pl/sql wrapper for java query is running in oracle


                    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "HelloWorldExample"


                    public class HelloWorldExample


                    HelloWorldExample hello;


                    public HelloWorldExample()


                    hello = new HelloWorldExample();


                    public static void sayHello(String forename, String surname

                      , String outString[])


                    outString[0] = "HELLO WORLD more specifically hello" + forename

                      + " " + surname;


                    public static void main(String[] args)


                    //no method




                    show errors java source "HelloWorldExample";

                    /You should see :


                    AND COMPILE Compiled.
                    No Errors.

                    Step 2: Create a pl/sql call spec/wrapper

                    order to use your Java method from Apex or PL/SQL you must create a
                    pl/sql call specification wrapper round each Java method you wish to run
                    from PL/SQL. 



                    Again copy and past the following code into sqlplus/sqldeveloper:

                    CREATE OR REPLACE PROCEDURE HELLO_WORLD(p1_forename in VARCHAR2
                    , p2_surname in varchar2, p3_outString out varchar2)
                    JAVA NAME  'HelloWorldExample.sayHello(java.lang.String
                    , java.lang.String , java.lang.String[])';
                    show err;

                    Step 3: Execute to test


                    Executing this Hello World example is
                    as easy as declaring an anonymous block and calling the method from
                    within within. For example:

                    p_forename varchar2(4000) := 'KRISTIAN';
                    p_surname  varchar2(4000) := 'JONES';
                    p_msg      varchar2(4000) := null;
                    hello_world(p_forename, p_surname, p_msg);



                    Again if completed correctly you will see :


                    Anonymous block completed
                    HELLO WORLD more specifically hello KRISTIAN JONES
                    • 7. Re: how to write a procedure for sending fax

                      How does this example prove that the Fax Java class should work? All the example shows is basic Java code being able to compile and execute. As expected.


                      If you want to use a Java class that is not included by default by Oracle, you need to familiarise yourself with the limitations and restrictions of the Oracle database Java VM, how to load and test new classes - and as that Java class communicates with a fax device (via RS323?), that device needs to be attached to the database server, and server o/s and device correctly configured for use.


                      None of which has anything to do with the subject matter of this forum - the SQL and PL/SQL languages.