public void setPayloadProperty(Object data, Object msg, String strKey, Class<?> classKey)
   {
       String name = "set" + strKey;
       try {
           Class<?>[] params = {classKey};
           Method method = msg.getClass().getMethod(name, params);
           if (method != null)
           {
               Object[] datas = new Object[1];
               if (data != null)
                   if (!classKey.isAssignableFrom(data.getClass()))
                   {
                       data = this.convertObjectToDatatype(data, classKey);
                   }
               datas[0] = data;
               method.invoke(msg, datas);
           }
       } catch (SecurityException e) {
           e.printStackTrace();
       } catch (NoSuchMethodException e) {
           // Ignore this one
       } catch (InvocationTargetException e) {
           e.printStackTrace();
       } catch (IllegalAccessException e) {
           e.printStackTrace();
       }
       
   }
public void setPayloadProperty ( Object data , Object msg , String strKey , Class < ? > classKey ) { String name = "set" + strKey ; try { Class < ? > [ ] params = { classKey } ; Method method = msg . getClass ( ) . getMethod ( name , params ) ; if ( method != null ) { Object [ ] datas = new Object [ 1 ] ; if ( data != null ) if ( ! classKey . isAssignableFrom ( data . getClass ( ) ) ) { data = this . convertObjectToDatatype ( data , classKey ) ; } datas [ 0 ] = data ; method . invoke ( msg , datas ) ; } } catch ( SecurityException e ) { e . printStackTrace ( ) ; } catch ( NoSuchMethodException e ) { } catch ( InvocationTargetException e ) { e . printStackTrace ( ) ; } catch ( IllegalAccessException e ) { e . printStackTrace ( ) ; } }
Move this standard payload data to the xml.
@param message
@param msg
@param strKey