Test the BWS accessibility with wget

event_note November 12, 2012

The tool wget can be used to test the BioID Web Service client certificate similar to Windows PowerShell as described in an older post.

Preparation

First you need to prepare SOAP envelope as a text file status.xml

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <soap:Body>
   <Status xmlns="http://www.bioid.com/2011/12/bws">
        <Status />
  </Status>
</soap:Body>
</soap:Envelope>

Then you need your client certificate file and the key file as well as the passphrase for the private key. If you received a PKCS#12 (PFX) file you can convert it to the certificate and key files with OpenSSL.

Accessing the BioID Web Service

The test will be performed with the following command.

/usr/bin/wget --certificate=Client.crt --private-key=Client.key \
              --header="Content-Type: text/xml" \
              --header="SOAPAction: http://www.bioid.com/2011/12/bws/IBioIDWebService/Status" \
              --post-file=status.xml --output-document foo.xml \
              https://bws.bioid.com/BioIDWebService.svc

You can also use the option --debug to get more diagnostic output in the terminal.

Output

The output from the BWS will be stored in the file foo.xml. This file should contain the current BWS version string and some other status information about the service.

--2012-11-15 11:34:35--  https://bws.bioid.com/BioIDWebService.svc
Resolving bws.bioid.com... 10.0.0.88
Connecting to bws.bioid.com|10.0.0.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 917 [text/xml]
Saving to: `foo.xml'

100%[=============================================================================&gt;] 917         --.-K/s   in 0s

2012-11-13 11:34:35 (46.0 MB/s) - `foo.xml' saved [917/917]