...
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. getLandingReportNumbers (userid, password, schemaVersionNumber, numberOfNumbersRequested, reportType);
Or
String xml = ws. getReportNumbers ("amarx", "A_marx", "2.1", "10");
If the web service call was successful you will receive a string containing something like:
Code Block |
---|
Wiki Markup |
{CODE} <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <number_info> <schema_version>2.1</schema_version> <landing_report_id>15397997</landing_report_id> <landing_report_id>15397998</landing_report_id> <landing_report_id>15397999</landing_report_id> <landing_report_id>15398000</landing_report_id> <landing_report_id>15398001</landing_report_id> <landing_report_id>15398002</landing_report_id> <landing_report_id>15398003</landing_report_id> <landing_report_id>15398004</landing_report_id> <landing_report_id>15398005</landing_report_id> <landing_report_id>15398006</landing_report_id> </number_info> {CODE} |
In eLandings, this webservice is called when creating a new Landing Report. For example, if you logged into eLandings as amarx and clicked on the "Salmon Landing Report" button
...
eLandings would call the webservice method and ask for a new Landing Report number to attach to the new landing report. In so doing, eLandings is telling the database not to give this landing report number to anyone else. This preserves the landing report id's uniqueness.
The web page runs the following web service call:
String xml = ws. getReportNumbers ("amarx", "A_marx", "2.1", "1");
The returned XML
Code Block |
---|
Wiki Markup |
{CODE} <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <number_info> <schema_version>2.1</schema_version> <landing_report_id>15404133</landing_report_id> </number_info> {CODE} |
This number will then be assigned to the new landing report number
...