• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can a webservice encrypt a file and return it?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I want to create a web service which takes source of the file, and then encrypt it and return the encrypted file then is it possible. Not having enough experience in the field but I think it should work...
Please help...with bit explanation.

Thanks in advance.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
If you want to use a SOAP web service, you may want to take a look at the SAAJ API: http://en.wikipedia.org/wiki/SAAJ
Using this API, you can send and receive attachments (files) with web service requests and responses.
Best wishes!
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And Tip: Send and receive SOAP messages with SAAJ might be useful.

Regards,
Dan
 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mitesh,

Not sure if you have to only use SAAJ API for your need. You can even consider in-line attachments without using SAAJ API.

You can use xsd:base64Binary or xsd:hexBinary types in WSDL to represent your attachments (may even be encrypted) for relatively small sized file content.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't need SOAP's authentication and other security capabilities it would be easier as a RESTful service.

1. PUT the original file - which get encrypted as it is stored in a temp location

2. GET the encrypted file

3. If the GET suceeded, DELETE the temp file

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic