0

I want to check given string palindrome or not and I want to write the logic in WebMethods, Is anyone help me on this, because I am new in the WebMethods..

Atul
  • 1
  • 3
  • Can you show us some of your code and you set up so we can better help you with you questions? – Algo7 Sep 27 '20 at 03:12
  • Hi @AvivLo this is the only task i have now, i need to create webmethods Flow which is checking the string, whether it is palindrome or not – Atul Sep 28 '20 at 12:25

1 Answers1

1

I would recommend you to write a Java service, with a Webmethods Flow this will be rather painful and not good for performance. In a Webmethods Java service you can use the same libraries as in a normal Java application

First Step, Create a Java service First Step, Create a Java service

Define in- and output Define in- and output

Than you get the input in java

IDataMap map = new IDataMap(pipeline);
String stringToCheck = map.getAsString("stringToCheck");

Now its your turn to implement the logic to check for palindrome, you can simply use the put Method from the IDataMap Class to define the service output

map.put("isPalindrome", palindromeCheckResult);
Michael Knoth
  • 58
  • 1
  • 2
  • 10