Package org.wso2.carbon.logging.view.stub

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


    }

    public byte[] getProcessImage(String processId) {

        QName qName = decode(processId);
        SVGInterface svg = createSVG(qName);
        return svg.toPNGBytes();
    }
View Full Code Here


    private SVGInterface createSVG(QName qName) {

        // generate new
        InputStream in = getBpelDescriptor(qName);

        SVGInterface svg = null;

        try {
            svg = BPEL2SVGUtil.generate(in);

            if (svg == null)
View Full Code Here

   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

  public LogViewerStub stub;

  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

    @Override
    protected void invokeClient() {
        try {
            clientLog = Axis2Client.fireClient("ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/StockQuoteProxy -Djms_payload=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 250 doesn't work");
                log.error("Sample 250 doesn't work");
            }
        } catch (Exception e) {
View Full Code Here

    @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

        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

    @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

TOP

Related Classes of org.wso2.carbon.logging.view.stub.LogViewerStub

Copyright © 2018 www.massapicom. 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.