Results 1 to 3 of 3

Thread: How to check Digipede service alive or not

  1. #1

    Default How to check Digipede service alive or not

    Hi Digipede,

    Is there any API we can use to check for Digipede server availability?

    so far we can only try and catch the exception but it's too late in the game, what we want is to detect if it's alive or not right at the beginning.
    Please advice.
    Thanks

    Jack

  2. #2

    Default

    There is a way to check for server availability outside of an API request.

    If you make an HTTP request to "http://servername/DigipedeWS/ServerStatus.aspx" you will get back XML to determine the server status. What you want to see is a ServerStatus/Status field reporting Active. If it isn't, then the ServerStatus/Message field will be useful.

    Code:
    <?xml version="1.0" encoding="utf-16"?>
    <?xml-stylesheet type='text/xsl' href='ServerStatus.xsl'?>
    <ServerStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<ServerName>DNSERVER</ServerName>
    	<TimeOfLastRequest>2012-01-27T08:45:58.7616588-08:00</TimeOfLastRequest>
    	<IsUp>true</IsUp>
    	<IsUpText>*UP*</IsUpText>
    	<Status>Active</Status>
    	<Now>2012-01-27T08:45:59.131719-08:00</Now>
    	<TimeOfLastCheckIn>2012-01-27T08:45:57.6796359-08:00</TimeOfLastCheckIn>
    	<Message>The Digipede Services are responding.</Message>
    	<CountingLocalRequestsToo>false</CountingLocalRequestsToo>
    	<PrimaryServerName>DNSERVER</PrimaryServerName>
    	<PrimaryTimeOfLastCheckIn>2012-01-27T08:45:54.67</PrimaryTimeOfLastCheckIn>
    	<PrimaryTimeOfLastRequest>2012-01-27T08:45:53.76</PrimaryTimeOfLastRequest>
    	<PrimaryRequestTimeoutExceeded>False</PrimaryRequestTimeoutExceeded>
    	<MultipleServersEnabled>false</MultipleServersEnabled>
    </ServerStatus>
    Note that you can also view this from the Web browser and is formatted for readability.

    As long as IIS and the DigipedeWS site are up, you will get back valid XML; otherwise, of course, you'll get an exception related to your request.

  3. #3

    Default

    That's what we need, thank you!

    Quote Originally Posted by Digipede Support View Post
    There is a way to check for server availability outside of an API request.

    If you make an HTTP request to "http://servername/DigipedeWS/ServerStatus.aspx" you will get back XML to determine the server status. What you want to see is a ServerStatus/Status field reporting Active. If it isn't, then the ServerStatus/Message field will be useful.

    Code:
    <?xml version="1.0" encoding="utf-16"?>
    <?xml-stylesheet type='text/xsl' href='ServerStatus.xsl'?>
    <ServerStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<ServerName>DNSERVER</ServerName>
    	<TimeOfLastRequest>2012-01-27T08:45:58.7616588-08:00</TimeOfLastRequest>
    	<IsUp>true</IsUp>
    	<IsUpText>*UP*</IsUpText>
    	<Status>Active</Status>
    	<Now>2012-01-27T08:45:59.131719-08:00</Now>
    	<TimeOfLastCheckIn>2012-01-27T08:45:57.6796359-08:00</TimeOfLastCheckIn>
    	<Message>The Digipede Services are responding.</Message>
    	<CountingLocalRequestsToo>false</CountingLocalRequestsToo>
    	<PrimaryServerName>DNSERVER</PrimaryServerName>
    	<PrimaryTimeOfLastCheckIn>2012-01-27T08:45:54.67</PrimaryTimeOfLastCheckIn>
    	<PrimaryTimeOfLastRequest>2012-01-27T08:45:53.76</PrimaryTimeOfLastRequest>
    	<PrimaryRequestTimeoutExceeded>False</PrimaryRequestTimeoutExceeded>
    	<MultipleServersEnabled>false</MultipleServersEnabled>
    </ServerStatus>
    Note that you can also view this from the Web browser and is formatted for readability.

    As long as IIS and the DigipedeWS site are up, you will get back valid XML; otherwise, of course, you'll get an exception related to your request.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •