ESB WSO2 - Connecting to a local MySQL database ["Registry entry defined with key: com.mysql.jdbc.Driver not found"] - mysql

First of all I want to say that I'm a beginner with ESB WSO2.
I want to connect to a MySQL DataBase and I get this error:
"Error DB Mediator datasource: null.Registry entry defined with key: com.mysql.jdbc.Driver not found."
"DataSource: null was not initialized for given JNDI properties"
This is my code:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/api/dbtask" name="api.dbtask" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET">
<inSequence>
<dblookup>
<connection>
<pool>
<driver key="com.mysql.jdbc.Driver"/>
<url key="jdbc:mysql://localhost:3306/utilizatori"/>
<user key="root"/>
<password key="1234"/>
</pool>
</connection>
<statement>
<sql><![CDATA[SELECT * FROM people WHERE id=1;]]></sql>
<parameter expression="//m0:getQuote/m0:request/m0:symbol" type="VARCHAR" xmlns:m0="https://services.samples"/>
<result column="nume" name="nume"/>
</statement>
</dblookup>
<!--
<log level="custom">
<property name="ID" expression="get-property('id')" />
<property name="NAME" expression="get-property('nume')" />
<property name="AGE" expression="get-property('varsta')" />
</log>
-->
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>

There is an issue with the connection pool you have added. The above format is used to get the configuration values from the registry [1],[2]. If you want to define the connection pool inline you need to use the following format [3].
<dblookup xmlns="http://ws.apache.org/ns/synapse">
<connection>
<pool>
<driver>org.apache.derby.jdbc.ClientDriver</driver>
<url>jdbc:derby://localhost:1527/esbdb;create=false</url>
<user>esb</user>
<password>esb</password>
</pool>
</connection>
<statement>
<sql><![CDATA[select * from company where name =?]]></sql>
<parameter expression="//m0:getQuote/m0:request/m0:symbol" type="VARCHAR" xmlns:m0="http://services.samples/xsd"/>
<result column="id" name="company_id"/>
</statement>
</dblookup>
[1]-https://docs.wso2.com/display/EI640/Managing+the+Registry
[2]-https://ei.docs.wso2.com/en/7.2.0/micro-integrator/references/mediators/dBLookup-Mediator/#connection-pool-configurations
[3]-https://ei.docs.wso2.com/en/7.2.0/micro-integrator/references/mediators/dBLookup-Mediator/#example

Related

WSO2: xml to json data mapping in wso2 esb : json message is wrapped in soap envelope

I am working on one request where the input message is xml and it has to be converted to json. I am using data mapper to do this.
Configured proxy service for the same and below is the code for it:
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="xmltojson_to_Partneronb" startOnLoad="true" transports="vfs
http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<log level="full">
<property name="property_name" value="Initial reading file"/>
</log>
<datamapper config="gov:datamapper/ProducerPartnerOnb.dmc" inputSchema="gov:datamapper/ProducerPartnerOnb_inputSchema.json" inputType="XML" outputSchema="gov:datamapper/ProducerPartnerOnb_outputSchema.json" outputType="JSON"/>
<log level="full">
<property name="property_name" value="after enriching"/>
</log>
<property name="messageType" scope="axis2" type="STRING" value="application/json"/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
<parameter name="transport.PollInterval">1</parameter>
<parameter name="transport.vfs.FileURI">file:///tmp/in</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file:///tmp/failure</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file:///tmp/out</parameter>
</proxy>
From the logs which you have provided the SOAP format is not framed correctly, below is the formatted SOAP Response.
<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/envelope/">
;
<soapenv:Body>
<jsonObject>
<FirstName>ABC</FirstName>
<MiddleInitial>m</MiddleInitial>
<LastName>LN</LastName>
<Email>test#test.com</Email>
<Company>Test</Company>
<Address1>200 West St</Address1>
<Address2>hjhjhj</Address2>
</jsonObject>
</soapenv:Body>
</soapenv:Envelope>
After SOAP envelop ends there is a ; due to which you are getting error, you need to rectify this.

Unable to get response in JSON format after aggregation in WSO2 ESB

