Package org.jboss.soa.esb.listeners.message

Examples of org.jboss.soa.esb.listeners.message.MessageDeliverException


        AuthenticationRequest authRequest = ExtractorUtil.extract(message.getBody().get().toString(), extractors);
        ExtractorUtil.addAuthRequestToMessage(authRequest, message);
      }
      catch( ExtractionException e )
      {
        throw new MessageDeliverException( e.getMessage(), e );
      }
      catch( SecurityServiceException e )
      {
        throw new MessageDeliverException( e.getMessage(), e );
      }
    }
  }
View Full Code Here


    public Message compose(T inputFile) throws MessageDeliverException {
        AssertArgument.isNotNull(inputFile, "inputFile");

        if(!inputFile.exists()) {
            throw new MessageDeliverException("Invalid File payload.  File '" + inputFile.getAbsolutePath() + "' doesn't exist.");
        }

        // Split the file input stream...
        try {
            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());
       
View Full Code Here

    byte[] bodyBytes = null;

        try {
      bodyBytes = StreamUtils.readStream(request.getInputStream());
    } catch (IOException e) {
      throw new MessageDeliverException("Failed to read body data from http request", e);
    }

        //Set http request info
    message.getProperties().setProperty(HTTP_REQUEST_INFO_MAP, getRequestInfo(request));
    if (paraMap != null && !paraMap.isEmpty()) {
View Full Code Here

                response.setStatus(status);
            } else {
                response.setStatus(HttpServletResponse.SC_OK);
            }
        } catch (IOException e) {
      throw new MessageDeliverException("Unexpected error when write the message to http response", e);
    }

        return null;
  }
View Full Code Here

        public Object decompose(Message message, T inputFile) throws MessageDeliverException {
            try {
                return _responderMethod.invoke(_composer, message, inputFile);
            } catch (IllegalAccessException e) {
                throw new MessageDeliverException("Legacy composer class ('" + _composerClass.getName() + "') responder method '" + _responderMethod.getName() + "' is not callable.", e);
            } catch (InvocationTargetException e) {
                throw new MessageDeliverException("Legacy composer class ('" + _composerClass.getName() + "') responder method '" + _responderMethod.getName() + "' failed with exception.", e.getCause());
            }
        }
View Full Code Here

    public Message compose(T inputFile) throws MessageDeliverException {
        AssertArgument.isNotNull(inputFile, "inputFile");

        if(!inputFile.exists()) {
            throw new MessageDeliverException("Invalid File payload.  File '" + inputFile.getAbsolutePath() + "' doesn't exist.");
        }

        Message message = MessageFactory.getInstance().getMessage();
        try {
            payloadProxy.setPayload(message, getPayload( inputFile ) );
        } catch (IOException e) {
            throw new MessageDeliverException("Error reading input file '" + inputFile.getAbsolutePath() + "'.", e);
        } catch (MimeDecodeException e) {
            throw new MessageDeliverException("Error decoding input file '" + inputFile.getAbsolutePath() + "' payload using '" + mimeDecoder.getClass().getName() + "'.  Wrong MimeDecoder, or MimeDecoder may require additional configuration.", e);
    }

        // Add some metadata about the file....
        message.getProperties().setProperty(PROP_FILE_OBJ, inputFile);
        message.getProperties().setProperty(PROP_FILE_PATH, inputFile.getAbsolutePath());
View Full Code Here

    String camelMessageId = camelMessageIn.getMessageId();
    if (camelMessageId != null) {
      try {
        esbMessageIn.getHeader().getCall().setMessageID(new URI(camelMessageId));
      } catch (URISyntaxException e) {
        throw new MessageDeliverException("problem creating messageID", e);
      }
    }
   
    // maintain correlation
    setRelatesTo(camelMessageIn.getExchange(), esbMessageIn);
View Full Code Here

      URI relatesTo = call.getRelatesTo();
      if (relatesTo == null) {
        try {
          relatesTo = new URI(InVMEpr.INVM_PROTOCOL, "correlationID", exchangeId);
        } catch (URISyntaxException e) {
          throw new MessageDeliverException("problem creating relatesTo", e);
        }
        call.setRelatesTo(relatesTo);
      }
    }
  }
View Full Code Here

            Class c = ClassUtil.forName(lbClass, this.getClass());
            loadBalancer = (LoadBalancePolicy) c.newInstance();
            loadServiceClusterInfo();
        } catch (ClassNotFoundException clf) {
            logger.error("No such LoadBalancePolicy class = " + lbClass);
            throw new MessageDeliverException(clf.getMessage(), clf);
        } catch (InstantiationException ie) {
            logger.error("Could not instatiate LoadBalancePolicy class = " + lbClass);
            throw new MessageDeliverException(ie.getMessage(), ie.getCause());
        } catch (IllegalAccessException iae) {
            logger.error("Illegal access while instantiating LoadBalancePolicy class = " + lbClass);
            throw new MessageDeliverException(iae.getMessage(), iae);
        }
    }
View Full Code Here

                }
            } else {
                throw mde;
            }
        } catch (FaultMessageException ex) {
            throw new MessageDeliverException("Unexpected FaultMessageException during message delivery.", ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.listeners.message.MessageDeliverException

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.