• 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

Spring-WS SOAP message with MTOM Hello World

 
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?




reply
    Bookmark Topic Watch Topic
  • New Topic