Professional Documents
Culture Documents
________________________________________________________________________
Table of Contents
Executive Summary
Citrix Presentation Server offers application virtualization and application streaming for
optimal application performance. It enables the best access experience for any user, with
any device, working over any network. With the secure application architecture,
organizations can centralize applications and data in secure data centers, reducing costs
of management and support, increasing data security, and ensuring fast, reliable
performance.
There are several methods currently available from Citrix Systems to access a published
application for the Citrix Presentation Server product family:
o Program Neighborhood
o Program Neighborhood Agent
o Web Interface
However, these two sets of utilities still don’t allow developers to launch published
applications from within their own applications or portals. Extentrix has resolved this
issue and unlocked the Citrix platform to the development community with Extentrix
Web Services for Citrix Presentation Server. This new product from Extentrix is built on
the open standard SOAP protocol allowing all web service consuming applications to
seamlessly access Citrix farms for published application access.
This white paper introduces the concept of Web services and identifies the benefits
associated with their implementation. Then it details the benefits of using Extentrix Web
Services for Citrix Presentation Server and how to integrate and use those WS APIs into
your application.
(XML Protocol)
Citrix XML PNAgent Site
Service
HTTP/S
HTTP/S XML
Outside World
Figure 1
Any information exchanged with the PNAgent site server assumes the form of XML data
delivered over an HTTP transport. The Citrix XML Service is nothing more than a simple
HTTP server publishing a single URL: /Scripts/wpnbr.dll. Citrix Secure Gateway
integration relies on a similar HTTP/XML service provided by the Secure Ticket
Authority, which publishes /Scripts/CtxSta.dll from an IIS server. PNAgent acts as a pass
through clients.
So the key to access Citrix word is to learn its language, NFuse XML Protocol. The
problem is that there is no direct documentation about the protocol, how to request for
specific information or how to parse the response to get the data. NFuse XML Protocol
version can be found by inspecting the NFuse.dtd file, guarantying the results, building a
tool to create the XML request string and parse the returned XML document. And if you
work in a different platform and a different language then the tool should be repeated to
all languages used... how easy is that?!
And developers who would like to allow their applications or portal to access Citrix
farms or launch published applications from their Apps are left in the darkness.
Extensible Markup Language (XML) is a simple, very flexible text format. It is classified
as an extensible language because it allows its users to define their own tags. Originally
designed to meet the challenges of large-scale electronic publishing, it is used to facilitate
the sharing of data across different information systems on the Web and elsewhere.
Because XML syntax consists of text-based mark-up that describes the data being tagged,
it is both application-independent and human readable. This simplicity and
interoperability have helped XML achieve widespread acceptance and adoption as the
standard for exchanging information between heterogeneous systems in a wide variety of
applications, including Web services.
Simple Object Access Protocol (SOAP) is a lightweight protocol for exchanging XML-
based messages over HTTP/HTTPS. It consists of three parts: an envelope that defines a
framework for describing what is in a message and how to process it, a set of encoding
rules for expressing instances of application-defined data types, and a convention for
representing remote procedure calls and responses. Because HTTP is supported by all
Web servers and browsers, SOAP messages can be sent between applications regardless
of their platform or programming language.
WSDL is an XML format describing how to communicate using web services. The
WSDL defines services as collections of network endpoints, or ports operating on
messages containing either document-oriented or procedure-oriented information. In this
way, the WSDL definition acts as the initial Web service interface, providing clients with
all the information they need to interact with the service in a standards-based way. A
• Reduces complexity
All components in Web Services are encapsulated as services. The type of
behavior a service provides is more important than how it is implemented. A
WSDL document is the mechanism to describe the behavior of a service.
• Interoperable
Since Web Services are operating on the system boundaries (that is, outside of
private company networks), they are achieving a higher level of commonality
than has previously been available. For developers, this commonality means that
the applications and services they develop will enjoy a long life span, outlasting
their proprietary equivalents.
Extentrix Web Services for Citrix Presentation Server represents a standard way to
communicate with Citrix Presentation Server world because it is built on open standards-
based Web technologies like HTTP, XML, SOAP and WSDL.
In addition, Extentrix Web Services for Citrix Presentation Server represents a platform
and language independent solution by design.
Figure 2
This diagram shows how the Extentrix Web Services talks to Citrix Presentation Server. For better security,
we recommend to have the Extentrix Web Services resides in the DMZ.
GetApplicationInfo
Gets information about a published application for a specific client with the
specified details, server types, and client types.
GetApplicationsByCredentials
Gets all published applications for a specific client with the specified details,
server types, and client types.
GetCodebaseURL
Returns the URL CodeBase of the PNAgent server that specifies the location
where the java classes used to launch the application via java client reside.
LaunchApplication
Returns the ICA file description to be used to launch an application.
LaunchApplicationWithParameter
Returns the ICA file description to be used to launch an application with a
given parameter.
ValidateCredentials
Checks the user's credentials and returns true if they are valid and returns false
if they are not.
Figure 3
Now, it is very simple to access Citrix Application Delivery Platform, thanks to Extentrix
Web Services for Citrix Presentation Server APIs.
Platform Independent
Extentrix Web Services for Citrix Presentation Server provides a standard means of
communication with Citrix Presentation Server among different software applications,
running on a variety of platforms and/or frameworks because it uses the standard SOAP,
XML, WSDL protocols in communication messages. And those protocols are platform
independent. So, it services any application talks SOAP, XML and WSDL. Extentrix
Web Services for Citrix Presentation Server gives a simplified mechanism to connect
applications regardless of the technology or devices they use, or their location.
Supports Security
Extentrix Web Services for Citrix Presentation Server helps you in securing your web
services. Today, HTTPS and BASIC authentication are often used to secure Web service
communications. While this simple transport-level security is sufficient for simple, point-
to-point Web services, their use is vulnerable to security breaches in multi-hop networked
interactions. Further, there are underlying performance issues inherent in HTTPS.
HTTPS supports only a one user credential per connection, so a highly-scaled server-to-
server communication might require hundreds or thousands of connections, a huge
scalability challenge. By contrast, Web Service Security works by specifying security
policy at the SOAP message level. Extentrix Web Services for Citrix Presentation Server
enables you to attach a policy file to your web services at creation time. Policy supports
automation with tools and infrastructure. Because these communications contracts can
and do change over time (in response to new regulatory requirements, for example), these
benefits are not one-time events, so use of Policy reduces on-going workload as well. In
sum, Policy enhances the flexibility of SOAP implemented using Web services, and it
does so in an open and interoperable way. But in this release, security is limited to X.509
certificate, which may be used to validate a public key that may be used to authenticate a
message or to identify the public key with which a message has been encrypted.
Developer’s support
Extentrix provides developers with a very easy to read manual that describes the APIs,
where to use them and how.
In addition, there are many examples with their source code published on Developers
page (http://www.extentrix.com/web%20services/Developers.htm). Those useful
samples source code written in different languages and help developers learning how to
integrate their application with Extentrix Web Services for Citrix Presentation Server.
How to Call Extentrix Web Services for Citrix Presentation Server APIs
In this section, we will show you how to call Extentrix web services for Citrix
Presentation Server APIs in Java and C#. We assume that the developer will create a
web reference (web service proxy). The complete code for those samples can be found on
Extentrix web site (http://www.extentrix.com/web%20services/Developers.htm)
We will use our published web service URL for test purposes:
http://www.extentrix.com/webservices/1.0.0/ExtentrixServiceCitrixPS.asmx
How to Call Extentrix Web Services for Citrix Presentation Server API using
Java
This code is written using Oracle Java Developer IDE after creating Web Service Proxy.
import com.extentrix.proxy.ExtentrixServiceCitrixPSSoap12Client;
import com.extentrix.proxy.Credentials;
ExtentrixServiceCitrixPSSoap12Client proxy =
new ExtentrixServiceCitrixPSSoap12Client();
How to Call Extentrix Web Services for Citrix Presentation Server API
using ASP.Net
This code is written using Microsoft Visual Studio 2005, after creating a Web Reference.
For more Information about Extentrix web services APIs, please refer to Developers’
Manual.
How to Call Extentrix Web Services for Citrix Presentation Server API
using JavaScript
1. You need to enable connecting with the web service from any control using this
property.
style="behavior:url(webservice.htc);"
service.useService("http://www.extentrix.com/webservices/1.0.0/Ex
tentrixWebServicesForCPS.asmx?WSDL","Service1");
function Credentials(UserName,Password,Domain,Type,Method)
{
this.UserName=UserName;
this.Password=Password;
this.Domain=Domain;
this.DomainType=Type;
this.PasswordEncryptionMethod=Method;
}
myusername = "citrixdesktop";
mypassword = "demo";
mydomain = "testdrive";
mytype = 0;
mymethod = 0;
var iCallID =
service.Service1.callService("LaunchApplicationWithParameter",
application, filename,credentials, clientname, clientIP);
onresult="onmyresult()";
icaContent = event.result.value;
array = icaContent.split('\n');
var Fs = new ActiveXObject("Scripting.FileSystemObject");
var Output = Fs.OpenTextFile(fileName,2,true);
var content = array[0] + "\n";
for (i = 1; i < array.length; i++)
{
content += array[i] + "\n";
Output.write(content);
Output.close();
How to Secure your Extentrix Web Services for Citrix Presentation Server
This release of Extentrix Web Services for Citrix Presentation Server supports security
based on Microsoft WSE 3.0, and it is a prerequisite if you want to secure your Extentrix
Web Services for Citrix Presentation Server using our Admin tool wizard.
Simple steps to secure your Extentrix Web Services for Citrix Presentation Server:
Figure 4
3. Create new web service, and walk on the wizard till you reach the Security
Settings page.
a. Select Advanced Security
b. Click Choose Policy file button to browse and select your policy file
created in step 1.
c. Fill the Policy Name field with the name of your policy created in step 1.
Figure 5
Importing certificates
If a Microsoft WSE 3.0 exception occurs (check your Event Viewer), please check your
certificate. You may need to import your certificate and give permission for your
ASP.NET client. You will need to import the certificate to the local machine store instead
of personal store.
To do this:
Note: The ASP.Net worker process might be running under an account other than the
ones mentioned above (i.e. customized to run under a particular user account), and in this
case, you will need to grant permission to whatever process the work process is running
under.
Extentrix Systems is privately held with company headquarters in RAK, UAE. For more
information, please visit the company’s Web site at www.extentrix.com or call +971-4-
211-5490.
Extentrix Systems
P.O.Box 43659
Dubai, UAE
Tel: +971 4 211 5490
Fax: +971 4 211 5101
info@extentrix.com
Learn More
Extentrix Web Services for Citrix Presentation Server Home Page
Free Download
Try Extentrix Web Services for Citrix Presentation Server free for thirty days.
Test Drive
Test drives Extentrix Web Services for Citrix Presentation Server right away.
Developers
Visit Extentrix Web Services for Citrix Presentation Server developers’ section.