Package org.jboss.soa.esb.addressing.eprs

Examples of org.jboss.soa.esb.addressing.eprs.LogicalEPR


     * @param executionContext of the currently invoked EsbActionHandler.
     * @return the replyTo EPR of the JBpmCallbackService.
     */
    protected EPR createReplyTo(String esbToJBpmXml, Boolean globalProcessScope, ExecutionContext executionContext)
    {
        EPR replyTo = new LogicalEPR(ServiceInvoker.INTERNAL_SERVICE_CATEGORY, JBpmCallback.JBPM_CALL_BACK_SERVICE_NAME);
        PortReference portReference = replyTo.getAddr();
        if (globalProcessScope!=null) {
            portReference.addExtension(Constants.PROCESS_SCOPE_ATTR, globalProcessScope.toString());
        }
        final Token token = executionContext.getToken() ;
        final long tokenId = token.getId();
View Full Code Here


    public void test_logical_extension() throws Exception {
  ObjectName on = new ObjectName(EPRStorageMBean.objectName);
  getServer().invoke(on, "clearMessage", null, null);

        final LogicalEPR logicalEPR = new LogicalEPR("MyServiceCategory", "MyService4") ;
        final String tag = "TestTag" ;
        final String prefix = "TestPrefix" ;
        final String value = "TestValue" ;
       
        logicalEPR.getAddr().addExtension(tag, prefix, Service4Action.TEST_URI, value) ;
       
        final Message message = MessageFactory.getInstance().getMessage() ;
        message.getBody().add("Incoming Test Payload") ;
        logicalEPR.getServiceInvoker().deliverAsync(message) ;
  Thread.sleep(10000);
        String messageOutput = (String) getServer().getAttribute(on, "Message");
        System.out.println("value from JMX = " + messageOutput);
        final String expectedOutput = "Prefix " + prefix + " Tag " + tag + " value " + value ;
View Full Code Here

    public Message process(Message message) throws ActionProcessingException {
        String instruction = (String) message.getBody().get();

        if(instruction.equalsIgnoreCase("reply-To")) {
            message.getHeader().getCall().setReplyTo(new LogicalEPR("MyServiceCategory", "MyService3"));
            message.getHeader().getCall().setFaultTo(null);
        } else {
            message.getHeader().getCall().setReplyTo(null);
            message.getHeader().getCall().setFaultTo(new LogicalEPR("MyServiceCategory", "MyService3"));
        }

        try {
            invoker.deliverAsync(message);
        } catch (MessageDeliverException e) {
View Full Code Here

    {
        getServer().invoke(new ObjectName(JbpmServerMBean.OBJECT_NAME), "deployProcess", null, null) ;
       
        final Message message = MessageFactory.getInstance().getMessage() ;
        final Call call = message.getHeader().getCall() ;
        final EPR replyToEPR = new LogicalEPR("TestJBPMReplyESB", "Reply") ;
        replyToEPR.getAddr().addExtension(ReplyAction.REPLY_TYPE, "reply") ;
        call.setReplyTo(replyToEPR) ;
       
        final EPR faultToEPR = new LogicalEPR("TestJBPMReplyESB", "Reply") ;
        faultToEPR.getAddr().addExtension(ReplyAction.REPLY_TYPE, "fault") ;
        call.setFaultTo(faultToEPR) ;
       
        final ServiceInvoker si = new ServiceInvoker("TestJBPMReplyESB", "Create") ;
        si.deliverAsync(message) ;
       
View Full Code Here

        esbMessage.getBody().add(message);
       
        ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);

        // Set up fault routing...
        esbMessage.getHeader().getCall().setFaultTo(new LogicalEPR("ESBServiceSample", "FaultService"));

        try {
            invoker.deliverAsync(esbMessage);
        }catch(Exception ex) {
           ex.printStackTrace();
View Full Code Here

            public void test() throws Exception {
                ServiceInvoker invoker = new ServiceInvoker("ServiceCat", "CallService");
                Message message = MessageFactory.getInstance().getMessage();
                ActionProcessingException exception = new ActionProcessingException("Exception!!!");

                message.getHeader().getCall().setFrom(new LogicalEPR("A", "B"));
                Message faultMessage = Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, exception);

                // Should not get a MessageDeliverException...
                invoker.deliverAsync(faultMessage);
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.eprs.LogicalEPR

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.