on 10-16-2007 3:59 PM
Hi all,
I have a JDBC to File scenario. When trying to send a message the data is correctly read from the database but not output file is generated in the receiver.
I checked the monitor and there is an error when the mapping is happening:
Cannot produce target element /ns1:msgT_createBusinessPartner/externalBusinessPartnerID. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
I have tested the mapping in the design area and it works fine. So I wonder if this have something to do with the format of the datatype I created for the sender? Should it match exactly the format of the xml message generated by the jdbc adapter?
The payload generated by the jdbc adapter has the following format:
<resulset_1>
<row>
<EXTERNALPERSONID>00001</EXTERNALPERSOND>
<NAME>Test</NAME>
...
</row>
</resulset_1>
I created a new datatype with the same format, but I'm still having the same error.
Please help.
Thanks in advance,
Jon
Hey
please test ur message mapping as shown in the following blog
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have tested it as explained in the blog, and I'm getting the same error.
Comparing to the test xml generated, I can see that my payload does not have the following format for the main tag:
<ns0:resultset_1 xmlns:ns0="http://curam.com/prototype">
...
</ns0:resultset_1>
Instead it has this:
<resulset_1>
...
</resulset_1>
This main tag can be set in the configuration of the JDBC Adapter, should I change it there?
Thanks Aamir,
I removed the namespace in the mapping as explained in the blog, the payload now matches the format of the datatype. When I copy it to the test the fields are populated correctly and are green
However when I run the test I'm still getting the error "Cannot produce target element".
I'm even getting the error when I use the generated test data.
Why is this happening?
I don't know if it has something to do but I changed all data type's field names to uppercase, cause the payload has them in uppercase as well.
Thanks for your help.
Message was edited by:
Jon Igual
Hey
you get "Cannot produce target element" if some mandatory field has not been mapped(this includes the node fields as well) so please make sure that all the fileds including nodes of the receiver have been mapped correctly.
second cause can be that the XML itself is not well formed,please paste the XML structure here via which you are testing the mapping
Thanx
Aamir
Hey Jon,
It could be that, when you are picking the data from the database, there could be some empty rows, but where as in your source structure the fields could be mandatory.
In such case a mapping error will be thrown.so the for the data again, or else if you can get the complete source xml try testing it in message mapping, it will show the exact line where its cribbing, try to debug and fix. If you need any help get back to us.
I Hope this help should solve your issue.
reward if useful
thanks,
Younus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jon
In order to investigate this please do the following:
Put the message payload from the SXMB_MONI in the message mapping Test and run to see if you still get the error. If yes, then its a mapping related problem. If no, then cash refresh is required.
regards
vijendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vijendra,
I have put the payload message in the mapping test and it is failing with the same error message, so it is definitely a mapping problem.
When I paste the payload the datatype's fields are populated with the values, but the circle in their left (before in green) is red, as if they weren't populated.
Thanks.
Message was edited by:
Jon Igual
Hi,
>>I have put the payload message in the mapping test and it is failing with the same error message, so it is definitely a mapping problem.
Do not paste as it is Payload..It will throw error. In Sxmb_Moni selete the message and go to the Pay load and select all and right click go for view source and paster it in Message Mapping test and execute it and check it out
Regards
Agasthuri Doss
Hi Jon,
If you done the mapping perfectly, some times the fields which are having the occurence 1..1 does not get the values due to validations mentioned or lack of data. Test your mapping once and check the display queue for fields which are having the occurence 1..1
Hope it will helps ..:)
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>So I wonder if this have something to do with the format of the datatype I created for the sender? Should it match exactly the format of the xml message generated by the jdbc adapter?
F7 is to check whether the Mapping is fine that is whether you have mapped the source and target and Mandatory filelds like that...
We have to make sure that incoming Data meets the requiremnt of our Mapping only then it will pass.
Should it match exactly the format of the xml message generated by the jdbc adapter?
YES
Regards
Agasthuri Doss
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.