| |
|
| java.lang.Object samples.attachments.TestRef
TestRef | public class TestRef (Code) | | An example of sending an attachment via messages.
The main purpose is to validate the different types of attachment references
by content Id, content location both absolute and relative.
Creates 5 separate attachments referenced differently by a SOAP document.
Each attachment contains a string that is assembled and tested to see if
if the attachments are correctly sent and referenced. Each attachment also
contains a mime header indicating its position and validated on the server
to see if mime headers are correctly sent with attachments.
Sends the same message again however the second attachments are placed in the
stream in reverse to see if they are still referenced ok.
The return SOAP document references a single attachment which is the a Java
serialized vector holding strings to the individual attachments sent.
Demos using attachments directly.
|
Inner Class :static class MemoryOnlyDataSource extends org.apache.axis.attachments.ManagedMemoryDataSource | |
Constructor Summary | |
public | TestRef(Options opts) |
positionHTTPHeader | final public static String positionHTTPHeader(Code) | | |
TestRef | public TestRef(Options opts)(Code) | | |
getAttachmentsFromDir | protected DataHandler[] getAttachmentsFromDir(String dirName)(Code) | | Return an array of datahandlers for each file in the dir.
Parameters: the - name of the directory return an array of datahandlers. |
main | public static void main(String args)(Code) | | Give a single file to send or name a directory
to send an array of attachments of the files in
that directory.
|
testit | public boolean testit() throws Exception(Code) | | This method sends all the files in a directory.
Parameters: The - directory that is the source to send. True if sent and compared. |
|
|
|