FTP edi document

I am trying to ftp an edi document from one B2B server to another. The service in the receiving B2B starts with envelopeProcess() accepting edidata. The receiving end reports an exception: 0004EF [B2BUNKW.EDIUTI.9999] Input ‘edidata’ must not be null [EDICOR.000010.000620].

Obviously that the receiving B2B’s ContentHandler hasn’t parsed incoming EDI to edidata although I have specified Content-type to be application/EDIstream. And the exactly same logic is working for a http submitting. Please help!!!