This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Attachments / MTOM

May 10th, 2007, 01:36 PM

Hi,

I read that you support SwA attachments by casting WebServiceMessage to SoapMessage. Then operate on SoapMessage in the normal J2EE way. I guess I could create interceptors analogous to JAX-RPC handlers in J2EE. These handlers could operate on the SoapMessage while the implementation deals mainly with payload.

Also, I saw that you will support MTOM with JAXB2. Does that mean that the JAXB endpoint binding is the first to support MTOM and that the other supported data bindings will eventually have support as well.

Hopefully, you will have samples of how to manipulate MTOM attachments. Basically, you will have to give us a javax.activation.DataHandler for input attachments and we will have to give you a javax.activation.DataHandler for output attachments.

Also, I saw that you will support MTOM with JAXB2. Does that mean that the JAXB endpoint binding is the first to support MTOM and that the other supported data bindings will eventually have support as well.

That's the idea. I created an abstraction called MimeMarshaller, which can marshal a DataHandler or a byte[] to a MIME attachment.

Hopefully, you will have samples of how to manipulate MTOM attachments. Basically, you will have to give us a javax.activation.DataHandler for input attachments and we will have to give you a javax.activation.DataHandler for output attachments.

I'm not sure if I have time to create a sample, but at least you can look at the unit test code to see how it works.

Comment

Comment

Need help on Spring WS ? Do you want to shift gears and build the architecture of your spring ws with half of the price that will be for your company ? I have worked on Spring Ws 1,5 year at full time and build around80 WS with full dao testing and integration tests with Soapui with Maven 2 on hudson

My focus has been on doing SAAJ MTOM support, and so far I haven't had time to investigate Axiom's MTOM stuff. So, for now MTOM on Axiom might work, but I haven't tried it yet.

How about now ? Ive just try to add a AxiomSoapMessageFactory in spring-sample-mtom with jaxb and the attachement send from the AxiomMtomClient of the mtom-sample is received inline (and outofmemory occur if the file is to big). WIthout AxiomSoapMessageFactory, it is received as an attachment according to the SoapEnvelopeLoggingInterceptor

In fact im looking for a better way to receive attachment without trying to dig in the messageContext & be able to use the benefits of Jaxb with heavy attachement (more than 10mo).

Im really loking for a sample able to send & receive a file of 10 mo and more with jax-ws & spring ws. (the mtom sample is not the one) I feel desperate