Bibliography
2. UML specifications
2.4. Protocol implementation
The Discovery sub-package (see Figure 72) contains classes that implement the WS-
Discovery protocol and its extensions. The most important classes in this sub-package are as follows:
The Proxy class implements a registry: this means it is both a regular WS-Discovery proxy and a (trusted) discovery policy enforcement point. Figure 73 describes how the service policy is retrieved and stored with the service description. It also describe the more complex process of client probe request retrieval and processing (matching and discovery policy enforcement).
The GenericClient class is used as a launcher for clients to retrieve information from looked up services (opening a unicast socket to a specified registry, generating and sending probe messages, and handling probe match messages)
Service launchers are provided by classes Server (multicast-able service) and
UnicastServer (unicast case only – necessarily registered with a registry). The use of such a launcher together with the construction of a policy is illustrated by the sequence diagram of Figure 71.
Figure 73: MOSQUITO registry - Service policy retrieval and storage (UML sequence diagram)
3. WSDL interface specification
The discovery mechanism exposes the LAN registry interface to potential clients and services that respectively want to send lookup or registration requests. The corresponding interface description is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://JavaAPI" xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://JavaAPI" xmlns:intf="http://JavaAPI"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
<wsdl:types>
<schema targetNamespace="http://JavaAPI" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOfLookupResponseType"> <complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="impl:LookupResponseType[]"/> </restriction>
</complexContent> </complexType> </schema> </wsdl:types>
<wsdl:message name="PublishRequest">
<wsdl:part name="in0" type="xsd:anyType"/> </wsdl:message>
<wsdl:message name="UnregisterResponse"> </wsdl:message>
<wsdl:message name="LookupResponse">
<wsdl:part name="LookupReturn" type="impl:ArrayOfLookupResponseType"/> </wsdl:message>
<wsdl:message name="UnregisterRequest">
<wsdl:part name="in0" type="impl:serviceID"/> </wsdl:message>
<wsdl:message name="LookupResponse1">
<wsdl:part name="LookupReturn" type="impl:ArrayOfLookupResponseType"/> </wsdl:message>
<wsdl:message name="LookupRequest1">
<wsdl:part name="in0" type="impl:ServiceProfile"/> </wsdl:message>
<wsdl:message name="LookupRequest">
<wsdl:part name="in0" type="xsd:anyType"/> <wsdl:part name="in1" type="soapenc:string"/> </wsdl:message>
<wsdl:message name="PublishResponse">
<wsdl:part name="PublishReturn" type="xsd:anyType"/> </wsdl:message>
<wsdl:portType name="Discovery">
<wsdl:operation name="Publish" parameterOrder="in0">
<wsdl:input message="impl:PublishRequest" name="PublishRequest"/> <wsdl:output message="impl:PublishResponse" name="PublishResponse"/> </wsdl:operation>
<wsdl:operation name="Unregister" parameterOrder="in0">
<wsdl:input message="impl:UnregisterRequest" name="UnregisterRequest"/> <wsdl:output message="impl:UnregisterResponse" name="UnregisterResponse"/> </wsdl:operation>
<wsdl:operation name="Lookup" parameterOrder="in0 in1">
<wsdl:input message="impl:LookupRequest" name="LookupRequest"/> <wsdl:output message="impl:LookupResponse" name="LookupResponse"/> </wsdl:operation>
<wsdl:operation name="Lookup" parameterOrder="in0">
<wsdl:input message="impl:LookupRequest1" name="LookupRequest1"/> <wsdl:output message="impl:LookupResponse1" name="LookupResponse1"/> </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="mosquitoSoapBinding" type="impl:Discovery">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="Publish">
<wsdlsoap:operation soapAction=""/> <wsdl:input name="PublishRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:input>
<wsdl:output name="PublishResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:output>
</wsdl:operation>
<wsdl:operation name="Unregister"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="UnregisterRequest">
namespace="http://JavaAPI" use="encoded"/> </wsdl:input>
<wsdl:output name="UnregisterResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:output>
</wsdl:operation>
<wsdl:operation name="Lookup">
<wsdlsoap:operation soapAction=""/> <wsdl:input name="LookupRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:input>
<wsdl:output name="LookupResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:output>
</wsdl:operation>
<wsdl:operation name="Lookup">
<wsdlsoap:operation soapAction=""/> <wsdl:input name="LookupRequest1">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:input>
<wsdl:output name="LookupResponse1">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://JavaAPI" use="encoded"/> </wsdl:output>
</wsdl:operation> </wsdl:binding>
<wsdl:service name="DiscoveryService">
<wsdl:port binding="impl:mosquitoSoapBinding" name="mosquito"> <wsdlsoap:address location="http://localhost:8080/mosquito"/> </wsdl:port>
</wsdl:service> </wsdl:definitions>