I have a proxy service to search a user in multiple systems and should return the combined responses in JSON format.I get the responses combined but instead of getting it in JSON format I get the responses in XML format.
I can see JSON responses in WSO2 server logs as below:
[2016-07-19 07:26:58,249] INFO - LogMediator To: http://www.w3.org/2005/08/addr
essing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:895c4303-6de5-49
88-a4d1-c06275582841, Direction: response, Component = Application2, Payload: {
"findUsers":[
{"id":"20","add_state":"0","remove_state":"0","supervisor_id_name":"","idc_id":"
3","backup_supervisor_name":"","backup_supervisor":"","business_unit_id":"","com
pany":"companyb","creation_date":"2016-05-11 18:02:42.0","deletion_date":"","dep
artment":"922","display_name":"Kevin Mollo (companyb)","email_address":"Kevin.Mo
llo#companyb.com","exception_count":"","first_name":"Kevin","is_terminated":"Fal
se","job_status":"Active","last_name":"Mollo","legacy_employee_id":"171352","sup
ervisor_id":"","termination_date":"","title":"Broadband Technician","unique_id":
"9000070","user_id":"user71","violation_count":""}
]
}
[2016-07-19 07:26:58,888] INFO - LogMediator To: http://www.w3.org/2005/08/addr
essing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:0cee9dc3-b6e6-48
81-9bdd-a89ec22999a7, Direction: response, Component = Application1, Payload: {"vi
ewableIdentityAttributes":{"Email":"Kevin.Mollo#companyb.com","cn":"Kevin Mollo"
,"Last Name":"Mollo","First Name":"Kevin"},"assignedRoles":[],"listAttributes":[
"First Name","Last Name","Email","cn"]}
However, I don't get response in JSON format after calling the proxy url.
Below is my ESB configuration:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SPRSAPproxy"
transports="http,https"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<log/>
<clone>
<target>
<sequence>
<property name="Application" value="Application1"/>
<property name="messageType"
value="application/xacml+json"
scope="axis2"
type="STRING"/>
<property name="Authorization"
expression="fn:concat('Basic ', base64Encode('username:password'))"
scope="transport"/>
<send>
<endpoint>
<address uri="http://hostname1:8080/identityiq/rest/identities/9000070"/>
</endpoint>
</send>
</sequence>
</target>
<target>
<sequence>
<property name="Application" value="Application2"/>
<property name="messageType"
value="application/json"
scope="axis2"
type="STRING"/>
<send>
<endpoint>
<address uri="http://hostname2:8080/aveksa/command.submit?cmd=findUsers&format=json&unique_id=9000070"/>
</endpoint>
</send>
</sequence>
</target>
</clone>
</inSequence>
<outSequence>
<log level="full" description="">
<property name="Component" expression="get-property('Application')"/>
</log>
<aggregate>
<completeCondition>
<messageCount min="2"/>
</completeCondition>
<onComplete expression="/">
<property name="messageType"
value="application/xacml+json"
scope="axis2"
type="STRING"
description="messageType"/>
<enrich>
<source clone="true" xpath="/"/>
<target type="body"/>
</enrich>
<send/>
</onComplete>
</aggregate>
</outSequence>
<faultSequence>
<log level="full" category="WARN"/>
</faultSequence>
</target>
<description/>
</proxy>
I get the response as below:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><jsonObject><findUsers><id>20</id><add_state>0</add_state><remove_state>0</remove_state><supervisor_id_name></supervisor_id_name><idc_id>3</idc_id><backup_supervisor_name></backup_supervisor_name><backup_supervisor></backup_supervisor><business_unit_id></business_unit_id><company>companyb</company><creation_date>2016-05-11 18:02:42.0</creation_date><deletion_date></deletion_date><department>922</department><display_name>Kevin Mollo (companyb)</display_name><email_address>Kevin.Mollo#companyb.com</email_address><exception_count></exception_count><first_name>Kevin</first_name><is_terminated>False</is_terminated><job_status>Active</job_status><last_name>Mollo</last_name><legacy_employee_id>171352</legacy_employee_id><supervisor_id></supervisor_id><termination_date></termination_date><title>Broadband Technician</title><unique_id>9000070</unique_id><user_id>user71</user_id><violation_count></violation_count></findUsers></jsonObject><soapenv:Envelope><soapenv:Header/><soapenv:Body><jsonObject><viewableIdentityAttributes><Email>Kevin.Mollo#companyb.com</Email><cn>Kevin Mollo</cn><Last Name>Mollo</Last Name><First Name>Kevin</First Name></viewableIdentityAttributes><listAttributes>First Name</listAttributes><listAttributes>Last Name</listAttributes><listAttributes>Email</listAttributes><listAttributes>cn</listAttributes></jsonObject></soapenv:Body></soapenv:Envelope></soapenv:Body></soapenv:Envelope>
Please let me know how I can get the JSON response.
Any help would be greatly appreciated.
You can set the messageType to application/json instead of application/xacml+json in outSequence and try.
<property name="messageType" value="application/json" scope="axis2" type="STRING" description="messageType"/>
Also there is no application/xacml+json message formatters and message builders shipped with WSO2 ESB by default. If you need to use these formats you have to write your own formatters and builders and configure them in axis2.xml file.

