Examples of LogViewerStub


Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

    @Override
    protected void invokeClient() {

        try {
            clientLog = Axis2Client.fireClient("ant stockquote -Dmode=placeorder -Dtrpurl=\"jms:/JMStoHTTPStockQuoteProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://" + HOST_NAME + ":61616&transport.jms.ContentTypeProperty=Content-Type&transport.jms.DestinationType=queue");
            LogViewerStub logViewerStub = new LogViewerStub("https://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT + "/services/LogViewer");
            AuthenticateStub authenticateStub = new AuthenticateStub();
            authenticateStub.authenticateAdminStub(logViewerStub, sessionCookie);
            LogMessage[] logMessages = logViewerStub.getLogs("ALL", "PropertyMediator");
            if (!logMessages[logMessages.length - 1].getLogMessage().contains(searchWord)) {
                Assert.fail("Sample 253 JMStoHTTPStockQuoteProxy Case doesn't work");
                log.error("Sample 253 JMStoHTTPStockQuoteProxy Case doesn't work");
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

        sampleNo = 252;
    }

    @Override
    protected void invokeClient() {
        LogViewerStub logViewerStub = null;

        try {
            logViewerStub = new LogViewerStub("https://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT + "/services/LogViewer");
            AuthenticateStub authenticateStub = new AuthenticateStub();
            authenticateStub.authenticateAdminStub(logViewerStub, sessionCookie);
            clientLog = Axis2Client.fireClient("ant jmsclient -Djms_type=text -Djms_payload=\"12.33 1000 ACP\" -Djms_dest=dynamicQueues/JMSTextProxy");

            LogMessage[] logMessages = logViewerStub.getLogs("ALL", "PropertyMediator");
            if (!logMessages[logMessages.length - 1].getLogMessage().contains(searchWord)) {
                Assert.fail("Sample 252 JMSTextProxy Case doesn't work");
                log.error("Sample 252 JMSTextProxy Case doesn't work");
            }

        } catch (Exception e) {
            log.error("Sample 252 JMSTextProxy Case doesn't work : " + e.getMessage());
        }

        try {
            clientLog1 = Axis2Client.fireClient("ant jmsclient -Djms_type=binary -Djms_dest=dynamicQueues/JMSFileUploadProxy -Djms_payload=./../../repository/samples/resources/mtom/asf-logo.gif");

            LogMessage[] logMessages = logViewerStub.getLogs("ALL", "PropertyMediator");
            if (!logMessages[logMessages.length - 1].getLogMessage().contains(searchWord)) {
                Assert.fail("Sample 252 JMSFileUploadProxy Case doesn't work");
                log.error("Sample 252 JMSFileUploadProxy Case doesn't work");
            }

        } catch (Exception e) {
            log.error("Sample 252 JMSFileUploadProxy Case doesn't work : " + e.getMessage());
        }

        try {
            clientLog2 = Axis2Client.fireClient("ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/JMSPoxProxy -Djms_payload=MSFT");
            LogMessage[] logMessages = logViewerStub.getLogs("ALL", "PropertyMediator");
            if (!logMessages[logMessages.length - 1].getLogMessage().contains(searchWord)) {
                Assert.fail("Sample 252 MSTF Case doesn't work");
                log.error("Sample 252 MSTF Case doesn't work");
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

    @Override
    protected void invokeClient() {
        try {
            clientLog = Axis2Client.fireClient("ant stockquote -Daddurl=http://" + HOST_NAME + ":" + HTTP_PORT + "/services/StockQuoteProxy -Dmode=placeorder -Dsymbol=MSFT");

            LogViewerStub logViewerStub = new LogViewerStub("https://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT + "/services/LogViewer");
            AuthenticateStub authenticateStub = new AuthenticateStub();
            authenticateStub.authenticateAdminStub(logViewerStub, sessionCookie);

            LogMessage[] logMessages = logViewerStub.getLogs("ALL", "PropertyMediator");
            if (!logMessages[logMessages.length - 1].getLogMessage().contains(searchWord)) {
                Assert.fail("Sample 251 doesn't work");
                log.error("Sample 251 doesn't work");
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

        OMElement response = axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(),
                null, "WSO2");
        assertTrue(response.toString().contains("WSO2"));

        LogViewerStub logViewerStub = new LogViewerStub(getAdminServiceURL("LogViewer"));
        authenticate(logViewerStub);

        LogMessage[] logs = logViewerStub.getLogs("INFO", "LogMediator");
        assertTrue(logs != null && logs.length > 0 && logs[0] != null);

        boolean requestLogOk = false;
        boolean responseLogOk = false;
        for (LogMessage l : logs) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

        OMElement response = axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(),
                null, "WSO2");
        assertTrue(response.toString().contains("WSO2"));

        LogViewerStub logViewerStub = new LogViewerStub(getAdminServiceURL("LogViewer"));
        authenticate(logViewerStub);

        LogMessage[] logs = logViewerStub.getLogs("INFO", "LogMediator");
        assertTrue(logs != null && logs.length > 0 && logs[0] != null);

        boolean requestLogOk = false;
        boolean responseLogOk = false;
        for (LogMessage l : logs) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

        OMElement response = axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(),
                null, "WSO2");
        assertTrue(response.toString().contains("WSO2"));

        LogViewerStub logViewerStub = new LogViewerStub(getAdminServiceURL("LogViewer"));
        authenticate(logViewerStub);

        LogMessage[] logs = logViewerStub.getLogs("INFO", "LogMediator");
        assertTrue(logs != null && logs.length > 0 && logs[0] != null);

        boolean requestLogOk = false;
        boolean responseLogOk = false;
        for (LogMessage l : logs) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

        axis2Client.setHeader("TestHeader", "http://test.wso2.org", "TestHeaderValue");
        OMElement response = axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(),
                null, "WSO2");
        assertTrue(response.toString().contains("WSO2"));

        LogViewerStub logViewerStub = new LogViewerStub(getAdminServiceURL("LogViewer"));
        authenticate(logViewerStub);

        LogMessage[] logs = logViewerStub.getLogs("INFO", "LogMediator");
        assertTrue(logs != null && logs.length > 0 && logs[0] != null);

        boolean requestLogOk = false;
        boolean responseLogOk = false;
        for (LogMessage l : logs) {
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

    public LogViewerClient(String cookie, String backendServerURL, ConfigurationContext configCtx)
            throws AxisFault {
        String serviceURL = backendServerURL + "LogViewer";

        stub = new LogViewerStub(configCtx, serviceURL);
        ServiceClient client = stub._getServiceClient();
        Options option = client.getOptions();
        option.setManageSession(true);
        option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
        option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
View Full Code Here

Examples of org.wso2.carbon.logging.view.stub.LogViewerStub

    public LogViewerClient(String cookie, String backendServerURL, ConfigurationContext configCtx)
            throws AxisFault {
        String serviceURL = backendServerURL + "LogViewer";

        stub = new LogViewerStub(configCtx, serviceURL);
        ServiceClient client = stub._getServiceClient();
        Options option = client.getOptions();
        option.setManageSession(true);
        option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
        option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
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.