cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc adapter in reciever side

Former Member
0 Kudos

Hi

I have configured reciever channel to jdbc adapter.I have queried database by Select col_nam from table wher value=...

Please can you tell me the location where i will get the output resulset.

Thanking you in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Piyush,

For getting the resultset you need another msg type and data type with the same name (eg:<i>something</i>_<b>response</b>.Here you specify the column names which needs to be fetched.

And dont forget to map this response to anotehr msg type(eg:http response)as this is a case f a sync scenario.

Regards,

Priyanka

Former Member
0 Kudos

hi

Thanks for giving idea about synchronous sender and synchronous reciever.I have got the idea what you are saying but i would like to have asynhronous sender channel(file) and synchronous reciever channel (jdbc).

I would like to put "the response of the query" at particular directory.Please tell me where should i configure the target directory.

Thanking you in advance.

Regards

piyush

Former Member
0 Kudos

Hi Piyush,

create another msg type which catches the response from the db.In the ID,cretae a new commn channel using recvr file adapter where you specify the target directory where u need the response in form of file.

First you need to create a bpm with foll steps:

1) recv step(gets input from file)

2)sync send(send data to jdbc and get response)

3)send step(send response to file)

good luck!!!

Priyanka

Former Member
0 Kudos

Hi priyanka

thanks for your suggestion.

In current scenario,is same as 3 steps described by you.

but that one is with bpm.

Bpm is not used,

here ,I am using sender as a asynchonous outbound interface .

and reciever as a synchronous inbound interface.

I want enquire that can i specify target diretory for a response from reciever?

If yes,then please let me know how?

for synchonous reciever for any adapter, I have yo use bpm or .......

Please guide me.

Thanks in advance.

Regards

piyush

Former Member
0 Kudos

Hi Piyush,

To get the response back from JDBC receiver you need to configure your interface with the response structure.

Refer this weblog for configuring JDBC receiver response.

/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response

Refer the SAP documention below for response structure format.

"action=SELECT

Statements with this action cause existing table values to be selected. Therefore, the statement corresponds to an SQL SELECT statement.

The <access> block contains the column names to be selected, a <key>element contains the columns whose values must be identical with the specified value to get the new column values. The name of the <key> element is arbitrary. Column values within a <key> element are combined with a logical AND; different <key>elements are combined with a logical OR.

A statement with the action SELECT must have exactly one <access>element. The number of <key> elements with arbitrary names is not restricted.

The corresponding SQL statement for StatementName4in the example above is as follows:

SELECT col1,col2,col3 FROM dbTableName WHERE ((col2=’val2old’ AND col4=’val4’) OR (col2=’val2old2’))

If there is no <key> element, or if there is a <key> element but it is empty, then no condition is specified and the entire table is to be selected. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.

The response document contains the result of the action in XML format as follows:

<row>

<column1>value11</column1>

<column2>value12</column2>

...

</row>

...

<row>

<column1>valueN1</column1>

<column2>valueN2</column2>

...

</row>

hope this helps..

Regards

Anand

Message was edited by: Anand Torgal