Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default message factory for WebServiceTemplate [SWS-106] #242

Closed
gregturn opened this issue Apr 11, 2007 · 3 comments
Closed

Default message factory for WebServiceTemplate [SWS-106] #242

gregturn opened this issue Apr 11, 2007 · 3 comments

Comments

@gregturn
Copy link
Contributor

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

@gregturn
Copy link
Contributor Author

Arjen Poutsma commented

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).

@gregturn
Copy link
Contributor Author

Craig Walls commented

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.

@gregturn
Copy link
Contributor Author

Arjen Poutsma commented

Closing RC1 issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants