cancel
Showing results for 
Search instead for 
Did you mean: 

attribute "action" missing or wrong XML structure

pansy_leung
Explorer
0 Kudos

Does anyone know what's the problem of below XML format ? I want to triggle a stored procedure in AS/400 from SAPXI after receiving records. But the message "No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)" is found

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

<ns0:MT_t1 xmlns:ns0="http://cxx.xxx.hk/zxxxpxx/jdbc">

<storedProcedurename>

<action>EXECUTE</action>

<table>LIBRARY.PROCNAME</table>

<TRNX_TYPE IsInput="true" TYPE="CHAR">content 1</TRNX_TYPE>

<TRNX_NO IsInput="true" TYPE="CHAR">content 2</TRNX_NO>

</storedProcedurename>

</ns0:MT_t1>

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

You have created action as "element" in your data type.

Change it to "attribute".

Answers (3)

Answers (3)

pansy_leung
Explorer
0 Kudos

Dear all,

Thanks for your help and now I can submit a stored procedure via SAP XI by using below XML format. I try to define two output parameters at the end of this XML. How to get the return value ? Should I define a response message type ? and what is the XML format ?

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

<ns0:MT_SYN_t1 xmlns:ns0="http://xxx.xxu.hk/zxxxpgs/jdbc">

<update>

<storedProcedurename action="EXECUTE">

<table>LIBRARY.PANSYTEST</table>

<TRNX_TYPE IsInput="TRUE" TYPE="CHAR">4</TRNX_TYPE>

<TRNX_NO IsInput="TRUE" TYPE="CHAR">2</TRNX_NO>

<ACTIN IsInput="TRUE" TYPE="CHAR">23</ACTIN>

<RCRT_DATM IsInput="TRUE" TYPE="CHAR">3</RCRT_DATM>

<RCRT_USER IsInput="TRUE" TYPE="CHAR">8</RCRT_USER>

<STUD_ID IsInput="TRUE" TYPE="CHAR">8</STUD_ID>

<AWD_SEQ IsInput="TRUE" TYPE="CHAR">6899</AWD_SEQ>

<AW_PSDATE IsInput="TRUE" TYPE="CHAR">89</AW_PSDATE>

<AW_PEDATE IsInput="TRUE" TYPE="CHAR">99</AW_PEDATE>

<OUT_TRNX_TYPE IsOutput="TRUE" TYPE="CHAR">4</OUT_TRNX_TYPE>

<OUT_TRNX_NO IsOutput="TRUE" TYPE="CHAR">2</OUT_TRNX_NO>

</storedProcedurename>

</update>

</ns0:MT_SYN_t1>

pansy_leung
Explorer
0 Kudos

Thanks for your info. Is my below change correct ? But I still have the same error

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

<ns0:MT_SYN_t1 xmlns:ns0="http://xxx.xxx.hk/zcssss/jdbc">

<update>

<storedProcedurename>

<action>EXECUTE</action>

<table>LIBRARY.PANSYTEST</table>

<TRNX_TYPE IsInput="TRUE" TYPE="CHAR">rr</TRNX_TYPE>

<TRNX_NO IsInput="TRUE" TYPE="CHAR">rryy</TRNX_NO>

</storedProcedurename>

</update>

</ns0:MT_SYN_t1>

stefan_grube
Active Contributor
0 Kudos

now you have put action as element again instead of attribute.

Former Member
0 Kudos

Just add the attribute "action" to your "storedProcedurename" (Element) in the message structure and this should work fine. The final message should look like this:

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

<ns0:MT_SYN_t1 xmlns:ns0="http://xxx.xxx.hk/zcssss/jdbc">

<update>

<storedProcedurename action="EXECUTE">

<table>LIBRARY.PANSYTEST</table>

<TRNX_TYPE IsInput="TRUE" TYPE="CHAR">rr</TRNX_TYPE>

<TRNX_NO IsInput="TRUE" TYPE="CHAR">rryy</TRNX_NO>

</storedProcedurename>

</update>

</ns0:MT_SYN_t1>

pansy_leung
Explorer
0 Kudos

same error was found even I have change the "action" to "attribute" type

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

<ns0:MT_ZCUPGS2_PG1IAWD2_SYN_t1 xmlns:ns0="http://cuhk.edu.hk/zcusispgs/jdbc">

<storedProcedurename action="EXECUTE">

<table>PGSDEV.PANSYTEST</table>

<TRNX_TYPE IsInput="true" TYPE="CHAR">123</TRNX_TYPE>

<TRNX_NO IsInput="true" TYPE="CHAR">456</TRNX_NO>

</storedProcedurename>

</ns0:MT_ZCUPGS2_PG1IAWD2_SYN_t1>

stefan_grube
Active Contributor
0 Kudos

It should be three levels instead of two:

<ns0:MT_ZCUPGS2_PG1IAWD2_SYN_t1 xmlns:ns0="http://cuhk.edu.hk/zcusispgs/jdbc">

<update>

<storedProcedurename action="EXECUTE">

Edited by: Stefan Grube on Aug 20, 2010 9:44 AM