Health Checking the XML Service with Custom Requests

by Nicholas Dille on 05/19/2009 | 2 Comments | 4,853 Views

Since I have released the XmlServiceExplorer and XmlServiceDigger,I have received several requests for another tool allowing for custom health checks against the XML service, e.g. see this comment. The XmlServiceReader is a command line tool sending arbitrary requests to the XML service and printing the reply to the same window. This output can be checked in a script to determine whether the reply is valid and the service fully operational.

The XmlServiceReader is available for download here.

Specifying the Target Host and Port

For the XmlServiceReader to operation, you need to supply a server name on the command line. It assumes that the XML service is located on port 80 on the specified host. If your setup differs from the default port, use the port parameter to pass on your port number.

XmlServiceReader.exe -server myhost -port 8080

By default, the XmlServiceReader requests a list of capabilities from the XML service by sending the following request:

<RequestCapabilities>

<Nil />

</RequestCapabilities>


Supplying a Request

Although the built-in request allows for a basic health check of the XML service, it does not check custom aspects of the XenApp farm. The latter can be achieved by passing a request on the command line using the request parameter:

XmlServiceReader.exe -server myhost
-request “<RequestCapabilities><Nil
/></RequestCapabilities>”


The following image contains the transcript of an example using the request parameter.

request

Mind that such a command line tends to get very long. In addition,the request is lost after closing the command prompt window.
Alternatively, you can save the request to a file and pipe it to the XmlServiceExplorer:

type request.txt | XmlServiceReader.exe -server myhost -stream


The following image contains the transcript of an example using the stream switch.

stream

XmlServiceReader will automatically add the XML, DOCTYPE and NFuseProtocol definitions enabling you to concentrate on building the request.

Utilizing a Proxy Server

In case you are located behind a proxy server, XmlServiceReader is able to use the proxy server defined in Internet Explorer by using the proxy switch.

XmlServiceReader.exe -server myhost -proxy


Debugging the Behaviour

If you experience unexpected behaviour or would simply like to trace what the XmlServiceReader is doing, add the debug switch for verbose output.

XmlServiceReader.exe -server myhost -debug


The following image contains the transcript of an example using the debug switch.

debug

AnhangGröße
xmlservicereader.exe23 KB

+++ Profile Migrator 2 - Ein neuer Desktop, ein frisches Benutzerprofile und alle bewährten Einstellungen und Daten. Jetzt kostenlos und unbefristet testen!

2 responses for "Health Checking the XML Service with Custom Requests"

Doesn't like my server name

Doesn't like my server name for some reason. Any ides's?

Thanks,
mjc

C:\Temp>xmlservicereader.exe -server vtst0101ctx.csxt.ad.csx.com -debug
Proxy switch not found.
No server specified.

XmlServiceReader
Copyright (c) by Nicholas Dille, sepago GmbH
Mail nicholas.dille@sepago.de | Blog http://blogs.sepago.de/nicholas/ | Web http
://www.sepago.de

XmlServiceReader send requests to the XML service as part of Citrix Presentation
Server / XenApp and displays the response.

Syntax: XmlServiceReader.exe -server [-port ] [-proxy]
[-stream|-request ] [-debug]

-server Parameter. Name of the server to send the request to.
-port Optional Parameter. Port of the XML service on the
specified server (default: 80).
-proxy Optional switch. Uses the proxy server defined in Internet

Explorer. If omitted, no proxy is used.
-stream Switch. Indicates the request being provided on standard
input. If omitted, -request must be specified.
-request Parameter. Followed by the request to be sent to the
server. If omitted, -stream must be specified.
-debug Optional switch. Displays debugging messages (default: no
debug messages).
-help Optional switch. Displays this message.

If both -stream and -request are omitted, the default request will
be used:

The request is automatically prepended the XML and DOCTYPE definition

Apparently, the commands

Apparently, the commands above do not use the normal dash but the longer variant. Please attempt typing the command without copy and paste. I will try to make sure that the correct dash is used in the article.

I'm sorry for the inconvenience!

Nicholas

Add Comment

Der Inhalt dieses Feldes wird nicht öffentlich angezeigt.
Sicherheitscode
Diese Frage hat den Zweck zu testen, ob Sie ein menschlicher Benutzer sind und um automatisierten Spam vorzubeugen.
Bild-CAPTCHA
Geben Sie die Zeichen ein, die im Bild zu sehen sind.

Citrix Competence Blog

Der optimale Einsatz der Citrix Produktpalette steht seit Jahren Im Fokus der sepago Beratungsdienstleistung. In diesem Blog berichten wir über neue Trends, technische Details und unsere Erfahrungen aus vielen Citrix Projekten.

RSS-FeedAlle Artikel des Competence Blogs abonnieren.

 

Über den Autor

Bild von nicholas
Nicholas Dille
Head of Technology and Innovation
Blogs about Centralized computing, virtualization and performance monitoring

Alle Artikel des Bloggers