Examples of Message


Examples of org.apache.axis.Message

        org.apache.axis.MessageContext messageContext = new org.apache.axis.MessageContext(null);
        req.setAttribute(MESSAGE_CONTEXT, messageContext);

        messageContext.setClassLoader(classLoader);

        Message responseMessage = null;

        String contentType = req.getHeader(HTTPConstants.HEADER_CONTENT_TYPE);
        String contentLocation = req.getHeader(HTTPConstants.HEADER_CONTENT_LOCATION);
        InputStream inputStream = req.getInputStream();
        Message requestMessage = new Message(inputStream, false, contentType, contentLocation);

        messageContext.setRequestMessage(requestMessage);
        messageContext.setProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO, req.getURI().getPath());
        messageContext.setProperty(org.apache.axis.MessageContext.TRANS_URL, req.getURI().toString());
        messageContext.setService(service);
        messageContext.setProperty(REQUEST, req);
        messageContext.setProperty(RESPONSE, res);
        messageContext.setProperty(AxisEngine.PROP_DISABLE_PRETTY_XML, Boolean.TRUE);

        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            try {
                String characterEncoding = (String) requestMessage.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
                if (characterEncoding != null) {
                    messageContext.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, characterEncoding);
                } else {
                    messageContext.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "UTF-8");
                }


                String soapAction = req.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
                if (soapAction != null) {
                    messageContext.setUseSOAPAction(true);
                    messageContext.setSOAPActionURI(soapAction);
                }

                SOAPEnvelope env = requestMessage.getSOAPEnvelope();
                if (env != null && env.getSOAPConstants() != null) {
                    messageContext.setSOAPConstants(env.getSOAPConstants());
                }
                SOAPService service = messageContext.getService();
View Full Code Here

Examples of org.apache.axis2.jaxws.message.Message

        Boolean value = (Boolean)
                requestMsgContext.getAxisMessageContext().getProperty(Constants.SAVE_REQUEST_MSG);
        if (value != null && value.booleanValue()) {
            // REVIEW: This does not properly account for attachments.
            Message m = requestMsgContext.getMessage();
            String savedMsg = m.getAsOMElement().toString();
            requestMsgContext.getAxisMessageContext()
                    .setProperty(Constants.SAVED_REQUEST_MSG_TEXT, savedMsg);
        }
    }
View Full Code Here

Examples of org.apache.camel.Message

     */
    protected DynamicQueryContext createDynamicContext(Exchange exchange) throws Exception {
        Configuration config = getConfiguration();
        DynamicQueryContext dynamicQueryContext = new DynamicQueryContext(config);

        Message in = exchange.getIn();
        Source source = null;
        try {
            Item item = in.getBody(Item.class);
            dynamicQueryContext.setContextItem(item);
        } catch (NoTypeConversionAvailableException e) {
            try {
                source = in.getBody(Source.class);
            } catch (NoTypeConversionAvailableException e2) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("No body available on exchange so using an empty document: " + exchange);
                }
                source = converter.toSource(converter.createDocument());
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.Message

     */
    private void initMessageParameters() {
        if ((pairSeparator == null) || (keyValuePairSeparator == null)) {
            for (Class<?> cl : models) {
                // Get annotation @Message from the class
                Message message = cl.getAnnotation(Message.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (message != null) {
                    // Get Pair Separator parameter
                    ObjectHelper.notNull(message.pairSeparator(), "No Pair Separator has been defined in the @Message annotation");
                    pairSeparator = message.pairSeparator();
                    LOG.debug("Pair Separator defined for the message: {}", pairSeparator);

                    // Get KeyValuePair Separator parameter
                    ObjectHelper.notNull(message.keyValuePairSeparator(), "No Key Value Pair Separator has been defined in the @Message annotation");
                    keyValuePairSeparator = message.keyValuePairSeparator();
                    LOG.debug("Key Value Pair Separator defined for the message: {}", keyValuePairSeparator);

                    // Get carriage return parameter
                    crlf = message.crlf();
                    LOG.debug("Carriage return defined for the message: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = message.isOrdered();
                    LOG.debug("Is the message ordered in output: {}", messageOrdered);
                }

                if (section != null) {
                    // Test if section number is not null
View Full Code Here

Examples of org.apache.cassandra.net.Message

    public Message getMessage() throws IOException
    {
        DataOutputBuffer dob = new DataOutputBuffer();
        serializer.serialize(this, dob);
        return new Message(FBUtilities.getLocalAddress(),
                           StorageService.Verb.RANGE_SLICE,
                           Arrays.copyOf(dob.getData(), dob.getLength()));
    }
View Full Code Here

Examples of org.apache.cometd.bayeux.Message

    public void publish(Message[] msgs) {
        if (msgs==null) return;
        MessageImpl[] imsgs = new MessageImpl[msgs.length];
        for (int i=0; msgs!=null && i<msgs.length; i++) {
            Message data = msgs[i];

            if (!(data instanceof MessageImpl))
                throw new IllegalArgumentException("Invalid message class, you can only publish messages "+
                                                   "created through the Bayeux.newMessage() method");
            /*if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.commons.scaffold.util.Message

    String template) {

      // Any other way to do this?
    BizResponse bizResponse =
      new org.apache.commons.scaffold.util.BizResponseImpl();
    Message message =
        new org.apache.commons.scaffold.util.MessageImpl(
      template,
      mapping.getPath(),
      mapping.getParameter()
    );
View Full Code Here

Examples of org.apache.cxf.common.i18n.Message

            buildToolContext();
            validate(context);
            FrontEndProfile frontend = context.get(FrontEndProfile.class);

            if (frontend == null) {
                Message msg = new Message("FOUND_NO_FRONTEND", LOG);
                throw new ToolException(msg);
            }

            WSDLConstants.WSDLVersion version = getWSDLVersion();
View Full Code Here

Examples of org.apache.cxf.message.Message

    @SuppressWarnings("unchecked")
    public synchronized boolean doIntercept(Message message) {
        updateIterator();
        pausedMessage = message;

        Message oldMessage = CURRENT_MESSAGE.get();
        try {
            CURRENT_MESSAGE.set(message);
            while (state == State.EXECUTING && iterator.hasNext()) {
                try {
                    Interceptor currentInterceptor = iterator.next();
View Full Code Here

Examples of org.apache.deltaspike.core.api.message.Message

    @Test
    public void testArbitraryMessageContextRendering()
    {
        final LocaleResolver localeResolver = new FixedGermanLocaleResolver();
        final Message message = this.messageContext
                .localeResolver(localeResolver)
                .messageResolver(new TestMessageResolver())
                .message().template("{hello}").argument("hans");
        Assert.assertEquals("Test Nachricht an hans", message.toString());

        final MessageContext messageContext2 = this.messageContext.clone().localeResolver(
                new FixedEnglishLocalResolver());
        Assert.assertEquals("test message to hans", message.toString(messageContext2));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.