Package org.apache.synapse.samples.framework

Examples of org.apache.synapse.samples.framework.SampleClientResult.incrementResponseCount()


                                    new QName(addressingNamespace.getNamespaceURI(), "ReferenceParameters"))
                            .getFirstChildWithName(
                                    new QName(eventingNamespace.getNamespaceURI(), "Identifier")).getText();
            log.info("Subscription identifier: " + subId);
            clientResult.addProperty("subId", subId);
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Fault Received : " + e.toString(), e);
            clientResult.setException(e);
        }
        deInitializeClient();
View Full Code Here


            serviceClient.addHeader(identifierOm);
            OMElement response = serviceClient.sendReceive(subscribeOm);
            log.info("UnSubscribed to ID " + identifier);
            Thread.sleep(1000);
            log.info("UnSubscribe Response Received: " + response.toString());
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Fault Received : " + e.toString(), e);
            clientResult.setException(e);
        }
        deInitializeClient();
View Full Code Here

                Thread.sleep(1000);
            } catch (InterruptedException e) {

            }
            log.info("SynapseSubscription Renew Response Received: " + response.toString());
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Fault Received : " + e.toString(), e);
            clientResult.setException(e);
        }
        deInitializeClient();
View Full Code Here

                Thread.sleep(1000);
            } catch (InterruptedException e) {

            }
            log.info("GetStatus Response Received: " + response.toString());
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Fault Received : " + e.toString(), e);
            clientResult.setException(e);
        }
        deInitializeClient();
View Full Code Here

            log.info("Sending Event : \n" + payload.toString());
            serviceClient.fireAndForget(payload);
            log.info("Event sent to topic " + topic);
            Thread.sleep(1000);
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Fault Received : " + e.toString(), e);
            clientResult.setException(e);
        }
        deInitializeClient();
View Full Code Here

                    symbol, 1);
            serviceClient.getOptions().setAction("urn:getQuote");
            OMElement resultElement = serviceClient.sendReceive(payload);
            log.info("Standard :: Stock price = $" +
                    StockQuoteHandler.parseStandardQuoteResponse(resultElement));
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Error invoking service", e);
            clientResult.setException(e);
        }
        terminate();
View Full Code Here

            while (true) {
                if (isCompleted()) {
                    log.info("Standard dual channel :: Stock price = $" +
                            StockQuoteHandler.parseStandardQuoteResponse(getResponse()));
                    clientResult.incrementResponseCount();
                    break;
                } else {
                    Thread.sleep(100);
                }
            }
View Full Code Here

            payload = StockQuoteHandler.createCustomQuoteRequest(symbol);
            serviceClient.getOptions().setAction("urn:getQuote");
            OMElement resultElement = serviceClient.sendReceive(payload);
            log.info("Custom :: Stock price = $" +
                    StockQuoteHandler.parseCustomQuoteResponse(resultElement));
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Error invoking service", e);
            clientResult.setException(e);
        }
        terminate();
View Full Code Here

            serviceClient.fireAndForget(payload);
            Thread.sleep(5000);

            log.info("Order placed for " + quantity + " shares of stock " + symbol
                    + " at a price of $ " + price);
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Error invoking service", e);
            clientResult.setException(e);
        }
        terminate();
View Full Code Here

            serviceClient.getOptions().setProperty(Constants.Configuration.ENABLE_REST,
                    Constants.VALUE_TRUE);
            OMElement resultElement = serviceClient.sendReceive(payload);
            log.info("Standard :: Stock price = $" + StockQuoteHandler.
                    parseStandardQuoteResponse(resultElement));
            clientResult.incrementResponseCount();
        } catch (Exception e) {
            log.error("Error invoking service", e);
            clientResult.setException(e);
        }
        terminate();
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.