<publish name="position" id="1" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish>The declaration of the content of the Service itself (the datas associated with the Service) depends on the Service type.
namespace
element as a parent of the services declaration[4]
<services> <namespace uri="http://mydomain.com/aircraft" > <publish name="position" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> <publish name="speed" > <data name="speedNorth" type="float" /> <data name="speedEast" type="float" /> <data name="speedDown" type="float" /> </publish> </namespace> </services>Note that services of a specified namespace can access types of the same namespace, or types with no namespace declaration.
invocationMode
attribute in the service definition:executorService
value, the framework will perform the invocation in a background Threadblocking
value, the framework will perform the invocation in the same Thread as the caller[5]
<publish name="position" invocationMode="blocking" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish>
position
Service, you don't declare directly with the Service:position
but have modules subscribing to it, which means that they will never be notified of a position
publication. Or we can have a provider but have no subscribers, which means that if the provider invokes the Service, no module will be notifiedFlightManagementSystem
module:position
publish servicedirectTo
event servicecomputeFlightPlan
request-response service<module name="FlightManagementSystem" id="1" > <interfaces> <subscribe service="position" /> <eventReceived service="directTo"/> <requestReceived service="computeFlightPlan"/> </interfaces> </module>
<module name="FlightManagementSystem" id="1" > <interfaces> <subscribe service="position" uri="http://mydomain.com/aircraft" /> <eventReceived service="directTo"/> <requestReceived service="computeFlightPlan"/> </interfaces> </module>
<services> <publish name="position" id="1" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> </services>With namespaces:
<services> <namespace uri="http://mydomain.com" > <publish name="position" id="1" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> </namespace> </services>
position
but have modules subscribing to it, which means that they will never be notified of a position
publication. Or we can have a provider but have no subscribers, which means that if the provider invokes the Service, no module will be notifiedCopyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence