Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Files in Web Services  RSS feed

 
prem saggar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Prem
 
William Barnes
Ranch Hand
Posts: 1048
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is "mime", not "dime" (unless you are talking about something else).

Here is an article which talks about doing this.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!