on 08-20-2010 7:52 AM
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>
You have created action as "element" in your data type.
Change it to "attribute".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.