Package org.jboss.soa.esb.addressing

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


      return processPipeline(message, getSecurityContext(message));
    }
    else
    {
        final Call callDetails = createCallDetails(message);
      if (LOGGER.isDebugEnabled())
      {
        LOGGER.debug("pipeline process disabled for message: "+message.getHeader());
      }
View Full Code Here


  }

  private boolean processPipeline(final Message message)
  {
    final long start = System.nanoTime();
    final Call callDetails = createCallDetails(message);

      boolean result = false ;
      String validationFailure = null ;
      if (requestSchema != null)
      {
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    private Call createCallDetails(final Message message)
    {
        Call callDetails;
        try
        {
            callDetails = new Call(message.getHeader().getCall());
        }
        catch (final URISyntaxException e)
        {
            LOGGER.error("Caught an URISyntaxException while calling Call's copy constructor. Will revert to using the old way using the copy method.", e);
            callDetails = new Call();
        callDetails.copy(message.getHeader().getCall()) ;
        }
        return callDetails;
    }
View Full Code Here

        suspendTransaction = configTree.getBooleanAttribute(ListenerTagNames.SUSPEND_TRANSACTION, false);
    }

    public Message process(Message message) throws ActionProcessingException {
        // Zap the faulto and replyto EPRs before sending...
        Call call = message.getHeader().getCall();
        EPR faultTo = call.getFaultTo();
        EPR replyTo = call.getReplyTo();
        Object txObject = null;

        if(isTransactional() && suspendTransaction) {
            try {
                txObject = TransactionStrategy.getTransactionStrategy(true).suspend();
            } catch (TransactionStrategyException e) {
                throw new ActionProcessingException("Error suspending transaction on service '" + serviceInvoker.getService() + "'", e);
            }
        }

        try {
            call.setFaultTo(null);
            call.setReplyTo(null);

            return serviceInvoker.deliverSync(message, timeout);
        } catch (Exception e) {
            // No real need to reset the EPRs because the pipeline has already captured them, but
            // lets do it anyway...
            call.setFaultTo(faultTo);
            call.setReplyTo(replyTo);

            if (failOnException) {
                throw new ActionProcessingException("Error delivering message to service '" + serviceInvoker.getService() + "'", e);
            } else {
                logger.debug("Exception during deliverSync().  Action configured to continue.", e);
View Full Code Here

    private MessageImpl(final MessageImpl message)
    {
        // Header and context are not by reference.
        _theHeader = new HeaderImpl() ;
        final Call origCall = message._theHeader.getCall() ;
        final Call call = new Call(origCall.getTo()) ;
        call.setAction(origCall.getAction()) ;
        call.setFaultTo(origCall.getFaultTo()) ;
        call.setFrom(origCall.getFrom()) ;
        call.setMessageID(origCall.getMessageID()) ;
        call.setRelatesTo(origCall.getRelatesTo()) ;
        call.setReplyTo(origCall.getReplyTo()) ;
        _theHeader.setCall(call) ;
        _theContext = new ContextImpl(message._theContext) ;
       
        _theBody = message._theBody ;
        _theFault = message._theFault ;
View Full Code Here

public class HeaderImpl extends ElementContent implements Header
{
  public HeaderImpl ()
  {
    _call = new Call();
  }
View Full Code Here

     * @throws XMLStreamException For errors during parsing.
     */
    public CallImpl(final XMLStreamReader in)
        throws XMLStreamException
    {
        this.call = new Call() ;
        parse(in) ;
       
        if (extensions.size() > 0)
        {
            final EPR origEPR = call.getTo() ;
View Full Code Here

 
  public static Message invokeAndAwaitResponse(Message message, String category, String name
            ,int maxWaitMillis)
    throws RegistryException, MalformedEPRException, CourierException, CourierTimeoutException, ServiceNotFoundException
  {
    Call call  = message.getHeader().getCall();
    Collection<EPR> eprs = RegistryUtil.getEprs(category, name);
    if (null==eprs || eprs.size()<1)
      throw new RegistryException("No eprs found for <"+category+","+name+">");
    EPR service = eprs.iterator().next();
    call.setTo(service);
    return invokeAndAwaitResponse(message, maxWaitMillis);
  }
View Full Code Here

   * @throws CourierTimeoutException - If response was not received in specified time
   */
  public static Message invokeAndAwaitResponse(Message outgoing ,int maxWaitMillis)
    throws CourierException, MalformedEPRException, CourierTimeoutException
  {
    Call call  = outgoing.getHeader().getCall();
    if (null==call.getMessageID())
    {
      URI   uri  = null;
      try  { uri = new URI(UUID.randomUUID().toString()); }
      catch (URISyntaxException e)
      {
        _logger.fatal("Failed to create URI: "+e);       
        throw new CourierException(e);
      }
      call.setMessageID(uri);
    }
   
    Courier sender = CourierFactory.getCourier(call.getTo());
                PickUpOnlyCourier receiver = null;
                try
                {
                        boolean waitForResponse = (maxWaitMillis > 0);
                        if (waitForResponse)
                        {
                                if (null==call.getReplyTo())
                                        call.setReplyTo(DefaultReplyTo.getReplyTo(call.getTo()));
                                receiver        = CourierFactory.getPickupCourier(call.getReplyTo());
                        }
                       
                        sender.deliver(outgoing);
                        return (waitForResponse ? receiver.pickup(maxWaitMillis) : null) ;
                }
View Full Code Here

 
  private MessageImpl(final MessageImpl message)
  {
    // Header and context are not by reference.
    _theHeader = new HeaderImpl() ;
    final Call origCall = message._theHeader.getCall() ;
    final Call call = new Call(origCall.getTo()) ;
    call.setAction(origCall.getAction()) ;
    call.setFaultTo(origCall.getFaultTo()) ;
    call.setFrom(origCall.getFrom()) ;
    call.setMessageID(origCall.getMessageID()) ;
    call.setRelatesTo(origCall.getRelatesTo()) ;
    call.setReplyTo(origCall.getReplyTo()) ;
    _theHeader.setCall(call) ;
    _theContext = new ContextImpl(message._theContext) ;
   
    _theBody = message._theBody ;
    _theFault = message._theFault ;
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.