Examples of replyWithFailure()


Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                if (((TestService)_testService.proxy()).invoke()) {
                    Message response = mex.createMessage(mex.getOperation().getOutput().getMessage().getQName());
                    response.setMessage(DOMUtils.newDocument().createElementNS(NAMESPACE, "tns:ResponseElement"));
                    mex.reply(response);
                } else {
                    mex.replyWithFailure(MessageExchange.FailureType.COMMUNICATION_ERROR, "BangGoesInvoke", null);
                }
                return null;
            }
        });
        // Faulting a process would send the fault message asynchronously.
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

        // ODE MEX needs to be invoked in a TX.
        try {
            _sched.execTransaction(new Callable<Void>() {
                public Void call() throws Exception {
                    PartnerRoleMessageExchange odeMex = (PartnerRoleMessageExchange) _server.getEngine().getMessageExchange(odeMexId);
                    odeMex.replyWithFailure(error, errmsg, null);
                    return null;
                }
            });

        } catch (Exception e) {
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                                odeMex.replyWithFault(faultName, response);
                            } else {
                                if (__log.isWarnEnabled())
                                    __log.warn("Fault response: faultType=(unkown)\n" + reply.getEnvelope().toString());
                                odeMex.replyWithFailure(FailureType.OTHER, reply.getEnvelope().getBody()
                                        .getFault().getText(), OMUtils.toDOM(reply.getEnvelope().getBody()));
                            }
                        } else {
                            Message response = odeMex.createMessage(odeMex.getOperation().getOutput().getMessage().getQName());
                            _converter.parseSoapResponse(response, reply.getEnvelope(), operation);
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                            odeMex.reply(response);
                        }
                    } catch (Exception ex) {
                        String errmsg = "Unable to process response: " + ex.getMessage();
                        __log.error(errmsg, ex);
                        odeMex.replyWithFailure(FailureType.OTHER, errmsg, null);
                    }
                    return null;
                }
            });
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

            if (pmex.getStatus() == Status.ASYNC || pmex.getStatus() == Status.REQUEST) {
                try {
                    switch (m.getStatus()) {
                        case FAILURE:
                            // We can't seem to get the failure out of the myrole mex?
                            pmex.replyWithFailure(MessageExchange.FailureType.OTHER, "operation failed", null);
                            break;
                        case FAULT:
                            Fault fault = pmex.getOperation().getFault(m.getFault().getLocalPart());
                            if (fault == null) {
                                __log.error("process " + this + " instance " + (context != null ? context.getPid() : null) + " thrown unmapped fault in p2p communication " + m.getFault() + " " + m.getFaultExplanation() + " - converted to failure");
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                            break;
                        case FAULT:
                            Fault fault = pmex.getOperation().getFault(m.getFault().getLocalPart());
                            if (fault == null) {
                                __log.error("process " + this + " instance " + (context != null ? context.getPid() : null) + " thrown unmapped fault in p2p communication " + m.getFault() + " " + m.getFaultExplanation() + " - converted to failure");
                                pmex.replyWithFailure(MessageExchange.FailureType.OTHER, "process thrown unmapped fault in p2p communication " + m.getFault() + " " + m.getFaultExplanation() + " - converted to failure", m.getFaultResponse().getMessage());
                            } else {
                                Message faultRes = pmex.createMessage(pmex.getOperation().getFault(m.getFault().getLocalPart())
                                        .getMessage().getQName());
                                faultRes.setMessage(m.getResponse().getMessage());
                                pmex.replyWithFault(m.getFault(), faultRes);
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                if (((TestService)_testService.proxy()).invoke()) {
                    Message response = mex.createMessage(mex.getOperation().getOutput().getMessage().getQName());
                    response.setMessage(DOMUtils.newDocument().createElementNS(NAMESPACE, "tns:ResponseElement"));
                    mex.reply(response);
                } else {
                    mex.replyWithFailure(MessageExchange.FailureType.COMMUNICATION_ERROR, "BangGoesInvoke", null);
                }
                return null;
            }
        });
        // Faulting a process would send the fault message asynchronously.
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                __log.debug("Replying to a p2p mex, myrole " + m + " - partnerole " + pmex);
            }
            switch (m.getStatus()) {
                case FAILURE:
                    // We can't seem to get the failure out of the myrole mex?
                    pmex.replyWithFailure(MessageExchange.FailureType.OTHER, "operation failed", null);
                    break;
                case FAULT:
                    Message faultRes = pmex.createMessage(pmex.getOperation().getFault(m.getFault().getLocalPart())
                            .getMessage().getQName());
                    faultRes.setMessage(m.getResponse().getMessage());
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

                            odeMex.reply(response);
                        }
                    } catch (Exception ex) {
                        String errmsg = "Unable to process response: " + ex.getMessage();
                        if (odeMex != null) {
                            odeMex.replyWithFailure(MessageExchange.FailureType.OTHER, errmsg, null);
                        }
                    }

                    return null;
                }
View Full Code Here

Examples of org.apache.ode.bpel.iapi.PartnerRoleMessageExchange.replyWithFailure()

        // ODE MEX needs to be invoked in a TX.
        try {
            _sched.execIsolatedTransaction(new Callable<Void>() {
                public Void call() throws Exception {
                    PartnerRoleMessageExchange odeMex = (PartnerRoleMessageExchange_server.getEngine().getMessageExchange(odeMexId);
                    odeMex.replyWithFailure(error, errmsg, details);
                    return null;
                }
            });

        } catch (Exception e) {
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.