Welcome to Dream.In.Code
Getting Java Help is Easy!

Join 136,467 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,545 people online right now. Registration is fast and FREE... Join Now!




How to do a Java program that can FAX?

 
Reply to this topicStart new topic

How to do a Java program that can FAX?

fsloke
30 Jun, 2008 - 11:05 PM
Post #1

D.I.C Regular
***

Joined: 19 Dec, 2007
Posts: 255



Thanked: 3 times
My Contributions
Where to find the code for Fax machine?

Thank you
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: How To Do A Java Program That Can FAX?
30 Jun, 2008 - 11:06 PM
Post #2

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,463



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
QUOTE(fsloke @ 1 Jul, 2008 - 03:05 AM) *

Where to find the code for Fax machine?


--> Google <--

I did a search for Java Fax Machine.

User is online!Profile CardPM
+Quote Post

fsloke
RE: How To Do A Java Program That Can FAX?
6 Jul, 2008 - 08:32 PM
Post #3

D.I.C Regular
***

Joined: 19 Dec, 2007
Posts: 255



Thanked: 3 times
My Contributions
Why fax machine code need the username and password?

Since the fax machine only know the telephone number....

smile.gif

CODE

class TestFax {  public static void main(String[] args) throws Exception
{
try {

    long result;
    // Create an instance of the Web Service Object
    InterFaxSoapStub ifs = new InterFaxSoapStub(new URL("http://ws.interfax.net/DFS.asmx"), new Service(new QName("SendCharFax")));

    // Invoke the SendCharFax method
    result = ifs.sendCharFax("MyUserName", "MyPassword", "+1-212-4567890", "This is a sample fax", "TXT");

    if (result > 0)

    // Positive returned value indicates that the fax was sent successfully.
    // The return value is the Transaction ID.
    System.out.println("Fax submitted properly. Transaction number: " + result);
    else
    // Negative returned value indicates sending failure.
    // See error code definitions
    System.out.println("Error sending fax!");

    } catch (Exception e) {
    System.out.println(e.toString());

    }
  }
}


This post has been edited by fsloke: 6 Jul, 2008 - 08:36 PM
User is offlineProfile CardPM
+Quote Post

pbl
RE: How To Do A Java Program That Can FAX?
6 Jul, 2008 - 08:47 PM
Post #4

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,110



Thanked: 202 times
Dream Kudos: 75
My Contributions
QUOTE(fsloke @ 6 Jul, 2008 - 09:32 PM) *

Why fax machine code need the username and password?

What do you think ? FAX providers will do it for you free of charge ?
You'll have to register so you need a username and a password and with this account (for which you pay) you are allowed to a certain number of FAX every month
User is offlineProfile CardPM
+Quote Post

fsloke
RE: How To Do A Java Program That Can FAX?
7 Jul, 2008 - 07:53 AM
Post #5

D.I.C Regular
***

Joined: 19 Dec, 2007
Posts: 255



Thanked: 3 times
My Contributions
OMG I want FREE FAX Provider!!!

Come on please... sad.gif

I search around but still not found anything about fax....

all is demo type .... sad.gif
User is offlineProfile CardPM
+Quote Post

pbl
RE: How To Do A Java Program That Can FAX?
7 Jul, 2008 - 03:41 PM
Post #6

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,110



Thanked: 202 times
Dream Kudos: 75
My Contributions
QUOTE(fsloke @ 7 Jul, 2008 - 08:53 AM) *

OMG I want FREE FAX Provider!!!

Come on please... sad.gif

I search around but still not found anything about fax....

all is demo type .... sad.gif


You didn't click on the good topics in Google.

Google Java Fax Machine

will give you:
- list of providers that offer Internet Fax Machine (usually in exchange of financial retributions)
- java libraries to send fax that you can download (some free some not) (few of the free with source code)

So I guess you cliked on the first type






User is offlineProfile CardPM
+Quote Post

pbl
RE: How To Do A Java Program That Can FAX?
7 Jul, 2008 - 07:46 PM
Post #7

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,110



Thanked: 202 times
Dream Kudos: 75
My Contributions
Just thinking about it...

If you are one Windows did you look at the possibility of printing on the FaxPrinter ?
User is offlineProfile CardPM
+Quote Post

pbl
RE: How To Do A Java Program That Can FAX?
8 Jul, 2008 - 05:30 PM
Post #8

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,110



Thanked: 202 times
Dream Kudos: 75
My Contributions
QUOTE(pbl @ 7 Jul, 2008 - 04:41 PM) *

QUOTE(fsloke @ 7 Jul, 2008 - 08:53 AM) *

OMG I want FREE FAX Provider!!!

Come on please... sad.gif

I search around but still not found anything about fax....

all is demo type .... sad.gif


You didn't click on the good topics in Google.

Google Java Fax Machine

will give you:
- list of providers that offer Internet Fax Machine (usually in exchange of financial retributions)
- java libraries to send fax that you can download (some free some not) (few of the free with source code)

So I guess you cliked on the first type


Did a few searches for you... not as easier as I though
There are a few for Linux not for Windows....
Seems that it is a complicated problem
Most people use an OpenSolution (free) hylafax written in C++ which has multiple Java client as GFax... but this for Linux
I guess Windows FaxPrinter is a better approach
User is offlineProfile CardPM
+Quote Post

fsloke
RE: How To Do A Java Program That Can FAX?
8 Jul, 2008 - 07:54 PM
Post #9

D.I.C Regular
***

Joined: 19 Dec, 2007
Posts: 255



Thanked: 3 times
My Contributions
Hylafax is Linux sad.gif

Thank pbl

But my user only know how to use window application...

My server also all in WIndow, none of them in Linux.

If still cannot, I think I will format the pc to Linux pc.

Can Hylafax/ Fax Printer do logging/ reporting => who fax at what time?
User is offlineProfile CardPM
+Quote Post

pbl
RE: How To Do A Java Program That Can FAX?
8 Jul, 2008 - 08:12 PM
Post #10

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,110



Thanked: 202 times
Dream Kudos: 75
My Contributions
QUOTE(fsloke @ 8 Jul, 2008 - 08:54 PM) *

Hylafax is Linux sad.gif

Thank pbl

But my user only know how to use window application...

My server also all in WIndow, none of them in Linux.

If still cannot, I think I will format the pc to Linux pc.

Can Hylafax/ Fax Printer do logging/ reporting => who fax at what time?

Yes it does but...

Really sorry to let you do all these researches... my apologies
It seems that sending a Fax is a lot more complicated than it looks at first approach... (Than I think it looks at first approach)... my mistake)
I think that the modem handle really needs native functions (not methods [to use these C== guys terminology]) not available in Java.

I found an Open project working on Fax for Java. Not completed yet. If you join the project, you'll have access to the already completed code... and so you can contribute. But if your boss said "I want to be abble to send a Fax from my application this Friday" this is not a viable approach.

Before turning your office all the way around (moving from Windows to Linux [nothing against Linux]) I think you should look at commercial applications (email to fax) there are a few at less than $ 100.00. Some are free if you send less than a certain number of Faxes per month.

Hope this help... but my recommendation to your boss will be:
"Before you start to fool around (spending your valuable time) on Linux, which you may not know, look at commercial alternative, it will end up costing you less.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 05:20PM

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month