hello
i have a sentence as a input and i want to count the words of the sentence so how i can got that output if there is any built-in-service tell me that also…
thanks
hello
i have a sentence as a input and i want to count the words of the sentence so how i can got that output if there is any built-in-service tell me that also…
thanks
There is no built-in service for it.
Thanks,
Rankesh
i already hve dis…i want solution not documentation
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String inputString = IDataUtil.getString( pipelineCursor, “inputString” );
String spaceCharacter = " ";
String outString = inputString.split(spaceCharacter);
int Words= outString.length;
pipelineCursor.destroy();
// pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, "Words", Words );
pipelineCursor_1.destroy();
write this code in your java service , and try hope it will work
The above code works fine… but you can also implement the same logic using webMethods flow service instead of java service if you need
Core services used are in WmPublic pkg. :lol:
Also you can use wM inbuild service WmPublic/pub.string:substring