[SWS-540] Adding XML declaration to a response Created: 13/Jul/09  Updated: 04/May/12  Resolved: 07/Apr/10

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 1.5.7
Fix Version/s: 2.0 M2

Type: New Feature Priority: Major
Reporter: Jochen Terstiege Assignee: Arjen Poutsma
Resolution: Complete Votes: 1
Labels: None
Remaining Estimate: 0d
Time Spent: 46m
Original Estimate: Not Specified

Reference URL: http://forum.springsource.org/showthread.php?t=49412


We were asked to add the XML declaration

<?xml version="1.0" encoding="UTF-8"?>

to the response delivered by our web service endpoints.

Since SAAJ 1.2 there seems to be a way to enable the declaration by setting the property


on the soap message: http://java.sun.com/webservices/saaj/faq.html

Are there any plans to add this feature to the current Spring ws implementation? We are using classes that implement the


interface in combination with the



Comment by Nino Stokbro Ag [ 27/Aug/09 ]

This would also fix the problem we are having described in this post:

Comment by Lukas Krecan [ 07/Mar/10 ]

It is possible (and simple) to create an Interceptor to achieve this. It would be great if such interceptor was part of Spring WS.

Comment by Arjen Poutsma [ 07/Apr/10 ]

Done. I've added a 'messageProperties' property to SaajSoapMessageFactory. Properties set this way will be applied to any created SaajSoapMessage

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Tue Oct 23 20:18:48 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.