cancel
Showing results for 
Search instead for 
Did you mean: 

Calling RFC Adapter fails - convert error

peter_jarsunek
Participant
0 Kudos

Hi,

I have a problem with calling RFC Adapter. I'm using JDBC->XI->RFC scenario. JDBC does just "select 'W' from dual". In the destination SAP system RFC function is created for test purposes. This function has one parameter - string type. After calling it, it should write a sysdate into the SAP Z_ table. The XI should call the function with the 'W' parameter. But this fails. Everything is ok, but calling the RFC returns following error (copied from the Runtime Workbench -> Message Monitoring :

Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'W', in "u

(Yes, this is thw whole error message. I don't know what u should be...)

Did someone get this error?

Thanx 4 answers, Peter

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi again,

here is the update what I've learned during my eliminative investigation. The two XML messages will follow. The FIRST one passes without problem however the SECOND one does NOT. Please note the name(!) of the import-pramater names.

FIRST XML message:

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

- <ns0:Z_BAPI_PARAMETERS_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<PARAM>Z_XID_500</PARAM>

- <b><ZTTOTH_STRUCT></b>

<PARAM1>Z_XID_500</PARAM1>

</ZTTOTH_STRUCT>

</ns0:Z_BAPI_PARAMETERS_TEST_XI>

SECOND XML message:

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

- <ns0:Z_BAPI_PARAMETERS_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<PARAM>Z_XID_500</PARAM>

- <b><ZTTOTH_BAPI></b>

<PARAM1>Z_XID_500</PARAM1>

</ZTTOTH_BAPI>

</ns0:Z_BAPI_PARAMETERS_TEST_XI>

In my point of view there is obvious BUG in the parser of the adapter.

So what would you say ???

Cheers. Tom

bekirakturk
Explorer
0 Kudos

stop and restart comm channel from RWB

Former Member
0 Kudos

Hello all,

Let me reopen the topic of my colleague. I'm facing the same error though with bit different symptoms. Here it is.

ERROR msg:

Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'Z', in "T

The XML message (MainDocument):

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

- <ns0:Z_BAPI_ACCESSIBILITY_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<BAPI1008 />

<PARAM>Z_XID_500_ACC</PARAM>

<ZTTOTH_BAPI1008 />

- <b><ZTTOTH_STRUCT>

<PARAM1></b>Z_XID_500_ACC</PARAM1>

</ZTTOTH_STRUCT>

</ns0:Z_BAPI_ACCESSIBILITY_TEST_XI>

According to the error message the parser expects behind string ...<ZTTOTH_STRUCT><PARAM1> another tag, but the question is why.

To make all this more funny here I paste another XML message of BAPI calling which works fine (without the error described above):

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

- <ns0:Z_BAPI_PARAMETERS_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<PARAM>Z_XID_500</PARAM>

- <ZTTOTH_STRUCT>

<PARAM1>Z_XID_500</PARAM1>

</ZTTOTH_STRUCT>

</ns0:Z_BAPI_PARAMETERS_TEST_XI>

The BAPI functions are absolutely the same except those other two import-pramater structures (BAPI1008 and ZTTOTH_BAPI1008). I'm gonna to try to add those import-parameter structures into Z_BAPI_PARAMETERS_TEST_XI, but anyway - this is weird.

Does anybody have an idea, what should be wrong ?

Thx. Tom

Message was edited by: Tomas Toth

MichalKrawczyk
Active Contributor
0 Kudos

Hi Peter,

can you paste the target RFC-xml that you get

when you test "jdbc to rfc" mapping?

Regards,

michal

peter_jarsunek
Participant
0 Kudos

Hi,

this is the xml produced by the JDBC Adapter

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

<ns:Message1String xmlns:ns="http://appg.com/peter">

<row>

<W>W</W>

</row>

</ns:Message1String>

and this should by mapped XML for RFC

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

<ns0:Z_XI_HELLO_WORLD_TEST xmlns:ns0="urn:sap-com:document:sap:rfc:functions">W</ns0:Z_XI_HELLO_WORLD_TEST>

Z_XI_HELLO_WORLD_TEST is the function in the SAP destination system. I suppose, that W should be the parameter of the RFC call.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

it looks like tour RFC has no parameters

1. try activatiing RFC

2. try reimporting it again into the repository

then check if in the Repository - Imported Objects - RFC you see the correct structure of the RFC (with the W parameter)

Regards,

michal

Message was edited by: Michal Krawczyk

MichalKrawczyk
Active Contributor
0 Kudos

Hi Peter,

after you reimport/activate the RFC it should look something like this (when you test it):

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

<ns0:Z_XI_HELLO_WORLD_TEST xmlns:ns0="urn:sap-com:document:sap:rfc:functions"><W>date</W></ns0:Z_XI_HELLO_WORLD_TEST>

Regards,

michal

MichalKrawczyk
Active Contributor
0 Kudos

one more thing, remember that the W parameter has to be created as an "Import" parameter in the RFC

Regards,

michal

peter_jarsunek
Participant
0 Kudos

Thanx guys 4 all your answers! The problem was, that the function in SAP had been re-created and in IX I was still using old specification.