This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Spring-WS SOAP message with MTOM Hello World Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Spring-WS SOAP message with MTOM Hello World " Watch "Spring-WS SOAP message with MTOM Hello World " New topic
Author

Spring-WS SOAP message with MTOM Hello World

O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

I am trying to create a simple Spring webservice which when called returns a file attachement as part of the SOAP response. The Enpoint class is shown below:


And finally the endpoint




I would like the response to include the file as an attachement similar to the following response:



I have tried to follow the documentation and the sample code in the spring-ws samples and for some reason the output i am getting is always this (i.e. the base64 data is not an attachement.




As you can see, the payload is not an attachment. Here is how i have configured my application:

web.xml


ws-config.xml



downloadMessageRequest.xsd schema file



The file does get converted to base64binary. The JAXB clases are generated correctly. The Endpoint works but it is not including the file as an attachement. It is including it as part of the XML tag even though i have set mtomEnabled=true.

What am i missing?




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring-WS SOAP message with MTOM Hello World
 
Similar Threads
Validating a SOAP document using XSD
soap fault return empty <detail> element.
passing a matrix
[schema] Allow an element to have any content
WSSecurity, MTOM and TIBCO 5.6