MCPcopy Create free account
hub / github.com/andreikop/python-ws-discovery / constructProbeMatch

Function constructProbeMatch

wsdiscovery/actions/probematch.py:14–31  ·  view source on GitHub ↗

construct an envelope that represents a ``Probe Match`` message

(services, relatesTo)

Source from the content-addressed store, hash-verified

12
13
14def constructProbeMatch(services, relatesTo):
15 "construct an envelope that represents a ``Probe Match`` message"
16
17 env = SoapEnvelope()
18 env.setAction(NS_ACTION_PROBE_MATCH)
19 env.setTo(NS_ADDRESS_UNKNOWN)
20 env.setMessageId(uuid.uuid4().urn)
21 random.seed((int)(time.time() * 1000000))
22 env.setInstanceId(_generateInstanceId())
23 env.setMessageNumber("1")
24 env.setRelatesTo(relatesTo)
25
26 prbs = env.getProbeResolveMatches()
27 for srv in services:
28 prb = ProbeResolveMatch(srv.getEPR(), srv.getTypes(), srv.getScopes(), \
29 srv.getXAddrs(), str(srv.getMetadataVersion()))
30 prbs.append(prb)
31 return env
32
33
34def createProbeMatchMessage(env):

Callers 1

_sendProbeMatchMethod · 0.85

Calls 15

setActionMethod · 0.95
setToMethod · 0.95
setMessageIdMethod · 0.95
setInstanceIdMethod · 0.95
setMessageNumberMethod · 0.95
setRelatesToMethod · 0.95
SoapEnvelopeClass · 0.85
_generateInstanceIdFunction · 0.85
ProbeResolveMatchClass · 0.85
getEPRMethod · 0.45
getTypesMethod · 0.45

Tested by

no test coverage detected