Would also recommend creating a service (in your common utility package or your equivalent of WmPublic that everyone seems to have for common helper services) using String.split() and using that instead of tokenize. The tokenize method has behaviors that may or may not be desirable depending on what is being done.
Split varies from tokenize in these ways:
-
Split does not collapse consecutive delimiters to a single field.
For example, with input of “one|two||four” split will return
“one”, “two”, “”, “four” whereas tokenize will return
“one”, “two”, “four”.
-
Split supports using regex for the delimiter matching. Tokenize
accepts a delimiter string in which each character in the string is
treated as a delimiter. For example, with input of “foo and bar
and baz” split will return “foo”, “bar”, “baz” whereas tokenize
will return “foo”, “b”, “r”, “b”, “z”. This is because tokenize
treats the delimiter string of " and" as a set
[’ ', ‘a’, ‘n’, ‘d’], not as a string pattern to match.
#Service-Designer#webMethods#Integration-Server-and-ESB