Package org.apache.ode.bpel.iapi

Examples of org.apache.ode.bpel.iapi.MyRoleMessageExchange.createMessage()


            scheduler.begin();
            try {
                mex = _server.getEngine().createMessageExchange(new GUID().toString(), _invocation.target, _invocation.operation);
                mexContext.clearCurrentResponse();

                Message request = mex.createMessage(_invocation.requestType);
                request.setMessage(_invocation.request);
                _invocation.invokeTime = System.currentTimeMillis();
                running = mex.invoke(request);

                Status status = mex.getStatus();
View Full Code Here


        MyRoleMessageExchange role;
        scheduler.beginTransaction();
        try {
            role = server.getEngine().createMessageExchange(guid, serviceName, operation);
            //role.setProperty("isTwoWay", "true");
            Message msg = role.createMessage(null);

            Document doc = camelContext.getTypeConverter().convertTo(Document.class, "<message><TestPart>" + name + "</TestPart></message>");
            msg.setMessage(doc.getDocumentElement());

            LOG.info("Sending msg " + msg);
View Full Code Here

            return;
        }

        copyMexProperties(odeMex, jbiMex);
        javax.wsdl.Message msgdef = odeMex.getOperation().getInput().getMessage();
        Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
        Mapper mapper = _ode.findMapper(request, odeMex.getOperation());
        if (mapper == null) {
            String errmsg = "Could not find a mapper for request message for JBI MEX " + jbiMex.getExchangeId() + "; ODE MEX "
                    + odeMex.getMessageExchangeId() + " is failed. ";
            __log.error(errmsg);
View Full Code Here

                __log.error(errmsg);
                throw new OdeFault(errmsg);
            }

            // Preparing message to send to ODE
            Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
            _converter.parseSoapRequest(odeRequest, msgContext.getEnvelope(), odeMex.getOperation());
            readHeader(msgContext, odeMex);

            if (__log.isDebugEnabled()) {
                __log.debug("Invoking ODE using MEX " + odeMex);
View Full Code Here

        MyRoleMessageExchange mex;

        mex = _server.createMessageExchange(InvocationStyle.UNRELIABLE, serviceName, opName, "" + messageId);
        if (mex.getOperation() == null)
            throw new Exception("Did not find operation " + opName + " on service " + serviceName);
        Message request = mex.createMessage(mex.getOperation().getInput().getMessage().getQName());
        Element wrapper = body.getOwnerDocument().createElementNS("", "main");
        wrapper.appendChild(body);
        Element message = body.getOwnerDocument().createElementNS("", "message");
        message.appendChild(wrapper);
        request.setMessage(message);
View Full Code Here

            try {
                mex = _server.createMessageExchange(InvocationStyle.UNRELIABLE, _invocation.target, _invocation.operation,
                        new GUID().toString());

                Message request = mex.createMessage(_invocation.requestType);
                request.setMessage(_invocation.request);
                _invocation.invokeTime = System.currentTimeMillis();
                mex.setRequest(request);
                mex.invokeBlocking();
View Full Code Here

                // invoke the process
                txMgr.begin();
                mex = odeServer.getBpelServer().getEngine().createMessageExchange(new GUID().toString(),
                        new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl", "HelloService"), "hello");

                Message request = mex.createMessage(new QName("", ""));
                request.setMessage(DOMUtils.stringToDOM("<message><TestPart><hello xmlns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl\">Hello</hello></TestPart></message>"));
                onhold = mex.invoke(request);
                txMgr.commit();
            } catch (Exception e) {
                e.printStackTrace();
View Full Code Here

            if (BpelProcess.__log.isDebugEnabled()) {
                __log.debug("Invoking in a p2p interaction, partnerrole " + mex + " - myrole " + myRoleMex);
            }

            Message odeRequest = myRoleMex.createMessage(operation.getInput().getMessage().getQName());
            odeRequest.setMessage(outgoingMessage);
            ((MessageImpl)odeRequest)._dao.setHeader(message.getHeader());

            if (BpelProcess.__log.isDebugEnabled()) {
                __log.debug("Setting myRoleMex session ids for p2p interaction, mySession "
View Full Code Here

                    jbiMex.getOperation().getLocalPart());

            if (odeMex.getOperation() != null) {
                copyMexProperties(odeMex, jbiMex);
                javax.wsdl.Message msgdef = odeMex.getOperation().getInput().getMessage();
                Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
                Mapper mapper = _ode.findMapper(request, odeMex.getOperation());
                if (mapper == null) {
                    String errmsg = "Could not find a mapper for request message for JBI MEX " + jbiMex.getExchangeId()
                            + "; ODE MEX " + odeMex.getMessageExchangeId() + " is failed. ";
                    __log.error(errmsg);
View Full Code Here

            PortType portType = odeMex.getPortType();
            Operation operation = odeMex.getOperation();
            odeMex.setProperty("isTwoWay", Boolean.toString(msgContext.getAxisOperation() instanceof TwoChannelAxisOperation));
            if (odeMex.getOperation() != null) {
                // Preparing message to send to ODE
                Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
                _converter.parseSoapRequest(odeRequest, msgContext.getEnvelope(), odeMex.getOperation());
                readHeader(msgContext, odeMex);

                if (__log.isDebugEnabled()) {
                    __log.debug("Invoking ODE using MEX " + odeMex);
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.