cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the label KEY in receiver JDBC

former_member184166
Participant
0 Kudos

Hi,

I need a little help with an issue.

SOAP ---> XI -


> JDBC

I'm working in a synchronous scenario.

I have a "sender" created with the SOAP adapter and one "receiver" created with JDBC adapter (select)

When I have a call to SOAP, it returns the next error:

-


<?xml version="1.0"?>

<!-- see the documentation -->

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP:Body>

<SOAP:Fault>

<faultcode>SOAP:Server</faultcode>

<faultstring>Server Error</faultstring>

<detail>

<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">

<context>XIAdapter</context>

<code>DeliveryException</code>

<text><![CDATA[

com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'F_CAPBIN' (structure 'Statement'): java.sql.SQLException: FATAL ERROR: Column 'ID_COLUM' does not exist in table 'EXAMPLE_TABLE'

at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:451)

at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:127)

at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:832)

at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)

at com.sap.engine.frame.core.thread.Task.run(Task.java(Compiled Code))

at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java(Compiled Code))

at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java(Compiled Code))

]]></text>

</s:SystemError>

</detail>

</SOAP:Fault>

</SOAP:Body>

</SOAP:Envelope>

-


I'm doing the select statement over a existing valid table, like the field 'ID_COLUM'. Through some modifications in the query statement, I realize that the problem is in the KEY field, from reply message. (Message for a receiver, is a specific formatted message)

I mean, it doesn't matter what value I put there, error persists.

Message format for the receiver, I can validate it in: http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

This problem is because of the output XML structure .

Ie input to the JDBC Adapter.

Is your database Table contains the column called 'ID_COLUM' . This should be equalent to the Reciever XML structure. (Case sensitive) Check it.

For more on the format-http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

Regards,

Moorthy

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

.....

<binfmov></binfmov>

<access>

change

<access> to </access> and try to execute

former_member184166
Participant
0 Kudos

Hi,

Here I send the structures you asked for.

The table Structure

f_capbin

(binlote NUMBER(6,0) NOT NULL,

bincod NUMBER(5,0) NOT NULL,

binfec DATE NOT NULL,

binori NUMBER(2,0) NOT NULL,

binmpri NUMBER(2,0) NOT NULL,

bincort NUMBER(2,0) NOT NULL,

binvari NUMBER(3,0) NOT NULL,

bintbot NUMBER(3,0) NOT NULL,

bintcor NUMBER(3,0) NOT NULL,

binest NUMBER(1,0),

binppro NUMBER(6,3),

binpbrue NUMBER(8,3),

binpnete NUMBER(8,3),

bincante NUMBER(5,0),

binpbrus NUMBER(8,3),

binpnets NUMBER(8,3),

bincants NUMBER(5,0),

binstatu NUMBER(2,0),

binsal DATE,

binppe NUMBER(2,0),

binspe NUMBER(3,0),

binpps NUMBER(2,0),

binsps NUMBER(3,0),

binusu CHAR(10),

marca NUMBER(1,0),

bintemb NUMBER(2,0),

binemba NUMBER(7,2),

binno NUMBER(6,0),

binclien NUMBER(10,0),

binreser NUMBER(6,0) DEFAULT 0,

binulmov CHAR(8),

binfmov DATE)

the JDBC request message

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CONS_EXISTENCIA_BD xmlns:ns0="urn:agrosuper:vina:produccion:despacho">

<Statement>

<F_CAPBIN action="SELECT">

<table>F_CAPBIN</table>

<access>

<binlote></binlote>

<bincod></bincod>

<binfec></binfec>

<binori></binori>

<binmpri></binmpri>

<bincort></bincort>

<binvari></binvari>

<bintbot></bintbot>

<bintcor></bintcor>

<binest></binest>

<binppro></binppro>

<binpbrue></binpbrue>

<binpnete></binpnete>

<bincante></bincante>

<binpbrus></binpbrus>

<binpnets></binpnets>

<bincants></bincants>

<binstatu></binstatu>

<binsal></binsal>

<binppe></binppe>

<binspe></binspe>

<binpps></binpps>

<binsps></binsps>

<binusu></binusu>

<marca></marca>

<bintemb></bintemb>

<binemba></binemba>

<binno></binno>

<binclien></binclien>

<binreser></binreser>

<binulmov></binulmov>

<binfmov></binfmov>

<access>

<key>

<binusu>jlopez</binusu>

</key>

</F_CAPBIN>

</Statement>

</ns0:MT_CONS_EXISTENCIA_BD>

Thanks for your help !!!

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

the error message displayed previously stated that thye coluymn ID_COLUM does not ecxist i the table example_table.

Is it the same error message that is displayed with this XML request message also?

The request message looks perfectly fine. If it still doesnt work, would suggest changing the column namesin your XML trucutre to CAPITALS.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Just found the reason for the problem.

In the Datatype that you have created , you have created the tags with the Name of the columns to be selected.

Actually, what should be done is, <b>the name of the tag can be anything, but the coumn name should be passed as a a value to the tag,</b>

