Dan Diephouse <dan <at> envoisolutions.com> writes:
>
>
> I don't know that XFire recognizes the FileDataSource object. In your service
method you should only be declaring a DataSource. On the client side, you just
construct a DataSource (using FileDataSource if you want) and pass it into your
client method:
> DataSource ds = new FileDataSource(new
File("file/i/want/to/send"));client.receiveDataSource(ds);Regards,- Dan
>
> On 11/28/06,
> Thomas Trostel <thomas.trostel <at> opm.gov> wrote:
> I have a web service as follows: /** recieveFileDataSource *
Recieve and save a transmitted file * <at> param source * <at>
return */ public void receiveFileDataSource(FileDataSource
source)
> { try { // Get the name of the
file being transmitted String fileName =
source.getName(); // Drop our new file in the tmp directory
> File to_file = new File("C:/tmp/" +
fileName); // Get our input and output
streams InputStream from_stream =
source.getInputStream(); FileOutputStream to_stream = new
FileOutputStream(to_file);
> int size = from_stream.available(); int
bytes_read; byte[] data = new
byte[size]; while((bytes_read = from_stream.read(data)) != -1)
> to_stream.write(data, 0,
bytes_read); from_stream.close();
to_stream.close(); } catch
(IOException e) {
> e.printStackTrace(); } }...Which seems okay
but on the client side how does one feed this a FileDataSourceobject?Thanks in
advanceTom---------------------------------------------------------------------
> To unsubscribe from this list please
visit: http://xircles.codehaus.org/manage_email
>
>
> -- Dan Diephouse
> Envoi Solutionshttp://envoisolutions.com | http://netzooid.com/blog
>
Yes ... I noticed however that using the Aegis binding the WSDL returns the
following:
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true"
type="xsd:base64Binary"/>
so should I assume that this cannot be done with straight Aegis binding?
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email