Examples of execute()


Examples of org.apache.commons.httpclient.methods.GetMethod.execute()

        String headers1 = "HTTP/1.1 200 OK\r\n"
                       +"Content-Length: 5\r\n";
        conn.addResponse(headers1, body);
        conn.open();
        GetMethod httpget = new GetMethod("/");
        httpget.execute(new HttpState(), conn);
        assertEquals(CHARSET_DEFAULT, httpget.getResponseCharSet());
        conn.close();
       
        httpget = new GetMethod("/");
        String headers2 = "HTTP/1.1 200 OK\r\n"
View Full Code Here

Examples of org.apache.commons.httpclient.methods.HeadMethod.execute()

        HeadMethod headMethod = new HeadMethod("/");

        conn.addResponse(headers, "");

        try {
            headMethod.execute(new HttpState(), conn);
            conn.assertNotOpen();

        } catch (Throwable t) {
            t.printStackTrace();
            fail("Unable to execute method : " + t.toString());
View Full Code Here

Examples of org.apache.commons.httpclient.methods.PostMethod.execute()

                    new Header("Content-type", "text/xml; charset=\"utf-8\""));
            method.setRequestHeader(new Header("SOAPAction", action));
            method.setUseDisk(false);
            method.setRequestBody(request);

            method.execute(new HttpState(), conn);

            String ret = method.getResponseBodyAsString();
            int startOfXML = ret.indexOf("<?xml");
            if (startOfXML == -1) { // No xml?!
                throw new ProcessingException("Invalid response - no xml");
View Full Code Here

Examples of org.apache.commons.httpclient.methods.PutMethod.execute()

        HttpState httpState = new HttpState();
        httpState.setCredentials(null, host, credentials);
        putMethod.setRequestBody(resource.getInputStream());
        putMethod.setRequestHeader("Content-type", resource.getContentType());
        putMethod.setRequestHeader("Content-length", String.valueOf(resource.getContentLength()));
        putMethod.execute(httpState, new HttpConnection(host, port, protocol));
    }

    public void removeResource(URI uri, Credentials credentials) throws IOException {
        String url = domain+uri.toString();
        DeleteMethod deleteMethod = new DeleteMethod(url);
View Full Code Here

Examples of org.apache.commons.jelly.impl.Embedded.execute()

                + "jelly-test-case"
                + " </j:jelly>";
        embedded.setScript(jellyScript);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        embedded.setOutputStream(baos);
        boolean status = embedded.execute();
        //executed properly without script errors
        assertEquals(status, true);
        //check that the output  confirms the exepected
        assertEquals("jelly-test-case", new String(baos.toByteArray()));
        //test generation of error
View Full Code Here

Examples of org.apache.commons.jexl.Script.execute()

            jexlVars.put("sampler", currentSampler); //$NON-NLS-1$ (may be null)
            jexlVars.put("sampleResult", previousResult); //$NON-NLS-1$ (may be null)
            jexlVars.put("OUT", System.out);//$NON-NLS-1$

            // Now evaluate the script, getting the result
            Object o = script.execute(jc);
            if (o != null)
            {
                str = o.toString();
            }
            if (vars != null && varName.length() > 0) {// vars will be null on TestPlan
View Full Code Here

Examples of org.apache.commons.jexl2.Script.execute()

   
    Boolean result = null;
    if (rewritten) {
      Script script = engine.createScript(this.modifiedQuery);
      try {
        result = (Boolean) script.execute(ctx);
      } catch (Exception e) {
        log.error("Error evaluating script: " + this.modifiedQuery + " against event" + eventFields.toString(), e);
      }
    } else {
      Expression expr = engine.createExpression(this.modifiedQuery);
View Full Code Here

Examples of org.apache.commons.scaffold.util.ProcessBean.execute()

            }

                // Execute business logic, using values from  map
            servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
            ProcessResult result = (ProcessResult)
                dataBean.execute(properties);

                // Analyze result of business logic
            checkOutcome(mapping,request,response,result);

        } // end for
View Full Code Here

Examples of org.apache.commons.scxml2.model.Script.execute()

     */
    public void executeGlobalScript(final SCXMLExecutionContext exctx) throws ModelException {
        Script globalScript = exctx.getStateMachine().getGlobalScript();
        if ( globalScript != null) {
            try {
                globalScript.execute(exctx.getActionExecutionContext());
            } catch (SCXMLExpressionException e) {
                exctx.getInternalIOProcessor().addEvent(new TriggerEvent(TriggerEvent.ERROR_EXECUTION, TriggerEvent.ERROR_EVENT));
                exctx.getErrorReporter().onError(ErrorConstants.EXPRESSION_ERROR, e.getMessage(), exctx.getStateMachine());
            }
        }
View Full Code Here

Examples of org.apache.crunch.impl.mr.exec.MRExecutor.execute()

 
  @Override
  public MRPipelineExecution runAsync() {
    MRExecutor mrExecutor = plan();
    writePlanDotFile(mrExecutor.getPlanDotFile());
    MRPipelineExecution res = mrExecutor.execute();
    outputTargets.clear();
    return res;
  }

  @Override
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.