WSO2 ESB not roll backing in transcation with MySQL

I am trying transaction management in wso2 esb. I have a single database and a proxy to test transaction management, success case is working properly, but failure case it is not roll backing.
My Proxy:
<proxy name="a" transports="http https jms" startOnLoad="true">
<description/>
<target>
<inSequence>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<transaction action="new"/>
<log level="custom">
<property name="text" value="** Reporting to the Database esbdb**"/>
</log>
<dbreport useTransaction="true">
<connection>
<pool>
<dsName>jdbc/db</dsName>
</pool>
</connection>
<statement>
<sql>delete from company1 where name =?</sql>
<parameter xmlns:m1="http://services.samples/xsd"
xmlns:m0="http://services.samples"
expression="//m0:return/m1:symbol/child::text()"
type="VARCHAR"/>
</statement>
</dbreport>
<log level="custom">
<property name="text" value="** Reporting to the Database esbdb1**"/>
</log>
<dbreport useTransaction="true">
<connection>
<pool>
<dsName>jdbc/db</dsName>
</pool>
</connection>
<statement>
<sql>INSERT into company2 values (?,'c4',?)</sql>
<parameter xmlns:m1="http://services.samples/xsd"
xmlns:m0="http://services.samples"
expression="//m0:return/m1:symbol/child::text()"
type="VARCHAR"/>
<parameter xmlns:m1="http://services.samples/xsd"
xmlns:m0="http://services.samples"
expression="//m0:return/m1:last/child::text()"
type="DOUBLE"/>
</statement>
</dbreport>
<transaction action="commit"/>
<send/>
</outSequence>
<faultSequence>
<property name="SET_ROLLBACK_ONLY" value="true" scope="axis2"/>
<log level="custom">
<property name="Transaction Action" value="Rollbacked"/>
</log>
<transaction action="rollback"/>
</faultSequence>
</target>
</proxy>
My master-datasource.xml
<providers>
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
</providers>
<datasources>
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<datasource>
<name>DS1</name>
<jndiConfig>
<name>jdbc/db</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<dataSourceClassName>com.atomikos.jdbc.AtomikosDataSourceBean</dataSourceClassName>
<dataSourceProps>
<property name="xaDataSourceClassName">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</property>
<property name="uniqueResourceName">jdbc/db</property>
<property name="xaProperties.databaseName">esb_sp_sample</property>
<property name="xaProperties.user">root</property>
<property name="xaProperties.password">root</property>
<property name="xaProperties.URL">jdbc:mysql://localhost:3306/esb_sp_sample</property>
<property name="poolSize">10</property>
</dataSourceProps>
</configuration>
</definition>
</datasource>
What could be the problem?
Note: I have also tried with https://docs.wso2.com/display/ESB481/Transaction+Mediator+Example having one database and 2 tables in it, but with MySQL.
I think you are missing the
<send/>
Tag at the end of your fault sequence. Your fault sequence should be as follows.
<faultSequence>
<property name="SET_ROLLBACK_ONLY" value="true" scope="axis2"/>
<log level="custom">
<property name="Transaction Action" value="Rollbacked"/>
</log>
<transaction action="rollback"/>
<send/>
</faultSequence>

WSO2 Smook response not write to file

I'm trying write the response from a proxy with Smooks Mediator on a file but nothing happens.
The mediator get a csv file with vfs option, convert to xml output and send the csv to a out directory correctely.
In console i see the ws02-esb-service.log and the xml is correctly.
But i not do get write to file.
In /u01/app/wso2esb-4.7.0/tmp/send/convert then result not appears.
And not have any error.
This is the code.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SmookTest"
transports="vfs"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<smooks config-key="smooks-registro">
<input type="text"/>
<output type="xml"/>
</smooks>
<log level="full"/>
<property name="transport.vfs.ReplyFileName"
value="test1.xml"
scope="transport"/>
<property name="OUT_ONLY" value="true"/>
<send>
<endpoint name="grabar">
<address uri="vfs:file:///u01/app/wso2esb-4.7.0/tmp/send/convert"/>
</endpoint>
</send>
</inSequence>
</target>
<parameter name="transport.vfs.ReplyFileURI">salida.xml</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.PollInterval">5</parameter>
<parameter name="transport.vfs.FileURI">/u01/app/wso2esb-4.7.0/tmp/send</parameter>
<parameter name="transport.vfs.MoveAfterProcess">/u01/app/wso2esb-4.7.0/tmp/send/out</parameter>
<parameter name="transport.vfs.MoveAfterFailure">/u01/app/wso2esb-4.7.0/tmp/send/fail</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<description/>
</proxy>
Since the VFS read as a plain/text format it will not engage the formarter until you explicitly mention it. Therefore you can mention the content type before you call the endpoint
Like
<property name="OUT_ONLY" value="true"/>
<property name="messageType"
value="application/soap"
scope="axis2"
type="STRING"/>
<send>
<endpoint name="grabar">
<address uri="vfs:file:///u01/app/wso2esb-4.7.0/tmp/send/convert"/>
</endpoint>
</send>
I found the solution.
adding format to endpoint and the file content are write correctly.
<address uri="vfs:file:///u01/app/wso2esb-4.7.0/tmp/send/convert"
format="soap11"/>

WSO2 ESB - XML to MySQL Database

I need a solution for a problem:
I just tried this example for the WSO2 ESB and it is working:
http://wso2.org/library/articles/2011/01/wso2-esb-example-file-processing
But I like to use an XML file as input and write this to a MySQL-DB.
The XML-file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<Name>word</Name>
<Surname>processor</Surname>
<Phone>12333</Phone>
</soapenv:Body>
</soapenv:Envelope>
If i put this into my "in"-folder the file will be moved to the "out"-folder, but nothing is written into the database. There is no error message.
My Proxy-Service:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="FileProxy" transports="vfs" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<log level="full"/>
<clone>
<target sequence="fileWriteSequence"/>
<target sequence="databaseSequence"/>
</clone>
</inSequence>
</target>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.MoveAfterProcess">C:/wso2esb/testordner/out</parameter>
<parameter name="transport.vfs.FileURI">C:/wso2esb/testordner/in</parameter>
<parameter name="transport.vfs.MoveAfterFailure">C:/wso2esb/testordner/error</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.xml</parameter>
<parameter name="transport.vfs.ContentType">text/xml</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<description></description>
</proxy>
And my Sequence:
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse"
name="databaseSequence"
trace="enable"
statistics="enable">
<log level="full">
<property name="sequence" value="before-smooks"/>
</log>
<smooks config-key="smooks">
<input type="xml"/>
<output type="xml"/>
</smooks>
<log level="full">
<property name="sequence" value="after-smooks"/>
</log>
<log level="full">
<property xmlns:ns="http://org.apache.synapse/xsd"
name="name"
expression="//csv-record/name/text()"/>
<property xmlns:ns="http://org.apache.synapse/xsd"
name="surname"
expression="//csv-record/surname/text()"/>
<property name="phone" value="//csv-record/phone/text()"/>
</log>
<iterate xmlns:ns2="http://org.apache.synapse/xsd"
xmlns:ns="http://org.apache.synapse/xsd"
xmlns:sec="http://secservice.samples.esb.wso2.org"
expression="//csv-set/csv-record">
<target>
<sequence>
<log level="full">
<property name="State" value="Iteration"/>
</log>
<log level="full" category="DEBUG"/>
<dbreport>
<connection>
<pool>
<password>passwort</password>
<user>esb</user>
<url>jdbc:mysql://localhost:3306/</url>
<driver>com.mysql.jdbc.Driver</driver>
</pool>
</connection>
<statement>
<sql>insert into info.info (name, surname, phone) values (?, ?, ?)</sql>
<parameter expression="//csv-record/name/text()" type="VARCHAR"/>
<parameter expression="//csv-record/surname/text()" type="VARCHAR"/>
<parameter expression="//csv-record/phone/text()" type="VARCHAR"/>
</statement>
</dbreport>
</sequence>
</target>
</iterate>
<log level="full" category="DEBUG"/>
</sequence>
I thought this would be a simple problem, but I'm not able to get it...
Like I said, it's working with a normal text-file, but not with XML. I tried different thinks and have no idea what else I could try...
Does someone know what's my mistake?
Update:
The log from the console:
[2013-04-12 09:35:55,687] INFO - DBReportMediator Successfully created data source for jdbc:mysql://localhost:3306/.
[2013-04-12 09:36:10,170] INFO - LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:
2CBD1753113A1373101365752170177, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope x
mlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<Name>word</Name>
<Surname>processor</Surname>
<Phone>12333</Phone>
</soapenv:Body></soapenv:Envelope>
[2013-04-12 09:36:10,175] INFO - LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:
a9252cd8-fe73-4e85-9f41-0842872d3a73, Direction: request, sequence = before-smooks, Envelope: <?xml version='1.0' encodi
ng='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<Name>word</Name>
<Surname>processor</Surname>
<Phone>12333</Phone>
</soapenv:Body></soapenv:Envelope>
[2013-04-12 09:36:10,178] INFO - LogMediator sequence = fileWriteSequence
[2013-04-12 09:36:10,246] INFO - LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:
a9252cd8-fe73-4e85-9f41-0842872d3a73, Direction: request, sequence = after-smooks, Envelope: <?xml version='1.0' encodin
g='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><csv-set/></soapenv
:Body></soapenv:Envelope>
[2013-04-12 09:36:10,249] INFO - LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:
a9252cd8-fe73-4e85-9f41-0842872d3a73, Direction: request, name = , surname = , phone = //csv-record/phone/text(), Envelo
pe: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><s
oapenv:Body><csv-set/></soapenv:Body></soapenv:Envelope>
[2013-04-12 09:36:11,254] WARN - TimeoutHandler Expiring message ID : urn:uuid:4c422f4e-aed5-4eaa-ad9b-e5407db20562; dr
opping message after global timeout of : 120 seconds
The fileWriteSequence looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse"
name="fileWriteSequence"
trace="enable"
statistics="enable">
<log level="custom">
<property name="sequence" value="fileWriteSequence"/>
</log>
<property xmlns:ns2="http://org.apache.synapse/xsd"
xmlns:ns="http://org.apache.synapse/xsd"
name="transport.vfs.ReplyFileName"
expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')"
scope="transport"
type="STRING"/>
<property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
<send>
<endpoint name="FileEpr">
<address uri="vfs:C:/wso2esb/testordner/out"/>
</endpoint>
</send>
</sequence>
Smooks config:
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
<!--Configure the CSVParser to parse the message into a stream of SAX events. -->
<resource-config selector="org.xml.sax.driver">
<resource>org.milyn.csv.CSVParser</resource>
<param name="fields" type="string-list">name,surname,phone</param>
</resource-config>
</smooks-resource-list>
I also changed the code of the databaseSequence above.
Thank you.
Your proxy service looks ok. But I have few concerns.
Why have you put the sql query as CDATA. Please see the sample available here.
You have not mentioned the database name in the connection url. May be it is not a problem since you have used the database.table format in your sql query.
After fixing and 1 and 2, if the issue still exists, try your proxy with only one sequence. i.e. Avoid the file write sequence temporarily and try only with the dbwrite sequence.
You can also log the entries which you are going to insert before the DBReport mediator. i.e. Right after the smooks mediator, put a log mediator and log the name, surname and phone. This will make sure you are trying to insert values which are correctly extracted from the message.