public static void main(String[] args) {
    System.out.println("TestOAuthScribe");

    OAuthService service = new ServiceBuilder().provider(TwoLeggedOAuth.class).
      apiKey(OAUTH_API_KEY).
      apiSecret(OAUTH_SHARED_SECRET).
      build();
    /**
     * For 3-legged you would need to request the authorization token Key Bridge
     * web services use a two-legged OAuth transaction so the token is empty
     */
    Token token = new Token("", "");
    /**
     * Build the REST URI
     */
    String webResourceUri = SERVICE_URI_SSL
      + "/rest"
      + "/whitespace"
      + "/query"
      + "/txlpaux";
    /**
     * Initialize the OAuth Request by setting the request method (PUT),
     * identifying the encoding type, and signing the request header using the
     * empty token.
     * <p/>
     * Key Bridge API web services consume and produce two MediaTypes. These are
     * MediaType.APPLICATION_XML (application/xml) (default) and
     * MediaType.APPLICATION_JSON (application/json).
     * <p/>
     * The default MediaType is MediaType.APPLICATION_XML
     * <p/>
     * If using the OAUTH_API_KEY in more that one application (e.g. different
     * classes, etc.) then set the User-Agent header to your application name.
     * This information will be reported back to you in your API usage report.
     */
    OAuthRequest request = new OAuthRequest(Verb.PUT, webResourceUri);
    request.addHeader("Content-Type", "application/xml");
    request.addHeader("User-Agent", OAUTH_CLIENT_APPLICATION);

    service.signRequest(token, request);
    /**
     * This demonstration program queries the API to find the LPAUX reserved
     * channels at the United States Capital Visitor Center.
     * <p/>
     * All Key Bridge API web services return a ClientResponse, with the
     * encapsulated entity or entity list varying by service. You must
     * programmatically unwrap each web services ClientResponse.
     */
    Coordinate coordinate = new Coordinate();
    coordinate.setLatitude(38.889927);
    coordinate.setLongitude(-77.009139);
    coordinate.setDatum(EnumWsifDatum.WGS_84);
    /**
     * Use the JAXB reference implementation to marshall and unmarshall the
     * request and response objects to and from XML.
     */
    try {
      JAXBContext jaxbContextCoordinate = JAXBContext.newInstance(Coordinate.class);
      Marshaller marshaller = jaxbContextCoordinate.createMarshaller();
      StringWriter stringWriter = new StringWriter();
      marshaller.marshal(coordinate, stringWriter);
      request.addPayload(stringWriter.toString());
    } catch (JAXBException ex) {
      Logger.getLogger(Main_TxLpaux.class.getName()).log(Level.SEVERE, null, ex);
    }
    /**
     * Execute the REST transaction.
     */
    Response response = request.send();
    /**
     * Uncomment the following lines to print the raw response test header and
     * body.
     */
//    System.out.println("Response.Headers " + response.getHeaders());
//    System.out.println("Response.Body    " + response.getBody());
    /**
     * If the transaction was successful then unmarshall the returned XML
     * object.
     */
    if (response.isSuccessful()) {
      try {
        JAXBContext jaxbContextWhitespaceResponse = JAXBContext.newInstance(WhitespaceResponse.class);
        Unmarshaller unmarshaller = jaxbContextWhitespaceResponse.createUnmarshaller();

        StringReader stringReader = new StringReader(response.getBody());
        WhitespaceResponse whitespaceResponse = (WhitespaceResponse) unmarshaller.unmarshal(stringReader);

        System.out.println("WhitespaceResponse from " + SERVICE_URI_SSL);
        System.out.println("  Protocol Version   : " + whitespaceResponse.getProtocolVersion());
        System.out.println("  Date Effective     : " + whitespaceResponse.getDateEffective());
        System.out.println("  Date Expiration    : " + whitespaceResponse.getDateExpiration());
        System.out.println("  At Coordinate      : [" + whitespaceResponse.getLocation().getCoordinate().getLatitude() + ", " + whitespaceResponse.getLocation().getCoordinate().getLatitude() + "]");
        System.out.println("  Reserved Channels  : ");
        for (WhitespaceFrequency whitespaceFrequency : whitespaceResponse.getWhitespaceFrequencyList()) {
          System.out.println("    "
            + whitespaceFrequency.getChannel().getChannel() + " ["
            + whitespaceFrequency.getChannel().getFrequencyMin() + " - "
            + whitespaceFrequency.getChannel().getFrequencyMax() + " MHz] ("
            + whitespaceFrequency.getChannel().getAllocation()
            + ")");
        }

      } catch (JAXBException ex) {
        Logger.getLogger(Main_TxLpaux.class.getName()).log(Level.SEVERE, null, ex);
      }
    } else {
      System.err.println("Query failed to " + webResourceUri);
      System.out.println("Error message: " + response.getHeader("ERROR"));
    }
  }