MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / send

Method send

suds/client.py:625–665  ·  view source on GitHub ↗

Send soap message. @param soapenv: A soap envelope to send. @type soapenv: L{Document} @return: The reply to the sent message. @rtype: I{builtin} or I{subclass of} L{Object}

(self, soapenv)

Source from the content-addressed store, hash-verified

623 return result
624
625 def send(self, soapenv):
626 """
627 Send soap message.
628 @param soapenv: A soap envelope to send.
629 @type soapenv: L{Document}
630 @return: The reply to the sent message.
631 @rtype: I{builtin} or I{subclass of} L{Object}
632 """
633 result = None
634 location = self.location()
635 binding = self.method.binding.input
636 transport = self.options.transport
637 retxml = self.options.retxml
638 prettyxml = self.options.prettyxml
639 log.debug('sending to (%s)\nmessage:\n%s', location, soapenv)
640 try:
641 self.last_sent(soapenv)
642 plugins = PluginContainer(self.options.plugins)
643 plugins.message.marshalled(envelope=soapenv.root())
644 if prettyxml:
645 soapenv = soapenv.str()
646 else:
647 soapenv = soapenv.plain()
648 soapenv = soapenv.encode('utf-8')
649 plugins.message.sending(envelope=soapenv)
650 request = Request(location, soapenv)
651 request.headers = self.headers()
652 reply = transport.send(request)
653 ctx = plugins.message.received(reply=reply.message)
654 reply.message = ctx.reply
655 if retxml:
656 result = reply.message
657 else:
658 result = self.succeeded(binding, reply.message)
659 except TransportError as e:
660 if e.httpcode in (202, 204):
661 result = None
662 else:
663 log.error(self.last_sent())
664 result = self.failed(binding, e)
665 return result
666
667 def headers(self):
668 """

Callers 4

invokeMethod · 0.95
jquery.jsFile · 0.45
learnpython.jsFile · 0.45
invokeMethod · 0.45

Calls 14

locationMethod · 0.95
last_sentMethod · 0.95
headersMethod · 0.95
succeededMethod · 0.95
failedMethod · 0.95
PluginContainerClass · 0.90
RequestClass · 0.90
marshalledMethod · 0.80
sendingMethod · 0.80
receivedMethod · 0.80
rootMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected