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

Function createSkelSoapMessage

wsdiscovery/util.py:20–39  ·  view source on GitHub ↗
(soapAction)

Source from the content-addressed store, hash-verified

18
19
20def createSkelSoapMessage(soapAction):
21 doc = minidom.Document()
22
23 envEl = doc.createElementNS(NS_SOAPENV, "s:Envelope")
24
25 envEl.setAttribute("xmlns:a", NS_ADDRESSING) # minidom does not insert this automatically
26 envEl.setAttribute("xmlns:d", NS_DISCOVERY)
27 envEl.setAttribute("xmlns:s", NS_SOAPENV)
28
29 doc.appendChild(envEl)
30
31 headerEl = doc.createElementNS(NS_SOAPENV, "s:Header")
32 envEl.appendChild(headerEl)
33
34 addElementWithText(doc, headerEl, "a:Action", NS_ADDRESSING, soapAction)
35
36 bodyEl = doc.createElementNS(NS_SOAPENV, "s:Body")
37 envEl.appendChild(bodyEl)
38
39 return doc
40
41
42def addElementWithText(doc, parent, name, ns, value):

Callers 6

createByeMessageFunction · 0.85
createResolveMessageFunction · 0.85
createProbeMatchMessageFunction · 0.85
createHelloMessageFunction · 0.85
createProbeMessageFunction · 0.85

Calls 1

addElementWithTextFunction · 0.85

Tested by

no test coverage detected