Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.MessageReceiver


                if (request.getAttachment() != null &&
                    request.getAttachment() instanceof Axis2HttpRequest) {

                    Axis2HttpRequest axis2Request = (Axis2HttpRequest) request.getAttachment();
                    MessageContext mc = axis2Request.getMsgContext();
                    MessageReceiver mr = mc.getAxisOperation().getMessageReceiver();

                    try {
                        // this fault is NOT caused by the endpoint while processing. so we have to
                        // inform that this is a sending error (e.g. endpoint failure) and handle it
                        // differently at the message receiver.

                        Exception exception = request.getException();
                        MessageContext nioFaultMessageContext =
                            MessageContextBuilder.createFaultMessageContext(
                                /** this is not a mistake I do NOT want getMessage()*/
                                mc, new AxisFault(exception.toString(), exception));
                        nioFaultMessageContext.setProperty(NhttpConstants.SENDING_FAULT, Boolean.TRUE);
                        mr.receive(nioFaultMessageContext);
                       
                    } catch (AxisFault af) {
                        log.error("Unable to report back failure to the message receiver", af);
                    }
                }
View Full Code Here


        operationsAliasesMap.put(axisOperation.getName().getLocalPart(), axisOperation);
    }


    private MessageReceiver loadDefaultMessageReceiver(String mepURL, AxisService service) {
        MessageReceiver messageReceiver;
        if (mepURL == null) {
            mepURL = WSDLConstants.MEP_URI_IN_OUT;
        }
        if (service != null) {
            messageReceiver = service.getMessageReceiver(mepURL);
View Full Code Here

            }
            AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);

            // loading message receivers
            try {
                MessageReceiver messageReceiver = (MessageReceiver) messageReceiverClass.newInstance();
                operation.setMessageReceiver(messageReceiver);
            } catch (IllegalAccessException e) {
                throw new AxisFault("IllegalAccessException occured during message receiver loading"
                        + e.getMessage());
            } catch (InstantiationException e) {
View Full Code Here

                    axisOp.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_ONLY);
                } else {
                    axisOp.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OUT);
                }

                MessageReceiver msgrec = null;
                if (op.isNonBlocking()) {
                    msgrec = new Axis2ServiceInMessageReceiver(this, op);
                } else {
                    msgrec = new Axis2ServiceInOutSyncMessageReceiver(this, op);
                }
View Full Code Here

            // loading the message receivers
            OMElement receiverElement = operation.getFirstChildWithName(new QName(TAG_MESSAGE_RECEIVER));

            if (receiverElement != null) {
                MessageReceiver messageReceiver = loadMessageReceiver(service.getClassLoader(),
                        receiverElement);

                op_descrip.setMessageReceiver(messageReceiver);
            } else {
                // setting default message receiver
                MessageReceiver msgReceiver = loadDefaultMessageReceiver(
                        op_descrip.getMessageExchangePattern()
                        , service);
                op_descrip.setMessageReceiver(msgReceiver);
            }
View Full Code Here

            // loading the message receivers
            OMElement receiverElement = operation.getFirstChildWithName(new QName(TAG_MESSAGE_RECEIVER));

            if (receiverElement != null) {
                MessageReceiver messageReceiver = loadMessageReceiver(service.getClassLoader(),
                        receiverElement);

                op_descrip.setMessageReceiver(messageReceiver);
            } else {
                // setting default message receiver
                MessageReceiver msgReceiver = loadDefaultMessageReceiver(
                        op_descrip.getMessageExchangePattern()
                        , service);
                op_descrip.setMessageReceiver(msgReceiver);
            }
View Full Code Here

            // setting the mep of the operation
            // loading the message receivers
            OMElement receiverElement = operation.getFirstChildWithName(new QName(TAG_MESSAGE_RECEIVER));

            if (receiverElement != null) {
                MessageReceiver messageReceiver =
                        loadMessageReceiver(module.getModuleClassLoader(), receiverElement);
                op_descrip.setMessageReceiver(messageReceiver);
            } else {
                // setting default message receiver
                MessageReceiver msgReceiver = loadDefaultMessageReceiver(mepURL, null);
                op_descrip.setMessageReceiver(msgReceiver);
            }
            // Process Module Refs
            Iterator modules = operation.getChildrenWithName(new QName(TAG_MODULE));
            processOperationModuleRefs(modules, op_descrip);
View Full Code Here

                    outMessage.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
                            SchemaGenerator.METHOD_RESPONSE_WRAPPER));
                }
            } else {
                operation = getAxisOperationforJmethod(jmethod, table);
                MessageReceiver mr = axisService.getMessageReceiver(
                        operation.getMessageExchangePattern());
                if (mr != null) {
                    operation.setMessageReceiver(mr);
                } else {
                    mr = axisConfig.getMessageReceiver(operation.getMessageExchangePattern());
View Full Code Here

     *
     * @param mepURL  : can be null
     * @param service :  This can be null <code>AxisService</code>
     */
    protected MessageReceiver loadDefaultMessageReceiver(String mepURL, AxisService service) {
        MessageReceiver messageReceiver;
        if (mepURL == null) {
            mepURL = WSDLConstants.MEP_URI_IN_OUT;
        }
        if (service != null) {
            messageReceiver = service.getMessageReceiver(mepURL);
View Full Code Here

    protected HashMap processMessageReceivers(OMElement messageReceivers) throws DeploymentException {
        HashMap mr_mep = new HashMap();
        Iterator msgReceivers = messageReceivers.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
        while (msgReceivers.hasNext()) {
            OMElement msgReceiver = (OMElement) msgReceivers.next();
            MessageReceiver receiver =
                    loadMessageReceiver(Thread.currentThread().getContextClassLoader(), msgReceiver);
            OMAttribute mepAtt = msgReceiver.getAttribute(new QName(TAG_MEP));
            mr_mep.put(mepAtt.getAttributeValue(), receiver);
        }
        return mr_mep;
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.MessageReceiver

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.