Hi Rakesh,
I had the same problem and had solved it, with the same thought like you. On
the client side you can serialize your class in to file and send it as an
attachment.
//Create the ser File with your Object which you want to serialize
FileOutputStream fos = new FileOutputStream("data.ser");
ObjectOutputStream oos = new ObjectOutputStream(fos);
XSLTProcessorService xsltPS = new YourConcreteClass ();
oos.writeObject(xsltPS);
oos.close();
//Create the DataHandler Object with the ser File
DataHandler dhSource = new DataHandler(new FileDataSource(data.ser));
//send your request
call.invoke(new Object[]{dhSource});
//On the server side
BufferedInputStream bis =
new BufferedInputStream(
handler.getDataSource().getInputStream());
ObjectInputStream ois = new ObjectInputStream(bis);
XSLTProcessorService xsltPS =
(XSLTProcessorService)ois.readObject();
Hope it helps.
Regards
Ferruh
-----Urspr�ngliche Nachricht-----
Von: rakesh bhakta [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 8. Juni 2005 18:06
An: [email protected]
Betreff: RPC Service - Serialization to/from attachment for parameter.
I am using the RPC style services; I have java classes with methods that
contains
either parameters or return type of InputStream and File. Like below:
public interface XSLTProcessorService
{
public InputStream transform(InputStream xmlDoc);
public File getXSLTSrc();
}
I need the return value to be return as attachments, and the input parameter
to
be supplied from an attachments.
I realized using DataHandler is a solution; however, I don't have control of
the
interface and would like to seek an dynamic solution where I can serialize
any
inputstream & file to/from SOAP attachments.
Any thought on the best way to achieve this ?