aspose file tools
The moose likes Web Services and the fly likes Need Help in passing a string Array as a attachment Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Need Help in passing a string Array as a attachment" Watch "Need Help in passing a string Array as a attachment" New topic
Author

Need Help in passing a string Array as a attachment

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 521
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

Tony
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Need Help in passing a string Array as a attachment
 
Similar Threads
sending email attachment file from memory
Is there a size limit on sending data over a soap call
java mail API uses streaming
javax.activation. UnsupportedData TypeException
sending pdf or any attachment from a java webservice to java client using JAX-WS and SAAJ