Code Share

Added by Vishal Ganeriwala , last edited by Andrew Van Heden on Oct 31, 2008  (view change)
Tags: 

Expert Exchange is now NetScaler Code Share.


Community Contributed NetScaler - AppExpert Samples

Searching for a particular solution? Browse all the scripts and tools written by Citrix insiders, as well as by members of the NetScaler-AppExpert community.
Want to showcase your script or sample then login and contribute to the NetScaler-AppExpert Developer community.

Login with your MyCitrix account and start contributing.


Content Switching configuration using CSharp .Net

Content Switching configuration using CSharp .Net

Tags: 0 comments

ACL configuration sample using CSharp .Net

ACL configuration sample Csharp file

Tags: 0 comments

Load balancer spillover configuration sample using Csharp and NetScaler XML API

Load Balancer configuration sample

Tags: 0 comments

Compression configuration example using Csharp and NetScaler XML API

Compression configuration example using Csharp and NetScaler XML API

Tags: 0 comments

Caching configuration example using Csharp

Caching configuration example using Csharp

Tags: 0 comments

HA configuration sample using Csharp

HA configuration sample using Csharp

Tags: 0 comments

TCP Buffering configuration sample using Csharp

Csharp example showing TCP buffering with NetScaler API

Tags: 0 comments

Using Rewrite to Redirect on 500 errors

The Rewrite feature of the NetScaler can be used to automatically retry a web site when the backend server responds to a request with a 500 error.

Tags: 4 comments

Using Responder to create 404 Not Found


The responder module on the NetScaler can be used to generate respones based on some attribute of the incoming connection. The responder module is only available with NetScaler 8.0 (or later). This defines the prcocedure to create a 404 Not Found response based on the URL of the incoming request.

Tags: 2 comments

Simple Java program demo Netscaler API

Please write a short summary here. This short summary will appear on Script Exchange

Tags: 1 comments

Sample JAVA program to demonstrate netscaler api "get" methods

Please write a short summary here. This short summary will appear on Script Exchange

Tags: 0 comments




Looking forward to seeing this site fill up !!

Posted by Anonymous at Oct 01, 2007 18:26 | Reply To This

I am having difficulty getting access to server objects. I am using Java and have generated Java stubs from the WSDL. I can successfully run, for instance, the lbvserver examples. However, when I attempt to do something like the following:

getserverresult = client.getserver("", false);
System.out.println("post server" + System.currentTimeMillis());
Server[] serverNames = getserverresult.getList();
for (int j = 0; j < serverNames.length; j++)
{ System.out.println(" server name: " + serverNames[j].getName() + " " + serverNames[j].getState()); }
I get the following SOAP problems:

AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/\}
Client
faultSubcode:
faultString: XML syntax error
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/\}
stackTrace:XML syntax error
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
Is there a known problem with the XML emitted from the getserver call?

Also, FYI, you have a typo in your wsdl:

I believe it should be serviceconftype.

Posted by Anonymous at May 07, 2008 17:29Updated by John Jimenez | Reply To This

I have emailed the engineering team. Someone should get back to you soon. Thanks for finding out typo for serviceconftype

I was wondering if anyone has been able to get server results back from the web services API.

Thanks!

Posted by Anonymous at May 12, 2008 09:26 | Reply To This

I have ran several examples successfully right out of the box. I am going to post a video on how to get started. Meanwhile you can check the getting started resources.

http://community.citrix.com/display/ae/Getting%20started%20with%20NetScaler%20XML%20API

Thanks, perhaps I should clarify.  I have worked through the examples and those do seem to work fine, but I was wondering specifically about listing server objects in the netscaler, as mentioned above.  I seem to specifically have problems with that.

 Thanks!

Posted by Anonymous at May 12, 2008 10:15 | Reply To This

Thanks for the clarification. I will work on posting something specific to Server object. What version of NetScaler API are you working with?

View the rest of this thread. Most recent comment: May 13, 2008
3 more comments by: Anonymous , Raghunandan G