Seems like a misunderstood the question a bit.
New try:
If I look at the source for Spring WS it seems like the supports() methods for the MessageSenders simply check if the URI corresponds to a URI scheme that the sender in question knows how to connect to, for example in AbstractHttpWebServiceMessageSender:
Code:
public boolean supports(URI uri) {
return uri.getScheme().equals(HttpTransportConstants.HTTP_URI_SCHEME) ||
uri.getScheme().equals(HttpTransportConstants.HTTPS_URI_SCHEME);
}
According to the Javadoc of WebServiceAccessor, the createConnection() method will iterate over the array of configured MessageSenders, calling supports() on each of them, until one returns true. It will then use that one to send the message:
Code:
/**
* Creates a connection to the given URI, or throws an exception when it cannot be resolved.
* <p/>
* Default implementation iterates over all configured {@link WebServiceMessageSender} objects, and calls {@link
* WebServiceMessageSender#supports(URI)} for each of them. If the sender supports the parameter URI, it creates a
* connection using {@link WebServiceMessageSender#createConnection(URI)} .
*
* @param uri the URI to open a connection to
* @return the created connection
* @throws IllegalArgumentException when the uri cannot be resolved
* @throws IOException when an I/O error occurs
*/
protected WebServiceConnection createConnection(URI uri) throws IOException {