saveProductionReport()
Attempts to save a production report in the database. Report Status (un-submitted or final submit) is not changed. The report is validated according to the rules associated with the report status.
eLandings allows users to save a landing report in one of three states. These report status types are:
- 1 = NOT SUBMITTED
- 8 = FINAL REPORT SUBMITTED
- 16 = REPORT DELETED
If a production report is saved with a ReportStatus = 1 (NOT SUBMITTED), the data is stored in a clob in the database. This allows users to save unsubmitted reports in an incomplete or incorrect state. However, unsubmitted reports must be parsable from XML into a production_report object. This is the minimum requirement for an unsubmitted report save. All other report status¿ will trigger the report to be saved in the traditional report tables and columns.
The saveProductionReport() takes four arguments:
- String Userid – i.e "amarx"
- String password – i.e. "A_marx"
- String schemaVersionNumber – i.e. "2.1"
- String productionReportInXmlDataFormat – see below for example of long string
In the web service client we might auto generate a data structure by providing the web service URL. In eLandings we use Java – JAX-WS and generated a structure called ReportManager.
ReportManagement ws;
...
...
String xml = ws. saveProductionReport(userid, password, schemaVersionNumber, productionReportInXmlDataFormat);
Or
saveProductionReport_method_call_example.txt
If the web service call was successful you might see a string containing the production report that you submitted. So you would see something like this:
saveProductionReport_result_on_success.txt
If the web service call was unsuccessful you should receive a string containing XML for an empty production_report structure containing one or more messages documenting errors that were encountered when processing your request. For example if you tried to save a production report with three stat areas defined as such:
- Stat Area = 355401, Percent = 40
- Stat Area = 355430, Percent = 60
- Stat Area = -10, Percent = 30
Clearly a stat area of -10 doesn¿t exist and is illegal. Furthermore the total percentage should add up to 100 rather than 130.
If called the web service with:
saveProductionReport_method_call_with_errors.txt
As a result, when we try to save this production report you might receive something like:
saveProductionReport_result_on_failure.txt
For the list of potential elandings messages see the elandings codes page and click on Message Codes