Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOHTTPConnection.sendRequest()


      aRequest = new WORequest(MObject._GET, RemoteBrowseClient.getPathString, MObject._HTTP1, aHeadersDict,
          null, null);
      anHTTPConnection.setReceiveTimeout(5000);

      requestSucceeded = anHTTPConnection.sendRequest(aRequest);

      if (requestSucceeded) {
        aResponse = anHTTPConnection.readResponse();
      }
View Full Code Here


        try {
            WOHTTPConnection anHTTPConnection = new WOHTTPConnection(currentHost.name(), theApplication
                    .lifebeatDestinationPort());
            anHTTPConnection.setReceiveTimeout(10000);

            if (anHTTPConnection.sendRequest(aRequest)) {
                aResponse = anHTTPConnection.readResponse();
            }
        } catch (Throwable localException) {
            NSLog._conditionallyLogPrivateException(localException);
        }
View Full Code Here

        try {
            WOHTTPConnection anHTTPConnection = new WOHTTPConnection(anInstance.host().name(), anInstance.port().intValue());
            anHTTPConnection.setReceiveTimeout(_receiveTimeout);

            boolean requestSucceeded = anHTTPConnection.sendRequest(aRequest);

            if (requestSucceeded) {
                aResponse = anHTTPConnection.readResponse();
            } else {
                throw new MonitorException(_hostName + ": Failed to receive response from " + anInstance.displayName());
View Full Code Here

        try {
            WOHTTPConnection anHTTPConnection = new WOHTTPConnection(name(), WOApplication.application().lifebeatDestinationPort());
            anHTTPConnection.setReceiveTimeout(_receiveTimeout);

            boolean requestSucceeded = anHTTPConnection.sendRequest(aRequest);

            isAvailable = true;

            if (requestSucceeded) {
                aResponse = anHTTPConnection.readResponse();
View Full Code Here

        try {
            WOHTTPConnection anHTTPConnection = new WOHTTPConnection(configHostName, aPort);
            anHTTPConnection.setReceiveTimeout(5000);

            if (anHTTPConnection.sendRequest(aRequest)) {
                aResponse = anHTTPConnection.readResponse();
            }
        } catch(Exception localException) {
            log.error("Failed to connect to Host: " + configHostName + " and Port: " + aPort);
            throw new MonitorException("Failed to connect to Host: " + configHostName + " and Port: " + aPort);
View Full Code Here

        WORequest paypalEchoRequest;
        paypalEchoRequest = new WORequest("POST", paypalCgi, "HTTP/1.1", headers, null, null);

        paypalEchoRequest.setContent(returnString);
        ppEchoConnection.setReceiveTimeout(90 * 1000); // 90 second timeout -- this might be too long!?!
        connectionSuccess = ppEchoConnection.sendRequest(paypalEchoRequest);
        if (connectionSuccess) {
          ppValidationResponse = ppEchoConnection.readResponse(); // read PayPal's validation
        }

        ppValidationResponseString = ppValidationResponse.contentString();
View Full Code Here

    catch (UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    String url = "/maps/geo?q=" + encodedAddress + "&output=csv&key=" + apiKey();
    WORequest request = new WORequest("GET", url, "HTTP/1.0", null, null, null);
    boolean success = connection.sendRequest(request);
    if (success) {

      /*
       * A reply returned in the csv format consists of four numbers,
       * separated by commas. The first number is the status code, the
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.