cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Receiver Adapter - Synchronous call error in response structure - PI 7.31

abranjan
Active Participant
0 Kudos
325

Hi All,

I am working on a SOAP->JDBC synchronous scenario in PI 7.31 single stack.

I am getting an error while running the scenario saying "com.sap.aii.utilxi.misc.api.BaseRuntimeException; The content of elements must consist of well-formed character data or markup.". This error is encountered in response mapping.

I am running SQL_QUERY as access in mapping for the JDBC adapter and fetching a count. Query is like 'Select count(field) from table where (condition)'

Based on that, I have only one field in response structure 'COUNT'.

Since I'm getting error in response mapping, my guess is that the response structure is not correct. I was unable to find any thread which tells about the response structure in case of  SQL_QUERY.

Please help me in identifying the issue that is causing the failure. Any guidance for JDBC response structures will be highly appreciated.

Thanks,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

HI Ranjam

Check this link for SQL_QUERY response Defining an SQL_QUERY Statement - Advanced Adapter Engine - SAP Library

Regards.

abranjan
Active Participant
0 Kudos

Hi Inaki,

Thanks for sharing the link. I've maintained my request the same way.

The problem I feel is with the response structure. The link doesn't have it either as in how the response structure will look like. Any inputs on JDBC response structure?

Thanks,

Abhishek

iaki_vila
Active Contributor
0 Kudos

Hi Ranjan,

You are right, check Baskar answer in this thread

Regards.

abranjan
Active Participant
0 Kudos

Hi Inaki,

Thanks again for replying. The link you provided has a scenario where a select is done on table fields and in response structure, the same fields are created.

My case is a bit different here. I'm not doing a select on field rather I'm doing a 'count'. I followed the approach similar to select fields and thus created 'COUNT' as the only field in my response structure as mentioned in the top of the thread.

Can we execute statements like select count(field) from table where (condition)?

Thanks,

Abhishek

iaki_vila
Active Contributor
0 Kudos

HI Rajan,

A thread with the SELECT COUNT problem:

Regards.

former_member184720
Active Contributor
0 Kudos

Hi Ranjan - As suggested in the above thread, you can change the select query to capture the output into a field/ check the response payload and define your data type accordingly.

abranjan
Active Participant
0 Kudos

Hi Inaki,

Thanks again. That is the same way I'd structured my JDBC response. Still, my error persists.

Below is the message log from message monitor:

MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Runtime Exception when executing application mapping program com/sap/xi/tf/_*****_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; The content of elements must consist of well-formed character data or markup.

Any idea what can be the root cause of this error?

former_member184720
Active Contributor
0 Kudos

Did you change the select query to "select count(*) COUNT from tablename" in your request mapping? where COUNT is your response strcture field.

Also you can check the response payload and see how the data is coming from database..

abranjan
Active Participant
0 Kudos

Hi Hareesh/Inaki,

Perfect. Works like a charm now.

Thanks a lot. I missed on that.

Thanks for your time.

Regards,

Abhishek

Answers (0)