wood burning stoves 2.0
The moose likes Web Services and the fly likes Files in Web Services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Files in Web Services" Watch "Files in Web Services" New topic

Files in Web Services

prem saggar
Ranch Hand

Joined: Aug 24, 2000
Posts: 66
Hello Ranchers! Right, I'm trying to

1) pass a file in a Soap message as a byte [] and
2) pass a file in a Soap message as a dime attachment

When I try the byte array approach I get an "end of stream encountered before final boundary" exception on the client trying to access the file. All I'm doing is the service reads in a File from it's local file system into a byte array, and then returns it via a method byte[] getFile(). This method has been tested locally on it's server and it works. Then the client trys to call getFile() but when doing so I get that crazy exception "end of stream encountered before final boundary". Do you guys have any ideas? I'm stumped on this one.

Also, how on earth do you create a dime attachment for a soap message? Is there any way to implicitly have the file become a dime attachment? Or do I have to write up some Web service code to do so?

Ok Ranchers, thanks so much.

William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

It is "mime", not "dime" (unless you are talking about something else).

Here is an article which talks about doing this.

Please ignore post, I have no idea what I am talking about.
I agree. Here's the link: http://aspose.com/file-tools
subject: Files in Web Services
It's not a secret anymore!