cancel
Showing results for 
Search instead for 
Did you mean: 

File to Jdbc Scenario

Former Member
0 Kudos

Hi All,

I am doing a File to JDBC scenario, where sender side message type occurance is 0..unbounded and receiver side message type occurance is 1 in message mapping. The whole scenario working fine when both sender and receiver side message type occurance is 1 in message mapping.

When Sender side occurance is 1.

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

<ns0:mt_smtjdbc_sender xmlns:ns0="http://SmartJDBC">

<NAME>A</NAME>

<DEPT>B</DEPT>

</ns0:mt_smtjdbc_sender>

When Sender side occurance is 0..unbounded.

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">

<NAME>Dip</NAME>

<DEPT>xi</DEPT>

</ns1:mt_smtjdbc_sender>

</ns0:Message1>

</ns0:Messages>

If I use Sender side occurance as 0..unbounded I am getting the following error in adapter engine Communication channel monitor (for receiver communication channel)

Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

Can anybody please help me how to solve this problem?

Dipankar

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Take receiver side one node with occurence 0 ...unbound and map those (o..unbound)two nodes.

it will give better result.

Regards

Former Member
0 Kudos

HI,

But as per my requirement during message mapping my sender side message type should have occurance 0..unbounded and receiver side message type should have occurance 1.

former_member194786
Active Contributor
0 Kudos

Hi Dipankar,

Can you please provide more details about your scenario here. It will be easier to give some suggestions based upon that.

Regards,

Sanjeev.

Former Member
0 Kudos

hi,

r u doing n:1 mapping?

if not at a time only one message will come, then y u r taking sender message type occurance 0..unbounded?

sreedhar goud.

Former Member
0 Kudos

Hi,

My Sender side structure as follows.

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">

<NAME>DIp</NAME>

<DEPT>XI</DEPT>

</ns1:mt_smtjdbc_sender>

</ns0:Message1>

</ns0:Messages>

My corresponding Receiver side structure as follows.

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:mt_smtjdbc_receiver xmlns:ns1="http://SmartJDBC">

<Statement>

<dbTableName action="INSERT">

<TABLE>SMARTOP</TABLE>

<access>

<NAME>DIp</NAME>

<DEPT>XI</DEPT>

</access>

</dbTableName>

</Statement>

</ns1:mt_smtjdbc_receiver>

</ns0:Message1>

</ns0:Messages>

former_member194786
Active Contributor
0 Kudos

Hi Dipankar,

From what i understand of your requirement, you get multiple files and you need to send multiple insert requests to the JDBC based upon each file. If that is the case create a mapping and create a target structure like this:

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

<ns0:mt_smtjdbc_sender xmlns:ns0="http://SmartJDBC">

<Root>

<NAME>A</NAME>

<DEPT>B</DEPT>

<Root>

</ns0:mt_smtjdbc_sender>

Now you can send multiple requests by making your Root node as 0...unbounded and then map it to the Statement tag on the target side. Thus for each Root one request will be created.

Refer to this blog for the same:

Bhavesh has used it the same way.

Correct me if i have understood your requirement wrongly.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

it is not possible for me to change the structure of sender side.The sender side structure is as follows.

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">

<NAME>A</NAME>

<DEPT>B</DEPT>

</ns1:mt_smtjdbc_sender>

</ns0:Message1>

</ns0:Messages>

Regards

Dipankar

former_member194786
Active Contributor
0 Kudos

Hi Dipankar,

Try mapping the Message type mt_smtjdbc_sender to the Statement node of the target and then change the context if required. I think it should work.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

I mapped mt_smtjdbc_sender to Statement, but mt_smtjdbc_sender occurrence is 0..unbounded and Statement occurrence is 1. Till now I am getting the same problem.

Thanks

Dipankar

former_member194786
Active Contributor
0 Kudos

Hi Dipankar,

Are you using Message merge here???? If so you must be using BPM right??? In that case i think it will be better you change the source structure as i suggested and try to do the scenario. I think it should work.

Did you go through the link that i had provided?

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

Yes I am using BPM, but that is already done. If I don't use BPM then also I think this problem can be solved. I can not change the BPM structure under any circumstances.

Thanks

Dipankar

Former Member
0 Kudos

hi,

sender and Receiver JDBC Adaptor Config using XI

-


JDBC to JDBC

https://wiki.sdn.sap.com/wiki/display/XI/JDBCTOJDBC

Regards

former_member192295
Active Contributor
0 Kudos

Hi,

I think it is due to occurance problem,make sure both side occurance should be same else it will throw error. Make both side occurance 0..unbound, i think u didn't get any problem.

Former Member
0 Kudos
former_member194786
Active Contributor
0 Kudos

Hi Dipankar,

Why are you using source side message type occurence as 0...unbounded? You can send the request message as follows:

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

<ns0:mt_smtjdbc_sender xmlns:ns0="http://SmartJDBC">

<Root>

<NAME>A</NAME>

<DEPT>B</DEPT>

<Root>

</ns0:mt_smtjdbc_sender>

Here you can have the occurence of root as 0...unbounded. Thus you can send multiple requests.

Let me know if i have not understood your requirement clearly.

Also check your target side xml structure. It would be helpful to find the reason for error, if you can provide it here.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi,

Check that Have you created the JDBC Structure according to this Blog

REgards

Seshagiri