• 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

sending files via web service

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it true that sending files via web service is a "bad practice"? Is it considered not recommendable? If so, why and where can I find some more on this?
 
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
Sending bulk data with SOAP should be done using SAAJ - the SOAP with Attachments API for Java. It is certainly bad practice to send bulk data as part of a SOAP message body since that involves much extra encoding and parsing.

Sending bulk data to a RESTful service is entirely reasonable until you get to really huge files taking a long time to send, at which point something like BitTorrent, which makes it easy to interrupt and resume transmission would be advised.

Bill
 
Rodrigo Bossini
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

William Brogden wrote:Sending bulk data with SOAP should be done using SAAJ - the SOAP with Attachments API for Java. It is certainly bad practice to send bulk data as part of a SOAP message body since that involves much extra encoding and parsing.

Sending bulk data to a RESTful service is entirely reasonable until you get to really huge files taking a long time to send, at which point something like BitTorrent, which makes it easy to interrupt and resume transmission would be advised.

Bill



Thank you.

Has web services been officially added to the EJB specification ? When I create a web service using EJB, is it the same exact thing as creating a web service by using any other technology?
 
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 mr Attack!

Rod Attack wrote:
Has web services been officially added to the EJB specification ? When I create a web service using EJB, is it the same exact thing as creating a web service by using any other technology?


Exposing an EJB as a web service is a standardized solution described, for instance, in section 3.2.4 of the EJB 3.0 Core specification document.
Creating a web service using a stateless session EJB is different from creating a web service using a POJO in the following ways:
- An EJB can use transaction services offered by the EJB container.
- An EJB can have method-level security control.
- Concurrent access to an EJB is managed by the container. Thus only a single thread is allowed to execute in an EJB at a single point in time.
- The web service servlet context cannot be accessed from an EJB web service endpoint.
Best wishes!
 
eat bricks! HA! And here's another one! And a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic