• 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 Java

Basic instructions to compile Java programs which use the Citrix NetScaler API.

Requirements

To compile Java code which uses the Citrix NetScaler API, you need the JSDK 1.4.2 or later, Axis 1.1 or later, Xerces-2.5.0. or the Sun Java Web Service Development Pack: http://java.sun.com/webservices/jwsdp/index.jsp

Instruction to compile samples

Instructions to create Client applications using the NetScaler WSDL (NSconfig.wsdl)

  1. Modify the path of JDK_HOME, JAVA_HOME, AXIS_HOME,XERCES_HOME in build.bat and run.bat
  2. Compile the sample Client application : build.bat
    The Client application is compiled with stub sources and generates setConfig.java, setConfig.class, setConfig.class.
  3. Execute the NSConfig to configure the NetScaler box remotely - run.bat.

Cookie Handling

NetScaler uses the cookies for client authentication purposes. Java client needs to handle the cookies. Please add the following code in client code to handle the cookie.

public static void main(String[] args) {
...
client = new NSStatBindingStub(new URL(<url>),null);
client.setMaintainSession(true); // This is to handle the cookies.
...

HTTPS Support

You should use the HTTPS protocol to send secure API requests to the Citrix NetSclaer. The Citrix NetScaler, by default, uses a self signed CA certificate, therefore all java clients need to handle the self signed certificate if a HTTPS request is sent to the NetScaler.

usage : run  https://	<NS IP> <username> <password>

More Information

Tags

code code Delete
appexpert appexpert Delete
api api Delete
java java Delete
compile compile Delete
wsdl wsdl Delete
jsdk jsdk Delete
axis axis Delete
xerces xerces Delete
jwsdp jwsdp Delete
cookie handling cookie handling Delete
sun java sun java Delete
how to how to Delete
Enter tags to add to this page:
Please wait 
Looking for a tag? Just start typing.
Related Links