Package org.jboss.soa.esb.addressing

Examples of org.jboss.soa.esb.addressing.Call


      System.out.println(message.getHeader().getCall().getMessageID());
  }

  private final void deliver (String url) throws Exception
  {
    Call call = new Call(getEpr(url));
    call.setMessageID(new URI(UUID.randomUUID().toString()));

    Message message = MessageFactory.getInstance().getMessage();
    message.getHeader().setCall(call);
    message.getBody().add("Hello World".getBytes());
    Courier courier = CourierFactory.getCourier(call.getTo());

    courier.deliver(message);
  }
View Full Code Here


      {
        System.out.println("Usage SendEsbMessage <category> <name> <text to send>");
      }
      // Create a message, assign it a UID, and fill in call information
      Message esbMessage = MessageFactory.getInstance().getMessage();
      Call  call = new Call();
      call.setMessageID(new URI(UUID.randomUUID().toString()));
      esbMessage.getHeader().setCall(call);
     
      // set body contents with args[2], and send
      esbMessage.getBody().add(args[2]);
     
View Full Code Here

    toEpr.setInputSuffix(TEST_SUFFIX);
   
    Message msg = MessageFactory.getInstance().getMessage();
    msg.getBody().add(contents.getBytes());

    Call call = new Call(toEpr);
    String uid = UUID.randomUUID().toString();
    call.setMessageID(new URI(uid));
    msg.getHeader().setCall(call);
   
    CourierUtil.deliverMessage(msg);
   
    String timeSent = (String) msg.getProperties().getProperty(Environment.MESSAGE_ENTRY_TIME);
View Full Code Here

   
    msg.getFault().setReason(errorMessage);
    msg.getFault().setCode(code);
    msg.getFault().setCause(new IOException());

    Call call = new Call(toEpr);
    String uid = UUID.randomUUID().toString();
    call.setMessageID(new URI(uid));
    msg.getHeader().setCall(call);
   
    CourierUtil.deliverMessage(msg);
   
    File theFile = new File(_tmpDir,uid+TEST_SUFFIX);
View Full Code Here

    toEpr.setInputSuffix(TEST_SUFFIX);
   
    Message msg = MessageFactory.getInstance().getMessage();
    msg.getBody().add(contents.getBytes());

    Call call = new Call(toEpr);
    String uid = UUID.randomUUID().toString();
    call.setMessageID(new URI(uid));
    msg.getHeader().setCall(call);
   
    CourierUtil.deliverMessage(msg);
    File theFile = new File(_tmpDir,uid+TEST_SUFFIX);
    Assert.assertTrue(theFile.exists());
View Full Code Here

   
    Message msg = MessageFactory.getInstance().getMessage();
    msg.getBody().add(contents.getBytes());
    msg.getBody().add("exampleObj", new ExampleObject("hello", 1234));
   
    Call call = new Call(toEpr);
    final String uid = UUID.randomUUID().toString();
    call.setMessageID(new URI(uid));
    msg.getHeader().setCall(call);
   
    CourierUtil.deliverMessage(msg);
    File theFile = new File(_tmpDir,uid+TEST_SUFFIX);
    Assert.assertTrue(theFile.exists());
View Full Code Here

    Message msg = MessageFactory.getInstance().getMessage(
        MessageType.JBOSS_XML);

    assertNotNull("created message", msg);

    Call call = new Call();

    msg.getHeader().setCall(call);
   
    call = msg.getHeader().getCall();
   
View Full Code Here

        if (null!=variableMap)
            body.add(Constants.VARIABLE_VALUES, variableMap);

        if (_replyToOriginator) {
            final Call call = message.getHeader().getCall() ;
            setEPR(body, Constants.REPLY_TO, getEPR(call.getReplyTo())) ;
            setEPR(body, Constants.FAULT_TO, getEPR(call.getFaultTo())) ;
        }
  }
View Full Code Here

    if ((message == null) || (callDetails == null) || (toEPR == null))
    {
      return false ;
    }
   
    final Call replyCallDetails = message.getHeader().getCall() ;
    replyCallDetails.setTo(toEPR) ;
    replyCallDetails.setFrom(callDetails.getTo()) ;
    replyCallDetails.setReplyTo(null) ;
    replyCallDetails.setFaultTo(null) ;
    replyCallDetails.setRelatesTo(callDetails.getMessageID()) ;
    replyCallDetails.setMessageID(null) ;
   
    return true ;
  }
View Full Code Here

    int eprCount = 0;

        for (Message attachmentMessage : attachmentMessages) {
          Header header = attachmentMessage.getHeader();
      if(header != null) {
              Call call = header.getCall();
        if(call != null) {
                replyToEPRs.add(call.getReplyTo());
                eprCount++;
              }
          }
        }
   
        // Only map the replyTo EPR if all attachments have the same replyTo EPR...
        if(replyToEPRs.size() == 1 && eprCount == attachmentMessages.size()) {
          Call call = aggregatedMessage.getHeader().getCall();
      if(call == null) {
        call = new Call();
        aggregatedMessage.getHeader().setCall(call);
      }     
      call.setReplyTo(replyToEPRs.iterator().next());
        } else if(logger.isDebugEnabled()) {
          if(replyToEPRs.size() == 0) {
            logger.debug("Not mapping replyTo EPR for aggregate message '" + uuId + "'.  No replyTo EPR to be mapped.");
          } else if(replyToEPRs.size() > 1) {
            logger.debug("Not mapping replyTo EPR for aggregate message '" + uuId + "'.  Not all replyTo EPRs are the same: " + replyToEPRs);
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.Call

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.