cancel
Showing results for 
Search instead for 
Did you mean: 

File-File

Former Member
0 Kudos

Hello..

I have scenario File- File..

While i'm transfering a file from FTP to FTP..i'm getting the follwing error "09:10:26 Start of test

Cannot produce target element /ns:fileoutput_mt/record/row. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

09:10:26 End of test"

Please let me know what might be the error..

thanks..

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Padma,

check this weblog:

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

this is probably because of your mapping program

Regards,

michal

Former Member
0 Kudos

Thanks for the reply..

I created simple message type as per the web log...

fileinput

record

row

fistname

lastname

and i'm using output message as..

fileoutput

record

row

fistname

lastname

in my message mapping ...row-row,firstname-firstname,lastname-lastname.

I didn't understand what might be the error???

Michel..

I'm not using BPM for this process...when i'm testing in message mappming i'm getting the error..

Cannot produce target element /ns:fileoutput_mt/record/row. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Thanks..

MichalKrawczyk
Active Contributor
0 Kudos

in your data type of your output message

did you set the row "occurance" to 1 to many?

Regards,

michal

Former Member
0 Kudos

Thanks for the reply...

Actually i put only once as occurence initially...but now i canged it to un bounded...but still i'm getting following error in message mapping...

error is..

Messages:

14:06:23 Start of test

Compilation of file_to_file_mm successful

Cannot produce target element /ns:fileoutput_mt/record/row. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

14:06:28 End of test

Please let me know if something went wrong???

Thanks..

Former Member
0 Kudos

Are you sure that your target note 'row' is mapped? If you have identical names in source and target, you can place the cursor on fileinput and file output and then click on the icon (which will map identical fields)..

Former Member
0 Kudos

Source Structure Target Structure

fileinput ==> fileoutput

record ==> record

row ==> row

fistname ==> fistname

lastname ==> lastname

I thing the Row in the Target field is a REQUIRED FILED and if your source structure does not contain the corresponding element then it will fail with that error.

To avoid that you need to use the Exists function with the Source field "row" and make the context of the Row as the top of the structure and I think this will definitely resolve your problem.

Former Member
0 Kudos

Thanks for the reply..

I didn't under stand....To avoid that you need to use the Exists function with the Source field "row" and make the context of the Row as the top of the structure and I think this will definitely resolve your problem.

can u bit clarify me..

Thanks..

Former Member
0 Kudos

Padma,

Take the same example which is being discussed here...

Suppose the field row is optional in your source structure (0..1) and mandatory (1..1) in your target structure.In case the field element row does not appear in your source document(since it is optional in source ) the mapping will fail when you are mapping row in a source to row in target structure (since it is mandatory in the target). To avoid this you can use a Exists function i.e if a particular field does not appear in the source you can map with constant or dummy value to avoid the error "Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd".

Hope this clears your doubt..

Refer this thread for more information on Exists function..

Regards

Anand

Former Member
0 Kudos

Padma

Currently you have the mapping like this

Row ---> Row

Change the Mapping like below

Step 1

row ---Exists -


if/Then / Else ---> Row

Step 2

above the Then , connect to Row. for else connect to a literal

step 3

on source row field right click and change the context to the RootNode.

Sorry in the first place I have missed few points.

Former Member
0 Kudos

Padma, if the above explanation is not clear post your email id, I will send the screen shots.

Former Member
0 Kudos

Hi

Do you really require the mapping?

Because the result of the File Sender Adapter is an xml output and again the Receiver File Adapter creates a file with the same xml output. So , I feel that even if you doesnt mention the mapping the scenario should work properly.

Former Member
0 Kudos

Thanks Karen..

Can you please send me the screens...

vv.padma@gmail.com.

Thanks...

Former Member
0 Kudos

Thanks Karen..

Even though i used exists function...still i'm getting the error...what i noticed in my analysis was...

The below XML was genarated when i'm testing my message mapping..

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

<ns:fileinput_mt xmlns:ns="http://test">

<record>

<row>

<firstname />

<lastname />

<city />

<country />

</row>

</record>

</ns:fileinput_mt>

but in SXMB_MONI...i'm getting error (main document) is....

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

<ns:fileinput xmlns:ns="http://test">

<record>

<row>

<firstname></firstname>

<lastname></lastname>

<city></city>

<country></country>

</row>

</record>

</ns:fileinput>

My question is why there is a differentiation in </ns:fileinput_mt> and </ns:fileinput>....

Thanks...

Former Member
0 Kudos

Padma,

please check your message mapping and inreface mapping, whether they are pointing to correct message types and message interfaces...

Regards

Anand

Former Member
0 Kudos

Padma, are you using file conversion? If you are using file conversion? If you are using file conversion, ensure that you are using the Message type as your document name..

That should fix it..

Download the payload from SXMB_MONI and change the fileinput to FIleInput_mt and test your mapping.. it should work..

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, padma.

First of all, just forget the expression of the message "xsd blah, blah". This is just XI-only-knows message

> Cannot produce target

> element /ns:fileoutput_mt/record/row

Usually, this kinds of error happens because that your input record is incorrect w.r.t the structure(not value!).

i recommend you create first very simple input file which can be generated from Integration Repository's mapping test tool.

Good luck.