Difference between revisions of "Application Level Events (ALE) User's Guide"
From RifidiWiki
(→getSubscribers(String specName)) |
(→getStandardVersion()) |
||
Line 165: | Line 165: | ||
==getStandardVersion()== | ==getStandardVersion()== | ||
+ | |||
+ | Returns a string that identifies what version of the specification this implementation of the Reading API complies with. | ||
==getVendorVersion()== | ==getVendorVersion()== |
Revision as of 21:05, 1 February 2016
Note: Leverage similar approach to REST - below is just my thoughts - open to other ways to approach
Contents
- 1 Introduction
- 2 Configuration
- 3 How to Test ALE Operations
- 4 ALE Operations
- 4.1 getEndpoint()
- 4.2 setEndpoint(String endPointName)
- 4.3 define(String specName, String specFilePath)
- 4.4 undefine(String specName)
- 4.5 getECSpec(String specName)
- 4.6 getECSpecNames()
- 4.7 subscribe(String specName, String notificationURI)
- 4.8 unsubscribe(String specName, String notificationURI)
- 4.9 poll(String specName)
- 4.10 immediate(String specFilePath)
- 4.11 getSubscribers(String specName)
- 4.12 getStandardVersion()
- 4.13 getVendorVersion()
- 5 ALELR Operations
- 5.1 getEndpoint()
- 5.2 setEndpoint(String endPointName)
- 5.3 define(String readerName, LRSpec spec)
- 5.4 undefine(String readerName)
- 5.5 update(String readerName, LRSpec spec)
- 5.6 getLogicalReaderNames()
- 5.7 getLRSpec(String readerName)
- 5.8 addReaders(String readerName, String[] readers)
- 5.9 setReaders(String readerName, String[] readers)
- 5.10 removeReaders(String readerName, String[] readers)
- 5.11 setProperties(String readerName, LRProperty[] properties)
- 5.12 getPropertyValue(String readerName, String propertyName)
- 5.13 getStandardVersion()
- 5.14 getVendorVersion()
- 6 Example Rifidi App/Client
Introduction
Configuration
such as JVM args with explanation
How to Test ALE Operations
Set up testing
Execute
1. Start Rifidi server
Start the Rifidi server
2. Start Rifidi emulator
Start the Rifidi emulator, create an LLRP reader type, start it, and then create some Gen2 tags, and drag and drop some of them to emulated reader's antenna
3. Validate ALE and ALELR Web services are running
To validate ALE Web service, go to http://localhost:8112/aleservice?wsdl and you should see the web service definition
To validate ALELR Web service, go to http://localhost:8112/alelrservice?wsdl and you should see the web service definition
If you do not get web service response, make sure you have set required JVM arguments, as described in previous steps
4. Open web client application
Point your web browser to http://localhost:8081/fc-webclient-1.2.0/services/ALEWebClient.jsp and you should see the web application to test ale and alelr web services:
5. Call setEndPoint(String endPointName) for ALE
Call setEndPoint(String endPointName) for ALE: Clic on setEndPoint(String endPointName) link in left ALE panel, then type the url http://localhost:8112/aleservice as the endpoint attribute, then clic Invoke
After this, verify the end point was appropriate set, by calling getEndPoint(), and you should see the endpoint address you set before:
6. Call setEndPoint(String endPointName) for ALELR
Call setEndPoint(String endPointName) for ALELR: Click on setEndPoint(String endPointName) linl in left ALELR panel, then type the url http://localhost:8112/alelrservice as the endpoint attribute, then clic Invoke
After this, verify the end point was appropriate set, by calling getEndPoint(), and you should see the endpoint address you set before:
Validate
ALE Operations
Note: for each operation example request/response/wsdl
getEndpoint()
setEndpoint(String endPointName)
define(String specName, String specFilePath)
Creates a new ECSpec having the name specName
, according to spec
undefine(String specName)
Removes the ECSpec named specName
that was previously created by the define
method
getECSpec(String specName)
Returns the ECSpec
that was provided when the ECSpec named specName
was created by the define
method.
getECSpecNames()
Returns an unordered list of the names of all ECSpecs that are visible to the caller.
subscribe(String specName, String notificationURI)
Adds a subscriber having the specified notificationURI
to the set of current subscribers of the ECSpec named specName
. The notificationURI
parameter both identifies a specific binding of the ALECallback
interface and specifies addressing information meaningful to that binding.
unsubscribe(String specName, String notificationURI)
Removes a subscriber having the specified notificationURI
from the set of current subscribers of the ECSpec named specName
.
poll(String specName)
Requests an activation of the ECSpec named specName
, returning the results from the next event cycle to complete.
After calling poll service, the expected response is an xml like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns3:ECReports specName="ReportGenerator_0_0" date="2016-01-17T21:36:40.966-05:00" ALEID="RIFIDI-ALE604974863" totalMilliseconds="9500" terminationCondition="DURATION" xmlns:ns2="urn:epcglobal:ale:wsdl:1" xmlns:ns3="urn:epcglobal:ale:xsd:1"> <reports> <report reportName="Cycle_1"> <group> <groupList> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> </groupList> </group> </report> </reports> </ns3:ECReports>
immediate(String specFilePath)
Creates an unnamed ECSpec according to spec, and immediately requests its activation.
After calling immediate service, the expected response is an xml like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:ECReports specName="ReportGenerator_0_0" date="2016-01-18T16:32:36.500-05:00" ALEID="RIFIDI-ALE-293181330" totalMilliseconds="9500" terminationCondition="DURATION" xmlns:ns2="urn:epcglobal:ale:xsd:1" xmlns:ns3="urn:epcglobal:ale:wsdl:1"> <reports> <report reportName="Cycle_1"> <group> <groupList> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> <member><epc>300e34d6e51161826493ff7e</epc></member> </groupList> </group> </report> </reports> </ns2:ECReports>
getSubscribers(String specName)
Returns an unordered, possibly empty list of the notification URIs corresponding to each of the current subscribers for the ECSpec named specName
.
getStandardVersion()
Returns a string that identifies what version of the specification this implementation of the Reading API complies with.