...
All eLandings landings reports have one or more fish_ticket_numbers associated. There is one fish_ticket_number per CFEC permit holder on the landing report. Before assigning a fish_ticket_number to a new report, eLandings and all third-party users need to verify that the fish_ticket_numbers that they assign are not already in use. Otherwise, previous report data will be lost and new report data may be corrupted.
For example:
A landing report is created by userid=Bob and the landing report is assigned fish_ticket_number = 1000.
A landing report is created by userid=Joe and the landing report is assigned fish_ticket_number =1000
The header information for the record created by Bob will be replaced by the header information created by Joe. If bob¿s bob"s report had more permit items than Joe, then Joe¿s Joe"s report might contain his line items and Joe¿s Joe"s permit items. Bob will be angry at eLandings and at Joe.
To avoid this situation in eLandings situations or in third-party tools, eLandings provides the means to get and reserve a list of fish_ticket_numbers in such a way than anyone else that asks for an available fish ticket number will not be provided with these reserved numbers. As long as everyone honors this rule, we can avoid collisions and data loss.
We cannot prevent users from illegally re-using a fish_ticket_number. eLandings allows users to save their changes. It is very hard to determine if a change should be labeled illegal reuse or normal user data changes.
This method returns a list of reserved fish ticket numbers as a string in XML format as defined by the XSD definition for number_info object in dataelements.xsd. If errors were encountered while retrieving the landing report in the web service, an empty number_info object will be returned containing a list of messages objects as defined by the dataelements.xsd definition for messages elements.
The getFishTicketNumbers() takes four arguments:
1. String Userid – i.e ¿amarx¿"amarx"
2. String password – i.e. ¿A"A_marx¿marx"
3. String schemaVersionNumber – i.e. ¿2"2.1¿1"
4. String numberOfNumbersRequested - i.e. ¿10¿"10"
5. String reportType – i.e. ¿C¿ or ¿¿ "C" or "" – THIS FIELD¿S FIELD"S DATA HAS NO EFFECT
If we pass in a numberOfNumbersRequested=10, we are asking for 10 new fish_ticket_numbers from the database that have never been used and will be reserved for our use.
There are several reportTypes available for use:
1. ¿C¿ "C" = Crab
2. ¿G¿ "G" = Groundfish
3. ¿B¿ "B" = Salmon
Note: Currently, elandings web service logic does not use the reportType. Any String value passed in will be accepted and discarded. It will have no effect on how the numbers are retrieved or reserved in the database.
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.getFishTicketNumbers(userid, password, schemaVersionNumber, numberOfNumbersRequested, reportType);
Or
String xml = ws.getFishTicketNumbers(¿amarx¿, ¿A_marx¿, ¿2.1¿, ¿10¿, ¿C¿"amarx", "A_marx", "2.1", "10", "C");
If the web service call was successful you might see a string containing something like:
...