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

Can a webservice encrypt a file and return it?  RSS feed

 
Mitesh Soni
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Tip: Send and receive SOAP messages with SAAJ might be useful.

Regards,
Dan
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • 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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!