eg:

<b><binlote>binlote</binlote>

or

<col1>binlote</col1></b>

The same has to be done for all your columns.

Regards,

Bhavesh

former_member184166
Participant
0 Kudos

I understand, but like put the value of the column in TAG KEY ?

eg:

SELECT binlote, binusu, marca

FROM f_capbin

WHERE binusu = JLOPEZ

what I understood, it would have thus to be something:

<Statement>

<f_capbin action="SELECT">

<table>f_capbin</table>

<access>

<col>binlote</col>

<col>binusu</col>

<col>marca</col>

</access>

<key>

????

</key>

</f_capbin>

</Statement>

Then, as it would be the KEY ??

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

<i><Statement>

<f_capbin action="SELECT">

<table>f_capbin</table>

<access>

<col>binlote</col>

<col>binusu</col>

<col>marca</col>

</access>

<b><key>

<binusu>JLOPEZ </binusu>

</key></b></f_capbin>

</Statement></i>

Regards,

Bhavesh

former_member184166
Participant
0 Kudos

Hi Bhavesh

If you see the statement that i published two post back it's exactly that you say...but the error persist.

Regards.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

In this dataype, you were not passing the name of the column as a value to the field,

<i><?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CONS_EXISTENCIA_BD xmlns:ns0="urn:agrosuper:vina:produccion:despacho">

<Statement>

<F_CAPBIN action="SELECT">

<table>F_CAPBIN</table>

<access>

<binlote></binlote>

<bincod></bincod>

<binfec></binfec>

<binori></binori>

<binmpri></binmpri>

<bincort></bincort>

<binvari></binvari>

<bintbot></bintbot>

<bintcor></bintcor>

<binest></binest>

<binppro></binppro>

<binpbrue></binpbrue>

<binpnete></binpnete>

<bincante></bincante>

<binpbrus></binpbrus>

<binpnets></binpnets>

<bincants></bincants>

<binstatu></binstatu>

<binsal></binsal>

<binppe></binppe>

<binspe></binspe>

<binpps></binpps>

<binsps></binsps>

<binusu></binusu>

<marca></marca>

<bintemb></bintemb>

<binemba></binemba>

<binno></binno>

<binclien></binclien>

<binreser></binreser>

<binulmov></binulmov>

<binfmov></binfmov>

<access>

<key>

<binusu>jlopez</binusu>

</key>

</F_CAPBIN>

</Statement>

</ns0:MT_CONS_EXISTENCIA_BD></i>

This is how it should have been,

<b><i><?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CONS_EXISTENCIA_BD xmlns:ns0="urn:agrosuper:vina:produccion:despacho">

<Statement>

<F_CAPBIN action="SELECT">

<table>F_CAPBIN</table>

<access>

<binlote>binlote</binlote>

<bincod>bincod</bincod>

<binfec>binfec</binfec>

<binori>binori</binori>

<binmpri>binmpri</binmpri>

<bincort>bincort</bincort>

<binvari>binvari</binvari>

<bintbot>bintbot</bintbot>

<bintcor>bintcor</bintcor>

<binest>binest</binest>

<binppro>binppro</binppro>

<access>

<key>

<binusu>jlopez</binusu>

</key>

</F_CAPBIN>

</Statement>

</ns0:MT_CONS_EXISTENCIA_BD></i></b>

If this is the data type that you have created, can you look into the Adapter Moniotirng and state the error being displaed?

Also, as you are using a Receiver JDBC adapter to select rows from the DB, you should have made a synchronous call to the JDBC adapter and created a response message for it.

What is the format of the response message that you have created.

It should be something of this sort,

<i><?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CONS_EXISTENCIA_BD_response xmlns:ns0="urn:agrosuper:vina:produccion:despacho">

<row> 0 to UB

<binlote>binlotevalue</binlote>

<bincod>bincodvalue</bincod>

<binfec>binfecvalue</binfec>

<binori>binorivalue</binori>

<binmpri>binmprivalue</binmpri>

<bincort>bincortvalue</bincort>

<binvari>binvarivalue</binvari>

<bintbot>bintbotvalue</bintbot>

<bintcor>bintcorvalue</bintcor>

<binest>binestvalue</binest>

<binppro>binpprovalue</binppro>

</row>

</ns0:MT_CONS_EXISTENCIA_BD_response></i>

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

As the error message states clearly , the column ID_COLUMN does not exist in your table.

If the name of the column is ID , then just give it as ID in your XML strucutre.

You need to give a suffix as COLUMN , etc.

If you give us the table struture, the JDBC request message you have created , then the response format also can be found out and the exact cause of your problem can be occured at.

Regards,

Bhavesh

former_member184166
Participant
0 Kudos

I tried changing between lowercase and uppercase letters in KEY tag, but results was the same.

I validated format with that link you sent, and they're the same.

I accesing to an Oracle database.

moorthy
Active Contributor
0 Kudos

Hi,

Can you post your input xml structure (ie. input JDBC /JDBC structure )?

I think this will give some more information.

Regards,

Moorthy