Description
Attempting to upload SIS feed file via CURL causes error message.
Steps to Replicate
Log in as Administrator
Create SIS integration
Create SIS feed file
Attempt to upload feed file via CURL.
Expected Behavior:
Feed file uploads and integration performed.
Observed Behavior:
Jun 28, 2016 01:35:56 PM - Error while parsing Snapshot Feed File - java.lang.NullPointerException
at blackboard.dataintegration.flatfile.parser.FlatFileParser.parse(FlatFileParser.java:112)
at blackboard.dataintegration.flatfile.queue.FlatFileMessageQueueHandler.onMessage(FlatFileMessageQueueHandler.java:179)
at blackboard.platform.messagequeue.impl.activemq.ActiveMQMessageQueueConsumer$ConsumerThread.run(ActiveMQMessageQueueConsumer.java:189)
Target Release
Will Not Fix
Information
There's two problems with the curl command.
1. If you don't set the content-type using the -H flag, curl uploads the file as "Content-Type: application/x-www-form-urlencoded" which is the cause of the error you see. To fix that add this to the command:
-H "Content-Type:text/plain"
2. The data binary flag needs an @ symbol to tell it to find and upload the file specified, otherwise it assumes the string that follows is what you want uploaded. When Bb gets a POST that only contains the string "temp_test_courses_snapshot", it will throw an error saying your feed doesn't have the required headers.
Here is an example of a qualified curl command:
curl -k -u f5d3098b-7edd-4a2d-aec4-0bdf16091ea2:wackawacka -H "Content-Type:text/plain" --url https://abcsaas.blackboard.com/webapps/bb-data-integration-flatfile-BB57599c24afc52/endpoint/course/store --data-bin @temp_test_courses_snapshot
