Search in sources :

Example 1 with HTTPMixIn

use of org.switchyard.component.test.mixins.http.HTTPMixIn in project quickstarts by jboss-switchyard.

the class CDIBusClient method main.

/**
     * Only execution point for this application.
     * @param ignored not used.
     * @throws Exception if something goes wrong.
     */
public static void main(final String[] ignored) throws Exception {
    HTTPMixIn soapMixIn = new HTTPMixIn();
    soapMixIn.initialize();
    try {
        String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
        String url = "http://localhost:" + port + "/quickstart-cdi-bus/OrderService";
        String result = soapMixIn.postFile(url, XML);
        System.out.println("SOAP Reply:\n" + result);
    } finally {
        soapMixIn.uninitialize();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Example 2 with HTTPMixIn

use of org.switchyard.component.test.mixins.http.HTTPMixIn in project quickstarts by jboss-switchyard.

the class CamelCxfClient method sendMessage.

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));
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Example 3 with HTTPMixIn

use of org.switchyard.component.test.mixins.http.HTTPMixIn in project quickstarts by jboss-switchyard.

the class BPELLoanClient method main.

/**
     * Only execution point for this application.
     * @param ignored not used.
     * @throws Exception if something goes wrong.
     */
public static void main(final String[] ignored) throws Exception {
    HTTPMixIn soapMixIn = new HTTPMixIn();
    soapMixIn.initialize();
    try {
        String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
        String result = soapMixIn.postFile("http://localhost:" + port + "/loanService/loanService", XML);
        System.out.println("SOAP Reply:\n" + result);
    } finally {
        soapMixIn.uninitialize();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Example 4 with HTTPMixIn

use of org.switchyard.component.test.mixins.http.HTTPMixIn in project quickstarts by jboss-switchyard.

the class BPELCorrelationClient method main.

/**
     * Only execution point for this application.
     * @param ignored not used.
     * @throws Exception if something goes wrong.
     */
public static void main(final String[] ignored) throws Exception {
    HTTPMixIn soapMixIn = new HTTPMixIn();
    soapMixIn.initialize();
    try {
        String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
        String url = "http://localhost:" + port + "/HelloGoodbyeService/HelloGoodbyeService";
        String result = soapMixIn.postFile(url, XML1);
        System.out.println("SOAP Reply:\n" + result);
        result = soapMixIn.postFile(url, XML2);
        System.out.println("SOAP Reply:\n" + result);
    } finally {
        soapMixIn.uninitialize();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Example 5 with HTTPMixIn

use of org.switchyard.component.test.mixins.http.HTTPMixIn in project quickstarts by jboss-switchyard.

the class CamelClient method main.

/**
     * Only execution point for this application.
     * @param ignored not used.
     * @throws Exception if something goes wrong.
     */
public static void main(final String[] args) throws Exception {
    HTTPMixIn soapMixIn = new HTTPMixIn();
    soapMixIn.initialize();
    try {
        String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
        // For karaf, the directory will generally be cxf/proxy/ReverseService
        String dir = System.getProperty("org.switchyard.component.soap.client.dir", "proxy/ReverseService");
        String url = "http://localhost:" + port + "/" + dir;
        String result = soapMixIn.postFile(url, args[0]);
        System.out.println("SOAP Reply:\n" + result);
    } finally {
        soapMixIn.uninitialize();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Aggregations

HTTPMixIn (org.switchyard.component.test.mixins.http.HTTPMixIn)29 StringPuller (org.switchyard.common.io.pull.StringPuller)7 BufferedReader (java.io.BufferedReader)2 InputStreamReader (java.io.InputStreamReader)2 File (java.io.File)1 IOException (java.io.IOException)1