There is no way of modifying the URL in CommonsHttpMessageSender. In its current form, it is well suited for a hard coded URL, but does not handle setting the URL at runtime. If you try to set up CommonsHttpMessageSender in the applicationContext.xml file without providing a URL, it will fail on startup. If you provide a default URL, and then try to override it using the setUrl method, the new URL will not be used. I believe that HttpUrlConnectionMessageSender has the same issue.