Hi all...
I've been looking at the org.springframework.ws.transport.TransportConstant s interface:
I've also been testing the new SOAP/JMS features in SpringWS 1.5M1 and found out something unusual...Code:package org.springframework.ws.transport; /** * Declares useful transport constants. * * @author Arjen Poutsma * @since 1.0.0 */ public interface TransportConstants { /** The "Content-Id" header. */ String HEADER_CONTENT_ID = "Content-Id"; /** The "Content-Length" header. */ String HEADER_CONTENT_LENGTH = "Content-Length"; /** The "Content-Transfer-Encoding" header. */ String HEADER_CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding"; /** The "Content-Type" header. */ String HEADER_CONTENT_TYPE = "Content-Type"; /** The "SOAPAction" header. */ String HEADER_SOAP_ACTION = "SOAPAction"; }
In the class org.springframework.ws.soap.saaj.Saaj12Implementat ion the following lines :
set the mime headers. Which is fine. One of these headers is the "Content-Type" header. As far as i know, this header(attribute actually i think) is named "contentType" when sending JMSMessages.Code:// some SAAJ implementations (Axis 1) do not have a Content-Type header by default MimeHeaders headers = message.getMimeHeaders(); if (ObjectUtils.isEmpty(headers.getHeader(TransportConstants.HEADER_CONTENT_TYPE))) { headers.addHeader(TransportConstants.HEADER_CONTENT_TYPE, SoapVersion.SOAP_11.getContentType()); if (message.saveRequired()) { message.saveChanges(); } }
I've managed to wire-up a springWS based SOAP/JMS service which does nothing but throw a RuntimeException. This exception gets handled by the
and subsequently, a SOAPFault would be sent. The whole things crumbles down when setting the before mentioned "Content-Type" attribute on the JMSMessage...When i debug and manually set the name of the header to "contentType", everything works fine.Code:org.springframework.ws.soap.server.endpoint.SoapFaultMappingExceptionResolver
I was wondering if the value
only makes sense for HTTP messages and their headers?Code:/** The "Content-Type" header. */ String HEADER_CONTENT_TYPE = "Content-Type";
Thanks&Cheers!!


Reply With Quote