I want Reverse of a string in web methods development . If i give input string,i want reverse of that input string in web methods flow steps.
ex: input is : web methods
expecting output as : sdohtem bew
I want Reverse of a string in web methods development . If i give input string,i want reverse of that input string in web methods flow steps.
ex: input is : web methods
expecting output as : sdohtem bew
WebMethods is used for far more important stuffs than these. I am not saying they are not possible, what i am telling is that flow service is not used for this purpose. There is a REASON why webMethods has given us an option to use "JAVA SERVICE" . Tasks like the one which you have mentioned can be performed efficiently with a simple JAVA service.
Anyways, if you want to do it using flowservice, do as below
Get the length of incoming String and map it to a variable called strLen and lastIndex
reduce the value of strlen by 1. [This will be used as a REPEAT COUNT]
3.Initialize a string called "finalString" , startIndex to Zero.
4.Insert a repeat step, repeat on success, using strlen as COUNT
INSIDE THE REPEAT STEP:
5.Insert a map step, insert a transformer pub.math:subtractInts . map the lastIndex to input1, "1" to input2 and the result to "startIndex"
6.Invoke the service ,pub.string:substring map the inputString to inString, beginIndex = startindex, endIndex=lastIndex, value = tempString
7.Concat finalString+tempString =finalString using the concat service. Drop the tempString
8.Reduce lastIndex by 1
As said, stuffs like these are not intended to be done by FLOW SERVICE
Simplest and most performant way is writting a small and simple Java service. Don't try writting this in Flow, way too complex.