Let's assume that a GEMSS Registry Service is deployed and running on the following address:
http://localhost:9075/gemss/services/registry/reg?wsdl
and the user wants to publish some running GEMSS Application Services to the above mentioned GEMSS Registry Service:
For each service the user has to create a attributes file that describes the characteristics of the service. For example:
SERVICE 1 - SPECT: SPECT .attributes
serviceCategory=SPECT provider=ISS
memory = 2
SERVICE 2 - QUARTS: QUARTS.attributes
serviceCategory=QUARTS provider=ISS
memory = 5
SERVICE 3 - HelloWorld: HelloWorld.attributes
serviceCategory=HelloWorld memory=10
The next step is the publishing of the specified services. For this purpose the user can use the registry tool that is included in the GEMSS Registry Service distribution. As explained in section Using the registry tool the user has to execute the following registry tool commands:
java -jar tool/registry-tool.jar -d http://localhost:9075/gemss/services/registry/reg?wsdl -r https://bridge.vcpc.univie.ac.at/gemss/services/SPECT/appex?wsdl -attrfile SPECT.attributes
java -jar tool/registry-tool.jar -d http://localhost:9075/gemss/services/registry/reg?wsdl -r https://bridge.vcpc.univie.ac.at/gemss/services/QUARTS/appex?wsdl -attrfile QUARTS.attributes
java -jar tool/registry-tool.jar -d http://localhost:9075/gemss/services/registry/reg?wsdl -r https://bridge.vcpc.univie.ac.at/gemss/services/HelloWorld/appex?wsdl -attrfile HelloWorld.attributes
As result the below specified services are published in the GEMSS Registry Service:
GEMSS Registry Service @ ISSSPECT https://bridge.vcpc.univie.ac.at/gemss/services/SPECT/appex?wsdl serviceCategory = SPECT provider = ISS memory = 2 QUARTS https://bridge.vcpc.univie.ac.at/gemss/services/QUARTS/appex?wsdl serviceCategory = QUARTS provider = ISS memory = 5 HelloWorld https://bridge.vcpc.univie.ac.at/gemss/services/HelloWorld/appex?wsdl serviceCategory = HelloWorld memory = 10
Based on these published GEMSS Application Services (SPECT, QUARTS, HelloWorld), the user may invoke different queries to the GEMSS Registry Service in order to find one or more appropriate GEMSS Application Services. Therefore the user may utilize the GEMSS Discovery Component. The following queries are supported:
Query 1
query attributes query results[0]: serviceCategory = SPECT 1.SPECT The following Java code illustrates how to create and invoke a such query (without considering the concrete usage of the GEMSS Discovery component):
Attribute queryAttributes[] = new Attribute[1];
queryAttributes[0] = new Attribute(“serviceCategory”, “SPECT”);
ServiceDescription[] serviceDesc = registry.query(queryAttributes);The result of this query will be only the description of the SPECT service, because neither the QUARTS, nor the HelloWorld service match exactly the search criteria.
Query 2
query attributes query results[0]: provider = ISS 1.SPECT 2.QUARTS This query returns the SPECT and the QUARTS service, because both services have an attribute with the name provider and the value ISS.
query attributes query results[0]: serviceCategory = null 1.SPECT 2.QUARTS 3.HelloWorld The client specifies only the name of an attribute (e.g. serviceCategory ). The value of this attribute is null. This query will return all three published services.
This type of query will return all GEMSS Application Services that are published in the GEMSS Registry Service. In a match all query a client invokes the query method without any parameters by setting the array of attributes to null.
query attributes query results null1.SPECT 2.QUARTS 3.HelloWorld
Query 1
query attributes query results[0]: provider = ISS
[1]: MIN_memory = 51.QUARTS The results of this query is the QUARTS service, because the memory attribute is specified as a minimum ( MIN_memory ) and that means that all published GEMSS Application Services that have a memory value greater than 5 will be returned.
Query 2
query attributes query results[0]: provider = ISS
[1]: MAX_memory = 21.SPECT In this example only one GEMSS Application Service will be returned. The search criteria are specified as a maximum ( MAX_memory ), i.e. all GEMSS Application Services with a memory value smaller or equal to 2 are returned.