How to test #SOAP #WebServices from #PERL command line

Code-generation based on WSDL

Another way in which the SOAP::Lite package provides support for WSDL is through a tool that comes with the package called

The tool is a handy utility that both demonstrates the WSDL support in SOAP::Lite and produces a useful result. When run against a WSDL file or URL that refers to a WSDL resource, it generates a loadable Perl module from the services defined by the WSDL.The resulting file’s name is based on the class name that would be selected if the service were loaded directly by a SOAP::Lite client object. The WSDL for the WSDL describing the WishList service would yield a file called (which would be very different from the file by that name in the software project), while the WSDL for the journal system would yield Calling the tool is simple enough:

Generates code:

$perl file:./useperlorg.wsdl $ls $ useperlorg.wsdl

Once the stub file has been generated, it can then be used in a client in place of explicitly configuring the client settings:

$perl -MUsePerlJournal -e 'get_entries(shift, shift)' 1 15

From: Programming Web Services with Perl By: Randy J. Ray & Pavel Kulchenko ISBN: 0-596-00206-8


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s