Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-106

Default message factory for WebServiceTemplate


    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 M3
    • Fix Version/s: 1.0 RC1
    • Component/s: Core
    • Labels:


      MessageDispatcherServlet uses SaajSoapMessageFactory as its message factory by default. This is great, as I only have to configure a message factory if I do not want to use SAAJ.

      I'd like to see the same "sensible default" thinking applied to WebServiceTemplate.

      For the messageFactory property, I'd like it to default to use SaajSoapMessageFactory. This choice makes sense, as it fits most needs and because it's the same default applied on the service side.

      For the messageSender property, the default choice is a bit less clear. CommonsHttpMessageSender is more capable, but HttpUrlConnectionMessageSender is based on HttpUrlConnection which is a given in the JDK and thus requires no additional dependencies. Because it requires no additional dependencies, HttpUrlConnectionMessageSender is a reasonable default for messageSender.

      In either case, if the client developer doesn't want to use the defaults, they can be easily overridden by wiring in a replacement bean. For everyone else, these defaults will cut down a bit on the client-side configuration.




            • Assignee:
              arjen.poutsma Arjen Poutsma
              habuma Craig Walls
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: