Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Axis SOAP Web Service with Attachments

 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to build a web service that sends SOAP messages with binary MIME attachments, is there support for this in the generated Axis stub objects or in the JAX-RPC API? Right now we can only approach this by "hand-crafting" the SOAP message from scratch. Is this statement correct?

Any guidance would be greatly appreciated. Thanks.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tere are two options with Axis2, from which you can choose one.
1. MTOM (SOAP Message Transmission Optimization Mechanism)
2. SwA (SOAP Messages with Attachments)

Apache Axis2 exposes the attachment handling functionality through the MessageContext API. You can attach, access, or remove attachments belonging to a message using the org.apache.axis2.context.MessageContext in this API. Alternatively, you can also get a reference to the attachment map to directly manipulate the attachments.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use JAX-RPC for anything; it's obsolete.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

You can attach, access, or remove attachments belonging to a message using the org.apache.axis2.context.MessageContext in this API. Alternatively, you can also get a reference to the attachment map to directly manipulate the attachments.



Can I get to the MessageContext from the service's implementation object, e.g. MyServiceSoapBindingImpl?

Or, is the only way to touch the SOAP message is to "hand-write" it with the javax.xml.soap package?
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic