Examples of createFault()


Examples of javax.jbi.messaging.InOut.createFault()

    private void outResponseFault(MyRoleMessageExchange mex, javax.jbi.messaging.MessageExchange jbiMex) throws MessagingException {
        InOut inout = (InOut) jbiMex;

        try {
            Fault flt = inout.createFault();
            String mapperName = mex.getProperty(Mapper.class.getName());
            Mapper mapper = _ode.getMapper(mapperName);
            if (mapper == null) {
                String errmsg = "Message-mapper " + mapperName + " used in ODE MEX " + mex.getMessageExchangeId()
                        + " is no longer available.";
View Full Code Here

Examples of javax.jbi.messaging.InOut.createFault()

            if (ssn == null || ssn.length() == 0) {
                fail(exchange, new NullPointerException());
                return;
            }
            if (!ssn.startsWith("1")) {
                Fault fault = inOut.createFault();
                fault.setContent(new StringSource("<InvalidSSN xmlns=\"urn:logicblaze:soa:creditagency\"><ssn>" + ssn + "</ssn></InvalidSSN>"));
                fail(inOut, fault);
            } else {
                String operation = null;
                if (inOut.getOperation() != null) {
View Full Code Here

Examples of javax.jbi.messaging.InOut.createFault()

            if (ssn == null || ssn.length() == 0) {
                fail(exchange, new NullPointerException());
                return;
            }
            if (!ssn.startsWith("1")) {
                Fault fault = inOut.createFault();
                fault.setContent(new StringSource(
                        "<invalidSSNFault xmlns=\"urn:logicblaze:soa:creditagency:types\"><ssn>"
                        + ssn + "</ssn></invalidSSNFault>"));
                fail(inOut, fault);
            } else {
View Full Code Here

Examples of javax.jbi.messaging.InOut.createFault()

        consumer.getChannel().send(mec);
        // Provider side
        InOut mep = (InOut) provider.getChannel().accept(100L);
        assertNotNull(mep);
        assertEquals(ExchangeStatus.ACTIVE, mep.getStatus());
        Fault f = mep.createFault();
        f.setContent(new StringSource(RESPONSE));
        mep.setFault(f);
        provider.getChannel().send(mep);
        // Consumer side
        mec = (InOut) consumer.getChannel().accept(100L);
View Full Code Here

Examples of javax.jbi.messaging.InOut.createFault()

        consumer.getChannel().send(mec);
        // Provider side
        InOut mep = (InOut) provider.getChannel().accept(100L);
        assertNotNull(mep);
        assertEquals(ExchangeStatus.ACTIVE, mep.getStatus());
        Fault f = mep.createFault();
        f.setContent(new StringSource(RESPONSE));
        mep.setFault(f);
        provider.getChannel().send(mep);
        // Consumer side
        mec = (InOut) consumer.getChannel().accept(100L);
View Full Code Here

Examples of javax.jbi.messaging.InOut.createFault()

    private void outResponseFault(MyRoleMessageExchange mex, javax.jbi.messaging.MessageExchange jbiMex) {

        InOut inout = (InOut) jbiMex;

        try {
            Fault flt = inout.createFault();
            String mapperName = mex.getProperty(Mapper.class.getName());
            Mapper mapper = _ode.getMapper(mapperName);
            if (mapper == null) {
                String errmsg = "Message-mapper " + mapperName + " used in ODE MEX " + mex.getMessageExchangeId()
                        + " is no longer available.";
View Full Code Here

Examples of javax.jbi.messaging.InOut.createFault()

            if (ssn == null || ssn.length() == 0) {
                fail(exchange, new NullPointerException());
                return;
            }
            if (!ssn.startsWith("1")) {
                Fault fault = inOut.createFault();
                fault.setContent(new StringSource("<InvalidSSN xmlns=\"urn:logicblaze:soa:creditagency\"><ssn>" + ssn + "</ssn></InvalidSSN>"));
                fail(inOut, fault);
            } else {
                String operation = null;
                if (inOut.getOperation() != null) {
View Full Code Here

Examples of javax.jbi.messaging.MessageExchange.createFault()

                }
                if (message.getContent(Exception.class) == null) {
                    nm = exchange.createMessage();
                    exchange.setMessage(nm, "out");
                } else {
                    exchange.setFault(exchange.createFault());
                    nm = exchange.getFault();
                }
            }
            // Put headers
            toNMSHeaders(nm, message);
View Full Code Here

Examples of javax.jbi.messaging.MessageExchange.createFault()

                    if (nm == null) {
                        nm = exchange.createMessage();
                        exchange.setMessage(nm, "out");
                    }
                } else {
                    exchange.setFault(exchange.createFault());
                    nm = exchange.getFault();
                }
            }
            // Put headers
            toNMSHeaders(nm, message);
View Full Code Here

Examples of javax.jbi.messaging.MessageExchange.createFault()

        MessageExchange me = this.exchange.getInternalExchange();
        if (me instanceof InOnly) {
            me.setError(new Exception(content));
            getChannel().send(me);
        } else {
            Fault fault = me.createFault();
            fault.setContent(new StringSource(content));
            me.setFault(fault);
            getChannel().sendSync(me);
        }
        update();
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.