on 03-01-2006 9:06 AM
Hi,
I have a problem in the file-idoc scenario. The input file is a text file.
During testing of the mapping, direct filling of the values in the fields provided, i dont have any issues.
During execution of the file, the file is read and it is also deleted. So the file adapter seems to be working fine. But I am getting some problem in the message mapping. Following is the error:
"Cannot produce target element /ZMREPT02. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"
I saved the xml file that is available in the payload of the runtime monitor. Following is the same:
<?xml version="1.0" encoding="utf-8" ?>
- <ns:Employee_Monthly_OB_09 xmlns:ns="urn:yash-com:training:09">
- <ns:MonthlyDet xmlns:ns="urn:yash-com:training:09">
- <Z1EMHDR>
<SSN>1290</SSN>
<LNAME>suraj</LNAME>
<FNAME>kumar</FNAME>
<DOB>09-07-1974</DOB>
</Z1EMHDR>
- <Z1WKDET>
<WEEKNO>1</WEEKNO>
<TOTHOURS>40</TOTHOURS>
<HRLYRATE>25</HRLYRATE>
</Z1WKDET>
- <Z1CLDET>
<CLSITE>yash</CLSITE>
<WORKDESC>developer</WORKDESC>
</Z1CLDET>
- <Z1SUMRY>
<TOTHOURS>40</TOTHOURS>
<TOTAMOUNT>25</TOTAMOUNT>
</Z1SUMRY>
</ns:MonthlyDet>
</ns:Employee_Monthly_OB_09>
Following is the xml file generated in the test mapping, when values are filled directly in the fields:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns:Employee_Monthly_OB_MT_09 xmlns:ns="urn:yash-com:training:09">
- <MonthlyDet>
<Z1EMHDR SSN="1290" LNAME="Suraj" FNAME="Kumar" DOB="" />
<Z1WKDET WEEKNO="1" TOTHOURS="40" HRLYRATE="26" />
<Z1CLDET CLSITE="yash" WORKDESC="developer" />
<Z1SUMRY TOTHOURS="40" TOTAMOUNT="25" />
</MonthlyDet>
</ns:Employee_Monthly_OB_MT_09>
Could anyone please let me know the problem?
Thanks in anticipation.
Hi,
have a look at my weblog on how to test your mapping:
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
then you'll be able to correct the mapping
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<i>"Cannot produce target element /ZMREPT02. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"
</i>
But in your xml i donot see this <b>/ZMREPT02</b>, is that a segment??, also your file is getting deleted, but have you checked the content conversion, if it is correct at runtime, from moni??
Regards,
Anirban.
Hi,
Some more pointers, almost every common mistakes have been discussed but still you may try these,
1. open your source xml file in a browser and see if its wellformed.
2. open message type, goto edit mode, just below data type used you see a field xml namespace, remove that, save and activate, retest.
3. check the namespace in each object of configuration and see the receiver determination, if correct mapping is called.
Regards,
Anirban.
Hi Nikhil,
I think the XML posted by you were for the source side...
In the following XML (available in payload of the runtime monitor)
<?xml version="1.0" encoding="utf-8" ?>
- <ns:Employee_Monthly_OB_09 xmlns:ns="urn:yash-com:training:09">
- <ns:MonthlyDet xmlns:ns="urn:yash-com:training:09">
- <Z1EMHDR>
<SSN>1290</SSN>
<LNAME>suraj</LNAME>
<FNAME>kumar</FNAME>
<DOB>09-07-1974</DOB>
</Z1EMHDR>
- <Z1WKDET>
<WEEKNO>1</WEEKNO>
<TOTHOURS>40</TOTHOURS>
<HRLYRATE>25</HRLYRATE>
</Z1WKDET>
- <Z1CLDET>
<CLSITE>yash</CLSITE>
<WORKDESC>developer</WORKDESC>
</Z1CLDET>
- <Z1SUMRY>
<TOTHOURS>40</TOTHOURS>
<TOTAMOUNT>25</TOTAMOUNT>
</Z1SUMRY>
</ns:MonthlyDet>
</ns:Employee_Monthly_OB_09>
Each <SSN>, <LNAME>, etc are <b>sub elements</b> of <Z1EMHDR>
But in this XML where values were filled directly in the fields
<?xml version="1.0" encoding="UTF-8" ?>
- <ns:Employee_Monthly_OB_MT_09 xmlns:ns="urn:yash-com:training:09">
- <MonthlyDet>
<Z1EMHDR SSN="1290" LNAME="Suraj" FNAME="Kumar" DOB="" />
<Z1WKDET WEEKNO="1" TOTHOURS="40" HRLYRATE="26" />
<Z1CLDET CLSITE="yash" WORKDESC="developer" />
<Z1SUMRY TOTHOURS="40" TOTAMOUNT="25" />
</MonthlyDet>
</ns:Employee_Monthly_OB_MT_09>
They are all <b>attributes</b>....
Can you specify your source DT.
Regards
Suraj
Message was edited by: S.R. Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.