Hi, so i just learned Webmethods currently, i really want to know, is it possible to read a file from file polling and then validate the content of the file?? If it’s possible, could you guide me to do that?
File pollers are IS admin configurations used to identify if an expected file appears in directory
Once file is found by file pollers, it will invoke a service
You can code this service to read file (getFile Service) and read as bytes or stream based on size of file.
You can write Schemas and validate structure during parsing.
I’ve created the file polling and running a manual service to insert value inside the files to DB now can i automate it? if yes, how? Automate means like when i put file, the file will insert to DB without running the service
Assuming that you create the File Polling Port by hand from the UI, you have to specify the processing service.
Once the port finds something in the Monitoring directory, it will execute the processing service.
as pointed out above:
when you already have the processing service for the file polling port available to read in the file and validate it as well as the service for inserting into DB you can just add an invocation of the insert service at the end of the processing service.
So, when the file arrives, it will be read in, validated and then handed over to the inserting service.