Invoking webMethods service from a Perl Script

Hi,

I am looking to achieve the following

  1. A webMethods flow service needs to be invoked inside a perl script
  2. The output of this flow service is true or false
  3. If true then the script should not execute and a failure message need to be displayed
  4. If false then the script needs to execute.

I need to execute this script from the Solaris box only(not from webMethods developer)

Can you please let me know how this can be done ?

As far as I know, webMethods doesn’t support perl client invoke, but you can write the script to invoke service via HTTP.

Steps:

  1. In the service use pub.flow:setResponse to return “true” or “false” as response
  2. Set the execute ACL of this service to anonymous
  3. Write the perl script to send the GET request to URL http://HOST:PORT/invoke/FOLDER.SUBFOLDER/SERVICENAME?PARAM=something
  4. Parse the HTTP response, then do what you want to do in perl

CURL can do

Thanks Wang for your inputs. I was able to make it work with wget command in perl and invoke the service.

Hi Sachin,

If its not a copyright material (project related), can you please share your code sample package (.zip) with some details in a .doc/.txt.

If you can attach it :slight_smile: in the same thread.