Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.MessageReceiver


    protected HashMap processMessageReceivers(ClassLoader loader, OMElement element) throws DeploymentException {
        HashMap meps = new HashMap();
        Iterator iterator = element.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
        while (iterator.hasNext()) {
            OMElement receiverElement = (OMElement) iterator.next();
            MessageReceiver receiver =
                    loadMessageReceiver(loader, receiverElement);
            OMAttribute mepAtt = receiverElement.getAttribute(new QName(TAG_MEP));
            meps.put(mepAtt.getAttributeValue(), receiver);
        }
        return meps;
View Full Code Here


    protected MessageReceiver loadMessageReceiver(ClassLoader loader, OMElement element)
            throws DeploymentException {
        OMAttribute receiverName = element.getAttribute(new QName(TAG_CLASS_NAME));
        String className = receiverName.getAttributeValue();
        MessageReceiver receiver = null;

        try {
            Class messageReceiver;

            if ((className != null) && !"".equals(className)) {
View Full Code Here

   
    public void start()throws AxisFault {
        try {
            //Register the callback service
            AxisService messageCollectorService = new AxisService("MessageCollector");
            MessageReceiver messageReceiver = new MessageReceiver() {
                public void receive(MessageContext messageCtx) throws AxisFault {
                    if(callback != null){
                        callback.mesageReceived(messageCtx.getEnvelope());
                    }else{
                        System.out.println("Received " + messageCtx.getEnvelope());   
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 msgRecives = messageReceivers.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
        while (msgRecives.hasNext()) {
            OMElement msgRev = (OMElement) msgRecives.next();
            MessageReceiver msgrecivere =
                    loadMessageReceiver(Thread.currentThread().getContextClassLoader(), msgRev);
            OMAttribute mepAtt = msgRev.getAttribute(new QName(TAG_MEP));
            mr_mep.put(mepAtt.getAttributeValue(), msgrecivere);
        }
        return mr_mep;
View Full Code Here

    protected HashMap processMessageReceivers(ClassLoader loader, OMElement element) throws DeploymentException {
        HashMap meps = new HashMap();
        Iterator iterator = element.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
        while (iterator.hasNext()) {
            OMElement receiverElement = (OMElement) iterator.next();
            MessageReceiver receiver =
                    loadMessageReceiver(loader, receiverElement);
            OMAttribute mepAtt = receiverElement.getAttribute(new QName(TAG_MEP));
            meps.put(mepAtt.getAttributeValue(), receiver);
        }
        return meps;
View Full Code Here

    protected MessageReceiver loadMessageReceiver(ClassLoader loader, OMElement element)
            throws DeploymentException {
        OMAttribute receiverName = element.getAttribute(new QName(TAG_CLASS_NAME));
        String className = receiverName.getAttributeValue();
        MessageReceiver receiver = null;

        try {
            Class messageReceiver;

            if ((className != null) && !"".equals(className)) {
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

            AxisOperation operation = getAxisOperationforJmethod(jmethod, table);

            // loading message recivers
            try {
                Class clazz = Class.forName("org.apache.axis2.rpc.receivers.RPCMessageReceiver");
                MessageReceiver messageReceiver = (MessageReceiver) clazz.newInstance();
                operation.setMessageReceiver(messageReceiver);
            } catch (ClassNotFoundException e) {
                throw new AxisFault("ClassNotFoundException occurd during message receiver loading"
                        + e.getMessage());
            } catch (IllegalAccessException e) {
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(null, service);
                op_descrip.setMessageReceiver(msgReceiver);
            }

            // Process Module Refs
            Iterator modules = operation.getChildrenWithName(new QName(TAG_MODULE));
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.