cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC to IDoc Mapping Problem

Former Member
0 Kudos

Hello,

I have a connection going from a SQL (via a JDBC connection), mapping into an IDOC. Connections all work, but for some reason when I turn on the communication channel to pull from the database through a SELECT statement, I only get the header of the Idoc (below). I have tried many different things and cannot see why the mapping does not seem to be working. When I load the test data as a test instance in the mapping, it works. Any help would be appreciated.

Thank you.

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

<CRMXIF_PRODUCT_MATERIAL_SAVE01 />

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Carley...

Could you check the structure of the message type that you are ussing in your outbound interface? This happends to me once because the structure of the resultset that the JDBC driver gave to XI wasn't the same that was using the Outbound interface.

I hope that this will help with your problem

Hector

Former Member
0 Kudos

Hi Hector,

Yes, the result set has the correct same structure as in the outbound interface...

Former Member
0 Kudos

the Document Name should be "resultset" in the configuraiton, correct? Does the document namespace need to be filled in? I have <TEST> in the Update field. Is that correct?

Thank you very much!

ranjit_deshmukh
Active Participant
0 Kudos

Hi Carley,

didi u try copying this message in the mapping and tested it?

please see whether u are getting a proper xml when u hit grid button.

and then please run the test.

the problem is in your mapping i guess.

moreover please see to it that if you are including the namespace in the message type it is must to mention it in the adapter(JDBC) also there is nothing wrong in the name "resultset".

Ranjit

bhavesh_kantilal
Active Contributor
0 Kudos

Carley,

In your Sender JDBC adapter, the Document Name should be the Name of the Message Type you have created in the Integration Repository.

Document Namespace should be the namespace ion which the message type is available.

Make this change in the Sender JDBC adapter and it willwork fine.

Regards

Bhavesh

Former Member
0 Kudos

Carley,

plese fill the Document name and Document namespace as speicifed by bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Document Name

The document name is inserted in the message as the main XML tag. The default value is resultset.

Document Namespace

The namespace is added to the document name.

See the example below

The system converts the table resulting from the query SQL statement into a valid XML document and sends it to the Integration Engine. The document looks like this:

<resultset>

<row>

<column-name1>column-value</ column-name1>

<column-name2>column-value</ column-name2>

<column-name3>column-value</ column-name3>

</row>

<row>

<column-name1>column-value</ column-name1>

<column-name2>column-value</ column-name2>

<column-name3>column-value</ column-name3>

</row>

</resultset>

Regards

Chilla..

Former Member
0 Kudos

Thank you all for your input. There were two problems which you helped me with:

1. The exact structure of the message - there was an extra level of XML tags which I didn't knwo had to be taken out in the mapping.

2. The Document Name and the Document Namespace were defined incorrectly.

Thank you to all!!!

Former Member
0 Kudos

Hi,

I am also getting some errors in my mapping. The xml that I got is like this:

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

- <resultset>

- <Recordset>

- <ST_Pay>

...

</ST_Pay>

</Recordset>

</resultset>

It seems these extra '-' characters are causing errors. How do I get rid of these in content conversion.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

These "-" will be displayed in a browser. But if you actually look into the Source XML , using View --> Source, you will not find this Hiphen.

regards

Bhavesh

Former Member
0 Kudos

Yes Carley...

The structure need to have the resultset tag, could you compare the structure of your message in the first step in the pipeline with you message type? check everything, spelling, upper case letter, etc.

Former Member
0 Kudos

Hi Carley,

Didi u check he trace in the message in SXMB_MONI? Also, is the data getting selected from database and sent to XI?

Regards,

Akshay

Former Member
0 Kudos

Yes, I can see it in SXMB_MONI, the file below is what I am getting from the database. There are no apparent errors in SXMB_MONI.

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

- <resultset>

- <row>

<ProductCode>03020000</ProductCode>

<OEM>Deesmill</OEM>

<SourceMill />

<SheetFoldType />

<ProductFormatCode>000</ProductFormatCode>

<ItemsperPack>1</ItemsperPack>

<NumberofPlies>2</NumberofPlies>

<BasisWeight>32.0</BasisWeight>

<BasisWeightUOM>GSM</BasisWeightUOM>

<SheetCount>76</SheetCount>

<SheetWidth>21.0</SheetWidth>

<SheetWidthUOM>CM</SheetWidthUOM>

<SheetLength>11.0</SheetLength>

<SheetLengthUOM>CM</SheetLengthUOM>

<CoreDiameter />

<CoreDiameterUOM />

<RollDiameter />

<RollDiameterUOM />

<SizeCode>000</SizeCode>

<CEMarked />

<RecycledFibrePercentage />

<Brand>KLEENEX</Brand>

<SubBrand>- none -</SubBrand>

<RegionalAvailability>EUROPE</RegionalAvailability>

<Certification />

<ColorCode>034</ColorCode>

<SalesProductCostCurrency>USD</SalesProductCostCurrency>

<SalesProductCost>23.529411764705884</SalesProductCost>

</row>