Examples of postString()


Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

    }

    public static String sendMessage(String item, String quantity, String switchyard_web_service) throws Exception {
        HTTPMixIn http = new HTTPMixIn();
        http.initialize();
        return http.postString(switchyard_web_service, String.format(SOAP_TEMPLATE, item, quantity));
    }
}
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        final String soapRequest = new StringPuller().pull("/xml/soap-request.xml").replaceAll("TICKET_ID", ticketId);
        final HTTPMixIn http = new HTTPMixIn();
        http.initialize();
        try {
            String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
            http.postString("http://localhost:" + port + "/HelpDeskService/HelpDeskService", soapRequest);
            LOGGER.info("Started helpdesk process with ticket id: " + ticketId);
        } finally {
            http.uninitialize();
        }
    }
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        http.initialize();
        try {
            String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
            //LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
            LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
            String soapResponse = http.postString(endpoint, soapRequest);
            //LOGGER.info(String.format("Received work service response: %s", soapResponse));
            if (soapResponse.toLowerCase().contains("fault")) {
                throw new Exception("Error invoking work service (check server log)");
            }
        } finally {
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        http.initialize();
        try {
            String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
            //LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
            LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
            String soapResponse = http.postString(endpoint, soapRequest);
            //LOGGER.info(String.format("Received work service response: %s", soapResponse));
            if (soapResponse.toLowerCase().contains("fault")) {
                throw new Exception("Error invoking work service (check server log)");
            }
        } finally {
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

            return;
        } else {
            HTTPMixIn http = new HTTPMixIn();
            http.initialize();
            String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
            SOAPUtil.prettyPrint(http.postString("http://localhost:" + port + "/soap-binding-rpc/HelloWorldWSService", String.format(SOAP_TEMPLATE, args[0], "English")), System.out);
        }
    }
}
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        http.initialize();
        try {
            String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
            //LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
            LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
            String soapResponse = http.postString(endpoint, soapRequest);
            //LOGGER.info(String.format("Received work service response: %s", soapResponse));
            if (soapResponse.toLowerCase().contains("fault")) {
                throw new Exception("Error invoking work service (check server log)");
            }
        } finally {
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        http.initialize();
        try {
            String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
            //LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
            LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
            String soapResponse = http.postString(endpoint, soapRequest);
            //LOGGER.info(String.format("Received work service response: %s", soapResponse));
            if (soapResponse.toLowerCase().contains("fault")) {
                throw new Exception("Error invoking work service (check server log)");
            }
        } finally {
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        http.initialize();
        try {
            String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
            //LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
            LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
            String soapResponse = http.postString(endpoint, soapRequest);
            //LOGGER.info(String.format("Received work service response: %s", soapResponse));
            if (soapResponse.toLowerCase().contains("fault")) {
                throw new Exception("Error invoking work service (check server log)");
            }
        } finally {
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

        http.initialize();
        try {
            String endpoint = String.format("%s://localhost:%s/%s/WorkService", scheme, port, context);
            //LOGGER.info(String.format("Invoking work service at endpoint: %s with request: %s", endpoint, soapRequest));
            LOGGER.info(String.format("Invoking work service at endpoint: %s", endpoint));
            String soapResponse = http.postString(endpoint, soapRequest);
            //LOGGER.info(String.format("Received work service response: %s", soapResponse));
            if (soapResponse.toLowerCase().contains("fault")) {
                throw new Exception("Error invoking work service (check server log)");
            }
        } finally {
View Full Code Here

Examples of org.switchyard.component.test.mixins.http.HTTPMixIn.postString()

            testFile.delete();
        }

        HTTPMixIn http = new HTTPMixIn();
        http.initialize();
        return http.postString(switchyard_web_service, String.format(SOAP_TEMPLATE, item, quantity));
    }

    public static String getFileMessage() throws Exception {
        File testFile = getFile();
        // Wait for the actual response from WarehouseService
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.