I am trying to pass a String Array as a Soap attachment, but am slightly confused over the way to do it.
The javax.activation.DataHandler constructor takes one of three constructors:
public DataHandler(DataSource ds) Creates a DataHandler instance with the specified DataSource.
public DataHandler(java.lang.Object obj, java.lang.String mimeType)
public DataHandler(java.net.URL url) url - a URL object
I two I am interested in is DataHandler(DataSource ds) and DataHandler(java.lang.Object obj, java.lang.String mimeType)
Would I be right in saying that forthe second, I could only pass, an image, a string MimeMultiPart and a transform source since they are the only four with MIME type counterparts. If I am wrong does a Array of String have a MIME type counterpart.
Or do I have to convert my Array of String into a datasource, and if so are there any examples of this. The only examples I have seen use readymafe datasourses such as fileDataSourse and ByteArrayDataSource.
Thanks for any help
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad: