Search in sources :

Example 11 with HTTPMixIn

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

the class BPMClient 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 + "/swydws/ProcessOrder";
        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 12 with HTTPMixIn

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

the class BeanClient 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 + "/quickstart-bean/OrderService", XML);
        System.out.println("SOAP Reply:\n" + result);
    } finally {
        soapMixIn.uninitialize();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Example 13 with HTTPMixIn

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

the class BPELHelloClient 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 + "/SayHelloService/SayHelloService", XML);
        System.out.println("SOAP Reply:\n" + result);
    } finally {
        soapMixIn.uninitialize();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn)

Example 14 with HTTPMixIn

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

the class HelpDeskMain method main.

public static void main(String... args) throws Exception {
    final String ticketId = "TCKT-" + System.currentTimeMillis();
    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();
    }
}
Also used : HTTPMixIn(org.switchyard.component.test.mixins.http.HTTPMixIn) StringPuller(org.switchyard.common.io.pull.StringPuller)

Example 15 with HTTPMixIn

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

the class LibraryClient method main.

public static void main(String... args) throws Exception {
    HTTPMixIn httpMixIn = new HTTPMixIn();
    httpMixIn.initialize();
    try {
        String port = System.getProperty("org.switchyard.component.soap.client.port", "8080");
        LibraryClient client = new LibraryClient(httpMixIn, port);
        client.testLibraryServices();
    } finally {
        httpMixIn.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