Application Level Events (ALE) User's Guide

From RifidiWiki

Revision as of 21:05, 1 February 2016 by Manuel transcends (Talk | contribs)

Jump to: navigation, search

Note: Leverage similar approach to REST - below is just my thoughts - open to other ways to approach

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:


Aleservice client.jpg

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

Ale setendpoint.jpg

After this, verify the end point was appropriate set, by calling getEndPoint(), and you should see the endpoint address you set before:

Ale getendpoint.jpg

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

Alelr setendpoint.jpg

After this, verify the end point was appropriate set, by calling getEndPoint(), and you should see the endpoint address you set before:

Alelr getendpoint.jpg

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.

getVendorVersion()

ALELR Operations

getEndpoint()

setEndpoint(String endPointName)

define(String readerName, LRSpec spec)

undefine(String readerName)

update(String readerName, LRSpec spec)

getLogicalReaderNames()

getLRSpec(String readerName)

addReaders(String readerName, String[] readers)

setReaders(String readerName, String[] readers)

removeReaders(String readerName, String[] readers)

setProperties(String readerName, LRProperty[] properties)

getPropertyValue(String readerName, String propertyName)

getStandardVersion()

getVendorVersion()

Example Rifidi App/Client

Personal tools