File Polling Port Input parameter ffData cannot be null

Hi,
I have configured a file polling port. My service which is used to process inbound files, has input variable as ‘ffData’ of datatype object. My service internally invokes “convertToValues” method as first flow step. So I have mapped My Service’s input variable ‘ffData’ to the input variable of service ‘ConvertToValues’ whichi is “ffData”, too.

Now when I put a text file to process in “inbound” directory, file polling port reads the file and puts in “error” directory. I get the error message in server.log file as:

Error Processing Service : “Input parameter ffData cannot be null.”

Can you assist me how to resolve this problem.

Regards,
Nilesh

Try ffData as a String variable as input or just set *Node object(with different name not as ffData) and check in the pipeline.

HTH.

I think that correct variable name has to be ffdata defined as object not ffData. It is pipeline and its case sensetive.
To really test it put savepipelineToFile service at start of your flow service and run your poller again. Next disable or replace this with restorePipelineFromFile builtin service and step through your flow after this service see what is in pipeline. you should see ffdata although this stream object may be invalid now but its just to test if your poller actually got the file and passing data to your flow.

Nilesh,

Are you success in solving this issue??

Nilesh,

Are you success in solving this issue??

Hello, Thank to all of you …RMG and Igor Androsov

The problem is solved by declaring variable as “ffdata” instead of “ffData”.

Thanks again to Igor Androsov .

Regards,
Nilesh

Hello,
I am interested in invoking a service, when a file is ftped to the FTP port of the SAP BC!

I have created a new port for FTP will Allow by default settings
The service has the input parameters ffdata(type String)
The first step of the service is savePipelinetoFile with filename dummy.txt
Using the IP address and port number, I try to FTP a test file into location /ns/<folder>/<service>

Result : The pipeline contains only the filename used for saving the pipeline.

Sample of the pipeline file “dummy.txt”

<?xml>
<idataxmlcoder>
<record>
<value>dummy1.txt</value>
</record>
</idataxmlcoder>

Could somebody help me !

TIA
Bhavani

Hi Nilesh,
when you receive flat file you will be receving in a stream or bytes your convertToValues service accepts bytes as ffdata input.

In case you dont know the inpute encode i will suggest you to perform these steps:

  1. convert *input from stream to bytes using pub.io.streamToBytes
  2. Loop using the REPEAT and called the service convertToValues and mapt the output byes to ffdata and turn iterate to true.
  3. Branch on ffiterator exit $null

Thanks and regards
Satya Mandiga

I think this thread is a way back old thread…Anyways…

your service input should be named as ffdata not ffData…object type …for receiving the flatfiles (flatfile:convertToValues)

HTH,
RMG

“1. convert *input from stream to bytes using pub.io.streamToBytes”

There have been a number of posts talking about “converting” streams to bytes. Strictly speaking, this is not a “conversion” (even though the wM docs refer to it that way too). One reads from a stream to get the bytes–this is an I/O operation. I point this out only to help people realize what a stream really is so they can understand what they can and cannot do with it.

Depending on the service needs, one may not need to read the the entire stream by calling streamToBytes. Indeed, in the steps outlined by Satya above, reading the stream into a byte array is unnecessary. The convertToValues service accepts the ffData input parameter, which can be a String, an InputStream or a ByteArray. Just pass along the ffdata variable to convertToValues and it will work.

This is particularly important to do if the file is considered large and one uses the node iterator services to processes parts of the file at a time. If one reads the entire stream into memory, then you’ve defeated the purpose of using streams and node iteration.

The fun part is that the file polling port puts “ffdata” in the pipeline. And convertToValues accepts “ffData”. One must pay close attention to that character case difference.