• View Communities
    • Citrix Developer Network
      The place for unfiltered straight talk on Citrix products. Blogs, code downloads, best practices, APIs, and more can all be found here.
    • Citrix Ready Community Verified
      Does it work with Citrix? Application compatibility questions are a thing of the past with the new Citrix Community Verified site.
    • Blogs
      Learn the latest from the Citrix employees who are building application delivery infrastructure technologies.
    • Blogosphere
      The Citrix Blogosphere is a window into the thousands of conversations taking place about Citrix and Application Delivery.
  •  Sign In
NetScaler Developer Network

How to compile sample API code written in Perl

Basic instructions for compiling the Citrix NetScaler API with the PERL scripting language.

Requirements

The following are required to compile Perl code which uses the Citrix NetScaler API.

  • The SOAP::Lite Perl module, available at http://www.soaplite.com/.
  • HTTP::Cookie - used for client authentication purposes, since SOAP::Lite does not support cookies on its own.

The following command should install all of the required modules: perl -MCPAN -c "install 'SOAP::Lite'"

Cookie Handling

As mentioned above, the  SOAP::Lite perl module does not handle cookies. You can handle cookies in your perl code as follows

# Create cookie object. Server sends cookie for client authentication.

my $cookies = HTTP::Cookies->new(ignore_discard=> 1, hide_cookie2 => 1);

# create the soap object and pass the cookies object

my $soap = SOAP::Lite-> proxy("http://$<NS>/soap", cookie_jar=>$cookies);

HTTPS support

You also need to use the HTTPS protocol  to send secure API requests to the Citrix NetSclaer. An additional package, 'Crypt-SSLeay' needs to be installed to use the HTTPS protocol in the API request.

usage : perl  <scriptname>https:// <NS IP> <username> <password>

More Information

Tags

code code Delete
appexpert appexpert Delete
api api Delete
perl perl Delete
compile compile Delete
wsdl wsdl Delete
soap soap Delete
crypt-ssleay crypt-ssleay Delete
cookie handling cookie handling Delete
cookie jar cookie jar Delete
soap object soap object Delete
cookie object cookie object Delete
soap lite soap lite Delete
http cookie http cookie Delete
how to how to Delete
Enter tags to add to this page:
Please wait 
Looking for a tag? Just start typing.
Related Links