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

JAX-RPC and Attachments

 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Can somebody tell me whether it is possible to use JAX-RPC in a way the request contains attachments and the response also contains attachments? What would this look like from a service definition perspective?
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

SOAP with Attachments API for Java (SAAJ) is used mainly for the SOAP
messaging that goes on behind the scenes in JAX-RPC and JAXR implementations.
Secondarily, it is an API that developers can use when they choose to write
SOAP messaging applications directly rather than using JAX-RPC. The SAAJ
API allows you to do XML messaging from the Java platform: By simply making
method calls using the SAAJ API, you can create, send, and consume XML
messages over the Internet. This chapter will help you learn how to use the SAAJ
API.

 
author
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a quote from my book ... take that Pradeep Bhat! Just kidding.
----------- J2EE Web Services, AW 2004 ------------
Sending and receiving SOAP Messages with Attachments (SwA) using JAX-RPC is deceptively easy. I say "deceptively" because, like SAAJ, JAX-RPC depends on the Java Activation Framework (JAF) to handle the marshalling of attachments to and from SOAP messages, so sending and receiving attachments depends in large part on the types of DataContentHandler classes that your J2EE application server provides. This appendix will explain how JAX-RPC supports the SwA standard using JAF.
Essentially there are two ways to support attachments in JAF: You can use javax.activation.DataContentHandler classes or javax.activation.DataSource classes. Each of these interfaces has its strengths and weaknesses. Generally Data ContentHandler types are more convenient, because their operation is hidden, while the DataSource types are less user-friendly but easier to get working. The following provides a quick overview of the DataContentHandler and DataSource types and their strengths and weaknesses. For in-depth coverage of JAF, though, you should read Section F.1 of Appendix F: SAAJ Attachments.
------------------------------------------------
There is a lot more to it, but this is how the appendix on the subject starts. Its an appendix in my book because SwA is not yet sanctioned by the WS-I. there are some serioius interop problems that need to be worked out. That said, The WS-I Basic Profile 1.1, which is now in developement, does address the use of SwA.
 
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic