Package org.jboss.soa.esb.message

Examples of org.jboss.soa.esb.message.Message


      throw new SmooksConfigurationException ("Atleast one of [" + SEND_IN_VISIT_BEFORE + "] and [" + SEND_IN_VISIT_AFTER + "] must be true" );
  }

  protected Message createMessage( final Element element )
  {
    Message message = MessageFactory.getInstance().getMessage();
    message.getBody().add( element );
    return message;
  }
View Full Code Here


            // Try the exec context...
            object = executionContext.getAttribute(beanId);
        }

        if(object != null) {
            Message message = MessageFactory.getInstance().getMessage();

            if(!(object instanceof Serializable)) {
                logger.warn("Request to route non Serializable Object.  beanId: '" + beanId + "'.  Type: " + object.getClass().getName());
            }

            message.getBody().add(setPayloadLocation, object);

            // TODO: Add aggregation stuff...
            // Might be better to add something generic ala setting properties based on templates

            try {
View Full Code Here

    }
  }
 
  public Message delegateToESBServiceSync( final Message message, final long timeout ) throws FaultMessageException, MessageDeliverException, RegistryException
  {
    Message returnedMessage = null;
    if ( message != null )
      returnedMessage =  serviceInvoker.deliverSync( message, timeout );
   
    return returnedMessage;
  }
View Full Code Here

            split(new FileInputStream(inputFile));
        } catch (IOException e) {
            throw new MessageDeliverException("Exception while splitting file input stream for file '" + inputFile.getAbsolutePath() + "'.", e);
        }

        Message message = MessageFactory.getInstance().getMessage();
        message.getBody().add(inputFile.getAbsolutePath());
       
        return message;
    }
View Full Code Here

    // Create the delivery adapter for the target service (cache it)
    ServiceInvoker deliveryAdapter = new ServiceInvoker(
        "MyServiceCategory", "Webserviceconsumer_wise2");

    // Create and populate the request message...
    Message requestMessage = MessageFactory.getInstance().getMessage(
        MessageType.JBOSS_XML);
    ExternalObject external = new ExternalObject();
    InternalObject internal = new InternalObject();
    internal.setNumber(new Integer(1));
    internal.setText(message);
    external.setInternal(internal);
    String dateString = "2007-03-07T04:27:00";
    Date date = (new SimpleDateFormat(DEFAULT_DATE_FORMAT))
        .parse(dateString);
    external.setDate(date);
    requestMessage.getBody().add(external);

    // Deliver the request message synchronously - timeout after 20
    // seconds...
    deliveryAdapter.deliverAsync(requestMessage);
  }
View Full Code Here

      channel_map.remove("channel_3");
    RuleInfo ruleInfo = new RuleInfoBuilder("RuleServiceCallHelper.drl").channels(channel_map).build();
    StatefulRuleInfo statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, true, false);
   
    // create the message
    Message message = MessageFactory.getInstance().getMessage();
   
    // execute the rules (which will execute the channels)
    new DroolsRuleService().executeStatefulRules(statefulRuleInfo, message);
    assertEquals(4, TestChannel.count);
    }
View Full Code Here

  private JBossRulesRouter jbrRouter;

  @Test
  public void routeSerializedMessage() throws MessageRouterException
  {
    Message message = createMessage( MessageType.JAVA_SERIALIZED );
    ConfigTree configTree = new CBRConfigTreeBuilder( true ).ruleFile( "JBossESBRules.drl").build();
    jbrRouter.setConfigTree( configTree );

    List<String> destinationServices = jbrRouter.route(null, false, message, null);
    assertNotNull(destinationServices);
View Full Code Here

  }

  @Test
  public void routeSerializedMessageDecisionTableStateless() throws MessageRouterException
  {
    Message message = createMessage( MessageType.JAVA_SERIALIZED );

    ConfigTree configTree = new CBRConfigTreeBuilder( true ).decisionTable( "RuleBaseHelper.xls").build();
    jbrRouter.setConfigTree( configTree );

    List<String> destinationServices = jbrRouter.route( null, false, message, null);
View Full Code Here

  }

  @Test
  public void routeSerializedMessageDecisionTableStateful() throws MessageRouterException
  {
    Message message = createMessage( MessageType.JAVA_SERIALIZED );

    ConfigTree configTree = new CBRConfigTreeBuilder( true ).decisionTable( "RuleBaseHelper.xls").stateful( true ).build();
    jbrRouter.setConfigTree( configTree );

    List<String> destinationServices = jbrRouter.route( null, false, message, null);
View Full Code Here

  }

  @Test
  public void routeXMLMessage() throws MessageRouterException
  {
    Message message = createMessage( MessageType.JBOSS_XML);
    ConfigTree configTree = new CBRConfigTreeBuilder( true ).ruleFile( "JBossESBRules.drl").build();
    jbrRouter.setConfigTree( configTree );
    List<String> destinationServices = jbrRouter.route(null, null, false, message, null);
    assertEquals(destinationServices.iterator().next(),"xml-destination");
  }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.message.Message

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.