on 08-25-2017 5:01 PM
Dear SAP PI experts,
I am getting an error message in mapping:
Cannot create target element /ns1:AS500_DT_Person. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
I took the payload from message monitor and put in into the test application in Enterprise Service Builder. My Mapping looks like here:
The data comes from a JDBC connector and the data type is ZUCC_DATA_CNTCTN.resultSet. The target message type is AS500_DT_Person. When I delete the connection between the root elements at the tree in the mapping, the error will not show up but the target XML is empty, no data will be transferred.
What might be the root cause?
Thanks,
André
Hi Andre!
Please provide your JDBC response message payload.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Evgeniy,
for now I have changed the select statement, so that only one entry is in the resultSet.
Thanks for any hints in advance,
André
<?xmlversion="1.0" encoding="UTF-8"?><ZUCC_DATA_CNTCTN.resultSet><row><ID>2</ID><NAME_FIRST>Netis</NAME_FIRST><NAME_LAST>Witchard</NAME_LAST><TITLE_FT/><COUNTRY_FT>Germany</COUNTRY_FT><CITY1>Claußnitz</CITY1><POSTCODE>9236</POSTCODE><REGION>Sachsen</REGION><STREET>Am Anger</STREET><HOUSE_NUM1>3</HOUSE_NUM1><GENDER_FT>m</GENDER_FT><CONSUMER_ACCOUNT_ID/><COMPANY_NAME/><COMPANY_ID_ORIGIN/><PAFKT_FT/><SMTP_ADDR>Netis.Witchard@</SMTP_ADDR><OPT_IN_SMPTP_ADDR>Y</OPT_IN_SMPTP_ADDR><TELNR_LONG/><OPT_IN_TELNR_LONG/><TELNR_MOBILE>0049-575343457</TELNR_MOBILE><OPT_IN_TELNR_MOBILE>Y</OPT_IN_TELNR_MOBILE><OPT_IN_TELNR_MOBILE_SMS/><DATE_OF_BIRTH>1945.09.26</DATE_OF_BIRTH><ID_TW>Netis_Witchard_1</ID_TW><OPT_IN_TW/><ID_FB>Netis_Witchard_2</ID_FB><TIMESSTAMP>20170814132904</TIMESSTAMP><LATITUDE>50.936278</LATITUDE><LONGITUDE>12.883239</LONGITUDE></row></ZUCC_DATA_CNTCTN.resultSet>
Hi Andre,
What happens when you put this xml in test tab of the mapping is it green or red in the given xml i dont see any namespace have you removed the namespace in message type too. OR try to give message type namespace in channel level and check with that new xml.
if its red then the expected xml in mapping and the xml generated by channel is different suggest you to cross check these xml's again.
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andre,
Please do not map AS500_DT_Person target root field.
Warm Regards,
Rudra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andre!
Just a thought: as far as I remember, if you use JDBC sender adapter, message structure should look like:
Message_type
resultset
row...
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Evgeniy,
for now I have changed the select statement, so that only one entry is in the resultSet.
Thanks for any hints in advance,
André
<?xml version="1.0" encoding="UTF-8"?>
<ZUCC_DATA_CNTCTN.resultSet>
<row>
<ID>2</ID>
<NAME_FIRST>Netis</NAME_FIRST>
<NAME_LAST>Witchard</NAME_LAST>
<TITLE_FT/>
<COUNTRY_FT>Germany</COUNTRY_FT>
<CITY1>Claußnitz</CITY1>
<POSTCODE>9236</POSTCODE>
<REGION>Sachsen</REGION>
<STREET>Am Anger</STREET>
<HOUSE_NUM1>3</HOUSE_NUM1>
<GENDER_FT>m</GENDER_FT>
<CONSUMER_ACCOUNT_ID/>
<COMPANY_NAME/>
<COMPANY_ID_ORIGIN/>
<PAFKT_FT/>
<SMTP_ADDR>Netis.Witchard@</SMTP_ADDR>
<OPT_IN_SMPTP_ADDR>Y</OPT_IN_SMPTP_ADDR>
<TELNR_LONG/>
<OPT_IN_TELNR_LONG/>
<TELNR_MOBILE>0049-575343457</TELNR_MOBILE>
<OPT_IN_TELNR_MOBILE>Y</OPT_IN_TELNR_MOBILE>
<OPT_IN_TELNR_MOBILE_SMS/><DATE_OF_BIRTH>1945.09.26</DATE_OF_BIRTH>
<ID_TW>Netis_Witchard_1</ID_TW>
<OPT_IN_TW/>
<ID_FB>Netis_Witchard_2</ID_FB>
<TIMESSTAMP> 20170814132904</TIMESSTAMP>
<LATITUDE>50.936278</LATITUDE>
<LONGITUDE>12.883239</LONGITUDE>
</row>
</ZUCC_DATA_CNTCTN.resultSet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.