You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I agree about the WebServiceMessageFactory: we can set a default for that.
The MessageSender is a bit more difficult, though, since that requires an url to send the messages to. We could set the url on the template, and then have some kind of mechanism that determines the correct MessageSender based on the url (i.e. http urls take the HttpUrlConnection one, jms urls take the JMS message sender, etc).
Ah...you're right about MessageSender. I wasn't thinking about that in the late hours that I wrote up this issue. And, as you pointed out, it gets trickier when you consider that it might not be HTTP.
I'm okay with dropping that portion of this issue...but still like the idea of a default message factory.
Craig Walls opened SWS-106 and commented
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.
Affects: 1.0 M3
Referenced from: commits 74a880e
The text was updated successfully, but these errors were encountered: