*/
public MessageExchange createExchange(URI pattern) throws MessagingException {
checkNotClosed();
MessageExchange result = null;
if (pattern != null) {
Pattern p = Pattern.fromWsdlUri(pattern.toString());
if (p == Pattern.InOnly) {
result = createInOnlyExchange();
} else if (p == Pattern.InOut) {
result = createInOutExchange();
} else if (p == Pattern.InOptionalOut) {