cancel
Showing results for 
Search instead for 
Did you mean: 

empty pay load is generated with just a root element

Former Member
0 Kudos

hi

I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Example of such a payload generated from mapping is as follows: <?xml version="1.0" encoding="UTF-8"?> <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>

if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory.But the problem is a variable is declared in the communication channel which is picking the value from the pay load . So as empty pay load is getting generated the communicationn channel is failing as there is no field to pick

So please can any one help me out in solving this problem as some time full pay load is getting generated then the communication channel is showing succesfull and when the pay load is empty the communication channel is showing failure why message mapping is generating full pay load some times and empty pay load some time can it be said due to the thread load or any other thing

thanks and regards

sandeep

Accepted Solutions (0)

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

It looks like there is some problem in the mapping between the source and the target.

use this blog to test your mapping,

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

nisarkhan_n
Active Contributor
0 Kudos

what i suggest is to put an condition at the root level check the value of any field if stirng comapre it with Empty if true dnt send the data to root node......and in the file adater let the option ignore empty records be present....

use if then check the vlaue of any input filed which is mandt to null if not null then map the output of the ifthen to the target rootnode....

Former Member
0 Kudos

hi nisar

There are two message mappings of the same kind which are generating same empty payload with just a header and the 2 message mapping's has same message type as target message could you help me out with this .Can you find out where would have been the error occured

Thanks and Regards

Sandeep Pendyala

nisarkhan_n
Active Contributor
0 Kudos

what i suggest is goto the SXMB_MONI and check the request message mapping step there,,,,,just check the data before this step and after this step...if u are getting the output (Empty in payload) copy yhe sender XML and paste in the MAppning test, i belive this should be empty when you do this......

i think check for the occurence of the reciver data type fields, also put the condition as i had in my previous reply and let me know

Former Member
0 Kudos

ya i tried/tested what you said and it was empty with just an root element so is there any possiblity to even avoid the rootelement to be at the target side ( no transfer has to be done if there is an empty pay load by using java mapping

thanks and regards

sandeep

pendyala SANDEEP