[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

 Description   

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

WRITE_XML_DECLARATION

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

PayloadEndpoint

interface in combination with the

PayloadRootQNameEndpointMapping

.



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

This would also fix the problem we are having described in this post:
http://forum.springsource.org/showthread.php?t=76216

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 Sun Dec 17 07:50:21 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.