Application Level Events (ALE) User's Guide

From RifidiWiki

Revision as of 20:53, 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)

unsubscribe(String specName, String notificationUri)

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)

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)

getStandardVersion()

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