Reverted SOAPJMS_ fallback mechanism
Reverted the fallback mechanism introduced to fix SWS-798, as it reduced compatibility with 3rd party services. Issue: SWS-833
This commit is contained in:
@@ -76,19 +76,8 @@ public abstract class JmsTransportUtils {
|
||||
return CONVERSION_TABLE[i + 1];
|
||||
}
|
||||
}
|
||||
// fall-back
|
||||
StringBuilder builder = new StringBuilder(JmsTransportConstants.PROPERTY_PREFIX);
|
||||
for (int i = 0; i < headerName.length(); i++) {
|
||||
char ch = headerName.charAt(i);
|
||||
if (i == 0) {
|
||||
builder.append(Character.toLowerCase(ch));
|
||||
return headerName;
|
||||
}
|
||||
else if (Character.isJavaIdentifierPart(ch)) {
|
||||
builder.append(ch);
|
||||
}
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the given JMS property name to a transport header name. Returns the given property name if no match is
|
||||
@@ -103,27 +92,7 @@ public abstract class JmsTransportUtils {
|
||||
return CONVERSION_TABLE[i - 1];
|
||||
}
|
||||
}
|
||||
// fall-back
|
||||
if (propertyName.startsWith(JmsTransportConstants.PROPERTY_PREFIX)) {
|
||||
StringBuilder builder = new StringBuilder(propertyName.length());
|
||||
int start = JmsTransportConstants.PROPERTY_PREFIX.length();
|
||||
for (int i = start; i < propertyName.length(); i++) {
|
||||
char ch = propertyName.charAt(i);
|
||||
if (i == start) {
|
||||
builder.append(Character.toUpperCase(ch));
|
||||
}
|
||||
else {
|
||||
if (Character.isUpperCase(ch)) {
|
||||
builder.append('-');
|
||||
}
|
||||
builder.append(ch);
|
||||
}
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
else {
|
||||
return propertyName;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,18 +112,4 @@ public class JmsTransportUtilsTest {
|
||||
String replyTo = JmsTransportUtils.getReplyToName(uri);
|
||||
assertEquals("Invalid reply to name", "jms/REPLY_QUEUE", replyTo);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void headerToJmsPropertyFallback() {
|
||||
String expected = "SOAPJMS_fooBarBaz";
|
||||
String result = JmsTransportUtils.headerToJmsProperty("Foo-Bar-Baz");
|
||||
assertEquals(expected, result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void jmsPropertyToHeader() {
|
||||
String expected = "Foo-Bar-Baz";
|
||||
String result = JmsTransportUtils.jmsPropertyToHeader("SOAPJMS_fooBarBaz");
|
||||
assertEquals(expected, result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user