WSDL file supporting attachments generated by xrpcc ?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, September 6, 2002 01:49 AM

I would like to be able to send attachments in a jax-rpc. Until now I have been using xrpcc to generate wsdl-file, client and server classes based on an interface. No problems with primitive types, strings, beans etc. Problems arise when I'm trying to send an attachment (an xml document for instance) in this way. My question therefore is, if anybody has successed doing that, and, if this is the case, they would share the code with me? My very naive try, i.e. defining the following method in the interface: public DataHandler getDocument(String dummy) throws RemoteException; and implementing it as: public DataHandler getDocument(Str   More>>

I would like to be able to send attachments in a jax-rpc.


Until now I have been using xrpcc to generate wsdl-file, client and server classes based on an interface. No problems with primitive types, strings, beans etc.


Problems arise when I'm trying to send an attachment (an xml document for instance) in this way. My question therefore is, if anybody has successed doing that, and, if this is the case, they would share the code with me?


My very naive try, i.e. defining the following method in the interface:

			
public DataHandler getDocument(String dummy) throws RemoteException;


and implementing it as:


			
public DataHandler getDocument(String dummy) throws RemoteException{
File file = new File( );
DataHandler handler = null ;
if (file.isFile()){
Source src = new StreamSource(file);
handler = new DataHandler(src,"text/html");
}
return handler;
}


fails due to "Missing port information".    <<Less
About | Sitemap | Contact