15
SOAP and Web Services
DNS Service Discovery
DNS Service Discovery
Suppose the exact URL for a given service is not known, but that it is available locally
because it has been published using
DNS Service Discovery
(DNS-SD). You may use the
SOAP
object’s
queryServices
and
resolveService
methods to locate the service
on the network and bind to it for communications.
The
queryServices
method can locate services that have been registered using
Multicast DNS (mDNS) for location on a local network link, or through unicast DNS for
location within an enterprise. The method performs an asynchronous search, and the
resultant service names can be subsequently bound to a network location or URL through
the
SOAP
object’s
resolveService
method.
The
queryServices
method accepts the following parameters:
●
●
cType
: The DNS SRV service name (such as "http" or "ftp")
oAsync
: A notification object used when services are located or removed (implements
addServices
and
removeServices
methods). The notification methods accept a
parameter containing the following properties:
–
name
: the unicode display name of the service
–
domain
: the DNS domain for the service
–
type
: the DNS SRV service name (identical to
cType
)
●
aDomains
: An array of domains for the query. The valid domains are
ServiceDiscovery.local
(searches the local networking link using mDNS) and
ServiceDiscovery.default
(searches the default DNS domain using unicast
DNS).
256
Acrobat JavaScript Scripting Guide