Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Files in Web Services

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic