|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (6)
View Page Historyh1. Feature
The FTP component is a Binding Component (BC) which supports FTP command.
The SQL component is a Binding Component (BC) which supports SQL instructions in Data Manipulation Language, through the Java Data Base Connectivity API (JDBC).
This component provides a set of X operations:
These operations are described in an embedded WSDL.
h3. Execute Operation
When the {{execute}} operation is set on the incoming message exchange, the component performs the SQL instructions contained in the IN message. If the execution returns information (an SQL SELECT for example), the OUT message contains the SQL ResultSet.
When the {{execute}} operation is set on the incoming message exchange, the component performs the SQL instructions contained in the IN message. If the execution returns information (an SQL SELECT for example), the OUT message contains the SQL ResultSet.
{info}If you want to see extra information on the response, you can set the show-metadata attribute to true. The response will contains row index, column name and type.{info}
The IN message looks like :
{code:xml}
{code:xml}
<sql show-metadata="true">SELECT name, firstname FROM user WHERE id='123'</sql>
{code}
{code}
The OUT message returned to the consumer contains the XML representation of the ResultSet returned by the SQL statement execution. If metadata have been enabled, their are set as attributes.
{code:xml}
<executeResponse xmlns="http://petals.ow2.org/components/sql/version-1">
<row index='1'>
<column name='name' type='varchar'>Field</column>
<column name='firstname' type='varchar'>Jean</column>
</row>
<row index='2'>
<column name='name' type='varchar'>Foo</column>
<column name='firstname' type='varchar'>John</column>
</row>
</executeResponse>
{info}The ResultSet can be written in the OUT message by a thread while the reponse message is sent back by another thread (pipes strreaming mechanism), increasing performance. To enable this feature, set the {{org.ow2.petals.transport.streaming=true}} property on the JBI Exchange, or set the {{streamingMode}} parameter of the Service Unit (in this case, the streaming mode is active for all requests).{info}
{info}The execute operation is defined in the SQL component abstract WSDL. You can import this abstract WSDL and define a concret WSDL to reference in your SU.{info}
{code:xml}
<executeResponse xmlns="http://petals.ow2.org/components/sql/version-1">
<row index='1'>
<column name='name' type='varchar'>Field</column>
<column name='firstname' type='varchar'>Jean</column>
</row>
<row index='2'>
<column name='name' type='varchar'>Foo</column>
<column name='firstname' type='varchar'>John</column>
</row>
</executeResponse>
{info}The ResultSet can be written in the OUT message by a thread while the reponse message is sent back by another thread (pipes strreaming mechanism), increasing performance. To enable this feature, set the {{org.ow2.petals.transport.streaming=true}} property on the JBI Exchange, or set the {{streamingMode}} parameter of the Service Unit (in this case, the streaming mode is active for all requests).{info}
{info}The execute operation is defined in the SQL component abstract WSDL. You can import this abstract WSDL and define a concret WSDL to reference in your SU.{info}
{code}
h2. Configuration