Package org.jboss.soa.esb.message

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


     * @param message The ESB Message object that contains the overrides in its properties.
     * @param configTree The configTree the properties on the ESB Message object will override.
     */
    public static void overrideSmtpProperties(final Message message, final ConfigTree configTree)
    {
        final Properties properties = message.getProperties();
        override(Email.HOST, properties, configTree);
        override(Email.PORT, properties, configTree);
        override(Email.USERNAME, properties, configTree);
        override(Email.PASSWORD, properties, configTree);
        override(Email.AUTH, properties, configTree);
View Full Code Here


            }
        }

        @Override
        public Object decompose(Message message, T invocationRequest) throws MessageDeliverException {
            Properties properties = message.getProperties();
            String propertyNames[] = properties.getNames();
            Map responseMap = getJBRResponseMap(invocationRequest);

            for(String name : propertyNames) {
                Object value = properties.getProperty(name);

                if(value instanceof ResponseHeader) {
                  // JBESB-2511
                    ResponseHeader header = (ResponseHeader)value;
                    header.putNameValue(responseMap);
View Full Code Here

            messageRequest = body.get() ;
        }
        final String contents = String.valueOf(messageRequest) ;
        ebwsServer.logMessage(contents) ;
       
        final Properties props = message.getProperties() ;
        final String wsaMessageID = (String) props.getProperty(Environment.WSA_MESSAGE_ID) ;
        log(ebwsServer, wsaMessageID) ;
       
        final String response = (message.getBody().get(EBWSUtil.ERROR) != null ? EBWSUtil.INVALID_RESPONSE : EBWSUtil.VALID_RESPONSE) ;
        ebwsServer.logMessage(response) ;
       
View Full Code Here

    }
   
    public void testOldSerializedPropertiesDeserialisation()
        throws Exception
    {
        final Properties properties = (Properties)deserialise("old_properties.ser") ;
        validateOldProperties(properties) ;
    }
View Full Code Here

    }
   
    public void testNewSerializedPropertiesDeserialisation()
        throws Exception
    {
        final Properties properties = (Properties)deserialise("new_properties.ser") ;
        validateNewProperties(properties) ;
    }
View Full Code Here

        _config = config;
    }


    public Message process(Message message) throws Exception {
        Properties properties = message.getProperties();

        System.out.println("=========== Server Request: ====================================");
        System.out.println("Message Payload:");
        System.out.println("\t[" + message.getBody().get() + "]");

        System.out.println();
        System.out.println("\tHeaders:");
        System.out.println("\t\thost: " + properties.getProperty("host"));
        System.out.println("\t\tMethod: " + properties.getProperty("MethodType"));
        System.out.println("\t\tPath: " + properties.getProperty("Path"));
        System.out.println("\t\tuser-agent: " + properties.getProperty("user-agent"));
        System.out.println("\t\tcontent-type: " + properties.getProperty("content-type"));
        System.out.println("================================================================");

        message.getBody().add("Http Response Payload!!");

        return message;
View Full Code Here

    final String propertyValue = "myPropertyValue";
    fromJMSTextMessage.setStringProperty( propertyKey, propertyValue );
   
    setter.setPropertiesFromJMSMessage( fromJMSTextMessage , toESBMessage );
   
    Properties properties = toESBMessage.getProperties();
    assertNull(properties.getProperty(propertyKey));
  }
View Full Code Here

        final String propertyValue = "myPropertyValue";
        fromJMSTextMessage.setStringProperty( propertyKey, propertyValue );
       
        setter.setPropertiesFromJMSMessage( fromJMSTextMessage , toESBMessage );
       
        Properties properties = toESBMessage.getProperties();
    assertNull(properties.getProperty(propertyKey));
    }
View Full Code Here

    }

    private void initialiseWSAProps(final Message esbReq, final MAP props)
    {
        final String messageID = props.getMessageID() ;
        final Properties esbReqProps = esbReq.getProperties() ;
       
        if (messageID != null)
        {
            esbReqProps.setProperty(Environment.WSA_MESSAGE_ID, messageID) ;
        }
        final MAPRelatesTo relationship = props.getRelatesTo() ;

        if (relationship != null)
        {
            final String[] relatesTo = new String[1] ;
            final String[] relationshipType = new String[1] ;
            relatesTo[0] = relationship.getRelatesTo() ;
            final QName type = relationship.getType() ;
            if (type != null)
            {
                relationshipType[0] = type.toString() ;
            }
            else
            {
                relationshipType[0] = ADDRESSING_REPLY.toString() ;
            }
            esbReqProps.setProperty(Environment.WSA_RELATES_TO, relatesTo) ;
            esbReqProps.setProperty(Environment.WSA_RELATIONSHIP_TYPE, relationshipType) ;
        }
    }
View Full Code Here

  private void setProperties( final Message fromJMSMessage, final org.jboss.soa.esb.message.Message toESBMessage ) throws JMSException
  {
    @SuppressWarnings("unchecked")
    Enumeration<String> properties = fromJMSMessage.getPropertyNames();
    Properties esbProperties = toESBMessage.getProperties();
    if (null != properties)
    {
      while (properties.hasMoreElements())
      {
        final String key = properties.nextElement();
       
        if (filter() && propertiesPattern.matcher(key).matches())
            continue;
       
        final Object value = fromJMSMessage.getObjectProperty(key);
        if (null != value)
          esbProperties.setProperty(key, value);
      }
       }
  }
View Full Code Here

TOP

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

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.