java.lang.Object
samples.attachments.EchoAttachment
- public class EchoAttachment
- extends java.lang.Object
An example of sending an attachment via RPC.
This class has a main method that beside the standard arguments
allows you to specify an attachment that will be sent to a
service which will then send it back.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
opts
org.apache.axis.utils.Options opts
EchoAttachment
public EchoAttachment(org.apache.axis.utils.Options opts)
echo
public boolean echo(boolean doTheDIME,
java.lang.String filename)
throws java.lang.Exception
- This method sends a file as an attachment then
receives it as a return. The returned file is
compared to the source.
echoDir
public boolean echoDir(boolean doTheDIME,
java.lang.String filename)
throws java.lang.Exception
- This method sends all the files in a directory.
main
public static void main(java.lang.String[] args)
- Give a single file to send or name a directory
to send an array of attachments of the files in
that directory.
compareFiles
protected boolean compareFiles(java.lang.String one,
java.lang.String other)
throws java.io.FileNotFoundException,
java.io.IOException
- Quick and unsophisticated method to compare two file's
byte stream.
getAttachmentsFromDir
protected javax.activation.DataHandler[] getAttachmentsFromDir(java.lang.String dirName)
- Return an array of datahandlers for each file in the dir.
echoUsingSAAJ
public boolean echoUsingSAAJ(java.lang.String filename)
throws java.lang.Exception
- This method sends a file as an attachment then
receives it as a return. The returned file is
compared to the source. Uses SAAJ API.