This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.redhat.jboss.esb.filter; | |
import java.util.Map; | |
import org.jboss.soa.esb.actions.ActionProcessingException; | |
import org.jboss.soa.esb.actions.SystemPrintln; | |
import org.jboss.soa.esb.couriers.CourierException; | |
import org.jboss.soa.esb.filter.InputOutputFilter; | |
import org.jboss.soa.esb.helpers.ConfigTree; | |
import org.jboss.soa.esb.message.Message; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?><smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"> | |
<params> | |
<param name="stream.filter.type">SAX</param> | |
<param name="inputType">input.xml</param> | |
<param name="input.xml" type="input.type.actived">Workspace://esb-sqlRouter-demo/esbContent/META-INF/cliente.xml</param> | |
</params> | |
<jb:bean beanId="cliente" class="aaa.bbb.ccc.Cliente" createOnElement="/pedido/cliente"> | |
<jb:value data="/pedido/cliente/@cpf" decoder="Integer" property="cpf"/> | |
<jb:value data="/pedido/cliente/primeiro-nome" property="primeiroNome"/> | |
<jb:value data="/pedido/cliente/ultimo-nome" property="ultimoNome"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pedido numero="123456789"> | |
<data-entrada>25-04-2010</data-entrada> | |
<hora-entrada>16:47</hora-entrada> | |
<cliente cpf="798274"> | |
<primeiro-nome>Ricardo</primeiro-nome> | |
<ultimo-nome>Ferreira</ultimo-nome> | |
<ativo>true</ativo> | |
</cliente> | |
<produtos> | |
<produto codigo="123"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<jbossesb | |
parameterReloadSecs="5" | |
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd | |
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"> | |
<providers> | |
<jms-provider connection-factory="ConnectionFactory" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<action name="sqlRouter" class="org.jboss.soa.esb.actions.routing.sql.SQLRouter"> | |
<property name="driver-class" value="com.mysql.jdbc.Driver" /> | |
<property name="connection-url" value="jdbc:mysql://localhost/sqlRouterDemo" /> | |
<property name="user-name" value="root" /> | |
<property name="password" value="root" /> | |
<property name="table-name" value="TAB_CLIENTE" /> | |
<property name="operation-type" value="UPDATE" /> | |
<property name="show-sql" value="true" /> | |
<property name="columns"> | |
<column name="ATIVO" value="true" update="true" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message.getBody().add("primeiroNomeParam", "'Ricardo'"); | |
message.getBody().add("ultimoNomeParam", "'Ferreira'"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<action name="sqlRouter" class="org.jboss.soa.esb.actions.routing.sql.SQLRouter"> | |
<property name="datasource" value="java:/sqlRouterDemoDS" /> | |
<property name="table-name" value="TAB_CLIENTE" /> | |
<property name="operation-type" value="INSERT" /> | |
<property name="columns"> | |
<column name="PRIMEIRO_NOME" esb="primeiroNomeParam" /> | |
<column name="ULTIMO_NOME" esb="ultimoNomeParam" /> | |
<column name="ATIVO" value="true" /> | |
</property> | |
</action> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<action name="sqlRouter" class="org.jboss.soa.esb.actions.routing.sql.SQLRouter"> | |
<property name="datasource" value="java:/sqlRouterDemoDS" /> | |
<property name="table-name" value="TAB_CLIENTE" /> | |
<property name="operation-type" value="INSERT" /> | |
<property name="columns"> | |
<column name="PRIMEIRO_NOME" value="'Ricardo'" /> | |
<column name="ULTIMO_NOME" value="'Ferreira'" /> | |
<column name="ATIVO" value="true" /> | |
</property> | |
</action> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<action name="sqlRouter" class="org.jboss.soa.esb.actions.routing.sql.SQLRouter"> | |
<property name="driver-class" value="com.mysql.jdbc.Driver" /> | |
<property name="connection-url" value="jdbc:mysql://localhost/db_sqlRouterDemo" /> | |
<property name="user-name" value="root" /> | |
<property name="password" value="root" /> | |
<property name="table-name" value="TAB_CLIENTE" /> | |
<property name="operation-type" value="INSERT" /> | |
<property name="columns"> | |
<column name="PRIMEIRO_NOME" value="'Ricardo'" /> | |
<column name="ULTIMO_NOME" value="'Ferreira'" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE TAB_CLIENTE ( | |
CPF int(11) NOT NULL AUTO_INCREMENT, | |
PRIMEIRO_NOME varchar(20) NOT NULL, | |
ULTIMO_NOME varchar(20) NOT NULL, | |
DATA_NASC datetime DEFAULT NULL, | |
ATIVO tinyint(1) DEFAULT NULL, | |
PRIMARY KEY (CPF) | |
) |